Skip to content

SLC: Require user to specify demand component in control_parameters #739

@elenya-grant

Description

@elenya-grant

SLC: Require user to specify demand component in control_parameters

The bulk of the lines in H2IntegrateModel._classify_slc_technologies() is to auto-find the demand component from the technology configuration file. Currently, it'll throw an error if more than two demand components are found in the technology configuration file.

First, the logic in H2IntegrateModel._classify_slc_technologies() should be updated to only look for demand components that are in the technology_interconnections, since those are the only components actually relevant to the system performance (things may be defined in the technology config that are unused or unconnected).

But - I propose the entire logic relating to demand components in H2IntegrateModel._classify_slc_technologies() should be updated so that the demand technology is specified by the user in the input config. This parameter exists in the configuration class SystemLevelControlBaseConfig exists (in h2integrate/control/control_strategies/system_level/system_level_control_base.py), but is unused in H2IntegrateModel._classify_slc_technologies().

The main logic relating to the demand technology in H2IntegrateModel._classify_slc_technologies() would look like below:

demand_tech = self.plant_config["system_level_control"].get("control_parameters",{}).get("demand_tech",None)
if demand_tech is None:
   raise ValueError("demand_tech is a required control parameter for the system level controller")
if demand_tech not in self.technology_config.get("technologies", {}):
   raise ValueError(f"The demand technology {demand_tech} is not defined in the technology configuration file")
if demand_tech not in list(self.technology_graph.nodes):
   raise ValueError(f"The demand technology {demand_tech} is not connected in technology_interconnections")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions