bug-glpk
[Top][All Lists]
Advanced

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

Re: [Bug-glpk] GLPK Model Transfer to CPLEX LP File


From: Andrew Makhorin
Subject: Re: [Bug-glpk] GLPK Model Transfer to CPLEX LP File
Date: Sun, 30 Sep 2007 13:15:57 +0400

> I found there is a bug in the GLPK when transfering MathProg model
> to CPLEX LP file. While CPLEX LP does not allow for slash "/" in the
> model, certain "/" in the MathProg model is not transfered to other
> symbol which causes CPLEX reporting error. Specifically, in my
> MathProg model, I have a set S with a variable "Name1/Name2" and
> constraint defined as "ST_Constraint1(i in S): ...". Then the
> transfered LP file has the constraint "ST_Constraint1(Name1/Name2)"
> causing the problem. Your help to fix it will be appreaciated.

In MathProg item names you can use a wider character set, for example,
you can use extended ASCII characters (0x80..0xFE), so it is
problematic to convert all such characters to distinct characters
allowed in cplex lp format.

To avoid the problem you could use another character, say, a period or
tilde rather than a slash.

Btw, a slash is allowed in cplex lp format as the cplex documentation
says:

   4. Variables can be named anything provided that the name does not
      exceed 255 characters, all of which must be alphanumeric (a-z,
      A-Z, 0-9) or one of these symbols: ! " # $ % & ( ) / , . ; ? @ _
      ` ' { } | ~. Longer names are truncated to 255 characters.
      A variable name cannot begin with a number or a period.

      The letter E or e, alone or followed by other valid symbols, or
      followed by another E or e, should be avoided as this notation is
      reserved for exponential entries. Thus, variables cannot be named
      e9, E-24, E8cats, or other names that could be interpreted as an
      exponent. Even variable names such as eels or example can cause a
      read error, depending on their placement in an input line.

      Also, the following characters are not valid in variable names (in
      order to allow for quadratic objective information): ^, *, [ and ].







reply via email to

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