我无法运行我在apt-get上安装的GLPK求解器(glpsol),它包含一个名为dist的示例。它抛出以下内容:
$ 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
答案 0 :(得分:1)
您必须指定编写modelfile的符号(GLPK支持多种问题格式)。 默认情况下,它会尝试读取示例mathprog-problem-file上的freemps-problem-file失败。
尝试使用glpsol -m dist.mod
来处理mathprog示例。