help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] glpsol - cplex format question


From: Andrew Makhorin
Subject: Re: [Help-glpk] glpsol - cplex format question
Date: Tue, 24 Apr 2007 18:16:13 +0400

> This file:
> \* MtxLP *\
> Maximize
> OBJ: C + A + B + D
> Subject To
> _C1: - A - B = 0
> _C2: - A + C - D = 0
> Bounds
> A <= 1
> B <= 1
> D <= 1
> C <= 1
> End
>
> causes glpsolto bomb out with the message:
>
> lpx_read_cpxlp: reading problem data from `MtxLP-pulp.lp'...
> MtxLP-pulp.lp:9: symbol `B' in wrong position
> CPLEX LP file processing error

This is because 'B' in the first position is recognized as the first
letter of the 'Bounds' keyword.

A common rule is *not to begin* identifiers in the first position,
for example:

\* MtxLP *\
Maximize
   OBJ: C + A + B + D
Subject To
   _C1: - A - B = 0
   _C2: - A + C - D = 0
Bounds
   A <= 1
   B <= 1
   D <= 1
   C <= 1
End

> It can be fixed by simply renaming variables:

Not needed.

> But I can find nothing that suggests that that single letter
> variables, other than possibly E|e can cause problems. Can anyone
> explain this and point me to a definitive description of cplex
> syntax ?

See Appendix C "CPLEX LP Format" in the GLPK reference manual
included in the distribution.









reply via email to

[Prev in Thread] Current Thread [Next in Thread]