load_data_from_interval

(function from pyomo.contrib.mpc.interfaces.load_data)

pyomo.contrib.mpc.interfaces.load_data.load_data_from_interval(data, model, time, tolerance=0.0, prefer_left=True, exclude_left_endpoint=True, exclude_right_endpoint=False)[source]

A function to load IntervalData into a model

Loads values into specified variables at time points that are within the intervals specified. If a time point is on the boundary of two intervals, the default is to use the interval on the left. Often, intervals should be treated as half-open, i.e. one of the left or right endpoints should be excluded. This can be enforced with the corresponding optional arguments.

Parameters:
  • data (IntervalData)

  • model (BlockData)

  • time (Iterable)

  • tolerance (Float)

  • prefer_left (Bool)

  • exclude_left_endpoint (Bool)

  • exclude_right_endpoint (Bool)