sp=11*10**3;pc=300*10**6 ; ir=0.15 ;lp=15 ;fc=7 ;eff=0.35; cv=10100; mc=0.02; lf=0.8 ;er=860 #let the given variable be --sp=size of plant ,pc=project cost,ir=interest rate,lp=life of the plant,fc=fuel cost,eff=efficiency,cv=calorific value,er=860,mc=maintenance cost,lf=load factor,
cac=pc/sp #let the variable cac be captel cost
print "capitel cost is %.1f/kW"%(cac)
crfd1=(1+ir)**(-lp)
crfd=1-crfd1
crf=ir/crfd #crf=capitel cost recovery factor
print "CRF=%.3f"%(crf)
anfc=cac*crf #anual fixed cost is prodect of capitel cost and capitel recovery factor
print "annual fixed cost is Rs%.2f/kW"%(anfc)
hr=er/eff #heat rate is energy ratedivided by efficiency
print "heat rate is %fcal/kWh"%(hr)
gpf=cv/hr #kW generated per liter is division of calorific value to hr
print "number of kWh generated per liter of fuel is %.2fkWh/litre"%(gpf)
fcp=fc/gpf #fuel cost per unit is fuel cost divided by generated per liter
print "fuel cost per unit Rs%fper kWh"%(fcp)
aomc=cac*mc #annual operation and maintenence cost
print "annual operation cost Rs.%.4f/kW"%(aomc)
afom=anfc+aomc
print "annual fixed, operation and maintence cost Rs.%.2f/kW"%(afom)
egpy=8760*lf #energy generated is 24*12*60
print "energygenerated per year is %dkWh"%(egpy)
afomc=afom/egpy
print "annual fixed operation and maintenence cost per kWh of energy %.4f/kWh"%(afomc)
gco=fcp+afomc #generated cost is sum of fuel cost and maintenence cost
print "generated cost is Rs%.4f/kWh"%(gco)
sp=25*10**3 #size of the plant
cc=800*10**6 #capital cost
ir=0.1 #interest rate
lp=20 #life of the plant
mc=0.05 #maintence cost
lf=0.6 #load factor
sub=0.3 #subsidy
nc=cc*(1-sub)
nck=nc/sp
crf=ir/(1-(1+ir)**(-lp))
afc=nck*crf
aomc=nck*mc
tac=afc+aomc
aeg=8760*lf
gc=tac/aeg
print "net capital cost Rs%d*10**6 \nnet capital cost per KW Rs%f/kW \ncrf %f \nannual fixed cost Rs%d per kW \nannual operation and maintenance cost Rs%dper kW \nTotal annual cost Rs%dper kW \nAnnual energy generated per kW of plant capacity %.1fkWh \ngeneration cost Rs%.3fkWh"%(nc/(10**6),nck,crf,afc,aomc,tac,aeg,gc)
pp=11 #power capacity
cost=35 #cost of the system
In=0.14 #interest
lis=30 #life of system
sv=0.15 #salvage value
es=13.5*10**6 #energy sent
los=0.05 #losses
omc=0.02 #O&M charges
gr=0.006 #general revenue
rd=(1-sv)*100/lis
rdd=rd/100
tac=cost*(In+omc+rdd+gr)
ery=es*(1-los)
wc=(tac/ery)*10**5
print "rate of depreciation is %.3fpercent \ntotal annual cost is Rs.%.5f lakhs/year \nenergy received per year %ekWh/year \nwheeling charges Rs%f"%(rd,tac,ery,wc)