GLPK invalid indicator error in example

1.2k Views Asked by At

I cannot run the GLPK solver (glpsol) which I installed through apt-get on an included example called dist. It throws the following:

$ 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

EDIT: Running with -m returns a different error:

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

There are 1 best solutions below

0
Paul G. On

You have to specify in which notation the modelfile is written (GLPK supports multiple problem formats). By default it tries to read an freemps-problem-file which fails on the example mathprog-problem-file.

Try using glpsol -m dist.mod to process the mathprog example.