osier.CapacityExpansion#

class osier.CapacityExpansion(technology_list, demand, objectives, constraints={}, solar=None, wind=None, prm=0.0, lower_bound=0.0, upper_bound=1.0, penalty=1e+20, power_units=MW, curtailment=True, allow_blackout=False, verbosity=50, solver='cbc', model_engine='optimal', **kwargs)[source]#

Bases: ElementwiseProblem

The CapacityExpansion class inherits from the pymoo.core.problem.ElementwiseProblem class. This problem determines the technology mix that _minimizes_ the provided objectives.

Parameters:
  • technology_list (list of osier.Technology objects) – Defines the technologies used in the model and the number of decision variables.

  • demand (numpy.ndarray) – The demand curve that needs to be met by the technology mix.

  • objectives (list of str or functions) – Specifies the number and type of objectives. A list of strings must correspond to preset objective functions. Users may optionally write their own functions and pass them to osier as items in the list.

  • constraints (dictionary of string : float or function : float) – Specifies the number and type of constraints. String key names must correspond to preset constraints functions. Users may optionally write their own functions and pass them to osier as keys in the list. The values must be numerical and represent the value that the function should not exceed. See notes for more information about constraints.

  • prm (Optional, float) – The “planning reserve margin” (prm) specifies the amount of excess capacity needed to meet reliability standards. See capacity_requirement. Default is 0.0.

  • solar (Optional, numpy.ndarray) – The curve that defines the solar power provided at each time step. Automatically normalized with the infinity norm (i.e. divided by the maximum value).

  • wind (Optional, numpy.ndarray) – The curve that defines the wind power provided at each time step. Automatically normalized with the infinity norm (i.e. divided by the maximum value).

  • power_units (str, unyt.unit_object) – Specifies the units for the power demand. The default is MW. Can be overridden by specifying a unit with the value.

  • penalty (Optional, float) – The penalty for infeasible solutions. If a particular set produces an infeasible solution for the osier.DispatchModel, the corresponding objectives take on this value.

  • curtailment (boolean) – Indicates if the model should enable a curtailment option.

  • allow_blackout (boolean) – If True, a “reliability” technology is added to the dispatch model that will fulfill the mismatch in supply and demand. This reliability technology has a variable cost of 1e4 $/MWh. The value must be higher than the variable cost of any other technology to prevent a pathological preference for blackouts. Default is False.

  • verbosity (Optional, int) – Sets the logging level for the simulation. Accepts logging.LEVEL or integer where LEVEL is {10:DEBUG, 20:INFO, 30:WARNING, 40:ERROR, 50:CRITICAL}.

  • solver (str) – Indicates which solver to use. May require separate installation. Accepts: [‘cplex’, ‘cbc’, ‘glpk’]. Other solvers will be added in the future.

  • model_engine (str) – Determines which dispatch algorithm to use. Accepts: [‘optimal’, ‘logical’] where ‘optimal’ will use a linear program and ‘logical’ will use a myopic rule-based approach. Default is ‘optimal’.

Notes

Constraints:

Pymoo constraints are not strict in the sense that Pymoo prefers feasibility over respecting constraints. However, all Pymoo algorithms will minimize the “constraint violation (CV).”

Methods

print_problem_formulation()

Prints the problem formulation.