[Coin-discuss] How to choose a MIP solver in GLPK OSI?

Lou Hafer lou at cs.sfu.ca
Tue Jun 26 13:08:34 EDT 2007


Michal,

	There's no set/get method for bbWasLast_ as it is an internal state
variable with value determined by the type of the last call (lp or ip).  In
general, it would be a bad idea to expose this variable.

	I have some contributed patches in hand for OsiGlpk configuration that
will choose lpx_intopt() when the local glpk version provides it.  You've
probably noticed the new stable version of Osi.  I hope that we're now in a
position to do smaller upgrades, more often.  My goal is to get this into trunk
over the next week, and out to stable shortly thereafter.

	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


							Lou




More information about the Coin-discuss mailing list