File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3852,8 +3852,9 @@ def _calculate_derived_outputs(self, model: Model) -> None:
38523852 .to (convertible_unit (self .chp_percent_cost_allocation_for_electrical_plant .CurrentUnits )).magnitude
38533853 )
38543854
3855- self .surface_equipment_costs_total .value = (self .Cplant .quantity () + self .Cgath .quantity ()).to (
3856- self .surface_equipment_costs_total .CurrentUnits ).magnitude
3855+ if all (hasattr (self , it ) for it in ['Cplant' , 'Cgath' ]):
3856+ self .surface_equipment_costs_total .value = (self .Cplant .quantity () + self .Cgath .quantity ()).to (
3857+ self .surface_equipment_costs_total .CurrentUnits ).magnitude
38573858
38583859
38593860 @property
Original file line number Diff line number Diff line change @@ -499,7 +499,7 @@ def PrintOutputs(self, model: Model):
499499 if model .surfaceplant .plant_type .value == PlantType .ABSORPTION_CHILLER :
500500 f .write (f' of which Absorption Chiller Cost: { econ .chillercapex .value :10.2f} { econ .chillercapex .CurrentUnits .value } \n ' )
501501 if model .surfaceplant .plant_type .value == PlantType .HEAT_PUMP :
502- f .write (f' of which Heat Pump Cost: { econ .heatpumpcapex .value :10.2f} { econ .Cplant . heatpumpcapex .value } \n ' )
502+ f .write (f' of which Heat Pump Cost: { econ .heatpumpcapex .value :10.2f} { econ .heatpumpcapex . CurrentUnits .value } \n ' )
503503 if model .surfaceplant .plant_type .value == PlantType .DISTRICT_HEATING :
504504 f .write (f' of which Peaking Boiler Cost: { econ .peakingboilercost .value :10.2f} { econ .peakingboilercost .CurrentUnits .value } \n ' )
505505
You can’t perform that action at this time.
0 commit comments