SubclassOf
(class from pyomo.core.base.block
)
- class pyomo.core.base.block.SubclassOf(*ctype)[source]
Bases:
object
This mocks up a tuple-like interface based on subclass relationship.
Instances of this class present a somewhat tuple-like interface for use in PseudoMap ctype / descend_into. The constructor takes a single ctype argument. When used with PseudoMap (through Block APIs like component_objects()), it will match any ctype that is a subclass of the reference ctype.
This allows, for example:
model.component_data_objects(Var, descend_into=SubclassOf(Block))
Methods
__init__
(*ctype)Member Documentation