forum.alglib.net

ALGLIB forum
It is currently Sun Dec 01, 2024 9:24 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Suggestion: More stopping conditions for minnlc/SQP
PostPosted: Tue Aug 29, 2023 6:30 pm 
Offline

Joined: Sat May 19, 2018 2:14 am
Posts: 5
The Matlab fmincon routine has stopping conditions for StepTolerance, FunctionTolerance, OptimalityTolerance, ConstraintTolerance, MaxIterations and MaxFunctionEvaluations. AFAIK minnlc only supports StepTolerance and MaxIterations. It would be nice to be able to set something like OptimalityTolerance to 1e-3/1e-4 but ContraintTolerance to 1e-8 (I care about constraints not being violated much more than I care about perfect cost optimization, I don't really care about stepsize until it gets extremely low).

I know the requesttermination APIs exist, but they are a bit kludgy to use for this purpose. Since they return the last accepted step, but the function may be called as part of gradient calculations, the user has to save the point and call requesttermination, and in the calling function detect that termination and pull off the saved point. That'll also require computing first order optimality in the user function which is duplication of effort and difficult to do if you're not computing the gradient in the same function.

Alternatively, or maybe additionally, it would be nice to be able to set a flag on the requesttermination APIs to indicate the alglib to return the exact point that was passed to the function regardless of how the function was called by alglib.


Top
 Profile  
 
 Post subject: Re: Suggestion: More stopping conditions for minnlc/SQP
PostPosted: Tue Aug 29, 2023 8:24 pm 
Offline

Joined: Sat May 19, 2018 2:14 am
Posts: 5
I just took a run at what it would look like to use minnlcrequesttermination() and as far as I can tell it isn't really possible since the function evaluations don't have access to the lagrange multipliers to compute the OptimalityTolerance value. I don't see how to compute OptimalityTolerance and set up a stopping condition from user code right now.

There might be a way to inflate or bias the objective function to give somewhat similar results, but I wasn't getting much different behavior playing around with that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group