BoundsInitializer
(class from pyomo.core.base.set
)
- class pyomo.core.base.set.BoundsInitializer(init, default_step=0)[source]
Bases:
InitializerBase
An Initializer wrapper that converts bounds information to a RangeSet
The BoundsInitializer wraps another initializer that is expected to return valid arguments to the RangeSet constructor. Nominally, this would be bounds information in the form of (lower bound, upper bound), but could also be a single scalar or a 3-tuple. Calling this initializer will return a RangeSet object.
BoundsInitializer objects can be intersected with other SetInitializer objects using the SetInitializer.intersect() method.
Methods
__init__
(init[, default_step])constant
()Return True if this initializer is constant across all indices
Return True if this initializer contains embedded indices
indices
()Return a generator over the embedded indices
setdefault
(val)Attributes
default_step
verified
Member Documentation
- contains_indices()
Return True if this initializer contains embedded indices
- indices()
Return a generator over the embedded indices
This will raise a RuntimeError if this initializer does not contain embedded indices