Yalmip solution seems to be incorrect

23 views
Skip to first unread message

Lun Yang

unread,
Jan 8, 2019, 11:47:53 AM1/8/19
to YALMIP
Dear professor Löfberg,

I am trying to solve the following problem in Yalmip. 

x = sdpvar(1); y = semivar(1);
F = [1e-6 <= y <= 10];
F = [F, y == abs(x - 3.01)];
obj = (x-3)^2;
optimize(F,obj,sdpsettings('solver','cplex'));
value(x)
value(y)

It seems the correct solution are x = 3 and y = 0.01. But what I get is x = 3.01 and y = 1e-6. Is there something wrong with semivar? Could you please help us take a look?

I use Yalmip version '20180612' , Cplex 128 and Matlab 2018a. 

Thank youvery much,

Lun Yang

Johan Löfberg

unread,
Jan 8, 2019, 12:31:58 PM1/8/19
to YALMIP
nothing wrong, that solution satisfies cplex termination criteria, hence cplex thinks it is good enough
Reply all
Reply to author
Forward
0 new messages