get_penalty_from_time_varying_target

(function from pyomo.contrib.mpc.modeling.cost_expressions)

pyomo.contrib.mpc.modeling.cost_expressions.get_penalty_from_time_varying_target(variables, time, setpoint_data, weight_data=None, variable_set=None)[source]

Constructs a penalty expression for the specified variables and specified time-varying target data.

Parameters:
  • variables (List of Pyomo variables) – Variables that participate in the cost expressions.

  • time (Iterable) – Index used for the cost expression

  • setpoint_data (TimeSeriesData) – Holds the trajectory values that will be used as a setpoint

  • weight_data (ScalarData (optional)) – Weights for variables. Default is all ones.

  • variable_set (Set (optional)) – Set indexing the list of provided variables, if one exists already.

Returns:

Set indexing the list of provided variables and Expression, indexed by the variable set and time, for the total weighted penalty with respect to the provided setpoint.

Return type:

Set, Expression