commonpower.modeling.robust_cost.WorstCaseRobustCost
- class WorstCaseRobustCost(discount_factor: float = 1.0)[source]
Bases:
_ScenarioBasedCostUtility class to create a robust cost function from a given cost function expression.
- Parameters:
discount_factor (float, optional) – Discount rate to give lower importance to costs further in the future. The logic is: sum_t (cost_t * df**t). Defaults to 1.0.
Methods
Adds additional constraints for the worst-case cost.
initializeInitializes the robust cost function.
Creates the objective function for the worst-case cost.
- add_additional_constraints(model: ConcreteModel) None[source]
Adds additional constraints for the worst-case cost. Specifically, the upper bound constraint for the worst-case cost ‘obj_fcn_ub’ and the constraint ‘obj_fcn_ub_c’ that the cost in each scenario is less or equal to the worst-case cost.
- Parameters:
model (ConcreteModel) – Model instance.