iter_component

(函数来自 pyomo.util.components)

pyomo.util.components.iter_component(obj)[source]

从一个使用basekernel API定义的组件中生成“子”对象。如果组件未被索引,则返回自身。

Parameters:

obj (ComponentType) – 例如 TupleContainer, ListContainer, DictContainer, IndexedComponent, 或 Component

Returns:

迭代器[组件类型]

Return type:

组件数据对象的迭代器。