[Coin-discuss] How to choose a MIP solver in GLPK OSI?
Stefan Vigerske
stefan at math.hu-berlin.de
Tue Jun 26 14:25:17 EDT 2007
Hi,
> If you want to tweak the code in a manner that will be compatible with
> the intended changes, best to go to the branchAndBound() method and edit to use
> lpx_intopt() instead of lpx_integer(). Something along the following lines
> should do it:
>
> #ifdef GLPK_HAS_INTOPT
> int err = lpx_intopt( model );
> #else
> // Must have an LP solution before running lpx_integer
> if (lpx_get_status(model) != LPX_OPT)
> initialSolve();
> // What if there's an error there?
> int err = lpx_integer( model );
> #endif
For the moment, you will need to define GLPK_HAS_INTOPT by yourself (if
you use a recent enough GLPK). Later, the build system will check for
lpx_intopt and define GLPK_HAS_INTOPT accordingly.
Stefan
--
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan
More information about the Coin-discuss
mailing list