help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] gplk/cplex compatibility


From: Sebastien . deMentendeHorne
Subject: [Help-glpk] gplk/cplex compatibility
Date: Tue, 17 Feb 2004 12:26:09 +0100

Hi glpkers,

I am using both glpk and cplex within an interface in python and switch from
one to the other in function of the problems.

In order to keep a single version of my problem formulation, I always use
mathprog even when I work with cplex. However, as cplex has no mathprog
reader but only .mps or .lp readers, I still use glpk to read the mathprog
problem, and transfer it to cplex by .mps or .lp files.

BUT, the .mps files are too limited in their format (variable names < 8
chars) and so I use .lp files.
BUT, the .lp files does not accept brackets "[" and "]" in the name of the
variables and hence glpk generates names like xNNN or rNNN for any variable
with indices. This limitation removes a lot of the information in the
problem (the variable names).

As a solution, I did modify glpmpl3.c in line 716 and 728 to output
parenthesis in place of brackets when writing the .lp files and it solves my
problem.

My question (to Andrew mainly) relates to the variable name convention.
Could it be possible to use variable names that are common to the largest
set of formats (like avoiding [ ]) in order to make the transfer of problems
the easiest possible ?

And, more generally, is there a fundamental/philosophical problem (not a
license problem) in using glpk as a tool for other proprietary programs ? In
this example, use glpk as an advanced parser of problems for cplex.

Sebastien




reply via email to

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