diff options
author | hardythe1 | 2015-04-07 15:58:05 +0530 |
---|---|---|
committer | hardythe1 | 2015-04-07 15:58:05 +0530 |
commit | 92cca121f959c6616e3da431c1e2d23c4fa5e886 (patch) | |
tree | 205e68d0ce598ac5caca7de839a2934d746cce86 /Engineering_Economics | |
parent | b14c13fcc6bb6d01c468805d612acb353ec168ac (diff) | |
download | Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.gz Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.tar.bz2 Python-Textbook-Companions-92cca121f959c6616e3da431c1e2d23c4fa5e886.zip |
added books
Diffstat (limited to 'Engineering_Economics')
21 files changed, 3916 insertions, 0 deletions
diff --git a/Engineering_Economics/Chapter1.ipynb b/Engineering_Economics/Chapter1.ipynb new file mode 100755 index 00000000..64198a89 --- /dev/null +++ b/Engineering_Economics/Chapter1.ipynb @@ -0,0 +1,83 @@ +{ + "metadata": { + "name": "EE-1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Introduction" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 1.1 Page 10" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of Variable\nFC=2000000.0;#in Rs\nv=100.0;#in Rs\ns=200.0;#in Rs\nQ=60000.0;#in units\n\n#Part a \n# calculation\nBEQ=FC/(s-v);#in units\n\n#result\nprint \"Break even quantity in units : \",round(BEQ,3)\n\n#Part b \n#calculation\nBES=FC*s/(s-v);#in Rs\n\nprint \"Break even sales in Rs. : \",round(BES,3)\n\n#Part c \n#calculation\nCon=s*Q-v*Q;#in Rs\nMos=Q*s-BES;#in Rs\n\n#result\nprint \"Contribution in units : \",round(Con,3)\nprint \"Margin of safety in Rs. : \",round(Mos,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Break even quantity in units : 20000.0\nBreak even sales in Rs. : 4000000.0\nContribution in units : 6000000.0\nMargin of safety in Rs. : 8000000.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 1.2,Page 12" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nFC=25000.0;#in Rs\nv=45000.0;#in Rs\ns=120000.0;#in Rs\n\n#Part a \n#calculation\nCon=s-v;#in Rs\n\n#result\nprint \"Contribution in Rs \",round(Con,3)\n\n#Part b \n#calculation\nProf=Con-FC;#in Rs\n\n#result\nprint \"Profit in Rs \",round(Prof,3);\n\n#Part c \n#calculation\nPVratio=Con*100.0/s;#in %\nBEP=FC*100.0/PVratio;#in Rs\n\n#result\nprint \"BEP in Rs \", round(BEP,3)\n\n#Part d \n#calculoation\nMS=Prof*100/PVratio;#in Rs\n\n#result\nprint\"M.S. in Rs \", round(MS,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Contribution in Rs 75000.0\nProfit in Rs 50000.0\nBEP in Rs 40000.0\nM.S. in Rs 80000.0\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 1.3 Page 13" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\nFC=15000.0;#in Rs\nv=35000.0;#in Rs\ns=80000.0;#in Rs\n\n#Part a \n#calculation\nCon=s-v;#in Rs\n\n#result\nprint \"Contribution in Rs\", round(Con,3);\n\n#Part b \n#calcualtion\nProf=Con-FC;#in Rs\n\n#result\nprint \"Profit in Rs \", round(Prof,3)\n\n#Part c \n#calculation\nPVratio=Con*100/s;\nBEP=FC*100/PVratio;#in Rs\n\n#result\nprint \"BEP in Rs \",round(BEP,3)\n\n#Part d \n#calculation\nMS=Prof*100/PVratio;#in Rs\n\nprint \"M.S. in Rs\",round(MS,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Contribution in Rs 45000.0\nProfit in Rs 30000.0\nBEP in Rs 26666.667\nM.S. in Rs 53333.333\n" + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter10.ipynb b/Engineering_Economics/Chapter10.ipynb new file mode 100755 index 00000000..bc34bb84 --- /dev/null +++ b/Engineering_Economics/Chapter10.ipynb @@ -0,0 +1,357 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:28b0077be1a0d41b0cc471c0e34331f1edde6c138991b53632e2c3b3cb0de57c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Evaluation of Public Alternatives"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1 Page 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "Ii=4000000.0;#in Rs.\n",
+ "AM=150000.0;#in Rs.\n",
+ "AFS=600000.0;#in Rs.\n",
+ "Einc=50000.0;#in Rs.\n",
+ "i=12.0;#in % per annum\n",
+ "n=15.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "Cp=AM*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\n",
+ "TPW=Ii+Cp;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"Total present worth of costs in RS. : \",round(TPW,3);\n",
+ "\n",
+ "#Total present worth of fuel savings:\n",
+ "AI=600000.0;#in Rs.\n",
+ "G=50000.0;#in Rs.\n",
+ "i=12.0;#in % per annum\n",
+ "n=15.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "A=AI+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100);#in RS\n",
+ "Bp=A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs.\n",
+ "BCratio=Bp/(Ii+Cp);#unitless\n",
+ "\n",
+ "#result\n",
+ "print \"Present worth of fuel savings in Rs. : \",round(Bp,3);\n",
+ "print \"BCratio : \",round(BCratio,3);\n",
+ "print\"Since BC ratio is more than 1, the construction of the bridge across the river is justified.\";\n",
+ "print\"answers are slightly different from the book due to approximation\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total present worth of costs in RS. : 5021629.673\n",
+ "Present worth of fuel savings in Rs. : 5782527.265\n",
+ "BCratio : 1.152\n",
+ "Since BC ratio is more than 1, the construction of the bridge across the river is justified.\n",
+ "answers are slightly different from the book due to approximation\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2 Page 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "Ic=80000000.0;#in Rs.\n",
+ "Aps=6000000.0;#in Rs.\n",
+ "Afs=3000000.0;#in Rs.\n",
+ "Aib=5000000.0;#in Rs.\n",
+ "Arb=2000000.0;#in Rs.\n",
+ "Amc=3000000.0;#in Rs.\n",
+ "i=12.0;#in % per annum\n",
+ "n=50.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "TAB=Afs+Aib+Arb;#in Rs.\n",
+ "PW_B=TAB*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Total present worth of benefits in RS. : \",round(PW_B,3);\n",
+ "\n",
+ "#Present worth of costs:\n",
+ "PW_C=Ic+Amc*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)-Aps*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
+ "BCratio=PW_B/PW_C;#unitless\n",
+ "\n",
+ "#result\n",
+ "print \"Present worth of costs in Rs. : \",round(PW_C,3);\n",
+ "print \"BCratio : \",round(BCratio,3);\n",
+ "print \"Since BC ratio is more than 1, the state govt. can implement the hydroelectric project.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total present worth of benefits in RS. : 83044984.884\n",
+ "Present worth of costs in Rs. : 55086504.535\n",
+ "BCratio : 1.508\n",
+ "Since BC ratio is more than 1, the state govt. can implement the hydroelectric project.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 10.3 Page 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#alternative 1\n",
+ "P=3000000.0;#in Rs.\n",
+ "B=900000.0;#in Rs.\n",
+ "i=10.0;#in % per annum\n",
+ "n=5.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "AE1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n",
+ "BCratio=B/AE1;#unitless\n",
+ "\n",
+ "#result\n",
+ "print \"Annual equivalent of initial cost in Rs. : \",round(AE1,3);\n",
+ "print \"BCratio : \",round(BCratio,3);\n",
+ "\n",
+ "#Alternative A2 : \n",
+ "P=6000000.0;#in Rs.\n",
+ "B=1500000.0;#in Rs.\n",
+ "i=10.0;#in % per annum\n",
+ "n=7.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "AE2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n",
+ "BCratio=B/AE2;#unitless\n",
+ "\n",
+ "#result\n",
+ "print \"Annual equivalent of initial cost in Rs. : \",round(AE2,3);\n",
+ "print \"BCratio : \",round(BCratio,3);\n",
+ "print \"The benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Annual equivalent of initial cost in Rs. : 791392.442\n",
+ "BCratio : 1.137\n",
+ "Annual equivalent of initial cost in Rs. : 1232432.998\n",
+ "BCratio : 1.217\n",
+ "The benefit cost ratio of alternative 2 is more than that of alternative A1. Hence, alternative A2 is to be selected. The comparisoon is made on a 35 years period which is the minimum common multiple of the lives of alternative 1 and 2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4 Page 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#cost of the state\n",
+ "n=20.0;#in years\n",
+ "P=2500000000.0;#in Rs.\n",
+ "Agt=10000000.0;#in Rs.\n",
+ "Ai=1000000.0;#in Rs.\n",
+ "Com=48000.0;#in Rs./year/employee\n",
+ "C1=Com*300;#in Rs.\n",
+ "i=10.0;#in % per annum\n",
+ "\n",
+ "#calculation\n",
+ "C2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs\n",
+ "CA=C2+C1;#in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Annual equivalent initial cost in Rs. : \",round(C2,3);\n",
+ "print \"Total Annual equivalent cost of the project in Rs. : \",round(CA,3);\n",
+ "\n",
+ "#Benefit to the state : \n",
+ "W=30000000.0;#in Rs.\n",
+ "A1=W*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in Rs.\n",
+ "Agpy=10000000.0;#in ton/year\n",
+ "A2=Agpy*(30-10);#in Rs.\n",
+ "AvgAI=1000000.0;#in tons Km.\n",
+ "G=20000000.0;#in Rs.\n",
+ "\n",
+ "#calculation\n",
+ "A3=A2+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in Rs.\n",
+ "BA=A1+A3;#in Rs\n",
+ "BCratio=BA/CA;#unitless\n",
+ "print \"Annual equivalent average of transport cost saving in Rs. : \",round(A3,3);\n",
+ "print \"Total annual equivalent benefits to the state : \",round(BA,3);\n",
+ "print \"BCratio : \",round(BCratio,3);\n",
+ "print \"The benefit cost ratio is more than 1,the project is justified.\";\n",
+ "print \"the slight error in the answer of the book is due to approximation error\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Annual equivalent initial cost in Rs. : 293649061.931\n",
+ "Total Annual equivalent cost of the project in Rs. : 308049061.931\n",
+ "Annual equivalent average of transport cost saving in Rs. : 330161500.91\n",
+ "Total annual equivalent benefits to the state : 333685289.653\n",
+ "BCratio : 1.083\n",
+ "The benefit cost ratio is more than 1,the project is justified.\n",
+ "the slight error in the answer of the book is due to approximation error\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5 Page 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#project A\n",
+ "i=9.0;#% per annum\n",
+ "n=50.0;#in years\n",
+ "P_A=150000000.0;#in RS.\n",
+ "Fcs_A=2500000;#in Rs.\n",
+ "Ib_A=3500000;#in Rs.\n",
+ "Rb_A=1000000;#in RS.\n",
+ "OMC_A=2000000.0;#in Rs.\n",
+ "Psy_A=10000000.0;#in Rs.\n",
+ "\n",
+ "#calculation\n",
+ "AE_A=P_A*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n",
+ "Cpy_A=AE_A+OMC_A-Psy_A;#in Rs.\n",
+ "Bpy_A=Fcs_A+Ib_A+Rb_A;#in Rs.\n",
+ "BCratio_A=Bpy_A/Cpy_A;#unitless\n",
+ "\n",
+ "#result\n",
+ "print \"Costs/year : \",round(Cpy_A,3);\n",
+ "print \"Benefits/year : \",round(Bpy_A,3);\n",
+ "print \"BC Ratio of project A : \",round(BCratio_A,3)\n",
+ "\n",
+ "\n",
+ "#Project B : \n",
+ "P_B=250000000.0;#in Rs.\n",
+ "\n",
+ "OMC_B=2500000.0;#in Rs.\n",
+ "Psy_B=12000000.0;#in Rs.\n",
+ "Fcs_B=3500000.0;#in Rs.\n",
+ "Ib_B=4500000.0;#in Rs.\n",
+ "Rb_B=2000000.0;#in RS.\n",
+ "AE_B=P_B*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n",
+ "Cpy_B=AE_B+OMC_B-Psy_B;#in Rs.\n",
+ "Bpy_B=Fcs_B+Ib_B+Rb_B;#in Rs.\n",
+ "BCratio_B=Bpy_B/Cpy_B;#unitless\n",
+ "\n",
+ "#result\n",
+ "print \"Costs/year : \",round(Cpy_B,3);\n",
+ "print \"Benefits/year : \",round(Bpy_B,3);\n",
+ "print \"BC Ratio of project B : \",round(BCratio_B,3)\n",
+ "\n",
+ "#Project C : \n",
+ "P_C=400000000.0;#in Rs.\n",
+ "OMC_C=3500000.0;#in Rs.\n",
+ "Psy_C=18000000.0;#in Rs.\n",
+ "Fcs_C=5000000.0;#in Rs.\n",
+ "Ib_C=6000000.0;#in Rs.\n",
+ "Rb_C=3500000.0;#in RS.\n",
+ "AE_C=P_C*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n",
+ "Bpy_C=Fcs_C+Ib_C+Rb_C;#in Rs.\n",
+ "Cpy_C=AE_C+OMC_C-Psy_C;#in Rs.\n",
+ "BCratio_C=Bpy_C/Cpy_C;#unitless\n",
+ "\n",
+ "#result\n",
+ "print \"Costs/year : \",round(Cpy_C,3);\n",
+ "print \"Benefits/year : \",round(Bpy_C,3);\n",
+ "print \"BC Ratio of project C : \",round(BCratio_C,3)\n",
+ "print\"From the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Costs/year : 5684030.212\n",
+ "Benefits/year : 7000000.0\n",
+ "BC Ratio of project A : 1.232\n",
+ "Costs/year : 13306717.021\n",
+ "Benefits/year : 10000000.0\n",
+ "BC Ratio of project B : 0.752\n",
+ "Costs/year : 21990747.233\n",
+ "Benefits/year : 14500000.0\n",
+ "BC Ratio of project C : 0.659\n",
+ "From the computations it is clear that only alternative A is eligible because other two alternatives have BC ratio less than one.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter11.ipynb b/Engineering_Economics/Chapter11.ipynb new file mode 100755 index 00000000..55cbf9b2 --- /dev/null +++ b/Engineering_Economics/Chapter11.ipynb @@ -0,0 +1,306 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:72b2e09b74af58b464a4895e1776dc966d9cb12318da78fc7aa16f78becf8696"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Inflation Adjusted Decisions"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "print \"Few steps are as follows : \";\n",
+ "print \"Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\";\n",
+ "print \"Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\";\n",
+ "print \"Formula : P*(1+IR)^n\";\n",
+ "P=24000.0;#in Rs.\n",
+ "IR=9.0;#in % per year\n",
+ "Age=61.0;#in years\n",
+ "for n in range(21,31) :\n",
+ " IV=P*(1+IR/100)**n;#in Rs\n",
+ " print \"Age in years : \",Age,\". \"\"Inflated value of Rs. 24000 at end of year : \",n,\" in Rs. \",round(IV);\n",
+ " Age=Age+1;#in Years\n",
+ "\n",
+ "PW=0;#For initialising\n",
+ "n=21.0;#in years\n",
+ "for m in range(10) :\n",
+ " A=P*(1+IR/100)**n;#in Rs\n",
+ " n=n+1;\n",
+ " i=15.0;#in % per year\n",
+ " PW=PW+A/(1+i/100)**(m+1);\n",
+ "\n",
+ "#result\n",
+ "print \"Present equivalent of withdrawls in Rs. : \",round(PW,3);\n",
+ "\n",
+ "#The annual equivalent amount :\n",
+ "i=15.0;#in % per year\n",
+ "n=20.0;#in years\n",
+ "#Formula : (A/F,i,n) : (i/100)/(((1+i/100)^n)-1) \n",
+ "A=PW*(i/100)/(((1+i/100)**n)-1);#in Rs.\n",
+ "print \"The annual equivalent amount in Rs. : \",round(A,3);\n",
+ "print\"RECOMMENDATION : The person has to invest an amount of Rs. \",round(A,3),\" at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\"; \n",
+ "print \"slight erorr in the answer is due to approximation error\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Few steps are as follows : \n",
+ "Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\n",
+ "Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\n",
+ "Formula : P*(1+IR)^n\n",
+ "Age in years : 61.0 . Inflated value of Rs. 24000 at end of year : 21 in Rs. 146611.0\n",
+ "Age in years : 62.0 . Inflated value of Rs. 24000 at end of year : 22 in Rs. 159806.0\n",
+ "Age in years : 63.0 . Inflated value of Rs. 24000 at end of year : 23 in Rs. 174189.0\n",
+ "Age in years : 64.0 . Inflated value of Rs. 24000 at end of year : 24 in Rs. 189866.0\n",
+ "Age in years : 65.0 . Inflated value of Rs. 24000 at end of year : 25 in Rs. 206954.0\n",
+ "Age in years : 66.0 . Inflated value of Rs. 24000 at end of year : 26 in Rs. 225580.0\n",
+ "Age in years : 67.0 . Inflated value of Rs. 24000 at end of year : 27 in Rs. 245882.0\n",
+ "Age in years : 68.0 . Inflated value of Rs. 24000 at end of year : 28 in Rs. 268011.0\n",
+ "Age in years : 69.0 . Inflated value of Rs. 24000 at end of year : 29 in Rs. 292132.0\n",
+ "Age in years : 70.0 . Inflated value of Rs. 24000 at end of year : 30 in Rs. 318424.0\n",
+ "Present equivalent of withdrawls in Rs. : 1013631.794\n",
+ "The annual equivalent amount in Rs. : 9894.537\n",
+ "RECOMMENDATION : The person has to invest an amount of Rs. 9894.537 at the end of every year starting from his age 41 through 60 which will enable him to make a withdrawl at the end of every year starting from his age 61 through 70.\n",
+ "slight erorr in the answer is due to approximation error\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "print\"The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\";\n",
+ "print\"End of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\";\n",
+ "i=20.0;#in per year\n",
+ "Cum=0.0;#initialising\n",
+ "Op_cost=40000.0;#in RS.\n",
+ "Main_cost=60000.0;#in Rs.\n",
+ "OpMain=Op_cost+Main_cost;#in Rs.\n",
+ "S=400000.0;#in Rs.\n",
+ "for n in range (1,16) :\n",
+ " PF=1/((1+i/100)**n);\n",
+ " PW=OpMain*PF;#in Rs.\n",
+ " Cum=Cum+PW\n",
+ " PW_S=PF*S;#in RS.\n",
+ " TPW=500000.0+Cum-PW_S;#in Rs.\n",
+ " AP=((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);\n",
+ " AEM=TPW*AP;#in RS\n",
+ " print \" \",n,\" \",Op_cost,\" \",Main_cost,\" \",OpMain,\" \",PF,\" \",PW,\" \",Cum,\" \",S,\" \",PW_S,\" \",TPW,\" \",AP,\" \",AEM;\n",
+ " Op_cost=Op_cost+5000.0;#in Rs.\n",
+ " Main_cost=Main_cost+6000.0;#in Rs.\n",
+ " S=S-50000.0;#in Rs.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The method of finding the economic life of the machine witha discounting factor of 20% at zero inflation rate is summarized in table below. From the table it is clear that total annual cost is minimum if the machine is used for 14 years. Hence the economic life of the machine is 14 years.\n",
+ "End of year Op_cost Main_cost Op+Main P/F,i,n PW Cummulative Salvage PW_S TPW A/P,i,n AEM\n",
+ " 1 40000.0 60000.0 100000.0 0.833333333333 83333.3333333 83333.3333333 400000.0 333333.333333 250000.0 1.2 300000.0\n",
+ " 2 45000.0 66000.0 100000.0 0.694444444444 69444.4444444 152777.777778 350000.0 243055.555556 409722.222222 0.654545454545 268181.818182\n",
+ " 3 50000.0 72000.0 100000.0 0.578703703704 57870.3703704 210648.148148 300000.0 173611.111111 537037.037037 0.474725274725 254945.054945\n",
+ " 4 55000.0 78000.0 100000.0 0.48225308642 48225.308642 258873.45679 250000.0 120563.271605 638310.185185 0.386289120715 246572.280179\n",
+ " 5 60000.0 84000.0 100000.0 0.401877572016 40187.7572016 299061.213992 200000.0 80375.5144033 718685.699588 0.33437970329 240313.910987\n",
+ " 6 65000.0 90000.0 100000.0 0.33489797668 33489.797668 332551.01166 150000.0 50234.6965021 782316.315158 0.300705745867 235247.011053\n",
+ " 7 70000.0 96000.0 100000.0 0.279081647234 27908.1647234 360459.176383 100000.0 27908.1647234 832551.01166 0.277423926347 230969.570539\n",
+ " 8 75000.0 102000.0 100000.0 0.232568039361 23256.8039361 383715.980319 50000.0 11628.4019681 872087.578351 0.260609422409 227274.240084\n",
+ " 9 80000.0 108000.0 100000.0 0.193806699468 19380.6699468 403096.650266 0.0 0.0 903096.650266 0.248079461672 224039.730836\n",
+ " 10 85000.0 114000.0 100000.0 0.16150558289 16150.558289 419247.208555 -50000.0 -8075.27914449 927322.4877 0.238522756883 221187.516286\n",
+ " 11 90000.0 120000.0 100000.0 0.134587985742 13458.7985742 432706.007129 -100000.0 -13458.7985742 946164.805703 0.231103794152 218662.276491\n",
+ " 12 95000.0 126000.0 100000.0 0.112156654785 11215.6654785 443921.672608 -150000.0 -16823.4982177 960745.170825 0.225264964904 216422.227187\n",
+ " 13 100000.0 132000.0 100000.0 0.0934638789872 9346.38789872 453268.060506 -200000.0 -18692.7757974 971960.836304 0.220620001083 214434.000758\n",
+ " 14 105000.0 138000.0 100000.0 0.0778865658226 7788.65658226 461056.717089 -250000.0 -19471.6414557 980528.358544 0.216893055222 212669.791417\n",
+ " 15 110000.0 144000.0 100000.0 0.0649054715189 6490.54715189 467547.264241 -300000.0 -19471.6414557 987018.905696 0.213882119838 211105.69587\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "IR=5.0;#in % per year\n",
+ "i=15.0;#in % per year\n",
+ "#Machine X :\n",
+ "Ppx=1500000.0;#in Rs.\n",
+ "n=7.0;#in years\n",
+ "S=200000.0;#in Rs.\n",
+ "AMC=300000.0;#in Rs.\n",
+ "print \"End of year AMC InflationFactor InflatedAmount P/F PW\";\n",
+ "Pw=0;#For initialising\n",
+ "for n in range (1,8) :\n",
+ " FP=(1+IR/100)**n\n",
+ " IA=AMC*FP;#in Rs.\n",
+ " PF=1/((1+i/100)**n);\n",
+ " PW=IA*PF;#in Rs.\n",
+ " Pw=Pw+PW;#in Rs.\n",
+ " print\" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n",
+ "\n",
+ "print \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\n",
+ "PWX=Ppx+Pw-S*1/((1+i/100)**n);\n",
+ "print \"Present worth of machine X in Rs. : \",round(PWX,3);\n",
+ "\n",
+ "#Machine Y\n",
+ "\n",
+ "Ppy=2000000.0;#in Rs.\n",
+ "n=7.0;#in years\n",
+ "S=300000.0;#in Rs.\n",
+ "AMC=250000.0;#in Rs.\n",
+ "print \"End of year AMC InflationFactor InflatedAmount P/F PW\";\n",
+ "Pw=0;#For initialising\n",
+ "for n in range (1,8) :\n",
+ " FP=(1+IR/100)**n\n",
+ " IA=AMC*FP;#in Rs.\n",
+ " PF=1/((1+i/100)**n);\n",
+ " PW=IA*PF;#in Rs.\n",
+ " Pw=Pw+PW;#in Rs.\n",
+ " print \" \",n,\" \",AMC,\" \",FP,\" \",IA,\" \",PF,\" \",PW;\n",
+ "\n",
+ "PWY=Ppy+Pw-S*1/((1+i/100)**n);\n",
+ "\n",
+ "#result\n",
+ "print \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\n",
+ "print \"Present worth of machine Y in Rs. : \",round(PWY,3);\n",
+ "print \"Since the present worth of Machine X is less than Machine Y, select Machine X\"\n",
+ "print \" Calculations are not accurate in the book\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "End of year AMC InflationFactor InflatedAmount P/F PW\n",
+ " 1 300000.0 1.05 315000.0 0.869565217391 273913.043478\n",
+ " 2 300000.0 1.1025 330750.0 0.756143667297 250094.517958\n",
+ " 3 300000.0 1.157625 347287.5 0.657516232432 228347.168571\n",
+ " 4 300000.0 1.21550625 364651.875 0.571753245593 208490.893043\n",
+ " 5 300000.0 1.2762815625 382884.46875 0.497176735298 190361.25017\n",
+ " 6 300000.0 1.34009564063 402028.692188 0.432327595912 173808.097981\n",
+ " 7 300000.0 1.40710042266 422130.126797 0.375937039923 158694.35033\n",
+ "Present worth of inflated annual operating and maintenance cost in Rs. : 1483709.322\n",
+ "Present worth of machine X in Rs. : 2908521.914\n",
+ "End of year AMC InflationFactor InflatedAmount P/F PW\n",
+ " 1 250000.0 1.05 262500.0 0.869565217391 228260.869565\n",
+ " 2 250000.0 1.1025 275625.0 0.756143667297 208412.098299\n",
+ " 3 250000.0 1.157625 289406.25 0.657516232432 190289.307142\n",
+ " 4 250000.0 1.21550625 303876.5625 0.571753245593 173742.410869\n",
+ " 5 250000.0 1.2762815625 319070.390625 0.497176735298 158634.375141\n",
+ " 6 250000.0 1.34009564063 335023.910156 0.432327595912 144840.081651\n",
+ " 7 250000.0 1.40710042266 351775.105664 0.375937039923 132245.291942\n",
+ "Present worth of inflated annual operating and maintenance cost in Rs. : 1236424.435\n",
+ "Present worth of machine Y in Rs. : 3123643.323\n",
+ "Since the present worth of Machine X is less than Machine Y, select Machine X\n",
+ " Calculations are not accurate in the book\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "IR=6.0;#in % per year\n",
+ "i=18.0;#in % per year\n",
+ "AFR=5000000.0;#in Rs.\n",
+ "n=7.0;#in years\n",
+ "AI=500000.0;#in Rs.\n",
+ "print\"End of year AFR InflationFactor InflatedAmount P/F PW\";\n",
+ "TPW=0;#Initialising\n",
+ "\n",
+ "for n in range (1,6) :\n",
+ " IF=(1+IR/100)**n;\n",
+ " IA=IF*AFR;#in Rs.\n",
+ " PF=1/((1+i/100)**n);\n",
+ " PW=PF*IA;#in Rs.\n",
+ " TPW=PW+TPW;#in Rs.\n",
+ " print\" \",round(n),\" \",round(AFR,3),\" \",round(IF,3),\" \",round(IA,3),\" \",round(PF,3),\" \",round(PW,3);\n",
+ " AFR=AFR+AI;#in Rs.\n",
+ "\n",
+ " \n",
+ "#result\n",
+ "print \"The value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : \",round(TPW,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "End of year AFR InflationFactor InflatedAmount P/F PW\n",
+ " 1.0 5000000.0 1.06 5300000.0 0.847 4491525.424\n",
+ " 2.0 5500000.0 1.124 6179800.0 0.718 4438236.139\n",
+ " 3.0 6000000.0 1.191 7146096.0 0.609 4349334.645\n",
+ " 4.0 6500000.0 1.262 8206100.24 0.516 4232615.212\n",
+ " 5.0 7000000.0 1.338 9367579.043 0.437 4094655.134\n",
+ "The value of the single deposit to be made now to recieve the specified series for the next five years is Rs. : 21606366.553\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter12.ipynb b/Engineering_Economics/Chapter12.ipynb new file mode 100755 index 00000000..75f40350 --- /dev/null +++ b/Engineering_Economics/Chapter12.ipynb @@ -0,0 +1,104 @@ +{ + "metadata": { + "name": "EE-12" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Inventory Control" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 12.1 Page 160" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nfrom math import sqrt\nD=24000.0;#in units/year\nCo=150.0;#in Rs./order\nPprice=75.0;#Rs./unit\nCpupy=18.0;#in % of Pprice/unit\n\n#calculation\nCc=Pprice*Cpupy/100;#in Rs.\nEOQ=sqrt((2*Co*D)/Cc);#in units\nn=D/round(EOQ);#no. of orders/year\nT=round(EOQ)/D;# time between successive orders in year\nT=T*12;#in months\nT=T*30;#in Days\n\n#result\nprint \"Economic order quantity in units : \",round(EOQ);\nprint \"No. of orders/year : \",round(n,2);\nprint \"Time between successive orders in days : \",round(T);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Economic order quantity in units : 730.0\nNo. of orders/year : 32.88\nTime between successive orders in days : 11.0\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 12.2 Page 162" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nfrom math import sqrt\nr=12000.0;#in units/year\nk=24000.0;#in units/year\nCo=175.0;#in Rs./setup\nCc=15.0;#in Rs./unit/year\n\n#calclation\nEOQ=sqrt((2*Co*r)/(Cc*(1-r/k)));#in units\nQ=round(EOQ);#units\nt1=Q/k;#in year\nt1=t1*12*30;#in days\nt2=(Q/r)*(1-r/k);#in year\nt2=t2*12*30;#in days\n\n#result\nprint \"Economic order quantity in units : \",round(Q,3);\nprint \"Cycle time in days :\",round(t1+t2);\nprint \"No. of setups/year : \",round(r/Q,3)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Economic order quantity in units : 748.0\nCycle time in days : 22.0\nNo. of setups/year : 16.043\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 12.3 Page 164" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#iniatiation of variable\nfrom math import sqrt\nD=30000.0;#in units/year\nCc=2.0;#in Rs./unit/year\nCo=100.0;#in Rs./orde\nCs=12.0;#in units/year\n\n#calculation\nEOQ=sqrt(2*Co*D*(Cs+Cc)/(Cc*Cs));#in units\nQ=round(EOQ);#units\nQ1=sqrt(2*Co*D*Cs/(Cc*(Cs+Cc)));#in units\nt=Q/D;#in year\nt=t*365;#in days\nt1=Q1/D;#in year\nt1=t1*365;#in days\nt2=t-t1;#in days\n\n#result\nprint \"Ordering quantity in units : \",round(Q,3);\nprint \"Maximum Inventory in units : \",round(Q1);\nprint \"Maximum shortage quantity in units : \",round(Q-Q1);\nprint \"Cycle time in days: \",round(t);\nprint \"Inventory period(t1) in days : \",round(t1);\nprint \"Shortage period(t2) in days : \",round(t2);\nprint \"No. of Orders/year : \",round(D/Q,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ordering quantity in units : 1871.0\nMaximum Inventory in units : 1604.0\nMaximum shortage quantity in units : 267.0\nCycle time in days: 23.0\nInventory period(t1) in days : 20.0\nShortage period(t2) in days : 3.0\nNo. of Orders/year : 16.034\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 12.4 Page 166" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nfrom math import sqrt\nr=12000.0;#in units/year\nk=2000.0*12;#in units/year\nCo=400.0;#in Rs./setup\nCc=0.20*12;#in Rs./year\nCs=15.0;#in Rs./unit/year\n\n#calculation\nEOQ=sqrt((2*Co*k*r*(Cc+Cs)/(Cc*(k-r)*Cs)));#in units\nQ=round(EOQ);#units\nQ1=sqrt(2*Co*Cc*r*(k-r)/(Cs*(Cc+Cs)*k));#in units\nQ2=(Q*(k-r)/k)-Q1;#in Units\nt=Q/r;#in year\nt=t*365.0;#in days\nt1=(Q2/r)*365.0;#in days\nt2=(Q2/(k-r))*365.0;#in days\nt3=(Q1/(k-r))*365.0;#in days\nt4=(Q1/r)*365.0;#in days\n\n#result\nprint \"Ordering quantity in units : \",round(Q,3);\nprint \"Maximum Inventory in units : \",round(Q1);\nprint \"Maximum shortage quantity in units : \",round(Q2);\nprint \"Cycle time in days: \",round(t);\nprint \"Period of shortage in days : \",round(t1);\nprint \"Period of production satisfying back order in days : \",round(t2);\nprint \"Period of production satisfying period requirement in days : \",round(t3);\nprint \"Period of consumption only in days : \",round(t4);\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Ordering quantity in units : 3046.0\nMaximum Inventory in units : 210.0\nMaximum shortage quantity in units : 1313.0\nCycle time in days: 93.0\nPeriod of shortage in days : 40.0\nPeriod of production satisfying back order in days : 40.0\nPeriod of production satisfying period requirement in days : 6.0\nPeriod of consumption only in days : 6.0\n" + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter13.ipynb b/Engineering_Economics/Chapter13.ipynb new file mode 100755 index 00000000..af23fcbb --- /dev/null +++ b/Engineering_Economics/Chapter13.ipynb @@ -0,0 +1,104 @@ +{ + "metadata": { + "name": "EE-13" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Make or Buy Decision" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 13.1 Page 168" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nmaterial=300.0;#in Rs.\nlabour=250.0;#in Rs.\noverhead=100.0;#in Rs.\n\n#calculation\nVC=material+labour+overhead;#in Rs.\ndemand=5000.0;#in units\nTVC=demand*VC;#in Rs.\nFC=1000000;#in Rs.\nTC=FC+TVC;#in Rs.\n\n#result\nprint \"Total cost in Rs. : \",round(TC,3);\n\n#Cost to buy :\nPcost=900*demand;#in Rs.\nFC=1000000.0;#in Rs.\nTC=FC+Pcost;#in Rs.\n\n#result\nprint \"Total cost in Rs. : \",round(TC,3);\nprint \"The cost of making fixtures is less than the cost of buying fixtures from outside. Therefore, the organisation should make the fixtures.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost in Rs. : 4250000.0\nTotal cost in Rs. : 5500000.0\nThe cost of making fixtures is less than the cost of buying fixtures from outside. Therefore, the organisation should make the fixtures.\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 13.2 Page 171" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nfrom math import sqrt\nPbuy=8.0;#in Rs/unit\nD=2000.0;#in units/year\nCo=120.0;#in Rs./order\nCc=1.60;#in Rs./units/year\n\n#calculation\nQ1=sqrt(2*Co*D/Cc);#in units\nTC=D*Pbuy+D*Co/Q1+Q1*Cc/2;#in Rs.\nprint \"Total cost of buying in Rs. : \",round(TC,3)\n\n#Make Option :\nPmake=5.0;#in Rs/unit\nCo=60.0;#in Rs./setup\nCc=1.0;#in Re1/units/year\nr=2000.0;#in units/year\nk=8000.0;#in units/year\n\n#calculation\nQ2=sqrt(2*Co*r/(Cc*(1-r/k)));#in units\nTC=D*Pmake+D*Co/Q2+Q2*Cc*(k-r)/(2*k);#in Rs.\n\n#result\nprint \"Total cost of making in Rs. : \",round(TC,3)\nprint\"The cost of making is less than the cost of buying . Therefore, the firm should go in for making option.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Total cost of buying in Rs. : 16876.356\nTotal cost of making in Rs. : 10424.264\nThe cost of making is less than the cost of buying . Therefore, the firm should go in for making option.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 13.3 Page 173" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nSP=500.0;#in Rs.\nVC=300.0;#in Rs.\nFC=400000.0;#in RS.\n\n#calculation\nBEP=FC/(SP-VC);#in units\n\n#results\nprint \"BEP in units : \",round(BEP,3);\nprint\"Since the demand(1500units) is less than the break even quantity, the company should buy the cabinets for its TV production.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "BEP in units : 2000.0\nSince the demand(1500units) is less than the break even quantity, the company should buy the cabinets for its TV production.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 13.4 Page 173" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nvolume=8000;#in units\n#Process A :\nFC=500000.0;#in RS.\nVC=175.0;#in Rs.\n\n#calculation\nAC=FC+VC*volume;#in Rs.\n\n#result\nprint \"Annual Cost of Process A in Rs. :\",round(AC,3);\n\n#Process B :\nFC=600000.0;#in RS.\nVC=150;#in Rs.\n\n#calculation\nAC=FC+VC*volume;#in Rs.\n\n#result\nprint \"Annual Cost of Process A in Rs. :\",round(AC,3);\n\n#Buy option:\nPprice=125.0;#in RS./Unit\nVC=175.0;#in Rs.\nAC=Pprice*volume;#in Rs\n\n#result.\nprint \"Annual Cost of Buy in Rs. :\",round(AC,3);\nprint\"Since the annual cost of buy option is the minimum among all the alternatives, the company should buy the product.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Annual Cost of Process A in Rs. : 1900000.0\nAnnual Cost of Process A in Rs. : 1800000.0\nAnnual Cost of Buy in Rs. : 1000000.0\nSince the annual cost of buy option is the minimum among all the alternatives, the company should buy the product.\n" + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter16.ipynb b/Engineering_Economics/Chapter16.ipynb new file mode 100755 index 00000000..25b11449 --- /dev/null +++ b/Engineering_Economics/Chapter16.ipynb @@ -0,0 +1,297 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2e3de312e11632c16b5c14fdb6f5e083c4b44aeeb327466acbfc97c2f088ee01"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Linear Progrmming"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.1 Page 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#result\n",
+ "print\"The data of the problem are summarized below : \";\n",
+ "print\"Machine Products Limit on \";\n",
+ "print\" P1 P2 machine hours\";\n",
+ "print\"Lathe 5 10 60\";\n",
+ "print\"Milling 4 4 40\";\n",
+ "print\"Profit/unit 6 8\";\n",
+ "print\"Let X1 be the production volume of the product.P1, and\";\n",
+ "print\"X2 be the production volume of the product,P2.\";\n",
+ "print\"The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \";\n",
+ "print\"maximize Z = 6*X1 + 8*X2\";\n",
+ "print\"subject to\";\n",
+ "print\"5*X1+10*X2 <= 60\"\n",
+ "print\"4*X1+4*X2 <= 40\"\n",
+ "print\"X1,X2 >= 0\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The data of the problem are summarized below : \n",
+ "Machine Products Limit on \n",
+ " P1 P2 machine hours\n",
+ "Lathe 5 10 60\n",
+ "Milling 4 4 40\n",
+ "Profit/unit 6 8\n",
+ "Let X1 be the production volume of the product.P1, and\n",
+ "X2 be the production volume of the product,P2.\n",
+ "The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \n",
+ "maximize Z = 6*X1 + 8*X2\n",
+ "subject to\n",
+ "5*X1+10*X2 <= 60\n",
+ "4*X1+4*X2 <= 40\n",
+ "X1,X2 >= 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.2 Page 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "print\"Let X1 be the No. of packets of food type1 suggested for babies, and\";\n",
+ "print\"X2 be the No. of packets of food type1 suggested for babies.\";\n",
+ "print\"The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \";\n",
+ "print\"maximize Z = 2*X1 + 3*X2\";\n",
+ "print\"subject to\";\n",
+ "print\"X1+X2 >= 6\"\n",
+ "print\"7*X1+X2 >= 14\";\n",
+ "print\"X1,X2 >= 0\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Let X1 be the No. of packets of food type1 suggested for babies, and\n",
+ "X2 be the No. of packets of food type1 suggested for babies.\n",
+ "The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \n",
+ "maximize Z = 2*X1 + 3*X2\n",
+ "subject to\n",
+ "X1+X2 >= 6\n",
+ "7*X1+X2 >= 14\n",
+ "X1,X2 >= 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.3 Page201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "%pylab inline\n",
+ "import matplotlib.pyplot as plt\n",
+ "print\"Given the following LP model :\"\n",
+ "print\"maximize Z = 6*X1 + 8*X2\";\n",
+ "print\"subject to\";\n",
+ "print\"5*X1+10*X2 <= 60\";\n",
+ "print\"4*X1+4*X2 <= 40\";\n",
+ "print\"X1,X2 >= 0\";\n",
+ "print\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\n",
+ "print\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\n",
+ "print\"5*X1+10*X2 <= 60\";\n",
+ "print\"When X1=0 : X2=6\";\n",
+ "print\"When X2=0 : X1=12\";\n",
+ "plt.plot([0,12],[6,0],'r')\n",
+ "plt.plot([10,0],[0,10])\n",
+ "plt.title('Graphical Plot')\n",
+ "plt.show()\n",
+ "print \"Consider the 2nd constraint in the form : in blue \";\n",
+ "print \"4*X1+4*X2 <= 40\";\n",
+ "print \"When X1=0 : X2=10\";\n",
+ "print \"When X2=0 : X1=10\";\n",
+ "print \"The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\";\n",
+ "ZA=6*0+8*0;\n",
+ "ZB=6*10+8*0;\n",
+ "ZC=6*8+8*2;\n",
+ "ZD=6*0+8*6;\n",
+ "print \"Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \";\n",
+ "print \"X1 = 8 X2 = 2 and Z(Optimum) is\",ZC;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "Given the following LP model :\n",
+ "maximize Z = 6*X1 + 8*X2\n",
+ "subject to\n",
+ "5*X1+10*X2 <= 60\n",
+ "4*X1+4*X2 <= 40\n",
+ "X1,X2 >= 0\n",
+ "The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\n",
+ "Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n",
+ "5*X1+10*X2 <= 60\n",
+ "When X1=0 : X2=6\n",
+ "When X2=0 : X1=12\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEKCAYAAADkYmWmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGzlJREFUeJzt3Xtw1PW5x/HPImCRSAgISXMbSiAl4ZbYCJUOkMq1TIlc\nFZBCCeBR9FTQ4TRlqglSIRGl2qnSc4jhIhboZQoUkKlg12IRQYNAUaRQUgKBdCgkIQYSCXv+SAkG\nNrfNb/d32fdrJjPmsrvfdfTh4Z29uDwej0cAAFtqZfYBAAC+Y4gDgI0xxAHAxhjiAGBjDHEAsDGG\nOADYGEMcjpCVlaUf/OAH9X6/T58++stf/uLX26hPQUGBWrVqpevXr7fo9gFvGOLwi40bN2rgwIEK\nCQlReHi4vv3tb2vlypV+uz2Xy9Xg9//2t79pyJAhfrsNt9utVq1a6e6771aHDh3Uq1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ck7dq1S7179zb5VMbp1auX9u3bpytXrsjj8WjXrl1KTEw0+1iGS0tL\n09q1ayVJa9euddQiJdU8um/58uXasmWLvva1rzV+AV+edt+YHTt2eOLj4z1xcXGepUuX+uMmTLNn\nzx6Py+Xy9O/f35OUlORJSkryvP3222Yfy3But9szduxYs49huE8++cSTkpLi6devn2f8+PGekpIS\ns49kqJycHE9iYqKnT58+nhkzZniqqqrMPlKLTJkyxfP1r3/d06ZNG090dLQnLy/P8+9//9szbNgw\nT8+ePT0jRozwXLp0yexj+uzW+/fGG294evTo4YmNja2dL48//niD18GTfQDAxpz3EAQACCIMcQCw\nMYY4ANgYQxwAbIwhDgA2xhAHABtjiAOAjTHEAcDG/h92IUTgGfYhtAAAAABJRU5ErkJggg==\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x51094e0>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Consider the 2nd constraint in the form : in blue \n",
+ "4*X1+4*X2 <= 40\n",
+ "When X1=0 : X2=10\n",
+ "When X2=0 : X1=10\n",
+ "The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\n",
+ "Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \n",
+ "X1 = 8 X2 = 2 and Z(Optimum) is 64\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.4 Page 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "%pylab inline\n",
+ "import matplotlib.pyplot as plt\n",
+ "print\"Given the following LP model :\"\n",
+ "print \"minimize Z = 2*X1 + 3*X2\";\n",
+ "print\"subject to\";\n",
+ "print\"X1+X2 >= 6\";\n",
+ "print\"7*X1+X2 >= 14\";\n",
+ "print\"X1,X2 >= 0\";\n",
+ "print\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\n",
+ "print\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\n",
+ "print\"X1+X2 = 6\";\n",
+ "print\"When X1=0 : X2=6\";\n",
+ "print\"When X2=0 : X1=6\";\n",
+ "plt.plot([0,6],[6,0],'r')\n",
+ "plt.plot([2,0],[0,14])\n",
+ "plt.title('Graphical Plot')\n",
+ "plt.show()\n",
+ "print\"Consider the 2nd constraint in the form (in blue):\";\n",
+ "print\"7*X1+X2 = 14\";\n",
+ "print\"When X1=0 : X2=14\";\n",
+ "print\"When X2=0 : X1=2\";\n",
+ "print\"The Optimum solution will be in any one of the corners A, B and C\";\n",
+ "print\"The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\"\n",
+ "ZA=2*0+3*14;\n",
+ "ZB=2*(4.0/3)+3*(14.0/3);\n",
+ "ZC=2*6+3*0;\n",
+ "\n",
+ "#result\n",
+ "print\"Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \";\n",
+ "print \"X1 = 6 X2 = 0 and Z(Optimum) =\",ZC"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Populating the interactive namespace from numpy and matplotlib\n",
+ "Given the following LP model :\n",
+ "minimize Z = 2*X1 + 3*X2\n",
+ "subject to\n",
+ "X1+X2 >= 6\n",
+ "7*X1+X2 >= 14\n",
+ "X1,X2 >= 0\n",
+ "The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\n",
+ "Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n",
+ "X1+X2 = 6\n",
+ "When X1=0 : X2=6\n",
+ "When X2=0 : X1=6\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEKCAYAAAAyx7/DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGwVJREFUeJzt3Xlw1PX9x/HXpoiAkRAQNs3VtAHKHaJRig6yyBVtgcgl\nl9AgcayjLdJhRKeWwwoE1JZSpTNQUaQF2vKrUMCMgXYDipQhIFKoxYOMiRydoAlHhEiyvz8iKyHZ\nZHfz/e7u97vPx8zOJHt8v59VfPPsd7/frcPj8XgEALCMmHAvAAAQGAY3AFgMgxsALIbBDQAWw+AG\nAIthcAOAxTC4YQsLFizQgw8+6PPxPn36aPfu3abuw5eSkhLFxMSotra2RfsHrmJwwxQbN27UgAED\nFBsbK6fTqR/84AdatWqVaftzOBxNPv7vf/9bd999t2n7cLvdiomJ0c0336z27durR48eevXVVwPe\nR7B/OSC6MLhhuBdeeEGzZ8/Wk08+qTNnzujMmTP6/e9/r3feeUfV1dWNvqalNRqK68ia20dSUpLO\nnz+vc+fOKT8/X3l5efrggw9MXxeiD4MbhqqsrNT8+fO1atUqjR07VjfddJMkqX///lq/fr1at24t\nSfrxj3+sn/zkJ7rvvvsUGxsrt9ut7du3KzMzU3FxcUpNTdXChQu92716uGH16tVKSkpSYmKiXnjh\nBe/jDodD1dXVmjFjhtq3b68+ffqouLjY+3haWpp27dolSaqpqdHixYvVtWtXtW/fXllZWfrss88k\nST/72c+UmpqquLg4ZWVl6e233w7qn8OYMWMUHx+vY8eONXjs5MmTGj16tDp16qRu3bppzZo1kqSC\nggItWbJEmzZt0s0336zMzMyg9g37Y3DDUO+++64uX76sMWPGNPvcDRs26JlnntGFCxd01113KTY2\nVuvXr1dlZaW2b9+uVatWacuWLfVe43a79dFHH+mtt95Sfn6+dxh7PB5t3bpVkydPVmVlpUaPHq3H\nHnvM+zqHw+E91PHiiy9q48aNevPNN3Xu3DmtXbtWbdu2lSTdcccdOnz4sL744gtNmTJFEyZM8Pm/\nEnypra3V3/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U1td72mipifx/bsGGDSkpKlJiYqLFjx2rRokW65557\nJEkTJkyQVHfIKSsry+f2EN0cTf0fKcycOVPbt29Xly5d6h1LlOrO1Z07d67Ky8u9H+wAZikpKdH3\nvvc9XblypcExayDaNPlfQG5urgoKChrcX1paqsLCQn3nO98xbWEAgMY1ObgHDRqk+Pj4BvfPmTNH\ny5YtM21RQGP44A6oE/DpgFu2bFFycrL69etnxnqARqWlpammpibcywAiQkCDu6qqSosXL1ZhYaH3\nPj79BoDQCmhwf/zxxyopKVFGRoakugsZbrvtNu3fv19dunSp99xvfaurams/Nm6lABAF0tPTG73O\noB5PM06cOOHp06dPo4+lpaV5zp492+hjkjyjRjW3deuaP39+uJdgKt6fddn5vXk89n9/foxlT5Mf\nTk6ePFl33nmnjh8/rpSUFK1du7be4819WFRcXHcDABinyUMl136BT2M++eSTJh+fN09auFDaujXw\nhQEAGmfqlQx5efatbpfLFe4lmIr3Z112fm+S/d+fP5q8crJFG3Y45PF4tHKlVFhIdQOAP67Oziaf\nY/bgvnRJSk+vG9y33WbGngDAPvwZ3KZ/6UObNt8c6wYAtJzpxS2J6gYAP0VEcUtUNwAYKSTFLVHd\nAOCPiCluieoGAKOErLglqhsAmhNRxS1R3QBghJAWt0R1A0BTIq64JaobAFoq5MUtUd0A4EtEFrdE\ndQNAS4SluCWqGwAaE7HFLVHdABCssBW3RHUDwPUiurglqhsAghHW4paobgC4VsQXt0R1A0Cgwl7c\nEtUNAFdZorglqhsAAhERxS1R3QAgGVTcM2fOlNPpVN++fb33zZ07Vz179lRGRobGjh2rysrKFi+W\n6gYA/zQ7uHNzc1VQUFDvvhEjRujo0aM6fPiwunfvriVLlhiymLw8qbi47gYAaFyzg3vQoEGKj4+v\nd9/w4cMVE1P30gEDBqisrMyQxVDdANC8Fn84+corr+i+++4zYi2SqG4AaE6rlrz4ueeeU+vWrTVl\nypRGH1+wYIH3Z5fLJZfL1ew2r63urVtbsjoAiHxut1tutzug1/h1VklJSYlGjRqlI0eOeO979d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A6Hhg0bpqysLK1evTrcyzHMiRMn1LlzZ+Xm5urWW29VXl6eqpq4qtLw\nf7tcnGN9Fy5c0Pjx47VixQrFxsaGezmGiomJ0XvvvaeysjLt3r078i+fDsC2bdvUpUsXZWZm2rJK\nJemdd97RoUOH9Oabb+qll17Snj17wr0kQ1y5ckUHDx7Uo48+qoMHD+qmm27S0qVLfT7f8MGdlJSk\n0tJS7++lpaVKTk42ejcwyVdffaVx48Zp2rRpysnJCfdyTBMXF6cf/vCHOnDgQLiXYpi9e/dq69at\n+u53v6vJkyfrH//4h6ZPnx7uZRnq29/+tiSpc+fOuv/++7V///4wr8gYycnJSk5O1u233y5JGj9+\nvA4ePOjz+YYP7qysLH344YcqKSlRdXW1Nm3apNGjRxu9G5jA4/HooYceUq9evTR79uxwL8dw5eXl\nqqiokCR9+eWXKiwsVGZmZphXZZzFixertLRUJ06c0MaNG3XPPfdo3bp14V6WYaqqqnT+/HlJ0sWL\nF/XWW2/Z5uyuhIQEpaSk6Pjx45KknTt3qnfv3j6fH9QFOE2x+8U5kydPVlFRkc6ePauUlBQtWrRI\nubm54V6WId555x2tX7/ee7qVJC1ZskTZ2dlhXpkxTp06pRkzZqi2tla1tbV68MEHNXTo0HAvyzR2\nO2x55swZ3X///ZLqDi1MnTpVI0aMCPOqjLNy5UpNnTpV1dXVSk9P19q1a30+lwtwAMBi7PnRMwDY\nGIMbACyGwQ0AFsPgBgCLYXADgMUwuAHAYhjcAGAxDG4AsJj/B8cOct+Nyla5AAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x81f27b8>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Consider the 2nd constraint in the form (in blue):\n",
+ "7*X1+X2 = 14\n",
+ "When X1=0 : X2=14\n",
+ "When X2=0 : X1=2\n",
+ "The Optimum solution will be in any one of the corners A, B and C\n",
+ "The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\n",
+ "Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \n",
+ "X1 = 6 X2 = 0 and Z(Optimum) = 12\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter2.ipynb b/Engineering_Economics/Chapter2.ipynb new file mode 100755 index 00000000..e29c54c2 --- /dev/null +++ b/Engineering_Economics/Chapter2.ipynb @@ -0,0 +1,372 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:579288a5e0685252a970b36dc99c069cd7fb91e6e042c88d50d8eb0615ccf38d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Elementary Economic Analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#Part a \n",
+ "w1=1.2;#in Kg\n",
+ "c1=80.0;#cost of making aluminium casting in Rs/Kg\n",
+ "c2=150.0;#ost of machining aluminium casting per unit in Rs\n",
+ "\n",
+ "#calculation\n",
+ "Tc1=c1*w1+c2;#Total cost of jet engine part made of aluminium per unit in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Total cost of jet engine part made of aluminium per unit in Rs \",round(Tc1,3)\n",
+ "\n",
+ "#Part b \n",
+ "w2=1.35;#in Kg\n",
+ "c1=35.0;#in Rs/Kg\n",
+ "c2=170.0;#in Rs\n",
+ "c3=1300.0;#in Rs/Kg\n",
+ "\n",
+ "#calculation\n",
+ "Tc2=c1*w2+c2+c3*(w2-w1);#in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Total cost of jet engine part made of steel per unit in Rs : \",round(Tc2,3);\n",
+ "print \"DECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs \",round(Tc2-Tc1,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total cost of jet engine part made of aluminium per unit in Rs 246.0\n",
+ "Total cost of jet engine part made of steel per unit in Rs : 412.25\n",
+ "DECISION : The total cost/unit of a jet engine part made of aluminium is less than that for an engine made of steel. Hence, aluminium is suggested for making jet engine part. The economic advantage of aluminium over steel per unit in Rs 166.25\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, Page 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#Part a \n",
+ "wood=0.1;#in m^3\n",
+ "WoodCost=12000.0;#in Rs/m^3\n",
+ "Table=1;#in units\n",
+ "TableTopCost=3000.0;#in Rs/unit\n",
+ "LegBushes=4.0;#units\n",
+ "LegBushesCost=10.0;#Rs/units\n",
+ "Nails=100.0;#in grams\n",
+ "NailsCost=300.0;#in Rs/Kg\n",
+ "TotalLabour=15.0;#in Hours\n",
+ "TotalLabourCost=50.0;#in Rs/Hours\n",
+ "\n",
+ "#calcualtion\n",
+ "WoodCostframelegs=WoodCost*wood;#in Rs\n",
+ "WoodTopCost=3000.0;#in Rs\n",
+ "BushesCost=LegBushesCost*LegBushes;#in Rs\n",
+ "NailsCost=Nails*NailsCost/1000;#in Rs\n",
+ "LabourCost=TotalLabourCost*TotalLabour;#in Rs\n",
+ "TotalCost1=WoodCostframelegs+WoodTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Cost of Table with wooden top in Rs \",round(TotalCost1,3)\n",
+ "\n",
+ "#given data for table with granite top\n",
+ "#Part b \n",
+ "wood=0.15;#in m^3\n",
+ "WoodCost=12000.0;#in Rs/m^3\n",
+ "Granite=1.62;#in m^2\n",
+ "GraniteCost=800.0;#in Rs/m^2\n",
+ "LegBushes=4.0;#units\n",
+ "LegBushesCost=25.0;#Rs/units\n",
+ "Nails=50.0;#in grams\n",
+ "NailsCost=300.0;#in Rs/Kg\n",
+ "TotalLabour=8.0;#in Hours\n",
+ "TotalLabourCost=50.0;#in Rs/Hours\n",
+ "\n",
+ "\n",
+ "WoodCostframelegs=WoodCost*wood;#in Rs\n",
+ "GraniteTopCost=Granite*GraniteCost;#in Rs\n",
+ "BushesCost=LegBushesCost*LegBushes;#in Rs\n",
+ "NailsCost=Nails*NailsCost/1000;#in Rs\n",
+ "LabourCost=TotalLabourCost*TotalLabour;#in Rs\n",
+ "TotalCost2=WoodCostframelegs+GraniteTopCost+BushesCost+NailsCost+LabourCost;#in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Cost of Table with Granite top in Rs \",round(TotalCost2,3);\n",
+ "print \"Economic advantage of table with granite top in Rs \",round(TotalCost1-TotalCost2,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cost of Table with wooden top in Rs 5020.0\n",
+ "Cost of Table with Granite top in Rs 3611.0\n",
+ "Economic advantage of table with granite top in Rs 1409.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3 Page 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#design A\n",
+ "LatheCost=200.0;#in Rs/hour\n",
+ "grinderCost=150.0;#in Rs/hour\n",
+ "HoursOfLathe=16.0;#in hours/1000Unit\n",
+ "HoursOfGrinder=4.5;#in hours/1000Unit\n",
+ "\n",
+ "#calcualtion\n",
+ "TotalCostA=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n",
+ "\n",
+ "#result\n",
+ "print \"Total cost of design A per 100,000 units \",round(TotalCostA*100000.0/1000,3);\n",
+ "\n",
+ "# Design B\n",
+ "HoursOfLathe=7.0;#in hours/1000Unit\n",
+ "HoursOfGrinder=12.0;#in hours/1000Unit\n",
+ "TotalCostB=LatheCost*HoursOfLathe+grinderCost*HoursOfGrinder;#in Rs/1000unit\n",
+ "\n",
+ "#result\n",
+ "print \"Total cost of design A per 100,000 units\",round(TotalCostB*100000.0/1000,3);\n",
+ "print \"Economic advantage of design B over design A per 100,000 units in Rs \",round(TotalCostA-TotalCostB,3)*100;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total cost of design A per 100,000 units 387500.0\n",
+ "Total cost of design A per 100,000 units 320000.0\n",
+ "Economic advantage of design B over design A per 100,000 units in Rs 67500.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4,Page 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "from math import pi\n",
+ "Tanks=4.0;#units\n",
+ "TankDia=5.2;#in meter\n",
+ "\n",
+ "#calcualtion\n",
+ "TankRad=TankDia/2;#in meters\n",
+ "TankHeight=7;#in meters\n",
+ "HeightDiaRatio=TankHeight/TankDia;#unitless\n",
+ "VolPerTank=(22/7)*TankRad**2*TankHeight;#in m^3\n",
+ "h=VolPerTank/(pi)*64;#in meters\n",
+ "r=h/8;#in meters\n",
+ "d=2*r;#in meters\n",
+ "CostNewDesign=900000*(100.0/111);#in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Expected savings by redesign in Rs \",round(900000-CostNewDesign,3);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Expected savings by redesign in Rs 89189.189\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5,Page 21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#steel frame\n",
+ "distance=2500.0;#in Km\n",
+ "TransCost=1.0;#in Rs/Kg/100Km\n",
+ "SteelFramePrice=1000.0;#in Rs/Unit\n",
+ "SteelFrameWeight=75.0;#in Kg/Unit\n",
+ "\n",
+ "#calculation\n",
+ "TotalCost1=SteelFramePrice+TransCost*SteelFrameWeight*distance/100;#in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Total cost of steel window frame per unit in Rs \",round(TotalCost1,3);\n",
+ "\n",
+ "# Aluminium window frame\n",
+ "AlumilniumFramePrice=1500.0;#in Rs/Unit\n",
+ "AlumilniumFrameWeight=28.0;#in Kg/Unit\n",
+ "\n",
+ "#calculation\n",
+ "TotalCost2=AlumilniumFramePrice+TransCost*AlumilniumFrameWeight*distance/100;#in Rs\n",
+ "\n",
+ "#result\n",
+ "print \"Total cost of Alumilnium window frame per unit in Rs \",round(TotalCost2,3);\n",
+ "print \"DECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs \",round(TotalCost1-TotalCost2,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total cost of steel window frame per unit in Rs 2875.0\n",
+ "Total cost of Alumilnium window frame per unit in Rs 2200.0\n",
+ "DECISION : The total cost per unit of the aluminium window frame is less than that of steel window frame. Hence, Alumilnium window frame is recommended. The Economic advantage per unit of the Alumilnium window frame over steel window frame in Rs 675.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6,Page 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#Cost of component using process sequence 1\n",
+ "print\"The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\" ;\n",
+ "print \"Calculations are summarized in form of table below : \";\n",
+ "print \"Operation Operation Time Machine Hour rate Cost\";\n",
+ "print \" No. Min Hour Rs. Rs.\";\n",
+ "print \" 1 Turning 5 0.083 200 16.60\";\n",
+ "print \" 2 Milling 8 0.133 400 53.20\";\n",
+ "print \" 3 Shapiing 10 0.167 350 58.45\";\n",
+ "print \" 4 Drilling 3 0.050 300 15.00\";\n",
+ "print \" Total 143.25\";\n",
+ "\n",
+ "#Cost of component using process sequence 2\n",
+ "print \"The process sequence 2 of the component is as follows : Turning - Milling - Drilling\" ;\n",
+ "print \"Calculations are summarized in form of table below : \";\n",
+ "print \"Operation Operation Time Machine Hour rate Cost\";\n",
+ "print \" No. Min Hour Rs. Rs.\";\n",
+ "print \" 1 Turning 5 0.083 200 16.60\";\n",
+ "print \" 2 Milling 14 0.233 400 93.20\";\n",
+ "print \" 4 Drilling 3 0.050 300 15.00\";\n",
+ "print \" Total 124.80\";\n",
+ "\n",
+ "#Cost of component using process sequence 3\n",
+ "print \"The process sequence 3 of the component is as follows : Only CNC operations\" ;\n",
+ "print \"Calculations are summarized in form of table below : \";\n",
+ "print \"Operation Operation Time Machine Hour rate Cost\";\n",
+ "print \" No. Min Hour Rs. Rs.\";\n",
+ "print \" 1 CNC 8 0.133 1000 133\";\n",
+ "\n",
+ "print \"The process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The process sequence 1 of the component is as follows : Turning - Milling - Shaping - Drilling\n",
+ "Calculations are summarized in form of table below : \n",
+ "Operation Operation Time Machine Hour rate Cost\n",
+ " No. Min Hour Rs. Rs.\n",
+ " 1 Turning 5 0.083 200 16.60\n",
+ " 2 Milling 8 0.133 400 53.20\n",
+ " 3 Shapiing 10 0.167 350 58.45\n",
+ " 4 Drilling 3 0.050 300 15.00\n",
+ " Total 143.25\n",
+ "The process sequence 2 of the component is as follows : Turning - Milling - Drilling\n",
+ "Calculations are summarized in form of table below : \n",
+ "Operation Operation Time Machine Hour rate Cost\n",
+ " No. Min Hour Rs. Rs.\n",
+ " 1 Turning 5 0.083 200 16.60\n",
+ " 2 Milling 14 0.233 400 93.20\n",
+ " 4 Drilling 3 0.050 300 15.00\n",
+ " Total 124.80\n",
+ "The process sequence 3 of the component is as follows : Only CNC operations\n",
+ "Calculations are summarized in form of table below : \n",
+ "Operation Operation Time Machine Hour rate Cost\n",
+ " No. Min Hour Rs. Rs.\n",
+ " 1 CNC 8 0.133 1000 133\n",
+ "The process sequence 2 has the least cost. Therefore, it should be selected for manufacturing the component.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter3.ipynb b/Engineering_Economics/Chapter3.ipynb new file mode 100755 index 00000000..b94c5fa1 --- /dev/null +++ b/Engineering_Economics/Chapter3.ipynb @@ -0,0 +1,360 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:5b530b225e354d5204b6b04a92931fcee5b92fa42094bc3f03e4022169e39d78"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Interest Formulas and their Application"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 Page 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "P=20000.0;#in rupees\n",
+ "n=10.0;#in years\n",
+ "i=18.0;#% per annum\n",
+ "\n",
+ "#calculation\n",
+ "F=P*(1+i/100)**n;\n",
+ "\n",
+ "#result\n",
+ "print \"Maturity value after 18 years is \", round(F,3),\" Rupees.\";\n",
+ "print \" Ans in the book is not correct\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maturity value after 18 years is : 104676.711 Rupees.\n",
+ " Ans in the book is not correct\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2 Page 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "F=100000.0;#in rupees\n",
+ "n=10.0;#in years\n",
+ "i=15.0;#% per annum\n",
+ "\n",
+ "#calculation\n",
+ "P=F/((1.0+i/100.0)**n);\n",
+ "\n",
+ "#result\n",
+ "print \"The person has to invest \", round(P,3),\" Rupees.\";\n",
+ "print \" Ans in the book is not correct\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The person has to invest 24718.471 Rupees.\n",
+ " Ans in the book is not correct\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3 Page 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "A=10000.0;#in rupees\n",
+ "n=25.0;#in years\n",
+ "i=20.0;#% per annum\n",
+ "\n",
+ "#calculation\n",
+ "F=A*(((1+i/100)**n-1)/(i/100));\n",
+ "\n",
+ "#result\n",
+ "print \"The future sum of the annual equal payment after 25 years is \",round(F,3),\" Rupees.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The future sum of the annual equal payment after 25 years is 4719810.832 Rupees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4 Page 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "F=500000.0;#in rupees\n",
+ "n=15.0;#in years\n",
+ "i=18.0;#% per annum\n",
+ "\n",
+ "#calculation\n",
+ "A=F*((i/100)/((1+i/100)**n-1));\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equal ammount which must be deposited for 15 years is \",round(A,3),\" Rupees.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The annual equal ammount which must be deposited for 15 years is 8201.391 Rupees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5 Page 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiasation of variable\n",
+ "A=1000000.0;#in rupees\n",
+ "n=20.0;#in years\n",
+ "i=15.0;#% per annum\n",
+ "\n",
+ "#calculation\n",
+ "P=A*(((1+i/100)**n-1)/((i/100)*(1+i/100)**n));\n",
+ "\n",
+ "#result\n",
+ "print \"The amount of reserve which must be setup now is : \",round(P,3),\" Rupees\";\n",
+ "print \" Ans in the book is not correct\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amount of reserve which must be setup now is : 6259331.474 Rupees\n",
+ " Ans in the book is not correct\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6 Page 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "P=1000000.0;#in rupees\n",
+ "n=15.0;#in years\n",
+ "i=18.0;#% per annum\n",
+ "\n",
+ "#calculation\n",
+ "A=P*(((i/100)*(1+i/100)**n)/((1+i/100)**n-1));\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent installment to be paid by the company to the bank is \",round(A),\" Rupees.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The annual equivalent installment to be paid by the company to the bank is : 196403.0 Rupees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7 Page 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "A1=4000.0;#in rupees\n",
+ "G=500.0;#in rupees\n",
+ "n=10.0;#in years\n",
+ "i=15.0;#% per annum\n",
+ "\n",
+ "#calculation\n",
+ "A=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\n",
+ "F=A*(((1+i/100)**n-1)/(i/100));\n",
+ "\n",
+ "#result\n",
+ "print \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At the end of 10th year, the compound amountr of all his payments will be : 115560.6 Rupees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8 Page 36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "A1=8500.0;#in rupees\n",
+ "G=-500.0;#in rupees\n",
+ "n=10.0;#in years\n",
+ "i=15.0;#% per annum\n",
+ "\n",
+ "#calculation\n",
+ "A=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\n",
+ "F=A*(((1+i/100)**n-1)/(i/100));\n",
+ "\n",
+ "#result\n",
+ "print \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At the end of 10th year, the compound amountr of all his payments will be : 138235.878 Rupees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9 Page 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "P=5000.0;#in rupees\n",
+ "n=10.0;#in years\n",
+ "i=12.0;#% per annum\n",
+ "m=4.0;#no. of interest periods per year for quarterly\n",
+ "\n",
+ "#calculation\n",
+ "N=n*m;\n",
+ "r=i/m;\n",
+ "F=P*(1+r/100)**N;\n",
+ "\n",
+ "#result\n",
+ "print\"Maturity value after 10 years is \",round(F,3),\" Rupees.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maturity value after 10 years is : 16310.189 Rupees.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter4.ipynb b/Engineering_Economics/Chapter4.ipynb new file mode 100755 index 00000000..2b2d10b2 --- /dev/null +++ b/Engineering_Economics/Chapter4.ipynb @@ -0,0 +1,388 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:aed8a204f6a6b9aa286380e07fd82210fb76cb7818bcaa10c4f627aee9d0c52a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Present Worth Method of Comparision"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#technology 1\n",
+ "P=1200000.0;#in Rs\n",
+ "A=400000.0;#in Rs\n",
+ "i=20.0;#in % per annum\n",
+ "n=10.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth for this technology in RS. \",round(PW,3);\n",
+ "\n",
+ "#technology 2\n",
+ "P=2000000.0;#in Rs\n",
+ "A=600000.0;#in Rs\n",
+ "i=20.0;#in % per annum\n",
+ "n=10.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth for this technology in RS. \",round(PW,3);\n",
+ "\n",
+ "#technology 3\n",
+ "P=1800000.0;#in Rs\n",
+ "A=500000.0;#in Rs\n",
+ "i=20.0;#in % per annum\n",
+ "n=10.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "PW=-P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth for this technology in RS. \",round(PW,3);\n",
+ "print \"It is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\";\n",
+ "print \"the answer is differnt due to approximation error\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The present worth for this technology in RS. 476988.834\n",
+ "The present worth for this technology in RS. 515483.251\n",
+ "The present worth for this technology in RS. 296236.043\n",
+ "It is clear from the calculations that the present worth of technology 2 is the highest among all technologies. Therefore technology 2 is suggested for implementation to expand the production.\n",
+ "the answer is differnt due to approximation error\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2 Page 46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#bid 1\n",
+ "P=450000.0;#in Rs\n",
+ "A=27000.0;#in Rs\n",
+ "i=15.0;#in % per annum\n",
+ "n=15.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "PW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth for this bid in RS. \",round(PW,3)\n",
+ "\n",
+ "#bid 2\n",
+ "P=540000.0;#in Rs\n",
+ "A=28500.0;#in Rs\n",
+ "i=15.0;#in % per annum\n",
+ "n=15.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "PW=P+A*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth for this bid in RS. \",round(PW,3)\n",
+ "print \"The total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The present worth for this bid in RS. 607878.993\n",
+ "The present worth for this bid in RS. 706650.048\n",
+ "The total present worth cost of bid 1 is less than that of bid 2. Hence bid 1 is to be selected for implementation. That is, the Elevator from Alpha Elevator Inc. is to be purchased and installed in the new building.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3 Page 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#investment proposal A\n",
+ "P1=-10000.0;#in Rs\n",
+ "P2=3000.0;#in Rs\n",
+ "P3=3000.0;#in Rs\n",
+ "P4=7000.0;#in Rs\n",
+ "P5=6000.0;#in Rs\n",
+ "i=18.0;#in % per annum\n",
+ "\n",
+ "#calculation\n",
+ "PW_A=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth of A in RS. \",round(PW_A,3);\n",
+ "\n",
+ "#investment proposal B\n",
+ "P1=-10000.0;#in Rs\n",
+ "P2=6000.0;#in Rs\n",
+ "P3=6000.0;#in Rs\n",
+ "P4=3000.0;#in Rs\n",
+ "P5=3000.0;#in Rs\n",
+ "i=18.0;#in % per annum\n",
+ "\n",
+ "#calculation\n",
+ "PW_B=P1+P2*1/((1+i/100)**1)+P3*1/((1+i/100)**2)+P4*1/((1+i/100)**3)+P5*1/((1+i/100)**4);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth of B in RS. \",round(PW_B,3);\n",
+ "print\"At i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The present worth of A in RS. 2052.076\n",
+ "The present worth of B in RS. 2767.112\n",
+ "At i=18%, the present worth of proposal B is higher than that of proposal A. Therefore, select proposal B.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4 Page 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "P0=400000.0;#in Rs\n",
+ "P=200000.0;#in Rs\n",
+ "i=18.0;#in % per annum\n",
+ "n=10.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "PW=P0+P*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth of alternative 2 in RS. \",round(PW,3);\n",
+ "print \"The present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The present worth of alternative 2 in RS. 1298817.259\n",
+ "The present worth of 2nd alternative is less than that of first one i.e., complete downpayment of Rs. 1600000. Hence, select 2nd alternative.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5 Page 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#plan 1\n",
+ "P0=-1000.0;#in Rs\n",
+ "P=12000.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=15.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "PW1=P0+P*1/((1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth of Plan-1 in RS. \",round(PW1,3);\n",
+ "\n",
+ "#plan 2\n",
+ "P0=-1000.0;#in Rs\n",
+ "P=4000.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n1=10.0;#in years\n",
+ "n2=15.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "PW2=P0+P*1/((1+i/100)**n1)++P*1/((1+i/100)**n2);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth of Plan-2 in RS.\",round(PW2,3);\n",
+ "print \"The present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The present worth of Plan-1 in RS. 1192.355\n",
+ "The present worth of Plan-2 in RS. 1018.678\n",
+ "The present worth of Plan-1 is more than that of Plan-1. Therefore plan 1 is the best plan from the investors point of view.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6,Page 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#plan 1\n",
+ "P0=-10000.0;#in Rs\n",
+ "P=800000.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=20.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "PW1=P0*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n)+P*1/((1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth of Plan-1 in RS. \",round(PW1,3);\n",
+ "\n",
+ "#plan 2\n",
+ "P0=-10000.0;#in Rs\n",
+ "P=1500000.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n1=20.0;#in years\n",
+ "n2=25.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "PW2=P0*(((1+i/100)**n1)-1)/((i/100)*(1+i/100)**n1)+P*1/((1+i/100)**n2);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth of Plan-2 in RS. \",round(PW2,3);\n",
+ "print \"The present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\";\n",
+ "print \"answer is bit different due to approximation error\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The present worth of Plan-1 in RS. 8238.976\n",
+ "The present worth of Plan-2 in RS. 13540.524\n",
+ "The present worth of Innovative Investment Ltd. Plan is more than that of Novel Investment Ltd. Plan. Therefore Innovative Investment Ltd. Plan is the best plan from the investors point of view.\n",
+ "answer is bit different due to approximation error\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7 Page 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "P=12000.0;#in Rs\n",
+ "A1=10000.0;#in Rs\n",
+ "G=1000.0;#in Rs\n",
+ "i=18.0;#in % per annum\n",
+ "n=10.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "PW=-P+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/((i/100)*(1+i/100)**n);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The present worth of the small business in RS. \",round(PW,3);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The present worth of the small business in RS. 47293.316\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter5.ipynb b/Engineering_Economics/Chapter5.ipynb new file mode 100755 index 00000000..398e418d --- /dev/null +++ b/Engineering_Economics/Chapter5.ipynb @@ -0,0 +1,352 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e388f34dd67bfe5948d20d52a601f7e8e53b92aa882e9a754ed91176569417c0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Future Worth Method"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1,Page 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#alternate A\n",
+ "P=5000000.0;#in Rs\n",
+ "A=2000000.0;#in Rs\n",
+ "i=18.0;#in % per annum\n",
+ "n=4.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_A=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of alternative A in RS. \",round(FW_A,3);\n",
+ "\n",
+ "#alternate B\n",
+ "P=4500000.0;#in Rs\n",
+ "A=1800000.0;#in Rs\n",
+ "i=18.0;#in % per annum\n",
+ "n=4.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_B=(-P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100));#in RS\n",
+ "print \"The future worth amount of alternative B in RS. \", round(FW_B,3);\n",
+ "print \"The future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\";\n",
+ "print \" Calculation in the book is not accurate.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The future worth amount of alternative A in RS. 736975.2\n",
+ "The future worth amount of alternative B in RS. 663277.68\n",
+ "The future worth of alternative A is greater than that of alternative B. Thus, alternative A should be selected.\n",
+ " Calculation in the book is not accurate.\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2,Page 58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#alternate 1\n",
+ "FC=2000000.0;#in Rs\n",
+ "AI=800000.0;#in Rs\n",
+ "ATax=80000.0;#in Rs\n",
+ "NetAI=AI-ATax;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=20.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_1=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of alternative 1 in RS. : \", round(FW_1,3)\n",
+ "\n",
+ "#alternative2\n",
+ "FC=3600000.0;#in Rs\n",
+ "AI=980000.0;#in Rs\n",
+ "ATax=150000.0;#in Rs\n",
+ "NetAI=AI-ATax;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=20.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_2=(-FC*(1+i/100)**n)+(NetAI*(((1+i/100)**n)-1)/(i/100));#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of alternative 2 in RS.\",round(FW_2,3)\n",
+ "print\"The future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\";\n",
+ "print \" Calculation in the book is not accurate.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The future worth amount of alternative 1 in RS. : 32585172.373\n",
+ "The future worth amount of alternative 2 in RS. 25076872.093\n",
+ "The future worth of alternative 1 is greater than that of alternative 2. Thus, building the gas station is the best alternative.\n",
+ " Calculation in the book is not accurate.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3,Page 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#part a\n",
+ "#alternative 1\n",
+ "P=500000.0;#in Rs\n",
+ "A1=50000.0;#in Rs\n",
+ "G=50000.0;#in Rs\n",
+ "i=8.0;#in % per annum\n",
+ "n=6.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n",
+ "\n",
+ "#alternative 2\n",
+ "P=700000.0;#in Rs\n",
+ "A1=70000.0;#in Rs\n",
+ "G=70000.0;#in Rs\n",
+ "i=8.0;#in % per annum\n",
+ "n=6.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_2=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of alternative 2 in RS. \", round(FW_2,3);\n",
+ "print \"The future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\";\n",
+ "\n",
+ "\n",
+ "#part b\n",
+ "#alternative a\n",
+ "P=500000.0;#in Rs\n",
+ "A1=50000.0;#in Rs\n",
+ "G=50000.0;#in Rs\n",
+ "i=9.0;#in % per annum\n",
+ "n=6.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of alternative 1 in RS. \", round(FW_1,3);\n",
+ "\n",
+ "#altenative 2\n",
+ "P=700000.0;#in Rs\n",
+ "A1=70000.0;#in Rs\n",
+ "G=70000.0;#in Rs\n",
+ "i=9.0;#in % per annum\n",
+ "n=6.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_1=(-P*(1+i/100)**n)+(A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100))*(((1+i/100)**n)-1)/(i/100);#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of alternative 2 in RS.\", round(FW_1,3);\n",
+ "print \"The negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \";\n",
+ "print \" Calculation in the book is not accurate.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The future worth amount of alternative 1 in RS. 408314.938\n",
+ "The future worth amount of alternative 2 in RS. 571640.914\n",
+ "The future worth of alternative 2 is greater than that of alternative 1. Thus, alternative 2 must be selected.\n",
+ "The future worth amount of alternative 1 in RS. 383913.653\n",
+ "The future worth amount of alternative 2 in RS. 537479.115\n",
+ "The negative sign of alternatives future worth indicates that alternative 2 incurs loss. Thus, none of the two alternatives should be selected. \n",
+ " Calculation in the book is not accurate.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#alternative 1\n",
+ "P=8000000.0;#in Rs\n",
+ "A=800000.0;#in Rs\n",
+ "i=20.0;#in % per annum\n",
+ "n=12.0;#in years\n",
+ "Salvage=500000;#in Rs\n",
+ "\n",
+ "#calcualtion\n",
+ "FW1=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth for this alternative in RS.\",round(FW1,3)\n",
+ "\n",
+ "#alternative 2\n",
+ "P=7000000.0;#in Rs\n",
+ "A=900000.0;#in Rs\n",
+ "i=20.0;#in % per annum\n",
+ "n=12.0;#in years\n",
+ "Salvage=400000;#in Rs\n",
+ "\n",
+ "#calculation\n",
+ "FW2=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth for this alternative in RS.\",round(FW2,3);\n",
+ "\n",
+ "#alternative 3\n",
+ "P=9000000.0;#in Rs\n",
+ "A=850000.0;#in Rs\n",
+ "i=20.0;#in % per annum\n",
+ "n=12.0;#in years\n",
+ "Salvage=700000;#in Rs\n",
+ "\n",
+ "#calculation\n",
+ "FW3=P*(1+i/100)**n+A*(((1+i/100)**n)-1)/(i/100)-Salvage;#in RS\n",
+ "\n",
+ "print \"The future worth for this alternative in RS. \",round(FW3,3)\n",
+ "print \"The future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\";\n",
+ "print \" Calculation in the book is not accurate.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The future worth for this alternative in RS. 102493205.379\n",
+ "The future worth for this alternative in RS. 97635155.155\n",
+ "The future worth for this alternative in RS. 113188330.939\n",
+ "The future worth of alternative 2 is less than that of other two alternatives. Thus, Ms. Krishna castings should buy the annealing furnace from manufacturer 2.\n",
+ " Calculation in the book is not accurate.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initialisation of variable\n",
+ "#Machine A\n",
+ "P=400000.0;#in Rs\n",
+ "A=40000.0;#in Rs\n",
+ "S=200000.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=4.0#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_A=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of Machine A in RS. \",round(FW_A,3);\n",
+ "\n",
+ "#Machine B\n",
+ "P=800000.0;#in Rs\n",
+ "A=0.0;#in Rs\n",
+ "S=550000.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=4.0#in years\n",
+ "\n",
+ "#calculation\n",
+ "FW_B=(P*(1+i/100)**n)+(A*(((1+i/100)**n)-1)/(i/100))-S;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The future worth amount of Machine B in RS. \",round(FW_B,3);\n",
+ "print \"The future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\";\n",
+ "print \" Calculation in the book is not accurate\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The future worth amount of Machine A in RS. 620580.864\n",
+ "The future worth amount of Machine B in RS. 708815.488\n",
+ "The future worth of Machine A is less than that of Machine B. Thus, Machine A should be selected.\n",
+ " Calculation in the book is not accurate\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter6.ipynb b/Engineering_Economics/Chapter6.ipynb new file mode 100755 index 00000000..c0d35ab9 --- /dev/null +++ b/Engineering_Economics/Chapter6.ipynb @@ -0,0 +1,230 @@ +{ + "metadata": { + "name": "EE-6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Annual Equivalent Method" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.1 Page 70" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nrun=20000.0; #km\nkmperlitre=9; #kmpl\ncost=21;\nG=2222.20;#in Rs.\ni=18.0;#in % per annum\nn=4.0;#in years\n\n#calculation\ncon=run/kmperlitre;#consumption\nA1=con*cost;\nA=A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;\n\n#result\nprint \"Annual equal amount spending for petrol in Rs. : \",round(A,3);\nprint \"This amoount is less than the annual rental value of Rs. 60000. Therefore, the company should continue to provide its own car to its executive. \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Annual equal amount spending for petrol in Rs. : 49543.741\nThis amoount is less than the annual rental value of Rs. 60000. Therefore, the company should continue to provide its own car to its executive. \n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.2 Page 71" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nP=500000.0;#in Rs\nA=200000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calcultion\nAE_1=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 1 in RS. : \",round(AE_1,3);\n\n#alternative 2\nP=400000.0;#in Rs\nA=300000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nAE_2=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 2 in RS. : \",round(AE_2,3);\n\n#alternative 3\nP=600000.0;#in Rs\nA=150000.0;#in Rs\ni=20.0;#in % per annum\nn=15.0;#in years\n\n#calculation\nAE_3=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A;#in RS\n\n#result\nprint \"The Annual equivalent cost of alternative 3 in RS. : \",round(AE_3,3);\nprint\"The annual equivalent cost of manufacturer 3 is less than that of other two. Therefore, company should buy advanced machine centre from manufacturer 3. \";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost of alternative 1 in RS. : 306941.06\nThe Annual equivalent cost of alternative 2 in RS. : 385552.848\nThe Annual equivalent cost of alternative 3 in RS. : 278329.272\nThe annual equivalent cost of manufacturer 3 is less than that of other two. Therefore, company should buy advanced machine centre from manufacturer 3. \n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.3 Page 73" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative a\nP=150000.0;#in Rs\nA=60000.0;#in Rs\nS=15000.0;#in Rs\ni=25.0;#in % per annum\nn=5.0;#in years\n\n#calculation\nAE_A=-P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A+S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent revenue of alternative A in RS. : \",round(AE_A,3)\n\n#alternative b\nP=175000.0;#in Rs\nA=70000.0;#in Rs\nS=35000.0;#in Rs\ni=25.0;#in % per annum\nn=5.0;#in years\n\n#calculation\nAE_B=-P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+A+S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent revenue of alternative B in RS. : \",round(AE_B,3)\nprint \"The annual equivalent net return of alternative B is more than that of alternative A. Thus the company should select alternative A\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent revenue of alternative A in RS. : 6050.69\nThe Annual equivalent revenue of alternative B in RS. : 9191.456\nThe annual equivalent net return of alternative B is more than that of alternative A. Thus the company should select alternative A\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.4 Page 75" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#machine X\nP=150000.0;#in Rs\nA=0.0;#in Rs\nS=0.0;#in Rs\ni=15.0;#in % per annum\nn=12.0;#in years\n\n#calcualtion\nAE_X=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. : \",round(AE_X,3);\n\n#machine Y\nP=240000.0;#in Rs\nA=4500.0;#in Rs\nS=60000.0;#in Rs\ni=15.0;#in % per annum\nn=12.0;#in years\n\n#calcualtion\nAE_Y=P*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine Y in RS. : \",round(AE_Y,3);\nprint \"The annual equivalent cost of machine X is less than that of machine Y.So machine X is more cost effective machine. \";\nprint\" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost of machine X in RS. : 27672.116\nThe Annual equivalent cost of machine Y in RS. : 44275.386\nThe annual equivalent cost of machine X is less than that of machine Y.So machine X is more cost effective machine. \n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.5 Page 76" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initialisation of variable\n#alternative 1\nFC=15*150000.0;#in Rs\nMC=15*6000.0;#in Rs\nPL=15*15000.0;#in Rs\n\n#calculation\nMCPL=MC+PL;#in Rs\nS=15*90000.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\nAE1=FC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+MCPL-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE1,3);\n\n#alternative 2\nFC=5*750000.0;#in Rs\nMC=5*12000.0;#in Rs\nPL=5*15000.0;#in Rs\nMCPL=MC+PL;#in Rs\nS=5*150000.0;#in Rs\ni=15.0;#in % per annum\nn=15.0;#in years\n\n#calcualtion\nAE2=FC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+MCPL-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of alternative 1 is less than that of alternative 2. Therefore, select the route around the lake for laying the power line.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost for this alternative in RS. 671415.347\nThe Annual equivalent cost for this alternative in RS. 760551.158\nThe annual equivalent cost of alternative 1 is less than that of alternative 2. Therefore, select the route around the lake for laying the power line.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.6 Page 78" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nVC=390000.0;#in Rs\nLpY=60000.0/30;#in litres\nFcY=2000.0*8;#in Rs\nAllExp=FcY+9000.0+15000.0;#in Rs\nS=60000.0;#in Rs\ni=20.0;#in % per annum\nn=4.0;#in years\n\n#calcualtion\nAE1=VC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AllExp-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE1,3);\n\n#alternative 2\nVC=360000.0;#in Rs\nLpY=60000.0/20;#in litres\nFcY=3000.0*20;#in Rs\nAllExp=FcY+6000.0+15000.0;#in Rs\nS=90000.0;#in Rs\ni=20.0;#in % per annum\nn=3.0;#in years\n\n#calculation\nAE2=VC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AllExp-S*(i/100)/(((1+i/100)**n)-1);# in RS\n\n#result\nprint \"The Annual equivalent cost for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of purchase and operation of cars with diesel engine is less than that of cars with petrol engine. Therefore, the taxy company should buy cars with diesel engine.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost for this alternative in RS. 179475.41\nThe Annual equivalent cost for this alternative in RS. 227175.824\nThe annual equivalent cost of purchase and operation of cars with diesel engine is less than that of cars with petrol engine. Therefore, the taxy company should buy cars with diesel engine.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.7 Page 79" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nPprice=390000.0;#in Rs\nn=3.0;#in years\nn=n*12;#in months\nS=120000.0;#in Rs\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nME1=Pprice*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Monthly equivalent cost for this alternative in RS. \",round(ME1,3);\n\n#Alternative 2 \nLeaseAmount=10500.0;#in Rs\n\n#calcualtion\nMonthlyEquiCost=LeaseAmount;#in Rs.\n\n#result\nprint\"The Monthly equivalent cost for this alternative in RS. \",round(MonthlyEquiCost,3);\nprint\"The monthly equivalent cost of alternative 1 is less than that of alternative 2. hence the salesman should purchase the car for cash.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Monthly equivalent cost for this alternative in RS. 10167.864\nThe Monthly equivalent cost for this alternative in RS. 10500.0\nThe monthly equivalent cost of alternative 1 is less than that of alternative 2. hence the salesman should purchase the car for cash.\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.8 Page 81" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#machine A\nIC=300000.0;#in Rs\nn=4.0;#in years\nS=200000.0;#in Rs\nAM=30000.0;#in Rs\ni=15.0;#in % per annum\n\n#calcualtion\nAE_A=IC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AM-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. \",round(AE_A,3);\n\n#Machine B :\nIC=600000.0;#in Rs\nn=4.0;#in years\nS=300000.0;#in Rs\nAM=0.0;#in Rs\ni=15.0;#in % per annum\n\n#calcualtion\nAE_B=IC*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+AM-S*(i/100)/(((1+i/100)**n)-1);#in RS\n\n#result\nprint \"The Annual equivalent cost of machine X in RS. \",round(AE_B,3);\nprint \"The annual equivalent cost of machine A is less than that of machine B.So machine A is more cost effective machine. It is advised to buy machine A \";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The Annual equivalent cost of machine X in RS. 95026.535\nThe Annual equivalent cost of machine X in RS. 150079.605\nThe annual equivalent cost of machine A is less than that of machine B.So machine A is more cost effective machine. It is advised to buy machine A \n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.9 Page 83" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nDP=60000.0;#in Rs\nP1=15000.0;#in Rs\nn=1.0;#in years\ni=12.0;#in % Compounded anually\n\n#calculation\nPW1=DP+P1*1/((1+i/100)**n);#in RS\nn=4.0;#in years\nAE1=PW1*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)\n\n#result\nprint \"The annual equivalent for this alternative in RS. \",round(PW1,3);\nprint \"The annual equivalent for this alternative in RS.\",round(AE1,3);\n\n#alternative 2\nP4y=90000.0;#in Rs\nAE2=P4y*(i/100)/(((1+i/100)**n)-1);#in Rs.\n\n#result\nprint \"The annual equivalent for this alternative in RS. \",round(AE2,3);\nprint \"The annual equivalent cost of alternative 2 is less than that of alternative 1. Hence, Joshi Lakshimi should select alternative 2 for purchasing the home equipment.\";\nprint \" Calculation in the book is not accurate.\"", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent for this alternative in RS. 73392.857\nThe annual equivalent for this alternative in RS. 24163.456\nThe annual equivalent for this alternative in RS. 18831.099\nThe annual equivalent cost of alternative 2 is less than that of alternative 1. Hence, Joshi Lakshimi should select alternative 2 for purchasing the home equipment.\n Calculation in the book is not accurate.\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 6.10 Page 85" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initation of variable\n#Brand C : \nw=12.0;#in months\nP=1200.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand C : \nw=24.0;#in months\nP=1800.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand C : \nw=36.0;#in months\nP=2100.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_C=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_C,3);\n\n#Brand D : \nw=48.0;#in months\nP=2700.0;#in Rs/tyre\ni=12.0;#in % nominal rate(Compounded anually)\ni=i/12.0;#in % compounded monthly\n\n#calculation\nAE_D=P*((i/100)*(1+i/100)**w)/(((1+i/100)**w)-1);#in RS\n\n#result\nprint \"The annual equivalent for this brand in RS. \",round(AE_D,3);\nprint \"Here common multiple lives of tyres is considered. This is 144 months. Therefore, the comparison is nade on 144 months basis.\";\nprint \"The annual equivalent cost of Brand C is less than that of other brands. hence, it should be used in the vehicles of the trucking company. It should be replaced for times during the 144 months period.\";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent for this brand in RS. 106.619\nThe annual equivalent for this brand in RS. 84.732\nThe annual equivalent for this brand in RS. 69.75\nThe annual equivalent for this brand in RS. 71.101\nHere common multiple lives of tyres is considered. This is 144 months. Therefore, the comparison is nade on 144 months basis.\nThe annual equivalent cost of Brand C is less than that of other brands. hence, it should be used in the vehicles of the trucking company. It should be replaced for times during the 144 months period.\n" + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter7.ipynb b/Engineering_Economics/Chapter7.ipynb new file mode 100755 index 00000000..827a806e --- /dev/null +++ b/Engineering_Economics/Chapter7.ipynb @@ -0,0 +1,125 @@ +{ + "metadata": { + "name": "EE-7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Rate of Return Method" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.1 Page 89" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of vriable\nIi=100000.0;#in Rs\nAr=30000.0;#in Rs\nn=5.0;#in years\ni1=10.0;#in % per annum\n\n#calcualton\nPW1=-Ii+Ar*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\n\n#calcualtion\ni2=15.0;#in % per annum\nPW2=-Ii+Ar*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\n\n#result\nprint \"The present worth for i=15% in RS. \",round(PW2,3);\n\n#calculation\ni3=18.0;#in % per annum\nPW3=-Ii+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni=15+(PW2-0)*(i3-i2)/(PW2-PW3);#in Rs\n\n#result\nprint \"The present worth for i=18% in RS. \",round(PW3,3)\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return for the new business in % per annum \",round(i,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for i=10% in RS. 13723.603\nThe present worth for i=15% in RS. 564.653\nThe present worth for i=18% in RS. -6184.869\nPresent worth for i=15% is suitable.\nTherefore, the rate of return for the new business in % per annum 15.251\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.2 Page 90" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nIo=2000000.0;#in Rs\nANP=350000.0;#in Rs\nS=0.0;#in Rs\nn=10.0;#in years\ni1=10.0;#in % per annum\n\n#calcualtion\nPW1=-Io+ANP*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\n\n#calculation\ni2=12.0;#in % per annum\nPW2=-Io+ANP*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=10+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=15% in RS. \",round(PW2,3);\nprint \"Present worth for i=10% is suitable.\";\nprint \"Therefore, the rate of return for the new business in % per annum \",round(i,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for i=10% in RS. 150598.487\nThe present worth for i=15% in RS. -22421.94\nPresent worth for i=10% is suitable.\nTherefore, the rate of return for the new business in % per annum 11.741\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.3 Page 91" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternate 1\nIo=150000.0;#in Rs\nAp=45570.0;#in Rs\nn=5.0;#in years\n\n#calculation\ni1=10.0;#in % per annum\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=12.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni3=15.0;#in % per annum\nPW3=-Io+Ap*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=18.0;#in % per annum\nPW4=-Io+Ap*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth for i=10% in RS. \",round(PW1,3);\nprint \"The present worth for i=12% in RS. \",round(PW2,3);\nprint \"The present worth for i=15% in RS. \",round(PW3,3);\nprint \"The present worth for i=18% in RS. \",round(PW4,3);\nprint\"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\n\n#alternative 2\nIo=210000.0;#in Rs\nAp=58260.0;#in Rs\nn=5.0;#in years\ni1=12.0;#in % per annum\n\n#calcualtion\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=13.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=i1+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=12% in RS. \",round(PW1,3);\nprint \"The present worth for i=13% in RS. \",round(PW2,3);\nprint\"Present worth for i=12% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\n\n#Alternative 3:\nIo=255000.0;#in Rs\nAp=69000.0;#in Rs\nn=5.0;#in years\ni1=11.0;#in % per annum\nPW1=-Io+Ap*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=12.0;#in % per annum\nPW2=-Io+Ap*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni=i1+(PW1-0)*(i2-i1)/(PW1-PW2);#in Rs.\n\n#result\nprint \"The present worth for i=11% in RS. \",round(PW1,3);\nprint \"The present worth for i=12% in RS. \",round(PW2,3);\nprint\"Present worth for i=12% is suitable.\";\nprint \"Therefore, the rate of return of alternative in % per annum :\",round(i,3);\nprint\"It is clear that rate of return for alternative 3v is less than the minimum attractive rate of return of 12 %. So it should not be considered for comparison. the remaining two alternatives are qualified for consideration. Among the alternatives 1 and 2, the rate of return of 1 is greater than that of 2. hence,alternative 1 should be selected. \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth for i=10% in RS. 22746.153\nThe present worth for i=12% in RS. 14269.652\nThe present worth for i=15% in RS. 2757.708\nThe present worth for i=18% in RS. -7494.817\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative in % per annum : 15.807\nThe present worth for i=12% in RS. 14.262\nThe present worth for i=13% in RS. -5086.107\nPresent worth for i=12% is suitable.\nTherefore, the rate of return of alternative in % per annum : 12.003\nThe present worth for i=11% in RS. 16.894\nThe present worth for i=12% in RS. -6270.442\nPresent worth for i=12% is suitable.\nTherefore, the rate of return of alternative in % per annum : 11.003\nIt is clear that rate of return for alternative 3v is less than the minimum attractive rate of return of 12 %. So it should not be considered for comparison. the remaining two alternatives are qualified for consideration. Among the alternatives 1 and 2, the rate of return of 1 is greater than that of 2. hence,alternative 1 should be selected. \n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.4 Page 94" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nA0=-1275.0;#in Rs\nA1=150.0;#in Rs\nG=150.0;#in Rs\ni=10.0;#in % per annum\nn=5.0;#in years\n\n#calcualtion\nA=A1+G*(((1+i/100)**n)-i*n/100-1)/(((i/100)*(1+i/100)**n)-i/100) ;#in RS\ni1=10.0;#in % per annum\nPW1=A0+(A1+G*(((1+i1/100)**n)-i1*n/100-1)/(((i1/100)*(1+i1/100)**n)-i1/100))*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#i1n Rs.\ni2=12.0;#i2n % per annum\nPW2=A0+(A1+G*(((1+i2/100)**n)-i2*n/100-1)/(((i2/100)*(1+i2/100)**n)-i2/100))*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#i2n Rs.\ni3=15.0;#i3n % per annum\nPW3=A0+(A1+G*(((1+i3/100)**n)-i3*n/100-1)/(((i3/100)*(1+i3/100)**n)-i3/100))*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#i3n Rs.\ni4=18.0;#in % per annum\nPW4=A0+(A1+G*(((1+i4/100)**n)-i4*n/100-1)/(((i4/100)*(1+i4/100)**n)-i4/100))*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in Rs.\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The annual equivalent of the positive cash flows in RS. : \",round(A,3);\nprint \"PW(10)\",round(PW1,3);\nprint \"PW(12)\",round(PW2,3);\nprint \"PW(15)\",round(PW3,3);\nprint \"PW(18)\",round(PW1,4);\nprint\"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return for the given cash flow in % per annum :\",round(i,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The annual equivalent of the positive cash flows in RS. : 421.519\nPW(10) 322.888\nPW(12) 225.269\nPW(15) 94.095\nPW(18) 322.8882\nPresent worth for i=15% is suitable.\nTherefore, the rate of return for the given cash flow in % per annum : 17.448\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 7.5 Page 95" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\n#alternative 1\nIo=500000.0;#in Rs\nAr=170000.0;#in Rs\nn=5.0;#in years\ni1=15.0;#in % per annum\n\n#calculation\nPW1=-Io+Ar*(((1+i1/100)**n)-1)/((i1/100)*(1+i1/100)**n);#in RS\ni2=17.0;#in % per annum\nPW2=-Io+Ar*(((1+i2/100)**n)-1)/((i2/100)*(1+i2/100)**n);#in RS\ni3=20.0;#in % per annum\nPW3=-Io+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=22.0;#in % per annum\nPW4=-Io+Ar*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth(PW(15%)) for i=10% in RS. \",round(PW1,3);\nprint \"The present worth(PW(17%)) for i=10% in RS. \",round(PW2,3);\nprint \"The present worth(PW(20%)) for i=10% in RS. \",round(PW3,3);\nprint \"The present worth(PW(22%)) for i=10% in RS. \",round(PW4,3);\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative 1 in % per annum \",round(i,3);\n\n#altenative 2\nIo=800000.0;#in Rs\nAr=270000.0;#in Rs\nn=5.0;#in years\ni3=20.0;#in % per annum\n\n#calculation\nPW3=-Io+Ar*(((1+i3/100)**n)-1)/((i3/100)*(1+i3/100)**n);#in RS\ni4=22.0;#in % per annum\nPW4=-Io+Ar*(((1+i4/100)**n)-1)/((i4/100)*(1+i4/100)**n);#in RS\ni=i3+(PW3-0)*(i4-i3)/(PW3-PW4);#in Rs.\n\n#result\nprint \"The present worth(PW(20%)) for i=10% in RS. \",round(PW3,3);\nprint \"The present worth(PW(22%)) for i=10% in RS. \",round(PW4,3);\nprint \"Present worth for i=15% is suitable.\";\nprint \"Therefore, the rate of return of alternative 2 in % per annum \",round(i,3);\nprint \"Since the rate of return of alternative 1 is greater than that of the alternative 2, select alternative 1. \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "The present worth(PW(15%)) for i=10% in RS. 69866.367\nThe present worth(PW(17%)) for i=10% in RS. 43888.848\nThe present worth(PW(20%)) for i=10% in RS. 8404.064\nThe present worth(PW(22%)) for i=10% in RS. -13181.241\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative 1 in % per annum 20.779\nThe present worth(PW(20%)) for i=10% in RS. 7465.278\nThe present worth(PW(22%)) for i=10% in RS. -26817.264\nPresent worth for i=15% is suitable.\nTherefore, the rate of return of alternative 2 in % per annum 20.436\nSince the rate of return of alternative 1 is greater than that of the alternative 2, select alternative 1. \n" + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter8.ipynb b/Engineering_Economics/Chapter8.ipynb new file mode 100755 index 00000000..de307e62 --- /dev/null +++ b/Engineering_Economics/Chapter8.ipynb @@ -0,0 +1,619 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:44663c03d7c23760034bea6db3765d8b79a48144d6b54769443d3f295fd0b9f3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Replacement and Maintenance Analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1 Page 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "FC=4000.0;#in Rs.\n",
+ "i=0.0;#in % per annum\n",
+ "MC1=0;#in Rs.\n",
+ "print \"Tabulation to determine economic life : \";\n",
+ "print\"End of Maintenance Summation of Avg cost of Avg FC if Avg total\";\n",
+ "print\" year cost at end maintenance maintenance replaced at cost through\";\n",
+ "print\" of year costs through year year given year given\";\n",
+ "print\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\";\n",
+ "print\" 1 0 0 0 4000 4000\";\n",
+ "print\" 2 200 200 100 2000 2100\";\n",
+ "print\" 3 400 600 200 1333.33 1533.33\";\n",
+ "print\" 4 600 1200 300 1000 1300\";\n",
+ "print\" 5 800 2000 400 800 1200\";\n",
+ "print\" 6 1000 3000 500 666.67 1166.67\";\n",
+ "print\" 7 1200 4200 600 571.43 1171.43\";\n",
+ "print\"Economic life of the machine : 6 years\";\n",
+ "print\"Column C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\";\n",
+ "\n",
+ "#When i=12%\n",
+ "i=12.0;#in % per annum\n",
+ "FC=4000.0;#in Rs.\n",
+ "print\"Tabulation to determine economic life : \";\n",
+ "print\"End of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\";\n",
+ "print\" year cost at end 12% of year of PW of cumulative 12% total cost\";\n",
+ "print\" of year n maintenance maintenance maintenance n of year\";\n",
+ "print\" A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\";\n",
+ "print\" 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\";\n",
+ "print\" 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\";\n",
+ "print\" 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\";\n",
+ "print\" 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\";\n",
+ "print\" 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\";\n",
+ "print\" 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\";\n",
+ "print\" 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\";\n",
+ "print\" 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\";\n",
+ "print\" 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\";\n",
+ "print\" 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\";\n",
+ "print\"Economic life of the machine : 7 years\";\n",
+ "print\"For this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\";\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tabulation to determine economic life : \n",
+ "End of Maintenance Summation of Avg cost of Avg FC if Avg total\n",
+ " year cost at end maintenance maintenance replaced at cost through\n",
+ " of year costs through year year given year given\n",
+ " A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.)\n",
+ " 1 0 0 0 4000 4000\n",
+ " 2 200 200 100 2000 2100\n",
+ " 3 400 600 200 1333.33 1533.33\n",
+ " 4 600 1200 300 1000 1300\n",
+ " 5 800 2000 400 800 1200\n",
+ " 6 1000 3000 500 666.67 1166.67\n",
+ " 7 1200 4200 600 571.43 1171.43\n",
+ "Economic life of the machine : 6 years\n",
+ "Column C summarizes the summation of maintenance costs for each replacement period. The value corresponding to any end of year in this column represents the total maintenance costs of using the equipment till the end of that year. It gives the Economic life of the machine : 6 years\n",
+ "Tabulation to determine economic life : \n",
+ "End of Maintenance P/F PW as of begin Summation of PW of A/P Annual equi\n",
+ " year cost at end 12% of year of PW of cumulative 12% total cost\n",
+ " of year n maintenance maintenance maintenance n of year\n",
+ " A B(Rs.) C(Rs.) D(Rs.) E(Rs.) F(Rs.) G(rs.) H(rs.)\n",
+ " 1 0 0.8929 0.00 0.00 4000.00 1.1200 4480.00\n",
+ " 2 200 0.7972 159.44 159.44 4159.44 0.5917 2461.14\n",
+ " 3 400 0.7118 284.72 444.16 4444.16 0.4163 1850.10\n",
+ " 4 600 0.6355 381.30 825.46 4825.46 0.3292 1588.54\n",
+ " 5 800 0.5674 453.92 1279.38 5279.38 0.2774 1464.50\n",
+ " 6 1000 0.5066 506.60 1785.98 5785.98 0.2432 1407.15\n",
+ " 7 1200 0.4524 542.88 2328.86 6328.86 0.2191 1386.65\n",
+ " 8 1400 0.4039 565.46 2894.32 6894.32 0.2013 1387.83\n",
+ " 9 1600 0.3606 576.96 3471.28 7471.28 0.1877 1402.36\n",
+ " 10 1800 0.3220 579.60 4050.88 8050.88 0.1770 1425.00\n",
+ "Economic life of the machine : 7 years\n",
+ "For this problem, the annual equivalent total cost is minimum at the end of year 7. Therefore, the economic life of the equipment is 7 year.\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2 Page 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "FC=20000.0;#in Rs.\n",
+ "i=15.0;#in % per annum\n",
+ "\n",
+ "#result\n",
+ "print \"The other details are summarized in Table 8.3. It can be seen from the book.\";\n",
+ "print \"Total annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\";\n",
+ "print \"In column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The other details are summarized in Table 8.3. It can be seen from the book.\n",
+ "Total annual equivalent cost = [cumulative sum of PW as of beginning of year 1 of operation & maintenance cost + FC - PW as of beginning of year 1 of salvage]*(A/P,15,n)\n",
+ "In column L, the annual equivalent cost is minimum for n=5. Therefore, the economic life of the machine is 5 years. \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3 Page 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "FC=20000.0;#in Rs.\n",
+ "i=15.0;#in % per annum\n",
+ "\n",
+ "#result\n",
+ "print \"The details are summarized in Table 8.4. It can be seen from the book.\";\n",
+ "print\"Total annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\";\n",
+ "print\"(column E + Rs. 6000)* Column G\";\n",
+ "print \"Column F * Column G\";\n",
+ "print \"In column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \";\n",
+ "print \"RESULT : Min annual equivalent cost for machine A : Rs. 2780\";\n",
+ "print \"Min annual equivalent cost for machine B : Rs. 3672.30\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The details are summarized in Table 8.4. It can be seen from the book.\n",
+ "Total annual equivalent cost = [summation of PW of maintenance cost + FC]]*(A/P,15,n)\n",
+ "(column E + Rs. 6000)* Column G\n",
+ "Column F * Column G\n",
+ "In column H, the minimum annual equivalent cost occurs when n=8. Therefore, the economic life of the machine B is 8 years. \n",
+ "RESULT : Min annual equivalent cost for machine A : Rs. 2780\n",
+ "Min annual equivalent cost for machine B : Rs. 3672.30\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4 Page 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#alternative 1\n",
+ "Pprice=200000.0;#in Rs\n",
+ "P=120000.0;#in Rs\n",
+ "F=25000.0;#in Rs\n",
+ "A=25000.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=6.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE1,3);\n",
+ "\n",
+ "#Alternative 2\n",
+ "P=150000.0;#in Rs\n",
+ "F=20000.0;#in Rs\n",
+ "A=14000.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=6.0;#in years\n",
+ "\n",
+ "#calcualion\n",
+ "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(12%)) of this alternative in RS. \",round(AE2,3);\n",
+ "print \"Since, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\";\n",
+ "print \"answer is bit different due to approximation error\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The annual equivalent cost(AE(12%)) of this alternative in RS. 51106.443\n",
+ "The annual equivalent cost(AE(12%)) of this alternative in RS. 48019.343\n",
+ "Since, The equivalent cost of new machine is less than that of present machine, it is suggested that the present machine be replaced with the new machine.\n",
+ "answer is bit different due to approximation error\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5 Page 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initation of variable\n",
+ "#alternative 1\n",
+ "Pprice=50000.0;#in Rs\n",
+ "P=15000.0;#in Rs\n",
+ "F=8000.0;#in Rs\n",
+ "A=14000.0;#in Rs\n",
+ "i=15.0;#in % per annum\n",
+ "n=5.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(15%)) of this alternative in RS. \",round(AE1,3);\n",
+ "\n",
+ "#Alternative 2\n",
+ "P=65000.0;#in Rs\n",
+ "F=13000.0;#in Rs\n",
+ "A=9000.0;#in Rs\n",
+ "i=15.0;#in % per annum\n",
+ "n=20.0;#in years\n",
+ "\n",
+ "#calculation\n",
+ "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(15%)) of this alternative in RS. : \",round(AE2,3);\n",
+ "print \"Since, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The annual equivalent cost(AE(15%)) of this alternative in RS. 17288.209\n",
+ "The annual equivalent cost(AE(15%)) of this alternative in RS. : 19257.596\n",
+ "Since, The equivalent cost of Old deisel Engine is less than that of New deisel Engine, it is suggested to keep the Old deisel Engine.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.6 Page 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#intiation of variable\n",
+ "P=660000.0;#in Rs\n",
+ "F=400000.0;#in Rs\n",
+ "A=96000.0;#in Rs\n",
+ "i=10.0;#in % per annum\n",
+ "n=5.0;#in years\n",
+ "\n",
+ "#caculation\n",
+ "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE1,3);\n",
+ "\n",
+ "#Alternative 2\n",
+ "P=150000.0;#in Rs\n",
+ "X=420000.0;#in Rs\n",
+ "i=10.0;#in % per annum\n",
+ "n=40.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "AE2=(P-X)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(10%)) of this alternative in RS. : \",round(AE2,3);\n",
+ "print \"Since, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\";\n",
+ "print \" calculations in the book is not accurate.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The annual equivalent cost(AE(10%)) of this alternative in RS. : 204587.345\n",
+ "The annual equivalent cost(AE(10%)) of this alternative in RS. : 108389.958\n",
+ "Since, The equivalent cost of alternative 2 is less than that of alternative 1, it is suggested that alternative 2 should be selected.\n",
+ " calculations in the book is not accurate.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.7 Page 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "#alternative 1\n",
+ "P=10000.0;#in Rs\n",
+ "F=1500.0;#in Rs\n",
+ "A=1600.0;#in Rs\n",
+ "i=15.0;#in % per annum\n",
+ "n=7.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "AE1=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : \",round(AE1,3);\n",
+ "\n",
+ "#alternative 1 part 2\n",
+ "P=10000;#in Rs\n",
+ "F=800.0;#in Rs\n",
+ "A=1000.0;#in Rs\n",
+ "i=15.0;#in % per annum\n",
+ "n=7.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "AE2=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(10%)) of 10 hp motor in RS. \",round(AE2,3);\n",
+ "print \"Total annual equivalent cost of alternative in Rs. : \",round(AE1+AE2,3);\n",
+ "\n",
+ "\n",
+ "#Alternative 2\n",
+ "P=35000.0;#in Rs\n",
+ "F=4000.0;#in Rs\n",
+ "A=500.0;#in Rs\n",
+ "i=15.0;#in % per annum\n",
+ "n=7.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "AE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "\n",
+ "print \"The annual equivalent cost of alternative 2 in RS.\",round(AE,3);\n",
+ "print\"Since, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\";\n",
+ "print \" calculations in the book is not accurate\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The annual equivalent cost(AE(10%)) of 10 hp motor in RS. : 3868.063\n",
+ "The annual equivalent cost(AE(10%)) of 10 hp motor in RS. 3331.315\n",
+ "Total annual equivalent cost of alternative in Rs. : 7199.378\n",
+ "The annual equivalent cost of alternative 2 in RS. 8551.171\n",
+ "Since, The equivalent cost of alternative 1 is less than that of alternative 2, it is suggested that the present 10 hp motor be augmented with an additional 5 hp motor.\n",
+ " calculations in the book is not accurate\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.8 Page 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "P=10000.0;#in Rs\n",
+ "F=4000.0;#in Rs\n",
+ "A=500.0;#in Rs\n",
+ "i=12.0;#in % per annum\n",
+ "n=4.0;#in years\n",
+ "\n",
+ "#calcualtion\n",
+ "AE=(P-F)*((i/100)*(1+i/100)**n)/(((1+i/100)**n)-1)+F*i/100+A;#in RS\n",
+ "X= (AE-1000*i/100-750)/0.3292+1000;\n",
+ "#result\n",
+ "print \"The annual equivalent cost(AE(15%)) of n in RSew machine : \",round(AE,3);\n",
+ "print \"The comparative use value of old machine is Rs.\", round(X,3), \"which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \";\n",
+ "print\"Therefore, it is advisable to replace the old machine with the new one.\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The annual equivalent cost(AE(15%)) of n in RSew machine : 2955.407\n",
+ "The comparative use value of old machine is Rs. 7334.771 which is less than the price(Rs. 8000) offered by the company which is supplying the new machine in the event of replacing the old machine by nw machine. \n",
+ "Therefore, it is advisable to replace the old machine with the new one.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.9 Page 117"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Intiation of Variable\n",
+ "p1=0.07;#unitless\n",
+ "p2=0.11;#unitless\n",
+ "p3=0.12;#unitless\n",
+ "p4=0.18;#unitless\n",
+ "p5=0.21;#unitless\n",
+ "p6=0.20;#unitless\n",
+ "p7=0.11;#unitless\n",
+ "N0=100.0;#no. of transistors\n",
+ "\n",
+ "#calcualtion\n",
+ "N1=N0*p1;#no. of transistors\n",
+ "N2=N0*p2;#no. of transistors\n",
+ "N3=N0*p3;#no. of transistors\n",
+ "N4=N0*p4;#no. of transistors\n",
+ "N5=N0*p5;#no. of transistors\n",
+ "N6=N0*p6;#no. of transistors\n",
+ "N7=N0*p7;#no. of transistors\n",
+ "Life=0;#in weeks\n",
+ "p=[p1, p2, p3, p4, p5, p6, p7];#Unitless\n",
+ "for i in range (7): \n",
+ " Life=Life+(i+1)*p[i];\n",
+ "\n",
+ "#result\n",
+ "print \"Expected life of each transistor in weeks : \",round(Life,3)\n",
+ "print \"Average No. of failures/week : \",round(100/Life);\n",
+ "\n",
+ "#result of group replacement cost \n",
+ "print \"Cost of transistor when replaced simultaneously = Rs. 3\";\n",
+ "print \"Cost of transistor when replaced individually = Rs. 9\";\n",
+ "print \"The cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\";\n",
+ "print \"From table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\";\n",
+ "print \"Individual replacement cost/week = Rs. 207\";\n",
+ "print \"Minimum group replacement ost/week = Rs. 196.50\";\n",
+ "print \"Since the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Expected life of each transistor in weeks : 4.39\n",
+ "Average No. of failures/week : 23.0\n",
+ "Cost of transistor when replaced simultaneously = Rs. 3\n",
+ "Cost of transistor when replaced individually = Rs. 9\n",
+ "The cost of group replacement policy for seeral replacement periods are summarized in Table 8.6. This table can be seen from the book.\n",
+ "From table it is clear that the avg cost/week is minimum for the 4th week. Hence, the group replacement period is 4 weeks.\n",
+ "Individual replacement cost/week = Rs. 207\n",
+ "Minimum group replacement ost/week = Rs. 196.50\n",
+ "Since the min group replacement cost/week is less than the individual replacement cost/week, the group replacement policy is the best, and hence all the transistors should be replaced in 4 weeks.\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.10 Page 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#initiation of variable\n",
+ "p1=(100.0-96)/100;#unitless\n",
+ "p2=(96.0-89)/100;#unitless\n",
+ "p3=(89.0-68)/100;#unitless\n",
+ "p4=(68.0-37)/100;#unitless\n",
+ "p5=(37.0-13)/100;#unitless\n",
+ "p6=(13.0-0)/100;#unitless\n",
+ "N0=1000.0;#no. of resistors\n",
+ "\n",
+ "#calculation\n",
+ "N1=N0*p1;#no. of resistors\n",
+ "N2=N0*p2+N1*p1;#no. of resistors\n",
+ "N3=N0*p3+N1*p2+N2*p1;#no. of resistors\n",
+ "N4=N0*p4+N1*p3+N2*p2+N3*p1;#no. of resistors\n",
+ "N5=N0*p5+N1*p4+N2*p3+N3*p2+N4*p1;#no. of resistors\n",
+ "N6=N0*p6+N1*p5+N2*p4+N3*p3+N4*p2+N5*p1 ;#no. of resistors\n",
+ "\n",
+ "Life=0;#in months\n",
+ "p=[p1, p2, p3, p4, p5, p6];#Unitless\n",
+ "for i in range (6): \n",
+ " Life=Life+(i+1)*p[i];\n",
+ "\n",
+ "#result\n",
+ "print \"Expected life of each transistor in weeks : \",round(Life,3)\n",
+ "print \"Average No. of failures/week : \",round(1000/Life);\n",
+ "\n",
+ "#result of group replacement cost\n",
+ "print \"Cost/transistor when replaced simultaneously = Rs. 4\";\n",
+ "print \"Cost/transistor when replaced individually = Rs. 10\";\n",
+ "print \"The cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\";\n",
+ "print \"From table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\";\n",
+ "print \"Individual replacement cost/month = Rs. 2480\";\n",
+ "print \"Minimum group replacement ost/month = Rs. 2426.67\";\n",
+ "print \"Since the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Expected life of each transistor in weeks : 4.03\n",
+ "Average No. of failures/week : 248.0\n",
+ "Cost/transistor when replaced simultaneously = Rs. 4\n",
+ "Cost/transistor when replaced individually = Rs. 10\n",
+ "The cost of group replacement policy for several replacement periods are summarized in Table 8.7. This table can be seen from the book.\n",
+ "From table it is clear that the avg cost/month is minimum for the 3rd month. Hence, the group replacement period is 3 months.\n",
+ "Individual replacement cost/month = Rs. 2480\n",
+ "Minimum group replacement ost/month = Rs. 2426.67\n",
+ "Since the min group replacement cost/month is less than the individual replacement cost/month, the group replacement policy is the best, and hence all the transistors should be replaced in 3 months.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Economics/Chapter9.ipynb b/Engineering_Economics/Chapter9.ipynb new file mode 100755 index 00000000..6221daa0 --- /dev/null +++ b/Engineering_Economics/Chapter9.ipynb @@ -0,0 +1,209 @@ +{ + "metadata": { + "name": "EE-9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": "Depreciation" + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.1 Page 127" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=100000;#book vakue\n\n#calcualtion\nDt=(P-F)/n;#in Rs.\n\n#result\nprint \"End of year Depreciation Book value\";\nfor i in range (8):\n B=Bt-i*Dt;\n print eoy[i],\" \",Dt,\" \", B,\" \";\n \n \n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year Depreciation Book value\n0 10000.0 100000.0 \n1 10000.0 90000.0 \n2 10000.0 80000.0 \n3 10000.0 70000.0 \n4 10000.0 60000.0 \n5 10000.0 50000.0 \n6 10000.0 40000.0 \n7 10000.0 30000.0 \n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.2 Page 127" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\n\n#calculation\nD5=(P-F)/n;#in Rs.\nt=5;#in years\nBt=P-t*(P-F)/n;#in Rs\n\n#result\nprint \"D5 in Rs. : \",round(D5,3);\nprint \"(This is independent of the time period)\";\nprint \"B5 in Rs. : \",round(Bt,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D5 in Rs. : 10000.0\n(This is independent of the time period)\nB5 in Rs. : 50000.0\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.3 Page 129" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.2\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\n\n#result\nprint \"End of year Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n Dt[i]=k*Bt[i-1];\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",Dt[i],\" \", Bt[i],\" \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year Depreciation Book value\n0 0 100000\n1 20000.0 80000.0 \n2 16000.0 64000.0 \n3 12800.0 51200.0 \n4 10240.0 40960.0 \n5 8192.0 32768.0 \n6 6553.6 26214.4 \n7 5242.88 20971.52 \n8 4194.304 16777.216 \n" + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.4 Page 128" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.2\nt=5.0;#in years\n\n#calculation\nDt=k*(1-k)**(t-1)*P;#in Rs.\nBt=((1-k)**t)*P;#in Rs.\n\n#result\nprint \"D5 in Rs. : \",round(Dt,3);\nprint \"B5 in Rs. : \",round(Bt,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D5 in Rs. : 8192.0\nB5 in Rs. : 32768.0\n" + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.5 Page 129" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nSum=n*(n+1)/2;#sum of the years\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\nrate=[0.0,0,0,0,0,0,0,0,0];\n\n#result\nprint \"End of year Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n rate[i]=(8-i+1)/36.0;\n Dt[i]=rate[i]*(P-F);\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",Dt[i],\" \", Bt[i],\" \";", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year Depreciation Book value\n0 0 100000\n1 17777.7777778 82222.2222222 \n2 15555.5555556 66666.6666667 \n3 13333.3333333 53333.3333333 \n4 11111.1111111 42222.2222222 \n5 8888.88888889 33333.3333333 \n6 6666.66666667 26666.6666667 \n7 4444.44444444 22222.2222222 \n8 2222.22222222 20000.0 \n" + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.6 Page 131" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nt=5.0;#in years\n\n#cacualtion\nDt=(n-t+1)*(P-F)/(n*(n+1)/2);#in Rs.\nBt=(P-F)*((n-t)/n)*((n-t+1)/(n+1))+F;#in Rs.\n\n#result\nprint \"D5 in Rs. : \",round(Dt,3);\nprint \"B5 in Rs. : \",round(Bt,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D5 in Rs. : 8888.889\nB5 in Rs. : 33333.333\n" + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.7 Page 132" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\nk=0.12;\ni=12.0;#in % per annum\neoy=[0,1,2,3,4,5,6,7,8]#end of year\nBt=[100000.0,0,0,0,0,0,0,0,0];#book vakue\nDt=[0.0,0,0,0,0,0,0,0,0];\nrate=[0.0,0,0,0,0,0,0,0,0];\nSUM=0;\n\n#calculation\nA=(P-F)*(i/100)/(((1+i/100)**n)-1);\n\n#result\nprint \"End of year Net Depreciation Book value\";\nprint \"0 0 100000\"\nfor i in xrange (1,9):\n Dt[i]=k*SUM+A;\n SUM=SUM+Dt[i]\n Bt[i]=Bt[i-1]-Dt[i];\n print eoy[i],\" \",round(Dt[i],3),\" \", round(Bt[i],3),\" \";\n \nprint \"fixed deprececiation which is constant in Rs\",round(A,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "End of year Net Depreciation Book value\n0 0 100000\n1 6504.227 93495.773 \n2 7284.735 86211.038 \n3 8158.903 78052.135 \n4 9137.971 68914.164 \n5 10234.528 58679.637 \n6 11462.671 47216.966 \n7 12838.191 34378.774 \n8 14378.774 20000.0 \nfixed deprececiation which is constant in Rs 6504.227\n" + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.8 Page 133" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=100000.0;#in Rs\nF=20000.0;#in Rs\nn=8.0;#in years\ni=12.0;#in % per annum\nt=5.0;#in Years\n\n#calculation\nDt=(P-F)*(i/100)/(((1+i/100)**n)-1)*(1+i/100)**(t-1);#in Rs.\nt=7;#in Years\nBt=P-(P-F)*(i/100)/(((1+i/100)**n)-1)*(((1+i/100)**t)-1)/(i/100);#in Rs.\n\n#result\nprint \"D7 in Rs. : \",round(Dt,3);\nprint \"B7 in Rs. : \",round(Bt,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "D7 in Rs. : 10234.528\nB7 in Rs. : 34378.774\n" + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": "Example 9.9 Page 134" + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#initiation of variable\nP=8000000.0;#in Rs\nF=50000.0;#in Rs\nX=75000.0;#in Km\nx=2000.0;#in Km\nn=8.0;#in years\ni=12.0;#in % per annum\n\n#calcualtion\nD=(P-F)*x/X;#in Rs.\n\n#result\nprint \"Depreciation for year 3 in Rs. : \",round(D,3);", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Depreciation for year 3 in Rs. : 212000.0\n" + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Economics/README.txt b/Engineering_Economics/README.txt new file mode 100755 index 00000000..27bb08be --- /dev/null +++ b/Engineering_Economics/README.txt @@ -0,0 +1,10 @@ +Contributed By: Tarun Kumar Das +Course: btech +College/Institute/Organization: College of Engineering +Department/Designation: Industrial Engineering +Book Title: Engineering Economics +Author: R. Panneerselvam +Publisher: Phi Learning, Delhi +Year of publication: 2010 +Isbn: 978-81-203-1743-7 +Edition: 1
\ No newline at end of file diff --git a/Engineering_Economics/screenshots/Depriciation_and_Book_value.png b/Engineering_Economics/screenshots/Depriciation_and_Book_value.png Binary files differnew file mode 100755 index 00000000..3c2c419d --- /dev/null +++ b/Engineering_Economics/screenshots/Depriciation_and_Book_value.png diff --git a/Engineering_Economics/screenshots/Economic_order_and_Time.png b/Engineering_Economics/screenshots/Economic_order_and_Time.png Binary files differnew file mode 100755 index 00000000..623d5718 --- /dev/null +++ b/Engineering_Economics/screenshots/Economic_order_and_Time.png diff --git a/Engineering_Economics/screenshots/Expected_Saving.png b/Engineering_Economics/screenshots/Expected_Saving.png Binary files differnew file mode 100755 index 00000000..6970da10 --- /dev/null +++ b/Engineering_Economics/screenshots/Expected_Saving.png diff --git a/Engineering_Economics/screenshots/Present_Worth.png b/Engineering_Economics/screenshots/Present_Worth.png Binary files differnew file mode 100755 index 00000000..c5295c6e --- /dev/null +++ b/Engineering_Economics/screenshots/Present_Worth.png diff --git a/Engineering_Economics/screenshots/future_sum.png b/Engineering_Economics/screenshots/future_sum.png Binary files differnew file mode 100755 index 00000000..50e1aa00 --- /dev/null +++ b/Engineering_Economics/screenshots/future_sum.png diff --git a/Engineering_Economics/screenshots/maturity_value.png b/Engineering_Economics/screenshots/maturity_value.png Binary files differnew file mode 100755 index 00000000..72bd0ac4 --- /dev/null +++ b/Engineering_Economics/screenshots/maturity_value.png |