What happens when I give a partial x0?

78 views
Skip to first unread message

othman moumni

unread,
Nov 13, 2013, 5:07:40 AM11/13/13
to yal...@googlegroups.com
Hi,
I have a High level model in YALMIP  and I want to know if using the option usex0 works when I assign partially my variables because it is difficult to give a complete x0 that respects all the constraints.

Thanks!

ps: I use IPOPT as a solver


Johan Löfberg

unread,
Nov 13, 2013, 6:08:48 AM11/13/13
to yal...@googlegroups.com
>> sdpvar x y
>> assign(x,3);
>> solvesdp([],x^2+y^2,sdpsettings('usex0',1,'solver','ipopt'))

means x will start at 3 and y will be initialized to 0 when ipopt is told to start from a current solution

othman moumni

unread,
Nov 13, 2013, 9:05:42 AM11/13/13
to yal...@googlegroups.com
OK, but what happens when I have a constraint like:

>> sdpvar x y
>> assign(x,3);
>> solvesdp([x+y>=4],x^2+y^2,sdpsettings('usex0',1,'solver','ipopt'))

the initial point with x=3 and y=0 is infeasible. Does the solver take into account the partial assignment?

Johan Löfberg

unread,
Nov 13, 2013, 9:20:46 AM11/13/13
to yal...@googlegroups.com
Depends on the solver. Some solvers will complain that the supplied initial point is infeasible, some will try to start from the infeasible point anyway

othman moumni

unread,
Nov 13, 2013, 9:34:49 AM11/13/13
to yal...@googlegroups.com
Ok,
Maybe this is not the case for Ipopt as it uses interior points methods. I will look into Ipopt documentation.

Thank you for your help

Johan Löfberg

unread,
Nov 13, 2013, 9:44:53 AM11/13/13
to yal...@googlegroups.com
Being an IP method does not mean it never works with infeasible points. Problems are shifted and homogenized etc in these algorithms. How would ipopt be able to start from scratch otherwise?

Haven't you even run the code? It runs perfectly fine from infeasible initial point
%Let ipopt start from where it wants 
sdpvar x y
solvesdp([x^4+y^4<=4],(x-1)^2+(y-1)^2,sdpsettings('solver','ipopt'))

% Start from infeasible
assign(x,3);
assign(y,0);
solvesdp([x^4+y^4<=4],(x-1)^2+(y-1)^2,sdpsettings('usex0',1,'solver','ipopt'))

% Start from optimal
solvesdp([x^4+y^4<=4],(x-1)^2+(y-1)^2,sdpsettings('usex0',1,'solver','ipopt'))




othman moumni

unread,
Nov 13, 2013, 10:27:00 AM11/13/13
to yal...@googlegroups.com
I have run the code but I thought that maybe IPOPT simply ignore the starting point given.
Reply all
Reply to author
Forward
0 new messages