get_penalty_from_constant_target
(function from pyomo.contrib.mpc.modeling.cost_expressions)
- pyomo.contrib.mpc.modeling.cost_expressions.get_penalty_from_constant_target(variables, time, setpoint_data, weight_data=None, variable_set=None)[source]
This function returns a tracking cost IndexedExpression for the given time-indexed variables and associated setpoint data.
- Parameters:
variables (list) – List of time-indexed variables to include in the tracking cost expression
time (iterable) – Set of variable indices for which a cost expression will be created
setpoint_data (ScalarData, dict, or ComponentMap) – Maps variable names to setpoint values
weight_data (ScalarData, dict, or ComponentMap) – Optional. Maps variable names to tracking cost weights. If not provided, weights of one are used.
variable_set (Set) – Optional. A set of indices into the provided list of variables by which the cost expression will be indexed.
- Returns:
RangeSet that indexes the list of variables provided and an Expression indexed by the RangeSet and time containing the cost term for each variable at each point in time.
- Return type: