Uncertain parameters can be represented by either
mutable Param
or fixed Var objects.
Uncertain parameters cannot be directly
represented by Python literals that have been hard-coded into the
deterministic model.
A Param object can be made mutable
at construction by passing the argument mutable=True to the
Param constructor.
If specifying/modifying the mutable argument
is not straightforward in your context,
then add the following lines of code to your script
before setting up your deterministic model:
import pyomo.environ as pyo
pyo.Param.DefaultMutable = True
All Param objects declared
after the preceding code statements will be made mutable by default.
The optional arguments are enumerated in the documentation of the
solve() method.
Like other Pyomo solver interface methods,
the PyROS
solve()
method
accepts the keyword argument options,
which must be a dict
mapping names of optional arguments to
solve()
to their desired values.
If an argument is passed directly by keyword and
indirectly through options,
then the value passed directly takes precedence over the
value passed through options.
Warning
All required arguments to the PyROS
solve() method
must be passed directly by position or keyword,
or else an exception is raised.
Required arguments passed indirectly through the options
setting are ignored.
The PyROS solver supports custom prioritization of
the separation subproblems (and, thus, the constraints)
that are automatically derived from
a given model for robust optimization.
Users may specify separation priorities through:
(Recommended) Suffix components
with local name pyros_separation_priority,
declared on the model or any of its sub-blocks.
Each entry of every such
Suffix
should map a
Var
or Constraint
component to a value that specifies the separation
priority of all constraints derived from that component
The optional argument separation_priority_order
to the PyROS solve()
method. The argument should be castable to a dict,
of which each entry maps the full name of a
Var
or Constraint
component to a value that specifies the
separation priority of all constraints
derived from that component
Specification via Suffix components
takes precedence over specification via the solver argument
separation_priority_order.
Moreover, the precedence ordering among
Suffix
components is handled by the Pyomo
SuffixFinder utility.
A separation priority can be either
a (real) number (i.e., of type int, float, etc.)
or None.
A higher number indicates a higher priority.
The default priority for all constraints is 0.
Therefore a constraint can be prioritized [or deprioritized]
over the default by mapping the constraint to a positive [or negative] number.
In practice, critical or dominant constraints are often
prioritized over algorithmic or implied constraints.
Constraints that have been assigned a priority of None
are enforced subject to only the nominal uncertain parameter realization
provided by the user. Therefore, these constraints are not imposed robustly
and, in particular, are excluded from the separation problems.