osier.LogicDispatchModel#

class osier.LogicDispatchModel(technology_list, net_demand, allow_blackout=False, curtailment=True, verbosity=50, *args, **kwargs)[source]#

Bases: OsierModel

The LogicDispatchModel class creates and solves a basic dispatch model from the perspective of a “grid operator.”

Parameters:
  • technology_list (list of osier.Technology) – The list of Technology objects to dispatch – i.e. decide how much energy each technology should produce.

  • net_demand (list, numpy.ndarray, unyt.array.unyt_array, pandas.DataFrame) – The remaining energy demand to be fulfilled by the technologies in technology_list. The values of an object passed as net_demand are used to create a supply constraint. See oversupply and undersupply. If a pandas.DataFrame is passed, osier will try inferring a time_delta from the dataframe index. Otherwise, the time_delta must be passed or the default is used.

  • time_delta (str, unyt.unyt_quantity, float, int) –

    Specifies the amount of time between two time slices. The default is one hour. Can be overridden by specifying a unit with the value. For example:

    >>> time_delta = "5 minutes"
    >>> from unyt import days
    >>> time_delta = 30*days
    

    would both work.

  • 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.

  • 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}.

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

  • allow_blackout (boolean) – If True, a “reliability” technology is added to the 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.

objective#

The result of the model’s objective function. Only instantiated after DispatchModel.solve() is called.

Type:

float

technology_list#

A _sorted_ list of technologies.

Type:

list of osier.Technology

original_order#

A list of technology names to preserve the intended order of the technologies.

Type:

list of str

Methods

solve()

This function executes the model solve with a rule-based approach.