[Osi] Osi objective limits

Lou Hafer lou at cs.sfu.ca
Wed Jun 22 11:37:58 EDT 2011


Stefan,

> in OsiSolverInterface::setInitialData(), the comment indicate that the 
> default for the Osi's dual and primal objective limit depend on the 
> objective sense.
> That is, for minimization, the default dual obj limit is +infinity and 
> the default primal obj limit is -infinity.
> But then for maximization, the default dual obj limit should be 
> -infinity and the default primal obj limit should be +infinity.
> 
> If one now reads in a model and then changes the objective sense, 
> wouldn't that require to flip also the objective limits, since otherwise 
> one has immediately reached the limits? I doubt that any OsiXyz 
> interface or any Osi user implements this.

	It depends on how the Osi is implemented. The idea (others will no
doubt correct me if I'm wrong  :-) is that the user shouldn't have to
worry about max/min when setting an objective limit. It's up to the Osi
to correct internally, in whatever manner it chooses. OsiDylp, for
example, checks objective sense before deciding if `dual bound achieved'
means greater than (minimisation) or less than (maximisation) the
specified bound.

	The definition of correct operation for these methods (in
OsiSolverInterfaceTest::testObjFunctions) has always struck me as a bit
odd. For primal, true means we're better than the bound. For dual, true
means we're worse than the bound. But it makes sense if you think about
how the objective moves. Primal moves from less than optimal towards
optimal, dual from better than optimal towards optimal. The test returns
true if we've crossed the bound.

	In terms of the OsiDualObjectiveLimit and OsiPrimalObjectiveLimit
parameters, the rule would be that getDblParam should always return the
value stored with setDblParam.

						Lou




More information about the Osi mailing list