help-glpk
[Top][All Lists]
Advanced

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

Re: GMPL/GLPK display objective function value


From: Domingo Alvarez Duarte
Subject: Re: GMPL/GLPK display objective function value
Date: Sat, 29 Aug 2020 11:32:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hello Andrew !

Again thank you very much for your help !

After replying to your comments I reviewed again the wikibook link (https://en.wikibooks.org/wiki/GLPK/Troubleshooting#Objective_shift_term_ignored_when_exported) and realized that somehow I've got lost because of the of the misleading AMPL result and both solvers report of the objective value.

Also I think that like in the exported LP file we get a comment about the constant term, the solution file also somehow should have a comment about it.

So in this case AMPL has a bug.

I think that this function (and similares) should have a return value that could tell about this:

====

void glp_mpl_build_prob(glp_tran *tran, glp_prob *prob)

to

int glp_mpl_build_prob(glp_tran *tran, glp_prob *prob)

{

int ret = 0;

...

if (mpl_get_row_c0(tran, i) != 0.0) {
            xprintf("glp_mpl_build_prob: row %s; constant term %.12g ig"
               "nored\n",
               mpl_get_row_name(tran, i), mpl_get_row_c0(tran, i));

            ret = WARNING_CONST_TERM_IGNORED;

}

...

return ret;

}

====

Cheers !

On 29/8/20 11:01, Domingo Alvarez Duarte wrote:
Hello Andrew !

Thanks for reply !

The problem is that the GMPL is not informed/knows anything about the warning/divergence in the results and goes blindly.

Te exit code of glpsol also doesn't reflect anything that could be detected, only by visual inspection of the output or redirect the output and scan it for possible warnings.

Somehow GMPL should have a way to acknowledge situations like these.

===

>Exit code: 0

===

Cheers !

On 29/8/20 0:46, Andrew Makhorin wrote:
While trying to implement multi solve statements I found that in GMPL
the display of an objective function after solving do not show the
optimal value.
BTW, glpsol warns about that:

[...]
38 lines were read
Generating Reduced_Cost...
Generating Width_Limit...
Model has been successfully generated
glp_mpl_build_prob: row Reduced_Cost; constant term 1 ignored
[...]



reply via email to

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