获取索引的cuid

(函数来自 pyomo.contrib.mpc.data.get_cuid)

pyomo.contrib.mpc.data.get_cuid.get_indexed_cuid(var, sets=None, dereference=None, context=None)[source]

尝试将提供的“var”对象转换为带有通配符的CUID

Parameters:
  • var – 要处理的对象。可能是 VarData、IndexedVar(引用或其他)、ComponentUID、切片或字符串。

  • sets (Tuple of sets) – 如果切片一个vardata对象,要使用的集合

  • dereference (Noneint) – 我们可以访问引用属性以从引用中恢复“基础组件”的次数。

  • 上下文 (Block) – 将生成切片和CUID的块

Returns:

与提供的var对应的ComponentUID并设置

Return type:

ComponentUID