(function from pyomo.contrib.mpc.modeling.cost_expressions)
pyomo.contrib.mpc.modeling.cost_expressions
Returns an IndexedExpression penalizing deviation between the specified variables and piecewise constant target data.
variables (List of Pyomo variables) – Variables that participate in the cost expressions.
time (Iterable) – Index used for the cost expression
setpoint_data (IntervalData) – Holds the piecewise constant values that will be used as setpoints
weight_data (ScalarData (optional)) – Weights for variables. Default is all ones.
tolerance (Float (optional)) – Tolerance used for determining whether a time point is within an interval. Default is zero.
prefer_left (Bool (optional)) – If a time point lies at the boundary of two intervals, whether the value on the left will be chosen. Default is True.
Pyomo Expression, indexed by time, for the total weighted tracking cost with respect to the provided setpoint.
Set, Expression