[Bonmin] intermediate_callback
Andreas Waechter
andreasw at watson.ibm.com
Wed Mar 5 08:34:17 EST 2008
Hi Pierre,
> No I don't have any other suggestion I was just wondering when this
> should be called.
> I can create a
> virtual TMINLP::user_terminate_callback() (no arguments)
> which would be called by TMINLP2TNLP::intermediate_callback()
> then if this returns false it would stop the whole algorithm (which I am
> not sure how to do yet).
If Ipopt is used, then Ipopt would terminate with a particular termination
code (User_Requested_Stop) if intermediate_callback() returns false, and
you could test for this particular return code in Bonmin::IpoptSolver and
throw an exception.
If FilterSQP is used, you could call the TNLP::intermediate_callback()
method explicitly in any of the evaluation methods (such as
F77_FUNC(objfun,OBJFUN)) and throw an exception there.
Cheers,
Andreas
More information about the Bonmin
mailing list