7

c++/gurobi ファイルでエラーが発生します。

エラー コード = 10004 属性 'X' を取得できません

これはラベルと関係があるかもしれないと読みましたか?しかし、どのように問題があるのか​​ わかりません。一部の入力ファイルでは機能しますが、他のファイルでは機能しません。そこで、t5.txt というおもちゃのファイルを添付して作成しました。このファイルは機能しませんが、最後の列を削除して 8 から 7 に設定すると修正されます。私は当惑しています...

以下は、model.write の出力です。すべてが理にかなっているようですが、私が間違っていることはありますか? model.write(test.sol)をするたびにプログラムが停止するので、解決策に問題があるようです>

添付ファイル: main.cpp -> https://dl.dropboxusercontent.com/u/13564139/main.cpp

input.txt -> https://dl.dropboxusercontent.com/u/13564139/t5.txt

Maximize
  15 student_has_projects4.1
Subject To
 R0: student_has_projects0.0 + student_has_projects1.0
   + student_has_projects2.0 + student_has_projects3.0
   + student_has_projects4.0 + student_has_projects5.0
   + student_has_projects6.0 + student_has_projects7.0 <= 4
 R1: student_has_projects1.0 + student_has_projects2.0 >= 1
 R2: student_has_projects2.0 + 2 student_has_projects5.0 <= 2
 R3: student_has_projects2.0 + 2 student_has_projects5.0 >= 1
 R4: student_has_projects0.0 + student_has_projects3.0
   + student_has_projects4.0 + student_has_projects6.0
   + student_has_projects7.0 >= 1
 R5: student_has_projects2.0 + student_has_projects5.0 <= 1
 R6: student_has_projects0.1 + student_has_projects1.1
   + student_has_projects2.1 + student_has_projects3.1
   + student_has_projects4.1 + student_has_projects5.1
   + student_has_projects6.1 + student_has_projects7.1 <= 4
 R7: student_has_projects1.1 + student_has_projects2.1 >= 1
 R8: student_has_projects2.1 + 2 student_has_projects5.1 <= 2
 R9: student_has_projects2.1 + 2 student_has_projects5.1 >= 1
 R10: student_has_projects0.1 + student_has_projects3.1
   + student_has_projects4.1 + student_has_projects6.1
   + student_has_projects7.1 >= 1
 R11: student_has_projects2.1 + student_has_projects5.1 <= 1
 R12: student_has_projects0.2 + student_has_projects1.2
   + student_has_projects2.2 + student_has_projects3.2
   + student_has_projects4.2 + student_has_projects5.2
   + student_has_projects6.2 + student_has_projects7.2 <= 4
 R13: student_has_projects1.2 + student_has_projects2.2 >= 1
 R14: student_has_projects2.2 + 2 student_has_projects5.2 <= 2
 R15: student_has_projects2.2 + 2 student_has_projects5.2 >= 1
 R16: student_has_projects0.2 + student_has_projects3.2
   + student_has_projects4.2 + student_has_projects6.2
   + student_has_projects7.2 >= 1
 R17: student_has_projects2.2 + student_has_projects5.2 <= 1
 R18: student_has_projects0.0 + student_has_projects0.1
   + student_has_projects0.2 = 1
 R19: student_has_projects1.0 + student_has_projects1.1
   + student_has_projects1.2 = 1
 R20: student_has_projects2.0 + student_has_projects2.1
   + student_has_projects2.2 = 1
 R21: student_has_projects3.0 + student_has_projects3.1
   + student_has_projects3.2 = 1
 R22: student_has_projects4.0 + student_has_projects4.1
   + student_has_projects4.2 = 1
 R23: student_has_projects5.0 + student_has_projects5.1
   + student_has_projects5.2 = 1
 R24: student_has_projects6.0 + student_has_projects6.1
   + student_has_projects6.2 = 1
 R25: student_has_projects7.0 + student_has_projects7.1
   + student_has_projects7.2 = 1
Bounds
Binaries
 student_has_projects0.0 student_has_projects0.1 student_has_projects0.2
 student_has_projects1.0 student_has_projects1.1 student_has_projects1.2
 student_has_projects2.0 student_has_projects2.1 student_has_projects2.2
 student_has_projects3.0 student_has_projects3.1 student_has_projects3.2
 student_has_projects4.0 student_has_projects4.1 student_has_projects4.2
 student_has_projects5.0 student_has_projects5.1 student_has_projects5.2
 student_has_projects6.0 student_has_projects6.1 student_has_projects6.2
 student_has_projects7.0 student_has_projects7.1 student_has_projects7.2
End
4

1 に答える 1