[![画像の説明をここに入力してください] [1]] [1] CPLEXがeclipsで提案した例から "bendersatsp.py"を実行しています。 "filename ="が定義されているmain句にatsp.datのパスを追加しただけです。それを実行した後、len(sys.argv)= 1に対してのみ実行され、次の結果が得られます。何が問題なのか、なぜ完全に動かないのか分かりますか?CPLEXのPythonでのベンダーの分解例
Usage: bendersatsp.py {0|1} [filename]
0: Benders' cuts only used as lazy constraints,
to separate integer infeasible solutions.
1: Benders' cuts also used as user cuts,
to separate fractional infeasible solutions.
filename: ATSP instance file name.
File C:\Program Files (x86)\IBM\ILOG\CPLEX_Studio1261\cplex\examples/data/atsp.dat used if no name is provided.
bendersatsp.pyに行った変更を表示してください。 – rkersh
@rkersh、私はちょうどファイル名のパスを追加しました。デフォルトのデータは、mycomのC:¥Program Files(x86)¥IBM¥ILOG¥CPLEX_Studio1261¥cplex¥examples/data/atsp.datに定義されているので、元のbendersatsp.pyにファイル名として格納します。私はまだbendersatsp.pyを変更していない。 – rezzz