Fmincon with Yalmip, initial point warning

168 views
Skip to first unread message

Xu Wang

unread,
Mar 1, 2017, 10:53:13 AM3/1/17
to YALMIP
         x                                 = sdpvar(1,1);
         Obj                             = x^2;
         Constraints                = [x>=0, x<=1]; 
         options = sdpsettings('solver', 'fmincon', 'fmincon.algorithm', 'interior-point', 'usex0', 0.5);
         sol = optimize(Constraints, Obj, options);

The solver gives the correct solution, but it always shows that 
Your initial point x0 is not between bounds lb and ub; FMINCON shifted x0 to strictly satisfy the bounds.
Since I already put the initial point to be 0.5, what I understand is that Yalmip/Fmincon does not automatically recognize x>=0, x<=1 as the lower and upper bounds. Should I manually put lb and up somewhere in the code to avoid this warning and start the algorithm at 0.5? It seems that there is no fmincon.lb or fmincon.ub. Thanks a lot.

Johan Löfberg

unread,
Mar 1, 2017, 3:27:18 PM3/1/17
to YALMIP
it´s

assign(x,0.5);
 options = sdpsettings('solver', 'fmincon', 'fmincon.algorithm', 'interior-point', 'usex0', 1);


Reply all
Reply to author
Forward
0 new messages