[問題] 關於cplex的問題

看板C_and_CPP (C/C++)作者 (小奈)時間15年前 (2010/10/20 20:24), 編輯推噓0(003)
留言3則, 2人參與, 最新討論串1/1
請各位有使用過cplex的大大幫忙 float information2[Stores][inf]=...; dvar boolean Supply[Stores]; int D[inf]; execute{ for (var i in inf) for(var j in Stores) var D[i]=D[i] + Supply[j]*information2[j][i]; } 或是 execute error{ for (var i in inf) var D[i]=sum(j in Stores)(Supply[j]*information[j][i]); } 綠色的兩行總是出現錯誤訊息: Scripting parser error: missing ';' or newline between statements. 煩請各位大大幫忙 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 120.107.149.92 ※ 編輯: tgplf2x3 來自: 120.107.149.92 (10/20 20:31) ※ 編輯: tgplf2x3 來自: 120.107.149.92 (10/20 20:31)

10/20 21:27, , 1F
為什麼是var i in inf(store) 而不是var i in SomeList
10/20 21:27, 1F

10/20 23:02, , 2F
有點不太懂s大的意思 忘了加 inf={f1,f2,f3,f4,f5};
10/20 23:02, 2F

10/20 23:03, , 3F
range Stores=0..bank-1;
10/20 23:03, 3F
文章代碼(AID): #1Clj-Bdk (C_and_CPP)
文章代碼(AID): #1Clj-Bdk (C_and_CPP)