2017-03-10 7 views
1

に別の名前で同じセットを作成します。そのような何かを試してみました(4.2)しかし、私は次のエラーを取得プログラムを実行する場合:は、私は別のnames.Iで複数の同じセットを作成しようとしています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. 

答えて

0

これを行う方法は、別の

model.j = Set(initialize=model.i) 
で1セットを初期化することです
関連する問題