TimeBlock

class flexops.core.time_block.TimeBlock(*args, **kwds)
Parameters:
  • rule (function) – A rule function or None. Default rule calls build().

  • concrete (bool) – If True, make this a toplevel model. Default - False.

  • ctype (class) –

    Pyomo ctype of the block. Default - pyomo.environ.Block

    Config args

    start_date

    ISO-8601 string or datetime/date: inclusive start of the horizon.

    end_date

    ISO-8601 string or datetime/date: exclusive end of the horizon. Must be within one calendar month of start_date.

    time_step

    Time-step length as a pyunits-carrying expression, e.g. 15 * pyunits.min. Any positive duration is accepted.

    max_length

    Maximum horizon length as a dateutil.relativedelta, measured with calendar arithmetic from start_date. Defaults to one calendar month; widen it only if the rolling-horizon driver (flexschedule) or design tool (flexdesign) cannot.

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries with config arguments as keys.

  • idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to override the default behavior of matching the BlockData index exactly to the index in initialize.

Returns:

(TimeBlock) New instance