help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: About reading the relative mip gap from the glp_pr


From: Nathann Cohen
Subject: Re: [Help-glpk] [Fwd: About reading the relative mip gap from the glp_prob C struct]
Date: Thu, 27 Aug 2015 09:51:57 +0200

Hellooooooo,

> your mail had to be forwarded manually because you are not subscribed to
> the GLPK help list, cf.
> https://lists.gnu.org/mailman/listinfo/help-glpk

Oh, sorry. And thank you for forwading and answering it.

I wondered if I had to subscribe before posting, then read several
messages which said "if you have a question, write to
address@hidden" without mentionning the need to create an account
first, so... ^^;

> The gap of the last solution can be gathered using a callback function.
>
> You can find an example at
> http://sourceforge.net/p/glpk-java/code/HEAD/tree/trunk/examples/java/GmplSwing.java

Thanks ! It seems to be done at line 722.

It does not seem to be very practical for what I want to do, however:
given that the gap will be known only *inside* of the callback
function, is there a "natural" way to write the gap "outside" of the
function's scope so that it can be read right after the call to
glp_intopt? Or are we forced to define a global variable somewhere? In
your case it seems to be the 'progressTree' variable, but I don't have
classes in C ^^;

Maybe that could become a problem for us if several GLPK instances run
in parallel :-/

Furthermore, would you happen to know how to "detect" that the
exploration is finished, so that we only compute this gap when
necessary, i.e. right before glp_intopt returns?

Thank you very much for what you already answered,

Nathann



reply via email to

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