declare_objective_expressions
(function from pyomo.contrib.pyros.util
)
- pyomo.contrib.pyros.util.declare_objective_expressions(working_model, objective, sense=ObjectiveSense.minimize)[source]
Identify the per-stage summands of an objective of interest, according to the user-based variable partitioning.
Two Expressions are declared on the working model to contain the per-stage summands:
first_stage_objective
: Sum of additive terms of objective that are non-uncertain constants or depend only on the user-defined first-stage variables.second_stage_objective
: Sum of all other additive terms of objective.
To facilitate retrieval of the original objective expression (modified to account for the sense), an Expression called
full_objective
is also declared on the working model.- Parameters:
working_model (ConcreteModel) – Working model, constructed during a PyROS solver run.
objective (ObjectiveData) – Objective of which summands are to be identified.
sense ({common.enums.minimize, common.enums.maximize}, optional) – Desired sense of the objective; default is minimize.