# Ch-5, Selection of Plant¶

## example 5.1 Page 87¶

In [1]:
aerpe=100*10**6
md=25*10**3
def ucc(dd,e):
u=600*dd+0.3*e #rs per kW
return u
sc=30*10**3

a_cci=9000#per kW
a_shr=4000
b_cci=10500
b_shr=3500
c_cci=12000
c_shr=3000
salc=3000
sal=2280
sh=10
tax=0.04
ins=0.5*10**-2
cir=0.07
hv=5000#l cal per kg
fuc=225#rs per ton
acsnm=150000#for each plan
pl=20
dr=cir/((cir+1)**pl-1)
tfcr=cir+dr+tax+ins
print "depreciation rate %f \ntotal fixed rate =%f"%(dr,tfcr)
a_ci=a_cci*sc ;b_ci=b_cci*sc ;c_ci=c_cci*sc
a_afca=a_ci*tfcr ;b_afca=b_ci*tfcr ;c_afca=c_ci*tfcr
a_afuc=a_shr*fuc*10**8/(hv*10**3)
b_afuc=b_shr*fuc*10**8/(hv*10**3)
c_afuc=c_shr*fuc*10**8/(hv*10**3)
ass=12*(salc+sh*sal)
tota=a_afca+ass+a_afuc+acsnm
totb=b_afca+ass+b_afuc+acsnm
totc=c_afca+ass+c_afuc+acsnm
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)
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)
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)

ppt=ucc(md,aerpe)
print "\nannual cost of purchasing electricty from utility is Rs600x%d+0.3x%.1e is Rs%d"%(md,aerpe,ppt)

depreciation rate 0.024393
total fixed rate =0.139393

annual fixed cost of a is Rs37636089   fuel cost of plan a is Rs18000000 and total cost of a is Rs56095689

annual fixed cost of b is Rs43908771   fuel cost of plan b is Rs15750000 and total cost of b is Rs60118371

annual fixed cost of c is Rs50181453   fuel cost of plan c is Rs13500000 and total cost of c is Rs64141053

annual cost of purchasing electricty from utility is Rs600x25000+0.3x1.0e+08 is Rs45000000


## example 5.2 Page 88¶

In [2]:
aer=100*10**6
md=25*10**3
def ucc(dd,e):
u=600*dd+0.3*e #rs per kW
return u
p=30*10**3
ap=9000#per kW
ahr=4000
bp=10500
bhr=3500
cp=12000
Chr=3000
salc=3000
sal=2280
sh=10
t=0.04
i=0.5*10**-2
r=0.07
hv=5000#l cal per kg
fuc=225#rs per ton
mc=150000#for each plan
n=20
dr=r/((r+1)**n-1)
pwf=r/(1-(r+1)**(-n))
print "persent of worth factor is %f"%(pwf)
afc=ahr*fuc*10**8/(hv*10**3)
bfc=bhr*fuc*10**8/(hv*10**3)
cfc=Chr*fuc*10**8/(hv*10**3)
ass=12*(salc+sh*sal)
aaoc=ass+mc+afc
baoc=ass+mc+bfc
caoc=ass+mc+cfc
ai=ap*p ;bi=bp*p ;ci=cp*p
atac=(t+i)*ap*p+aaoc
btac=(i+t)*bp*p+baoc
ctac=(i+t)*cp*p+caoc
uts=ucc(md,aer)
apw=atac/pwf ;bpw=btac/pwf ;cpw=ctac/pwf; utss=uts/pwf
ta=apw+ai ;tb=bpw+bi; tc=cpw+ci
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)
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)
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)
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)
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"

persent of worth factor is 0.094393

annual cost excludinding interest and
depreciation of a 		Rs30609600
persent worth factor 		 0.094393
present worth annual cost of a is Rs324278538
investement of a is 	Rs270000000
total persent worth of a is 	594278538

annual cost excludinding interest and
depreciation of b 		Rs30384600
persent wort factor 		0.094393
present worth annual cost of b is Rs321894885
investement of b is 	Rs315000000
total persent worth of b is 	636894885

annual cost excludinding interest and
depreciation of c 		Rs30159600
persent wort factor 		0.094393
present worth annual cost of c is Rs319511232
investement of c is 	Rs360000000
total persent worth of c is 	679511232

annual cost excludinding interest and
depreciation of utility service 	Rs45000000
persent wort factor 			0.094393
present worth annual cost of utility service is Rs476730641
investement of utility service is 		 nill
total persent worth of utility service is 476730641

since the present worth of the utility service is the minimum,it is the obvious choice
out of the other plans,plan A is the best since it has the lowest present worth


## example 5.3 Page 89¶

In [3]:
aer=100*10**6   #from example 5.1
md=25*10**3
def ucc(dd,e):
u=600*dd+0.3*e #rs per kW
return u
p=30*10**3
ap=9000#per kW
ahr=4000
bp=10500
bhr=3500
cp=12000
Chr=3000
salc=3000
sal=2280
sh=10
t=0.04
i=0.5*10**-2
r=0.07
hv=5000#l cal per kg
fuc=225#rs per ton
mc=150000#for each plan
n=20
dr=r/((r+1)**n-1)
pwf=r/(1-(r+1)**(-n))
uts=ucc(md,aer)
afc=ahr*fuc*10**8/(hv*10**3)
bfc=bhr*fuc*10**8/(hv*10**3)
cfc=Chr*fuc*10**8/(hv*10**3)
ass=12*(salc+sh*sal)
aaoc=ass+mc+afc
baoc=ass+mc+bfc
caoc=ass+mc+cfc
aw=(((dr+t+i)*ap*p+aaoc)/r)+ap*p
bw=(((dr+t+i)*bp*p+baoc)/r)+bp*p
cw=(((dr+t+i)*cp*p+caoc)/r)+cp*p
utt=uts/r+p
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)
print "the utility service has the lowest capitalized cost and is the obvious choice. Out of the other plans,plan A is the best"

 plan A is 		Rs.801366999
plan B is 		Rs.858833880
planC is 		Rs.916300760
utility services is 	Rs642887142
the utility service has the lowest capitalized cost and is the obvious choice. Out of the other plans,plan A is the best


## example 5.4 page 90¶

In [4]:
from numpy import arange
aer=100*10**6
md=25*10**3
utse=6600*10**4
p=30*10**3
ap=9000#per kW
ahr=4000
bp=10500
bhr=3500
cp=12000
Chr=3000

salc=3000
sal=2280
sh=10
t=0.04
i=0.5*10**-2
r=0.07
hv=5000#l cal per kg
fuc=225#rs per ton
mc=150000#for each plan
n=20
dr=r/((r+1)**n-1)
pwf=r/(1-(r+1)**(-n))
afc=ahr*fuc*10**8/(hv*10**3)
bfc=bhr*fuc*10**8/(hv*10**3)
cfc=Chr*fuc*10**8/(hv*10**3)
ass=12*(salc+sh*sal)
aaoc=ass+mc+afc
baoc=ass+mc+bfc
caoc=ass+mc+cfc

sol_a_totalannualcost=(t+i)*ap*p+aaoc
sol_b_totalannualcost=(i+t)*bp*p+baoc
sol_c_totalannualcost=(i+t)*cp*p+caoc

sol_a_pinvestement=ap*p
sol_b_pinvestement=bp*p
sol_c_pinvestement=cp*p

sol_a_annuity=utse-sol_a_totalannualcost
sol_b_annuity=utse-sol_b_totalannualcost
sol_c_annuity=utse-sol_c_totalannualcost

sol_a_ratioaandp=sol_a_annuity/sol_a_pinvestement
sol_b_ratioaandp=sol_b_annuity/sol_b_pinvestement
sol_c_ratioaandp=sol_c_annuity/sol_c_pinvestement
def alt(r):
R=abs(r/(1-wr))
return R
ra=round((sol_a_ratioaandp)*100)
rb=round((sol_b_ratioaandp)*100)
rc=round((sol_c_ratioaandp)*100)

for x in arange(-0.12,-0.07,0.001): #for itration
wr=(1+x)**n
re=alt(x)
re=(round(re*100))
if  re==ra :
sol_a_return=(abs(x)*100)
#end
if re==rb :
sol_b_return=(abs(x)*100)
#end
if re==rc :
sol_c_return=(abs(x)*100)
#end
#end
print "for (a)"
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)
print "for (b)"
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)
print "for (c)"
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)
sb=sol_b_annuity-sol_a_annuity
sc=sol_c_annuity-sol_b_annuity
ib=sol_b_pinvestement-sol_a_pinvestement
ic=sol_b_pinvestement-sol_a_pinvestement
rcb=sb/ib; rcc=sc/ic
print "\nsaving in annual cost excluding interest and depreciation B over A \t %d C over A \t %d"%(sb,sc)
print "\nadditional investement P is \t\t\t\tB over A \t %d C over A \t %d"%(ib,ic)
print "\nrate of saving to investement \t\t\t\tAoverB \t\t %f BoverC  \t%f"%(rcb,rcc)
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"

for (a)
total annual cost Rs.30609600
investement Rs.270000000
annuity Rs35390400
ratio of a and b 0.131076
rate of return 11.4percent
for (b)
total annual cost Rs.30384600
investement Rs.315000000
annuity Rs35615400
ratio of a and b 0.113065
rate of return 8.9percent
for (c)
total annual cost Rs.30159600
investement Rs.360000000
annuity Rs35840400
ratio of a and b 0.099557
rate of return 7.6percent

saving in annual cost excluding interest and depreciation B over A 	 225000 C over A 	 225000

additional investement P is 				B over A 	 45000000 C over A 	 45000000

rate of saving to investement 				AoverB 		 0.005000 BoverC  	0.005000

rate of return on capital investement
evidently plan A is the best 				A over B 	Negative B over C 	Negative