[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] glpsol cannot solve exported CPLEX file
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] glpsol cannot solve exported CPLEX file |
Date: |
Wed, 16 Jul 2014 18:36:35 +0400 |
Hi Heinrich,
Thank you for your bug report.
> given the following model:
>
> var x, >=0;
> minimize obj : x + 5;
> end;
>
> I export it with
>
> glpsol -m test.mod --wlp test.lp --check
>
> I get
>
> \* Problem: test *\
>
> Minimize
> obj: + x
> \* constant term = 5 *\
>
> Subject To
>
> End
>
>
> Then I run
>
> glpsol --lp test.lp
>
> and receive the following output:
>
> Reading problem data from 'test.lp'...
> test.lp:9: missing variable name
> CPLEX LP file processing error
>
>
> The bug is in glpcpx.c. In parse_constraints() the token check should be
> moved from the end of the loop to the start of the loop.
I don't know how to better fix this bug. The problem is that your lp has
no constraints, however cplex lp format requires 'Subject To' section to
be non-empty.