Skip to content

Commit 260b072

Browse files
fix issues with previous 2 commits
1 parent 783ea75 commit 260b072

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/geophires_x/Economics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

src/geophires_x/Outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)