# # Module for CO2e Emission Calculation #Comparison between Road Haulage and Intermodal Transport Chains #Author: Janez Merlak # import math #Terminals print('____________________________________________________________________________________________') T1=input('What is the name of departing terminal? ') T1n=input('What is the average yearly throughput of '+str(T1)+ ', in TEUs? ') T1Cap=input('What is '+str(T1)+ ' container yard capacity in sq meters? ') T2=input('What is the name of destination terminal? ') T2n=input('What is the average yearly throughput of '+str(T2)+ ', in TEUs? ') T2Cap=input('What is '+str(T2)+ ' container yard capacity in sq meters? ') #Intermodal Train Utilisation rate UT=input('What is the utilisation rate of the train in %? ') #ITU ITU=input('Weight of the cargo, inside ITU, in kgs? ') #rail line RA=input('What is km distance on rail between departing and destination terminal? ') #shunting Shunt1=input('What is the distance between main rail station and '+str(T1)+' in km? ' ) Shunt2=input('What is the distance between main rail station and '+str(T2)+' in km? ' ) #trucking legs T1fm=input('How many km for the first-mile delivery of ITU? (Insert 0, if none) ') T2lm=input('How many km for the last-mile delivery of ITU? (Insert 0, if none) ') #pure trucking alternative RO=input('Road distance from POL to POD in km? (If unknown, enter 0 and the module will sum up rail kilometers and two trucking legs to compare!) ') # calculation of emissions of intermodal transport per unit, depending on train utilisation def DepOnUtil(UT): if int(UT) <= 50: return (0.5363) elif int(UT) <= 55: return (0.4876) elif int(UT) <= 60: return (0.4470) elif int(UT) <= 65: return (0.4126) elif int(UT) <= 70: return (0.3831) elif int(UT) <= 75: return (0.3576) elif int(UT) <= 80: return (0.3352) elif int(UT) <= 85: return (0.3155) elif int(UT) <= 90: return (0.2980) elif int(UT) <= 95: return (0.2823) else: return (0.2682) unit=DepOnUtil(UT) sumR=int(RA)*unit #Pure rail transport emissions print('____________________________________________________________________________________________') print('** CO2e emission for pure rail transport between '+str(T1)+' and '+str(T2)+' is '+str(format(sumR, '.2f'))+' kg.') #train shunting emissions per unit, depending on train utilisation def DepOnUtilS(UT): if int(UT) <= 50: return (0.1106) elif int(UT) <= 55: return (0.1008) elif int(UT) <= 60: return (0.0926) elif int(UT) <= 65: return (0.0856) elif int(UT) <= 70: return (0.0796) elif int(UT) <= 75: return (0.0744) elif int(UT) <= 80: return (0.0698) elif int(UT) <= 85: return (0.0657) elif int(UT) <= 90: return (0.0621) elif int(UT) <= 95: return (0.0589) else: return (0.0553) Sunit=DepOnUtilS(UT) SumS=int(Shunt1)+int(Shunt2)*Sunit #Train shunting emissions print('** CO2e emission for diesel train shunting in both terminals is '+str(format(SumS, '.2f'))+' kg.') #Manipulation emissions # avg.consumption units emissions units #diesel 1.44 litres 4.66 kg CO2e #electricity 6.09 kWh 2.85 kg CO2e #emissions per handling per unit. We will take the most probable average value of emissions as we don't know which #equipment will be used, but we can assume that the one with less energy consumption if both types available. #Wherever there are RMGs, they will be used as much as possible due savings. The average emission per lift is 3.76 kg. #consider 4 lifts in a journey. SumL=4*3.76 print('** CO2e emission for handlings in both terminals is '+str(format(SumL, '.2f'))+' kg.') #emission of inner trucking sumI=(0.7*2*24/100)*2*3.24 print('** CO2e emission for diesel inner trucking in both terminals is '+str(format(sumI, '.2f'))+' kg.') #emission of waiting cue of outside trucks. Avg.emission 1,8 kg CO2e per truck per visit. For EURO6 diesel engines. sumWT=(2*1.8)*2 print('** CO2e emission for waiting of trucks at the gates of both terminals is '+str(format(sumWT, '.2f'))+' kg.') #emission of supporting services def numTEU(T1n): if int(T1n) <= 50000 and int(T1Cap) <= 100000: return (0.8484) elif int(T1n) <= 60000 and int(T1Cap) <= 100000: return (0.7070) elif int(T1n) <= 70000 and int(T1Cap) <= 100000: return (0.6060) elif int(T1n) <= 80000 and int(T1Cap) <= 100000: return (0.5302) elif int(T1n) <= 90000 and int(T1Cap) <= 100000: return (0.4713) elif int(T1n) <= 100000 and int(T1Cap) <= 100000: return (0.4242) elif int(T1n) <= 150000 and int(T1Cap) <= 100000: return (0.2828) elif int(T1n) <= 200000 and int(T1Cap) <= 100000: return (0.2121) elif int(T1n) <= 300000 and int(T1Cap) <= 100000: return (0.1414) elif int(T1n) <= 400000 and int(T1Cap) <= 100000: return (0.1060) elif int(T1n) <= 500000 and int(T1Cap) <= 100000: return (0.0848) elif int(T1n) <= 50000 and int(T1Cap) <= 200000: return (1.6967) elif int(T1n) <= 60000 and int(T1Cap) <= 200000: return (1.4139) elif int(T1n) <= 70000 and int(T1Cap) <= 200000: return (1.2119) elif int(T1n) <= 80000 and int(T1Cap) <= 200000: return (1.0605) elif int(T1n) <= 90000 and int(T1Cap) <= 200000: return (0.9426) elif int(T1n) <= 100000 and int(T1Cap) <= 200000: return (0.8484) elif int(T1n) <= 150000 and int(T1Cap) <= 200000: return (0.5656) elif int(T1n) <= 200000 and int(T1Cap) <= 200000: return (0.4242) elif int(T1n) <= 300000 and int(T1Cap) <= 200000: return (0.2828) elif int(T1n) <= 400000 and int(T1Cap) <= 200000: return (0.2121) elif int(T1n) <= 500000 and int(T1Cap) <= 200000: return (0.1697) else: return (0.1697) unitSS1=numTEU(T1n) def numTEU(T2n): if int(T2n) <= 50000 and int(T2Cap) <= 100000: return (0.8484) elif int(T2n) <= 60000 and int(T2Cap) <= 100000: return (0.7070) elif int(T2n) <= 70000 and int(T2Cap) <= 100000: return (0.6060) elif int(T2n) <= 80000 and int(T2Cap) <= 100000: return (0.5302) elif int(T2n) <= 90000 and int(T2Cap) <= 100000: return (0.4713) elif int(T2n) <= 100000 and int(T2Cap) <= 100000: return (0.4242) elif int(T2n) <= 150000 and int(T2Cap) <= 100000: return (0.2828) elif int(T2n) <= 200000 and int(T2Cap) <= 100000: return (0.2121) elif int(T2n) <= 300000 and int(T2Cap) <= 100000: return (0.1414) elif int(T2n) <= 400000 and int(T2Cap) <= 100000: return (0.1060) elif int(T2n) <= 500000 and int(T2Cap) <= 100000: return (0.0848) elif int(T2n) <= 50000 and int(T2Cap) <= 200000: return (1.6967) elif int(T2n) <= 60000 and int(T2Cap) <= 200000: return (1.4139) elif int(T2n) <= 70000 and int(T2Cap) <= 200000: return (1.2119) elif int(T2n) <= 80000 and int(T2Cap) <= 200000: return (1.0605) elif int(T2n) <= 90000 and int(T2Cap) <= 200000: return (0.9426) elif int(T2n) <= 100000 and int(T2Cap) <= 200000: return (0.8484) elif int(T2n) <= 150000 and int(T2Cap) <= 200000: return (0.5656) elif int(T2n) <= 200000 and int(T2Cap) <= 200000: return (0.4242) elif int(T2n) <= 300000 and int(T2Cap) <= 200000: return (0.2828) elif int(T2n) <= 400000 and int(T2Cap) <= 200000: return (0.2121) elif int(T2n) <= 500000 and int(T2Cap) <= 200000: return (0.1697) else: return (0.1697) unitSS2=numTEU(T2n) def numrTEU(T1n): if int(T1n) <= 50000: return (0.7738) elif int(T1n) <= 60000: return (0.6448) elif int(T1n) <= 70000: return (0.5527) elif int(T1n) <= 80000: return (0.4836) elif int(T1n) <= 90000: return (0.4299) elif int(T1n) <= 100000: return (0.3869) elif int(T1n) <= 150000: return (0.2579) elif int(T1n) <= 200000: return (0.1934) elif int(T1n) <= 300000: return (0.1290) elif int(T1n) <= 400000: return (0.0967) else: return (0.0774) unitSS3=numrTEU(T1n) def numrTEU(T2n): if int(T2n) <= 50000: return (0.7738) elif int(T2n) <= 60000: return (0.6448) elif int(T2n) <= 70000: return (0.5527) elif int(T2n) <= 80000: return (0.4836) elif int(T2n) <= 90000: return (0.4299) elif int(T2n) <= 100000: return (0.3869) elif int(T2n) <= 150000: return (0.2579) elif int(T2n) <= 200000: return (0.1934) elif int(T2n) <= 300000: return (0.1290) elif int(T2n) <= 400000: return (0.0967) else: return (0.1697) unitSS4=numrTEU(T2n) sumSS=unitSS1+unitSS2+unitSS3+unitSS4 print('** CO2e emission of supporting services on both terminals is '+str(format(sumSS, '.2f'))+' kg.') #emission of first and last-mile trucking. sumT=((int(T1fm)*2)+(int(T2lm)*2))*(25.5/100) print('** CO2e emission for first and last-mile trucking on both ends is '+str(format(sumT, '.2f'))+' kg.') # eimission of entire intermodal chain. intE = sumR + SumS + SumL + sumI + sumT + sumSS + sumWT intkm=int(RA)+int(Shunt1)+int(Shunt2)+2*(int(T1fm)+int(T2lm)) print('** Total distance for intermodal calculation considered was ' + str(intkm) + ' km.') print('** CO2e emissions for complete intermodal transport chain for the ITU, '+str(ITU)+' kg of cargo, between POL and POD is '+str(format(intE, '.2f'))+' kg.') print('** Calculation of the rail part is done with EU27 average WTW conversion factor. ') # calculation of pure road transport emission, according to average consumption of Euro 6 engine at 25,5 liter of diesel/100km, # European continent, incl.alpine areas, cargo weight being 24 tons. if int(RO) == 0: roadkm=int(RA)+int(Shunt1)+int(Shunt2)+int(T1fm)+int(T2lm) else: roadkm=int(RO)*2 roadE=(((int(roadkm) * 25.5)/100)*3.24) print('--------------------------------------------------------------------------------------------') print('* Total distance for road calculation considered was ' + str(roadkm) + ' km.') print('* CO2e emissions for pure road transport of '+str(ITU)+ ' kg of cargo between POL and POD is '+str(format(roadE, '.2f'))+' kg.') print('* Calculation of the road part is done with WTW conversion factor. ') difE=int(roadE)-int(intE)#calculated difference between intermodal and road = savings in CO2e emissions. print('============================================================================================') if int(difE) <= 0: print('*** There are no savings of emissions by selecting Intermodal Transport over Road Haulage as the distance covered by rail is too short. ***') else: print('*** The savings of emissions by selecting Intermodal Transport over Road Haulage results in '+str(format(difE, '.2f'))+' kg CO2e per Unit. ***')