我正在尝试使用不同的名称创建多个相等的集合。我尝试了类似的方法:
model.j=model.i
我在操作章节 (4.2) 的 Pyomo 文档中看到了一些东西,但是当我运行程序时,我收到以下错误:
RuntimeError: Attempting to re-assign the component 'i' to the same
block under a different name (j).
This behavior is not supported by Pyomo; components must have a
single owning block (or model), and a component may not appear
multiple times in a block. If you want to re-name or move this
component, use the block del_component() and add_component() methods.