(function from pyomo.contrib.pyros.util)
pyomo.contrib.pyros.util
Reformulate second-stage equality constraints that are independent of the state variables.
The reformulation of every such constraint is as follows:
If the uncertainty set is discrete, then the constraint, subject to each scenario in the set, is added to the first-stage equality constraints.
Otherwise:
If, after substitution of the decision rule expressions for the effective second-stage variables, the constraint expression is a polynomial (of degree up to 2) in the uncertain parameters, then an equality requiring that each coefficient be of value 0 is added to the first-stage equality constraints. In some cases, matching of the coefficients may lead to immediate detection of robust infeasibility.
Otherwise, the constraint is cast to two second-stage inequalities, each of which is assigned a separation priority of DEFAULT_SEPARATION_PRIORITY.
DEFAULT_SEPARATION_PRIORITY
model_data (model data object) – Main model data object.
robust_infeasible – True if model found to be robust infeasible, False otherwise.
bool