BoundInitializer

(class from pyomo.core.base.initializer)

class pyomo.core.base.initializer.BoundInitializer(arg=None, obj=NOTSET)[source]

Bases: InitializerBase

Initializer wrapper for processing bounds (mapping scalars to 2-tuples)

Note that this class is meant to mimic the behavior of Initializer() and will return None if the initializer that it is wrapping is None.

Parameters:
  • arg – As with Initializer(), this is the raw argument passed to the component constructor.

  • obj (Component) – The component that “owns” the initializer. This initializer will treat sequences as mappings only if the owning component is indexed and the sequence passed to the initializer is not of length 2

__init__(arg, obj=NOTSET)[source]

Methods

__init__(arg[, obj])

constant()

Return True if this initializer is constant across all indices

contains_indices()

Return True if this initializer contains embedded indices

indices()

Return a generator over the embedded indices

Attributes

verified

Member Documentation

constant()[source]

Return True if this initializer is constant across all indices

contains_indices()[source]

Return True if this initializer contains embedded indices

indices()[source]

Return a generator over the embedded indices

This will raise a RuntimeError if this initializer does not contain embedded indices