The component_map method on Pyomo Block only provides components that live directly on that Block. It does not provide components that live on children blocks. This PR replaces the use of component_map with component_data_objects which has an option to descend into sub-blocks. Note that component_data_objects iterates over all of the ComponentData objects directly, so there is no need to worry about indexed objects.
The
component_map
method on PyomoBlock
only provides components that live directly on thatBlock
. It does not provide components that live on children blocks. This PR replaces the use ofcomponent_map
withcomponent_data_objects
which has an option to descend into sub-blocks. Note thatcomponent_data_objects
iterates over all of theComponentData
objects directly, so there is no need to worry about indexed objects.