commonpower.modeling.robust_cost.CostScenario
- class CostScenario(element_mapping: dict[str, str] | None = None)[source]
Bases:
objectUtility class to map variables and parameters to their corresponding scenario variables.
- Parameters:
element_mapping (dict[str, str], optional) – Mapping of variables and parameters to their scenario equivalents. If not given, the nominal scenario is assumed. Defaults to None.
Methods
- __call__(entity: ModelEntity, element_name: str, model: ConcreteModel) Var | Param[source]
Retrieves the pyomo element for the given element name. It does so across all scenarios defined by the uncertainties in the robust constraint.
- Parameters:
element_name (str) – Local name of the element.
model (ConcreteModel) – Model instance.
- Returns:
Var | Param – Pyomo element.