Question about using YALMIP with fmincon in MATLAB

651 views
Skip to first unread message

KiDo Tom

unread,
May 26, 2015, 7:36:44 PM5/26/15
to yal...@googlegroups.com
Dear Sir/Madam:

Recently I tried to use fmincon function in MATLAB to solve a constraint nonlinear optimization problem. I used "sqp" method and provided analytic gradient of my objective function to fmincon (which I include it in my objective function), but since my constraint function is nonlinear, I cannot provide constraint function's Joccobian for fmincon. The optimization results are sometimes good, but for certain initial conditions, the results are not good.

I am writing to you to ask that whether I can use YALMIP to provide automatic differentiation to my code directly? And if so, what modification should I make in fmincon? (I still want to use sqp algorithm provided by MATLAB and options I set for fmincon if it is possible)

Thank you very much, I'm waiting for your reply.

Sincerely,
Tom

Johan Löfberg

unread,
May 26, 2015, 10:27:53 PM5/26/15
to yal...@googlegroups.com
YALMIP supplies derivatives to fmincon. You don't have to do any changes

optimize(x^4 <= 1,exp(x),sdpsettings('solver','fmincon','fmincon.algorithm','sqp'))


Reply all
Reply to author
Forward
0 new messages