flatten_dae_components

(函数来自 pyomo.dae.flatten)

pyomo.dae.flatten.flatten_dae_components(model, time, ctype, indices=None, active=None)[source]

将组件分区为ComponentData和仅由提供的集合索引的Components。

Parameters:
  • model (BlockData) – 其组件被分区的块

  • time (Set) – 通过此集合(且仅此集合)进行索引将在返回的组件中保留。

  • ctype (子类Component) – 用于识别、分区和返回的组件类型

  • indices (TupleComponentMap) – 包含指定集合的索引,用于在深入块时使用

  • active (BoolNone) – 如果提供,用作过滤器,仅返回具有指定活动标志的组件。如果由切片定义的任何数据对象匹配此标志,则返回对切片的引用。

Returns:

第一个列表包含所有未被提供的集合索引的组件的ComponentData。第二个列表包含所有被提供的集合索引的组件的引用切片。

Return type:

ComponentData 的列表, listComponent