TuplizeValuesInitializer

(class from pyomo.core.base.set)

class pyomo.core.base.set.TuplizeValuesInitializer(*args)[source]

Bases: InitializerBase

An initializer wrapper that will “tuplize” a sequence

This initializer takes the result of another initializer, and if it is a sequence that does not already contain tuples, will convert it to a sequence of tuples, each of length ‘dimen’ before returning it.

__init__(_init)[source]

Methods

__init__(_init)

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