0

dist という付属のサンプルで apt-get を介してインストールした GLPK ソルバー (glpsol) を実行できません。以下をスローします。

$ glpsol dist.mod 
GLPSOL: GLPK LP/MIP Solver, v4.60
Parameter(s) specified in the command line:
 dist.mod
Reading problem data from 'dist.mod'...
dist.mod:1: invalid indicator record
MPS file processing error

編集: -m で実行すると、別のエラーが返されます:

172 lines were read
Generating cost...
dist.mod:103: fact contains w02 which not within specified set; see (1)
MathProg model processing error
4

1 に答える 1

1

モデルファイルがどの表記法で記述されているかを指定する必要があります (GLPK は複数の問題形式をサポートしています)。デフォルトでは、例の mathrog-problem-file で失敗する freemps-problem-file を読み込もうとします。

glpsol -m dist.modMathprog の例を処理するために使用してみてください。

于 2016-12-10T14:12:00.887 に答える