Skip to content

Commit 03d5320

Browse files
Fix incorrect CHP cost allocation ratio check for electricity end-use with fixed surface plant cost. Adds example_SHR-3 from https://scientificwebservices.com/shr/VERTICAL_LARGE_IDEAL_ADJUSTED/graphs/graphs.html
1 parent 75e05a5 commit 03d5320

3 files changed

Lines changed: 516 additions & 2 deletions

File tree

src/geophires_x/Economics.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3317,8 +3317,13 @@ def calculate_plant_costs(self, model: Model) -> None:
33173317
self.Cplant.value = self.ccplantfixed.value # TODO unit conversion
33183318

33193319
# TODO compute self.CAPEX_heat_electricity_plant_ratio.Valid property instead
3320-
is_cogen_plant_capex_ratio_valid: bool = self.CAPEX_heat_electricity_plant_ratio.Provided \
3321-
and self.CAPEX_heat_electricity_plant_ratio.value != -1
3320+
is_cogen_plant_capex_ratio_valid: bool = (
3321+
not model.surfaceplant.enduse_option.value.is_cogeneration_end_use_option
3322+
or (
3323+
self.CAPEX_heat_electricity_plant_ratio.Provided \
3324+
and self.CAPEX_heat_electricity_plant_ratio.value != -1
3325+
)
3326+
)
33223327

33233328
if not is_cogen_plant_capex_ratio_valid:
33243329
# TODO enhance message user-friendliness

0 commit comments

Comments
 (0)