flatten_dae_components
(function from pyomo.dae.flatten)
- pyomo.dae.flatten.flatten_dae_components(model, time, ctype, indices=None, active=None)[source]
Partitions components into ComponentData and Components indexed only by the provided set.
- Parameters:
model (BlockData) – Block whose components are partitioned
time (Set) – Indexing by this set (and only this set) will be preserved in the returned components.
ctype (Subclass of Component) – Type of component to identify, partition, and return
indices (Tuple or ComponentMap) – Contains the index of the specified set to be used when descending into blocks
active (Bool or None) – If provided, used as a filter to only return components with the specified active flag. A reference-to-slice is returned if any data object defined by the slice matches this flag.
- Returns:
The first list contains ComponentData for all components not indexed by the provided set. The second contains references-to -slices for all components indexed by the provided set.
- Return type:
List of ComponentData, list of Component