Hello Andrew, the mps files that David downloaded from http://www.cuter.rl.ac.uk/Problems/netlib.html contains blank lines.
When these lines are removed glpsol is able to consume the files. http://www.numerical.rl.ac.uk/lancelot/sif/node9.html describes the SIF file format: "In addition, completely blank cards are ignored when scanning the input file and may thus be used to space the data." The incorrect coding is in glpmps.c. Please, apply the patch below: diff --git a/src/glpmps.c b/src/glpmps.c --- a/src/glpmps.c +++ b/src/glpmps.c @@ -212,11 +212,11 @@ static int indicator(struct csa *csa, int name) loop: /* read the very first character of the next record */ xassert(csa->c == '\n'); read_char(csa); - if (csa->c == ' ' || csa->c == '\n') + if (csa->c == ' ') { /* data record */ ret = 0; } - else if (csa->c == '*') + else if (csa->c == '*' || csa->c == '\n') { /* comment record */ while (csa->c != '\n') read_char(csa); -- @David Please, remove the blank lines manually until a new GLPK release is available. Best regards Heinrich Schuchardt On 18.12.2015 16:52, usa usa wrote: > Hi, > > I am trying to use Win GLPK 4.57 > (http://sourceforge.net/projects/winglpk/) to solve some large-sized > linear programming models from Win 7 command line. > > *glpsol.exe --mps FileName * > > I have downloaded some LP problems from > > http://www.cuter.rl.ac.uk/Problems/netlib.html > > But, when I sovled it with GLPK, I got error: *missing indicator record*. > > I am not sure SIF format can be read by GLPK. > > and > > http://plato.asu.edu/ftp/lptestset/network/ > > I got error: *invalid indicator record* > > Could someone recommand some websites where I can find large sized LP > models (.mps or .lp) format so that I can solve them with GLPK 4.57. > > Any help would be appreciated. > > Thanks > > > _______________________________________________ > Help-glpk mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/help-glpk > _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
