[Coin-osi-devel] Turning presolve off with OsiXpr

Lou Hafer lou at cs.sfu.ca
Wed Jun 14 20:15:11 EDT 2006


Francois,

	This reply may be too little, too late, and it's generic comments, but
it might be useful.

	The trick with hints is to sort out whether it's the solver, the OSI, or
both, that need to deal with the hint.  Clp is generally the straightforward
case, because it's the native solver and has really good integration with the
OSI layer and with Coin in general.  If your solver isn't clp, life is more
difficult.

	For dylp, setHintParameter is a moderately long routine, as opposed to
OsiClp where it's trivial. You should be able to get a better feel for what's
required, and there are even a few comments, mostly accurate  :-).

	Roughly, for things that can be handled within the OSI, you may be able
to get away with just calling OsiSolverInterface::setHintParam.  This is easily
checked within the OSI using getHintParam.  One thing to watch for:
OsiSolverInterface::setHintParam *always* throws on OsiForceDo.  If you want
your setHintParam to be able to comply at this strength, you need to catch the
throw.

	OsiDylp, for example, handles presolve in the OSI layer, hence presolve
control is simply a matter of calling OsiSolverInterface::{set/get}HintParam.

	For other stuff, it's a question of deciding whether the underlying
solver has the required functionality, then sorting out how to pass the
necessary control information.  For dylp, the OSI layer maintains copies of the
control structures (options & tolerances) that dylp expects.  Attempting to
comply with a hint comes down to adjusting the options to some reasonable
approximation of the semantics of the hint.  For some things, dylp can get it
exactly.  For others, it's not so clean.  Some it can't do at all.  Fortunately,
these are hints. (For the various set{Int|Dbl|Str}Param routines, it's more of
a problem.)

	Arguably, setHintParam should throw when the strength is OsiForceDo and
the underlying solver can't comply. OsiDylp does this. But most code is not
prepared to catch throws, so you might think twice before doing it this way.

							Lou




More information about the Osi mailing list