Skip to content

Commit 711fc29

Browse files
committed
updated finance group connection logic for commodities in connect_technologies
1 parent eb1e371 commit 711fc29

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

h2integrate/core/h2integrate_model.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -671,34 +671,35 @@ def connect_technologies(self):
671671
)
672672

673673
if "electrolyzer" in tech_name:
674-
self.plant.connect(
675-
f"{tech_name}.total_hydrogen_produced",
676-
f"financials_subgroup_{group_id}.total_hydrogen_produced",
677-
)
678674
self.plant.connect(
679675
f"{tech_name}.time_until_replacement",
680676
f"financials_subgroup_{group_id}.{tech_name}_time_until_replacement",
681677
)
678+
if primary_commodity_type == "hydrogen":
679+
self.plant.connect(
680+
f"{tech_name}.total_hydrogen_produced",
681+
f"financials_subgroup_{group_id}.total_hydrogen_produced",
682+
)
682683

683-
if "ammonia" in tech_name:
684+
if "ammonia" in tech_name and primary_commodity_type == "ammonia":
684685
self.plant.connect(
685686
f"{tech_name}.total_ammonia_produced",
686687
f"financials_subgroup_{group_id}.total_ammonia_produced",
687688
)
688689

689-
if "doc" in tech_name:
690+
if "doc" in tech_name and primary_commodity_type == "co2":
690691
self.plant.connect(
691692
f"{tech_name}.co2_capture_mtpy",
692693
f"financials_subgroup_{group_id}.co2_capture_kgpy",
693694
)
694695

695-
if "oae" in tech_name:
696+
if "oae" in tech_name and primary_commodity_type == "co2":
696697
self.plant.connect(
697698
f"{tech_name}.co2_capture_mtpy",
698699
f"financials_subgroup_{group_id}.co2_capture_kgpy",
699700
)
700701

701-
if "air_separator" in tech_name:
702+
if "air_separator" in tech_name and primary_commodity_type == "nitrogen":
702703
self.plant.connect(
703704
f"{tech_name}.total_nitrogen_produced",
704705
f"financials_subgroup_{group_id}.total_nitrogen_produced",

0 commit comments

Comments
 (0)