Data Conversion
- pyomo.contrib.mpc.data.convert.interval_to_series(data, time_points=None, tolerance=0.0, use_left_endpoints=False, prefer_left=True)[source]
- Parameters:
data (IntervalData) – Data to convert to a TimeSeriesData object
time_points (Iterable (optional)) – Points at which time series will be defined. Values are taken from the interval in which each point lives. The default is to use the right endpoint of each interval.
tolerance (Float (optional)) – Tolerance within which time points are considered equal. Default is zero.
use_left_endpoints (Bool (optional)) – Whether the left endpoints should be used in the case when time_points is not provided. Default is False, meaning that the right interval endpoints will be used. Should not be set if time points are provided.
prefer_left (Bool (optional)) – If time_points is provided, and a time point is equal (within tolerance) to a boundary between two intervals, this flag controls which interval is used.
- Return type:
- pyomo.contrib.mpc.data.convert.series_to_interval(data, use_left_endpoints=False)[source]
- Parameters:
data (TimeSeriesData) – Data that will be converted into an IntervalData object
use_left_endpoints (Bool (optional)) – Flag indicating whether values on intervals should come from the values at the left or right endpoints of the intervals
- Return type: