Hello Nathan, 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
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 The graph in http://a.fsdn.com/con/app/proj/glpk-java/screenshots/278301.jpg shows how the gap changes from one integer solution to the next. It is created with the data from the callback function. Best regards Heinrich Schuchardt On 26.08.2015 21:09, Andrew Makhorin wrote: > -------- Forwarded Message -------- > From: Nathann Cohen <[email protected]> > To: GLPK help <[email protected]>, David Coudert > <[email protected]> > Subject: About reading the relative mip gap from the glp_prob C struct > Date: Wed, 26 Aug 2015 20:12:26 +0200 > > Hello everybody, > > David Coudert and I are contributors to a software called Sagemath > [1], and we currently try to improve its interface with LP solvers, > among which is GLPK :-) > > We would be very interested by a way to have in GLPK's C API, after a > call to glp_intopt, the value of the relative gap reached by the best > integer solution found so far. > > Our problem is that this information, stored in the search tree > object, is erased when glp_intopt returns [2]. Would it be possible to > change the behaviour of glp_intopt and store it in the glp_prob C > struct before the tree is destroyed? > > Of course, we would be happy with any information that would be > sufficient to deduce this gap, like the best lower bound (for a > minimization problem). > > Thank you very much, > > Nathann Cohen > > [1] http://www.sagemath.org/ > [2] http://lists.gnu.org/archive/html/help-glpk/2011-07/msg00068.html > > > > > _______________________________________________ > Help-glpk mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/help-glpk > _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
