flatten

A module for “flattening” the components in a block-hierarchical model with respect to common indexing sets

Functions

flatten_components_along_sets(m, sets, ctype)

This function iterates over components (recursively) contained in a block and partitions their data objects into components indexed only by the specified sets.

flatten_dae_components(model, time, ctype[, ...])

Partitions components into ComponentData and Components indexed only by the provided set.

generate_sliced_components(b, index_stack, ...)

Recursively generate slices of the specified ctype along the specified sets

get_slice_for_set(s)

Get the slice of the proper dimension for a set.

slice_component_along_sets(component, sets)

This function generates all possible slices of the provided component along the provided sets.