(class from pyomo.contrib.pyros.uncertainty_sets)
pyomo.contrib.pyros.uncertainty_sets
Bases: UncertaintySet
UncertaintySet
An axis-aligned ellipsoid.
center ((N,) array_like) – Center of the ellipsoid.
half_lengths ((N,) array_like) – Semi-axis lengths of the ellipsoid.
Examples
3D origin-centered unit hypersphere:
>>> from pyomo.contrib.pyros import AxisAlignedEllipsoidalSet >>> sphere = AxisAlignedEllipsoidalSet( ... center=[0, 0, 0], ... half_lengths=[1, 1, 1] ... ) >>> sphere.center array([0, 0, 0]) >>> sphere.half_lengths array([1, 1, 1])
Initialize self (see class docstring).
Methods
__init__(center, half_lengths)
__init__
compute_auxiliary_uncertain_param_vals(point)
compute_auxiliary_uncertain_param_vals
Compute auxiliary uncertain parameter values for a given point.
is_bounded(config)
is_bounded
Determine whether the uncertainty set is bounded.
is_nonempty(config)
is_nonempty
Return True if the uncertainty set is nonempty, else False.
is_valid(config)
is_valid
Return True if the uncertainty set is bounded and non-empty, else False.
point_in_set(point)
point_in_set
Determine whether a given point lies in the uncertainty set.
set_as_constraint([uncertain_params, block])
set_as_constraint
Construct a block of Pyomo constraint(s) defining the uncertainty set on variables representing the uncertain parameters, for use in a two-stage robust optimization problem or subproblem (such as a PyROS separation subproblem).
Attributes
center
Center of the ellipsoid.
dim
Dimension N of the axis-aligned ellipsoidal set.
geometry
Geometry of the axis-aligned ellipsoidal set.
half_lengths
Semi-axis lengths.
parameter_bounds
Bounds in each dimension of the axis-aligned ellipsoidal set.
type
Brief description of the type of the uncertainty set.
Member Documentation
Compute auxiliary uncertain parameter values for a given point. The point need not be in the uncertainty set.
point ((N,) array-like) – Point of interest.
solver (Pyomo solver, optional) – If needed, a Pyomo solver with which to compute the auxiliary values.
aux_space_pt – Computed auxiliary uncertain parameter values.
numpy.ndarray
config (ConfigDict) – PyROS solver configuration.
True if the uncertainty set is certified to be bounded, and False otherwise.
bool
Notes
This check is carried out by solving a sequence of maximization and minimization problems (in which the objective for each problem is the value of a single uncertain parameter). If any of the optimization models cannot be solved successfully to optimality, then False is returned.
This method is invoked during the validation step of a PyROS solver call.
point ((N,) array-like) – Point (parameter value) of interest.
is_in_set – True if the point lies in the uncertainty set, False otherwise.
This method is invoked at the outset of a PyROS solver call to determine whether a user-specified nominal parameter realization lies in the uncertainty set.
uncertain_params (None, Var, or list of Var, optional) – Variable objects representing the (main) uncertain parameters. If None is passed, then new variable objects are constructed.
block (BlockData or None, optional) – Block on which to declare the constraints and any new variable objects. If None is passed, then a new block is constructed.
A collection of the components added or addressed.
UncertaintyQuantification
(N,) numpy.ndarray
int
Geometry of the axis-aligned ellipsoidal set. See the Geometry class documentation.
List, length N, of 2-tuples. Each tuple specifies the bounds in its corresponding dimension.
list of tuples
str