Discontinuities in Nonlinear Constraint Function
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
John D'Errico
2015-4-21
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!