(function from pyomo.contrib.pyros.util)
pyomo.contrib.pyros.util
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.
first_stage_objective
second_stage_objective: Sum of all other additive terms of objective.
second_stage_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.
full_objective
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.