[Bonmin] intermediate_callback

Pierre Bonami pierre.bonami at gmail.com
Thu Mar 6 03:42:54 EST 2008


Hi Andreas,
Thanks, I did not remember the User_Requested_Stop code. It should make 
things more simple.

Andreas Waechter wrote:
> 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