forum.alglib.net
http://forum.alglib.net/

Suggestion: More stopping conditions for minnlc/SQP
http://forum.alglib.net/viewtopic.php?f=2&t=4581
Page 1 of 1

Author:  lamont [ Tue Aug 29, 2023 6:30 pm ]
Post subject:  Suggestion: More stopping conditions for minnlc/SQP

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.

Author:  lamont [ Tue Aug 29, 2023 8:24 pm ]
Post subject:  Re: Suggestion: More stopping conditions for minnlc/SQP

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.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/