Discontinuities in Nonlinear Constraint Function
2 views (last 30 days)
Show older comments
I am working on a code that uses fmincon to minimize f(x). In my nonlinear constraint function, the equality constraint equation as well as its gradient change depending on if x is positive or negative. This creates a discontinuity at x=0 which sometimes appears to catch the optimizer off guard; it can sometimes get "stuck" at x=0.
Are there any techniques out there that can remove or mitigate the discontinuity? One solution that might work would be to create two separate nonlinear equality constraints, one for when x>=0 and one for when x<0. But this may be easier said than done for my particular problem.
Are they any other clever solutions to this?
Thank you!
0 Comments
Answers (1)
John D'Errico
on 21 Apr 2015
Fmincon assumes a continuity. If you fail to provide that, then you should expect problems. Two separate nonlinear equality constraints are no different. You are just trying to disguise the problem. There is no magic to be found here.
Clever solutions? Use a different optimizer that is more robust to problems like this.
Or solve two different problems. One where you minimize the problem for positive x, the second where you solve it for negative x.
0 Comments
See Also
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!