bug-glpk
[Top][All Lists]
Advanced

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

[Fwd: Exportation/importation problem that seems to be related to decima


From: Andrew Makhorin
Subject: [Fwd: Exportation/importation problem that seems to be related to decimal numbers]
Date: Fri, 07 Aug 2020 00:41:49 +0300

-------- Forwarded Message --------

Date: Thu, 6 Aug 2020 17:12:26 -0300
Subject: Exportation/importation problem that seems to be related to decimal numbers
To: bug-glpk@gnu.org
From: Sylvain Fournier <sylvain@wplex.com.br>
Hi,

I'd like to be able to export a model into a (text) file in order to be able to run it again later. I noticed there are three couples of procedures for this:
  • glp_write_lp / glp_read_lp
  • glp_write_prob / glp_read_prob
  • glp_write_mps / glp_read_mps
I tried with each of them, and failed to import the model for specific reasons:
  • glp_*_lp: the exported file shows decimal numbers using a comma instead of a dot (it must be because it is the way to write decimals in Brazil). As a result, when trying to import back, I get the following message: "(line) 4: constraints section missing". Note that if I manually replace the comma by a dot, I get another error: "4: numeric constant '93.2807074368' out of range".
  • glp_*_prob: when trying to import the file back, the program stops at the first line describing the objective coefficients (starting with 'a') with the following message: "error: objective coefficient missing or invalid". If I replace the ',' by a dot, I get the same message.
  • glp_*_mps: here it is even more strange. It seems that the exported file describes a cost function very different from the original model one (coincidentally - or not -, the only decimal numbers in this model are the variables cost coefficients). In fact, it looks like it mistook one of the constraints with the cost coefficients. I could send the original (lp) file and the generated (mps) file for a better understanding of the issue, if needed. Besides, the generated file doesn't export the rows and columns names, but instead uses names like C0000143 or R0000143, which makes the model far more difficult to understand.
Note that I am running GLPK through the Java wrapper libglpk-java-1.12.0.
Am I doing something wrong? Is there some workaround to this issue?
 
Sylvain Fournier
Operations Research Manager
48 3239-2428
WPLEX Software Ltda.
Rod SC 401 no. 8600 Corporate Park bloco 5 sala 101
88050-000 Santo Antônio de Lisboa, Florianópolis SC +55 48 3239-2400
wplex.com.br
WPLEX




reply via email to

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