summaryrefslogtreecommitdiff
path: root/Engineering_Economics_by_R_Panneerselvam/Chapter11_1.ipynb
blob: 6eb51dc1fd52fe5bd21d6b492d0d16aae2407f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
 "metadata": {
  "name": "EE-11"
 },
 "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\nprint \"Few steps are as follows : \";\nprint \"Step 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\";\nprint \"Step 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\";\nprint \"Formula : P*(1+IR)^n\";\nP=24000.0;#in Rs.\nIR=9.0;#in % per year\nAge=61.0;#in years\nfor 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\nPW=0;#For initialising\nn=21.0;#in years\nfor 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\nprint \"Present equivalent of withdrawls in Rs. : \",round(PW,3);\n\n#The annual equivalent amount :\ni=15.0;#in % per year\nn=20.0;#in years\n#Formula : (A/F,i,n) : (i/100)/(((1+i/100)^n)-1) \nA=PW*(i/100)/(((1+i/100)**n)-1);#in Rs.\nprint \"The annual equivalent amount in Rs. : \",round(A,3);\nprint\"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.\"; ",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Few steps are as follows : \nStep 1 : The estimated future requirementt per year in terms of todays rupees from his age 61 through 70 is Rs. 24000.\nStep 2 : The formula which is given below is used to get future equivalent of Rs. 24000 with the inflation of 9% per year.\nFormula : P*(1+IR)^n\nAge in years :  61.0 . Inflated value of Rs. 24000 at end of year :  21  in Rs.  146611.0\nAge in years :  62.0 . Inflated value of Rs. 24000 at end of year :  22  in Rs.  159806.0\nAge in years :  63.0 . Inflated value of Rs. 24000 at end of year :  23  in Rs.  174189.0\nAge in years :  64.0 . Inflated value of Rs. 24000 at end of year :  24  in Rs.  189866.0\nAge in years :  65.0 . Inflated value of Rs. 24000 at end of year :  25  in Rs.  206954.0\nAge in years :  66.0 . Inflated value of Rs. 24000 at end of year :  26  in Rs.  225580.0\nAge in years :  67.0 . Inflated value of Rs. 24000 at end of year :  27  in Rs.  245882.0\nAge in years :  68.0 . Inflated value of Rs. 24000 at end of year :  28  in Rs.  268011.0\nAge in years :  69.0 . Inflated value of Rs. 24000 at end of year :  29  in Rs.  292132.0\nAge in years :  70.0 . Inflated value of Rs. 24000 at end of year :  30  in Rs.  318424.0\nPresent equivalent of withdrawls in Rs. :  1013631.794\nThe annual equivalent amount in Rs. :  9894.537\nRECOMMENDATION : 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"
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 11.2 Page 150"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#initiation of variable\nprint\"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.\";\nprint\"End of year     Op_cost     Main_cost    Op+Main     P/F,i,n     PW     Cummulative     Salvage     PW_S    TPW     A/P,i,n     AEM\";\ni=20.0;#in  per year\nCum=0.0;#initialising\nOp_cost=40000.0;#in RS.\nMain_cost=60000.0;#in Rs.\nOpMain=Op_cost+Main_cost;#in Rs.\nS=400000.0;#in Rs.\nfor 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.\nEnd 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\nIR=5.0;#in % per year\ni=15.0;#in % per year\n#Machine X :\nPpx=1500000.0;#in Rs.\nn=7.0;#in years\nS=200000.0;#in Rs.\nAMC=300000.0;#in Rs.\nprint \"End of year     AMC     InflationFactor     InflatedAmount     P/F     PW\";\nPw=0;#For initialising\nfor 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\nprint \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\nPWX=Ppx+Pw-S*1/((1+i/100)**n);\nprint \"Present worth of machine X in Rs. : \",round(PWX,3);\n\n#Machine Y\n\nPpy=2000000.0;#in Rs.\nn=7.0;#in years\nS=300000.0;#in Rs.\nAMC=250000.0;#in Rs.\nprint \"End of year     AMC     InflationFactor     InflatedAmount     P/F     PW\";\nPw=0;#For initialising\nfor 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\nPWY=Ppy+Pw-S*1/((1+i/100)**n);\n\n#result\nprint \"Present worth of inflated annual operating and maintenance cost in Rs. : \",round(Pw,3);\nprint \"Present worth of machine Y in Rs. : \",round(PWY,3);\nprint \"Since the present worth of Machine X is less than Machine Y, select Machine X\"\nprint \" 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\nPresent worth of inflated annual operating and maintenance cost in Rs. :  1483709.322\nPresent worth of machine X in Rs. :  2908521.914\nEnd 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\nPresent worth of inflated annual operating and maintenance cost in Rs. :  1236424.435\nPresent worth of machine Y in Rs. :  3123643.323\nSince 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\nIR=6.0;#in % per year\ni=18.0;#in % per year\nAFR=5000000.0;#in Rs.\nn=7.0;#in years\nAI=500000.0;#in Rs.\nprint\"End of year            AFR         InflationFactor     InflatedAmount  P/F           PW\";\nTPW=0;#Initialising\n\nfor 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\nprint \"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\nThe 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": {}
  }
 ]
}