bug-glpk
[Top][All Lists]
Advanced

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

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


From: Sylvain Fournier
Subject: Re: [Fwd: Exportation/importation problem that seems to be related to decimal numbers]
Date: Thu, 13 Aug 2020 18:38:34 -0300

Dear Heinrich,

Thank you very much for your answer. The method call you suggested fixed the problem of the numerical values, but there seem to be some other issues with the mps format:
As far as I tested, everything is fine with the lp and prob formats after the fix you suggested. Thanks again.
Best regards,

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





On Fri, 7 Aug 2020 at 03:32, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
Dear Sylvain,

this is a known issue, cf.
https://lists.gnu.org/archive/html/bug-glpk/2009-05/msg00009.html

http://glpk-java.sourceforge.net/usage.html#Locales describes that you
can call method GLPK.glp_java_set_numeric_locale("C"); to set the locale
for numbers to match the expectations of GLPK.

Please, inform me if this solves your problem.

Best regards

Heinrich

On 8/6/20 11:41 PM, Andrew Makhorin wrote:
> -------- 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 <mailto:bug-glpk@gnu.org>
> *From*: Sylvain Fournier <sylvain@wplex.com.br
> <mailto:Sylvain%20Fournier%20%3csylvain@wplex.com.br%3e>>
>> 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 <http://wplex.com.br/>
>> WPLEX
>>
>>
>>


reply via email to

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