{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Ch-5, Selection of Plant"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## example 5.1 Page 87"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"depreciation rate 0.024393 \n",
"total fixed rate =0.139393\n",
"\n",
"annual fixed cost of a is Rs37636089 fuel cost of plan a is Rs18000000 and total cost of a is Rs56095689\n",
"\n",
"annual fixed cost of b is Rs43908771 fuel cost of plan b is Rs15750000 and total cost of b is Rs60118371\n",
"\n",
"annual fixed cost of c is Rs50181453 fuel cost of plan c is Rs13500000 and total cost of c is Rs64141053\n",
"\n",
"annual cost of purchasing electricty from utility is Rs600x25000+0.3x1.0e+08 is Rs45000000\n"
]
}
],
"source": [
"aerpe=100*10**6\n",
"md=25*10**3\n",
"def ucc(dd,e):\n",
" u=600*dd+0.3*e #rs per kW\n",
" return u\n",
"sc=30*10**3\n",
"\n",
"a_cci=9000#per kW\n",
"a_shr=4000\n",
"b_cci=10500\n",
"b_shr=3500\n",
"c_cci=12000\n",
"c_shr=3000\n",
"salc=3000\n",
"sal=2280\n",
"sh=10\n",
"tax=0.04\n",
"ins=0.5*10**-2\n",
"cir=0.07\n",
"hv=5000#l cal per kg\n",
"fuc=225#rs per ton\n",
"acsnm=150000#for each plan\n",
"pl=20\n",
"dr=cir/((cir+1)**pl-1)\n",
"tfcr=cir+dr+tax+ins\n",
"print \"depreciation rate %f \\ntotal fixed rate =%f\"%(dr,tfcr)\n",
"a_ci=a_cci*sc ;b_ci=b_cci*sc ;c_ci=c_cci*sc\n",
"a_afca=a_ci*tfcr ;b_afca=b_ci*tfcr ;c_afca=c_ci*tfcr\n",
"a_afuc=a_shr*fuc*10**8/(hv*10**3)\n",
"b_afuc=b_shr*fuc*10**8/(hv*10**3)\n",
"c_afuc=c_shr*fuc*10**8/(hv*10**3)\n",
"ass=12*(salc+sh*sal)\n",
"tota=a_afca+ass+a_afuc+acsnm\n",
"totb=b_afca+ass+b_afuc+acsnm\n",
"totc=c_afca+ass+c_afuc+acsnm\n",
"print \"\\nannual fixed cost of a is Rs%d fuel cost of plan a is Rs%d and total cost of a is Rs%d\"%(a_afca,a_afuc,tota)\n",
"print \"\\nannual fixed cost of b is Rs%d fuel cost of plan b is Rs%d and total cost of b is Rs%d\"%(b_afca,b_afuc,totb)\n",
"print \"\\nannual fixed cost of c is Rs%d fuel cost of plan c is Rs%d and total cost of c is Rs%d\"%(c_afca,c_afuc,totc)\n",
"\n",
"ppt=ucc(md,aerpe)\n",
"print \"\\nannual cost of purchasing electricty from utility is Rs600x%d+0.3x%.1e is Rs%d\"%(md,aerpe,ppt)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## example 5.2 Page 88"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"persent of worth factor is 0.094393\n",
"\n",
"annual cost excludinding interest and \n",
"depreciation of a \t\tRs30609600 \n",
"persent worth factor \t\t 0.094393 \n",
"present worth annual cost of a is Rs324278538 \n",
" investement of a is \tRs270000000 \n",
" total persent worth of a is \t594278538\n",
"\n",
"\n",
" annual cost excludinding interest and \n",
"depreciation of b \t\tRs30384600 \n",
"persent wort factor \t\t0.094393 \n",
"present worth annual cost of b is Rs321894885 \n",
" investement of b is \tRs315000000 \n",
" total persent worth of b is \t636894885\n",
"\n",
" \n",
"annual cost excludinding interest and \n",
"depreciation of c \t\tRs30159600 \n",
"persent wort factor \t\t0.094393 \n",
"present worth annual cost of c is Rs319511232 \n",
" investement of c is \tRs360000000 \n",
" total persent worth of c is \t679511232\n",
"\n",
" \n",
"annual cost excludinding interest and \n",
"depreciation of utility service \tRs45000000 \n",
"persent wort factor \t\t\t0.094393 \n",
"present worth annual cost of utility service is Rs476730641 \n",
" investement of utility service is \t\t nill \n",
" total persent worth of utility service is 476730641\n",
"\n",
"\n",
"\tsince the present worth of the utility service is the minimum,it is the obvious choice \n",
"out of the other plans,plan A is the best since it has the lowest present worth\n"
]
}
],
"source": [
"aer=100*10**6\n",
"md=25*10**3\n",
"def ucc(dd,e):\n",
" u=600*dd+0.3*e #rs per kW\n",
" return u\n",
"p=30*10**3\n",
"ap=9000#per kW\n",
"ahr=4000\n",
"bp=10500\n",
"bhr=3500\n",
"cp=12000\n",
"Chr=3000\n",
"salc=3000\n",
"sal=2280\n",
"sh=10\n",
"t=0.04\n",
"i=0.5*10**-2\n",
"r=0.07\n",
"hv=5000#l cal per kg\n",
"fuc=225#rs per ton\n",
"mc=150000#for each plan\n",
"n=20\n",
"dr=r/((r+1)**n-1)\n",
"pwf=r/(1-(r+1)**(-n))\n",
"print \"persent of worth factor is %f\"%(pwf)\n",
"afc=ahr*fuc*10**8/(hv*10**3)\n",
"bfc=bhr*fuc*10**8/(hv*10**3)\n",
"cfc=Chr*fuc*10**8/(hv*10**3)\n",
"ass=12*(salc+sh*sal)\n",
"aaoc=ass+mc+afc\n",
"baoc=ass+mc+bfc\n",
"caoc=ass+mc+cfc\n",
"ai=ap*p ;bi=bp*p ;ci=cp*p\n",
"atac=(t+i)*ap*p+aaoc\n",
"btac=(i+t)*bp*p+baoc\n",
"ctac=(i+t)*cp*p+caoc\n",
"uts=ucc(md,aer)\n",
"apw=atac/pwf ;bpw=btac/pwf ;cpw=ctac/pwf; utss=uts/pwf\n",
"ta=apw+ai ;tb=bpw+bi; tc=cpw+ci\n",
"print \"\\nannual cost excludinding interest and \\ndepreciation of a \\t\\tRs%d \\npersent worth factor \\t\\t %f \\npresent worth annual cost of a is Rs%d \\n investement of a is \\tRs%d \\n total persent worth of a is \\t%d\"%(atac,pwf,apw,ai,ta)\n",
"print \"\\n\\n annual cost excludinding interest and \\ndepreciation of b \\t\\tRs%d \\npersent wort factor \\t\\t%f \\npresent worth annual cost of b is Rs%d \\n investement of b is \\tRs%d \\n total persent worth of b is \\t%d\"%(btac,pwf,bpw,bi,tb)\n",
"print \"\\n \\nannual cost excludinding interest and \\ndepreciation of c \\t\\tRs%d \\npersent wort factor \\t\\t%f \\npresent worth annual cost of c is Rs%d \\n investement of c is \\tRs%d \\n total persent worth of c is \\t%d\"%(ctac,pwf,cpw,ci,tc)\n",
"print \"\\n \\nannual cost excludinding interest and \\ndepreciation of utility service \\tRs%d \\npersent wort factor \\t\\t\\t%f \\npresent worth annual cost of utility service is Rs%d \\n investement of utility service is \\t\\t nill \\n total persent worth of utility service is %d\"%(uts,pwf,utss,utss)\n",
"print \"\\n\\n\\tsince the present worth of the utility service is the minimum,it is the obvious choice \\nout of the other plans,plan A is the best since it has the lowest present worth\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## example 5.3 Page 89"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" plan A is \t\tRs.801366999 \n",
" plan B is \t\tRs.858833880 \n",
" planC is \t\tRs.916300760 \n",
"utility services is \tRs642887142\n",
"the utility service has the lowest capitalized cost and is the obvious choice. Out of the other plans,plan A is the best\n"
]
}
],
"source": [
"aer=100*10**6 #from example 5.1\n",
"md=25*10**3\n",
"def ucc(dd,e):\n",
" u=600*dd+0.3*e #rs per kW\n",
" return u\n",
"p=30*10**3\n",
"ap=9000#per kW\n",
"ahr=4000\n",
"bp=10500\n",
"bhr=3500\n",
"cp=12000\n",
"Chr=3000\n",
"salc=3000\n",
"sal=2280\n",
"sh=10\n",
"t=0.04\n",
"i=0.5*10**-2\n",
"r=0.07\n",
"hv=5000#l cal per kg\n",
"fuc=225#rs per ton\n",
"mc=150000#for each plan\n",
"n=20\n",
"dr=r/((r+1)**n-1)\n",
"pwf=r/(1-(r+1)**(-n))\n",
"uts=ucc(md,aer)\n",
"afc=ahr*fuc*10**8/(hv*10**3)\n",
"bfc=bhr*fuc*10**8/(hv*10**3)\n",
"cfc=Chr*fuc*10**8/(hv*10**3)\n",
"ass=12*(salc+sh*sal)\n",
"aaoc=ass+mc+afc\n",
"baoc=ass+mc+bfc\n",
"caoc=ass+mc+cfc\n",
"aw=(((dr+t+i)*ap*p+aaoc)/r)+ap*p\n",
"bw=(((dr+t+i)*bp*p+baoc)/r)+bp*p\n",
"cw=(((dr+t+i)*cp*p+caoc)/r)+cp*p\n",
"utt=uts/r+p\n",
"print \"\\n plan A is \\t\\tRs.%d \\n plan B is \\t\\tRs.%d \\n planC is \\t\\tRs.%d \\nutility services is \\tRs%d\"%(aw,bw,cw,utt)\n",
"print \"the utility service has the lowest capitalized cost and is the obvious choice. Out of the other plans,plan A is the best\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## example 5.4 page 90"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"for (a)\n",
"total annual cost Rs.30609600\n",
"investement Rs.270000000\n",
"annuity Rs35390400 \n",
"ratio of a and b 0.131076 \n",
"rate of return 11.4percent\n",
"for (b)\n",
"total annual cost Rs.30384600\n",
"investement Rs.315000000\n",
"annuity Rs35615400 \n",
"ratio of a and b 0.113065 \n",
"rate of return 8.9percent\n",
"for (c)\n",
"total annual cost Rs.30159600\n",
"investement Rs.360000000\n",
"annuity Rs35840400 \n",
"ratio of a and b 0.099557 \n",
"rate of return 7.6percent\n",
"\n",
"saving in annual cost excluding interest and depreciation B over A \t 225000 C over A \t 225000\n",
"\n",
"additional investement P is \t\t\t\tB over A \t 45000000 C over A \t 45000000\n",
"\n",
"rate of saving to investement \t\t\t\tAoverB \t\t 0.005000 BoverC \t0.005000\n",
"\n",
"rate of return on capital investement\n",
" evidently plan A is the best \t\t\t\tA over B \tNegative B over C \tNegative\n"
]
}
],
"source": [
"from numpy import arange\n",
"aer=100*10**6\n",
"md=25*10**3\n",
"utse=6600*10**4\n",
"p=30*10**3\n",
"ap=9000#per kW\n",
"ahr=4000\n",
"bp=10500\n",
"bhr=3500\n",
"cp=12000\n",
"Chr=3000\n",
"\n",
"salc=3000\n",
"sal=2280\n",
"sh=10\n",
"t=0.04\n",
"i=0.5*10**-2\n",
"r=0.07\n",
"hv=5000#l cal per kg\n",
"fuc=225#rs per ton\n",
"mc=150000#for each plan\n",
"n=20\n",
"dr=r/((r+1)**n-1)\n",
"pwf=r/(1-(r+1)**(-n))\n",
"afc=ahr*fuc*10**8/(hv*10**3)\n",
"bfc=bhr*fuc*10**8/(hv*10**3)\n",
"cfc=Chr*fuc*10**8/(hv*10**3)\n",
"ass=12*(salc+sh*sal)\n",
"aaoc=ass+mc+afc\n",
"baoc=ass+mc+bfc\n",
"caoc=ass+mc+cfc\n",
"\n",
"sol_a_totalannualcost=(t+i)*ap*p+aaoc\n",
"sol_b_totalannualcost=(i+t)*bp*p+baoc\n",
"sol_c_totalannualcost=(i+t)*cp*p+caoc\n",
"\n",
"sol_a_pinvestement=ap*p \n",
"sol_b_pinvestement=bp*p \n",
"sol_c_pinvestement=cp*p\n",
"\n",
"sol_a_annuity=utse-sol_a_totalannualcost \n",
"sol_b_annuity=utse-sol_b_totalannualcost \n",
"sol_c_annuity=utse-sol_c_totalannualcost \n",
"\n",
"sol_a_ratioaandp=sol_a_annuity/sol_a_pinvestement \n",
"sol_b_ratioaandp=sol_b_annuity/sol_b_pinvestement \n",
"sol_c_ratioaandp=sol_c_annuity/sol_c_pinvestement \n",
"def alt(r):\n",
" R=abs(r/(1-wr))\n",
" return R\n",
"ra=round((sol_a_ratioaandp)*100)\n",
"rb=round((sol_b_ratioaandp)*100)\n",
"rc=round((sol_c_ratioaandp)*100)\n",
"\n",
"for x in arange(-0.12,-0.07,0.001): #for itration\n",
" wr=(1+x)**n\n",
" re=alt(x)\n",
" re=(round(re*100))\n",
" if re==ra :\n",
" sol_a_return=(abs(x)*100)\n",
" #end\n",
" if re==rb :\n",
" sol_b_return=(abs(x)*100)\n",
" #end\n",
" if re==rc :\n",
" sol_c_return=(abs(x)*100)\n",
" #end\n",
" #end\n",
"print \"for (a)\"\n",
"print \"total annual cost Rs.%d\\ninvestement Rs.%d\\nannuity Rs%d \\nratio of a and b %f \\nrate of return %.1fpercent\"%(sol_a_totalannualcost,sol_a_pinvestement,sol_a_annuity,sol_a_ratioaandp,sol_a_return)\n",
"print \"for (b)\"\n",
"print \"total annual cost Rs.%d\\ninvestement Rs.%d\\nannuity Rs%d \\nratio of a and b %f \\nrate of return %.1fpercent\"%(sol_b_totalannualcost,sol_b_pinvestement,sol_b_annuity,sol_b_ratioaandp,sol_b_return)\n",
"print \"for (c)\"\n",
"print \"total annual cost Rs.%d\\ninvestement Rs.%d\\nannuity Rs%d \\nratio of a and b %f \\nrate of return %.1fpercent\"%(sol_c_totalannualcost,sol_c_pinvestement,sol_c_annuity,sol_c_ratioaandp,sol_c_return)\n",
"sb=sol_b_annuity-sol_a_annuity\n",
"sc=sol_c_annuity-sol_b_annuity\n",
"ib=sol_b_pinvestement-sol_a_pinvestement\n",
"ic=sol_b_pinvestement-sol_a_pinvestement\n",
"rcb=sb/ib; rcc=sc/ic \n",
"print \"\\nsaving in annual cost excluding interest and depreciation B over A \\t %d C over A \\t %d\"%(sb,sc)\n",
"print \"\\nadditional investement P is \\t\\t\\t\\tB over A \\t %d C over A \\t %d\"%(ib,ic)\n",
"print \"\\nrate of saving to investement \\t\\t\\t\\tAoverB \\t\\t %f BoverC \\t%f\"%(rcb,rcc)\n",
"print \"\\nrate of return on capital investement\\n evidently plan A is the best \\t\\t\\t\\tA over B \\tNegative B over C \\tNegative\""
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}