Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- Remove unused dependencies.
- Fixes typos for skipped folders.
- Fixes missing dependencies for `gis` modifier used in new iron mapping tests.
- Adds `additional_cls_name` kwarg to `BaseConfif.from_dict()` to allow for configuration errors buried in parent or child classes to provide which model had the offending misconfiguration for simpler user debugging.

## 0.5.1 [December 18, 2025]

Expand Down
3 changes: 2 additions & 1 deletion h2integrate/control/control_rules/pyomo_rule_baseclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def initialize(self):

def setup(self):
self.config = PyomoRuleBaseConfig.from_dict(
self.options["tech_config"]["model_inputs"]["dispatch_rule_parameters"]
self.options["tech_config"]["model_inputs"]["dispatch_rule_parameters"],
additional_cls_name=self.__class__.__name__,
)

self.add_discrete_output(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def setup(self):
``tech_config``.
"""
self.config = DemandOpenLoopControlBaseConfig.from_dict(
self.options["tech_config"]["model_inputs"]["control_parameters"]
self.options["tech_config"]["model_inputs"]["control_parameters"],
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def setup(self):
flexible demand output profile, which will be populated in ``compute``.
"""
self.config = FlexibleDemandOpenLoopConverterControllerConfig.from_dict(
self.options["tech_config"]["model_inputs"]["control_parameters"]
self.options["tech_config"]["model_inputs"]["control_parameters"],
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class PassThroughOpenLoopController(ControllerBaseClass):

def setup(self):
self.config = PassThroughOpenLoopControllerConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "control")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "control"),
additional_cls_name=self.__class__.__name__,
)

self.add_input(
Expand Down
3 changes: 2 additions & 1 deletion h2integrate/control/control_strategies/pyomo_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,8 @@ class HeuristicLoadFollowingController(SimpleBatteryControllerHeuristic):
def setup(self):
"""Initialize HeuristicLoadFollowingController."""
self.config = HeuristicLoadFollowingControllerConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "control")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "control"),
additional_cls_name=self.__class__.__name__,
)

self.n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def setup(self):
self.config = DemandOpenLoopStorageControllerConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "control"),
strict=False,
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
6 changes: 4 additions & 2 deletions h2integrate/converters/ammonia/ammonia_synloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ class AmmoniaSynLoopPerformanceModel(ResizeablePerformanceModelBaseClass):
def setup(self):
n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
self.config = AmmoniaSynLoopPerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down Expand Up @@ -416,7 +417,8 @@ def setup(self):
)

self.config = AmmoniaSynLoopCostConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
6 changes: 4 additions & 2 deletions h2integrate/converters/ammonia/simple_ammonia_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def initialize(self):
def setup(self):
n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
self.config = AmmoniaPerformanceModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)
self.add_input("hydrogen_in", val=0.0, shape=n_timesteps, units="kg/h")
self.add_output("ammonia_out", val=0.0, shape=n_timesteps, units="kg/h")
Expand Down Expand Up @@ -100,7 +101,8 @@ class SimpleAmmoniaCostModel(CostModelBaseClass):

def setup(self):
self.config = AmmoniaCostModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)
super().setup()
# Inputs for cost model configuration
Expand Down
6 changes: 4 additions & 2 deletions h2integrate/converters/co2/marine/direct_ocean_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def initialize(self):

def setup(self):
self.config = DOCPerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)
super().setup()
self.add_output(
Expand Down Expand Up @@ -167,7 +168,8 @@ def initialize(self):

def setup(self):
self.config = DOCCostModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)

super().setup()
Expand Down
19 changes: 14 additions & 5 deletions h2integrate/converters/co2/marine/ocean_alkalinity_enhancement.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def initialize(self):

def setup(self):
self.config = OAEPerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)
super().setup()
n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
Expand Down Expand Up @@ -265,10 +266,14 @@ def initialize(self):
def setup(self):
if "cost" in self.options["tech_config"]["model_inputs"]:
self.config = OAECostModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)
else:
self.config = OAECostModelConfig.from_dict(data={})
self.config = OAECostModelConfig.from_dict(
data={},
additional_cls_name=self.__class__.__name__,
)
super().setup()
self.add_input(
"mass_sellable_product",
Expand Down Expand Up @@ -351,10 +356,14 @@ def initialize(self):
def setup(self):
if "cost" in self.options["tech_config"]["model_inputs"]:
self.config = OAECostModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)
else:
self.config = OAECostModelConfig.from_dict(data={})
self.config = OAECostModelConfig.from_dict(
data={},
additional_cls_name=self.__class__.__name__,
)
super().setup()
n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
self.add_input(
Expand Down
6 changes: 4 additions & 2 deletions h2integrate/converters/grid/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def initialize(self):

def setup(self):
self.config = GridPerformanceModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)

n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
Expand Down Expand Up @@ -169,7 +170,8 @@ class GridCostModel(CostModelBaseClass):

def setup(self):
self.config = GridCostModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
1 change: 1 addition & 0 deletions h2integrate/converters/hopp/hopp_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def setup(self):
self.config = HOPPComponentModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
strict=False,
additional_cls_name=self.__class__.__name__,
)

super().setup()
Expand Down
3 changes: 2 additions & 1 deletion h2integrate/converters/hydrogen/basic_cost_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class BasicElectrolyzerCostModel(ElectrolyzerCostBaseClass):

def setup(self):
self.config = BasicElectrolyzerCostModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class CustomElectrolyzerCostModel(ElectrolyzerCostBaseClass):

def setup(self):
self.config = CustomElectrolyzerCostModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)

super().setup()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ class AspenGeoH2SurfacePerformanceModel(GeoH2SurfacePerformanceBaseClass):

def setup(self):
self.config = AspenGeoH2SurfacePerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)
super().setup()
n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
Expand Down Expand Up @@ -238,7 +239,8 @@ class AspenGeoH2SurfaceCostModel(GeoH2SurfaceCostBaseClass):

def setup(self):
self.config = AspenGeoH2SurfaceCostConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)
super().setup()
n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
Expand Down
6 changes: 5 additions & 1 deletion h2integrate/converters/hydrogen/geologic/mathur_modified.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ def setup(self):
self.target_dollar_year = 2024

config_dict.update({"cost_year": self.target_dollar_year})
self.config = GeoH2SubsurfaceCostConfig.from_dict(config_dict, strict=True)
self.config = GeoH2SubsurfaceCostConfig.from_dict(
config_dict,
strict=True,
additional_cls_name=self.__class__.__name__,
)

super().setup()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ class NaturalGeoH2PerformanceModel(GeoH2SubsurfacePerformanceBaseClass):

def setup(self):
self.config = NaturalGeoH2PerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)
super().setup()
n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ class StimulatedGeoH2PerformanceModel(GeoH2SubsurfacePerformanceBaseClass):
def setup(self):
n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"]
self.config = StimulatedGeoH2PerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
1 change: 1 addition & 0 deletions h2integrate/converters/hydrogen/pem_electrolyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def setup(self):
self.config = ECOElectrolyzerPerformanceModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
strict=False,
additional_cls_name=self.__class__.__name__,
)
super().setup()
self.add_output("efficiency", val=0.0, desc="Average efficiency of the electrolyzer")
Expand Down
3 changes: 2 additions & 1 deletion h2integrate/converters/hydrogen/singlitico_cost_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class SingliticoCostModel(ElectrolyzerCostBaseClass):

def setup(self):
self.config = SingliticoCostModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
additional_cls_name=self.__class__.__name__,
)

super().setup()
Expand Down
3 changes: 2 additions & 1 deletion h2integrate/converters/hydrogen/wombat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class WOMBATElectrolyzerModel(ECOElectrolyzerPerformanceModel):
def setup(self):
super().setup()
self.config = WOMBATModelConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance")
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
additional_cls_name=self.__class__.__name__,
)
plant_life = int(self.options["plant_config"]["plant"]["plant_life"])
self.add_output("capacity_factor", val=0.0, units=None)
Expand Down
7 changes: 6 additions & 1 deletion h2integrate/converters/iron/iron_dri_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def setup(self):
self.config = IronReductionPerformanceBaseConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
strict=True,
additional_cls_name=self.__class__.__name__,
)

self.add_input(
Expand Down Expand Up @@ -319,7 +320,11 @@ def setup(self):

config_dict.update({"cost_year": target_dollar_year})

self.config = IronReductionCostBaseConfig.from_dict(config_dict, strict=False)
self.config = IronReductionCostBaseConfig.from_dict(
config_dict,
strict=False,
additional_cls_name=self.__class__.__name__,
)

super().setup()

Expand Down
7 changes: 6 additions & 1 deletion h2integrate/converters/iron/iron_mine.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def setup(self):
self.config = IronMinePerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
strict=False,
additional_cls_name=self.__class__.__name__,
)
self.add_discrete_output(
"iron_mine_performance", val=pd.DataFrame, desc="iron mine performance results"
Expand Down Expand Up @@ -134,7 +135,11 @@ def setup(self):
config_dict.update({"cost_year": self.target_dollar_year})
config_dict.update({"plant_life": self.plant_life})

self.config = IronMineCostConfig.from_dict(config_dict, strict=False)
self.config = IronMineCostConfig.from_dict(
config_dict,
strict=False,
additional_cls_name=self.__class__.__name__,
)

super().setup()
self.add_input("LCOE", val=self.config.LCOE, units="USD/MW/h")
Expand Down
6 changes: 5 additions & 1 deletion h2integrate/converters/iron/iron_plant.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def setup(self):
self.config = IronPlantPerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
strict=False,
additional_cls_name=self.__class__.__name__,
)
self.add_input("iron_ore_in", val=0.0, shape=n_timesteps, units="t/h")
self.add_discrete_output(
Expand Down Expand Up @@ -141,7 +142,10 @@ def setup(self):
config_dict.update({"cost_year": self.target_dollar_year})
config_dict.update({"plant_life": self.plant_life})

self.config = IronPlantCostConfig.from_dict(config_dict)
self.config = IronPlantCostConfig.from_dict(
config_dict,
additional_cls_name=self.__class__.__name__,
)

super().setup()
self.add_input("LCOE", val=self.config.LCOE, units="USD/MW/h")
Expand Down
2 changes: 2 additions & 0 deletions h2integrate/converters/iron/iron_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def setup(self):
self.config = IronTransportPerformanceConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
strict=False,
additional_cls_name=self.__class__.__name__,
)
self.add_output("land_transport_distance", val=0.0, units="km")
self.add_output("water_transport_distance", val=0.0, units="km")
Expand Down Expand Up @@ -182,6 +183,7 @@ def setup(self):
self.config = IronTransportCostConfig.from_dict(
config_dict,
strict=True,
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
1 change: 1 addition & 0 deletions h2integrate/converters/iron/iron_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def setup(self):
self.config = IronConfig.from_dict(
merge_shared_inputs(self.options["tech_config"]["model_inputs"], "cost"),
strict=False,
additional_cls_name=self.__class__.__name__,
)
super().setup()

Expand Down
6 changes: 5 additions & 1 deletion h2integrate/converters/iron/martin_mine_cost_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ def setup(self):
self.target_dollar_year = 2024

config_dict.update({"cost_year": self.target_dollar_year})
self.config = MartinIronMineCostConfig.from_dict(config_dict, strict=True)
self.config = MartinIronMineCostConfig.from_dict(
config_dict,
strict=True,
additional_cls_name=self.__class__.__name__,
)

super().setup()

Expand Down
Loading