get_penalty_at_time

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

pyomo.contrib.mpc.modeling.terminal.get_penalty_at_time(variables, t, target_data, weight_data=None, time_set=None, variable_set=None)[source]

Returns an Expression penalizing the deviation of the specified variables at the specified point in time from the specified target

Parameters:
  • variables (List) – List of time-indexed variables that will be penalized

  • t (Float) – Time point at which to apply the penalty

  • target_data (ScalarData) – ScalarData object containing the target for (at least) the variables to be penalized

  • weight_data (ScalarData (optional)) – ScalarData object containing the penalty weights for (at least) the variables to be penalized

  • time_set (Set (optional)) – Time set that indexes the provided variables. This is only used if target or weight data are provided as a ComponentMap with VarData as keys. In this case the Set is necessary to recover the CUIDs used internally as keys

  • variable_set (Set (optional)) – Set indexing the list of variables provided, if such a set already exists

Returns:

Set indexing the list of variables provided and an Expression, indexed by this set, containing the weighted penalty expressions

Return type:

Set, Expression