Can not get the optimal solution

16 views
Skip to first unread message

LIESEA LEUNG

unread,
Nov 16, 2019, 1:24:24 AM11/16/19
to YALMIP
Dear Johan,
        I write a simple optimal question, but the solution is not the optimal solution.  In the COST matrix, the 22 is the lowest number. But in the solution, corresponding variable matrix(Pg_pieces) position is 0, obviously it is not the optimal solution.
        The code are in the attachment. Thanks for your help!

test.m

Johan Löfberg

unread,
Nov 16, 2019, 1:36:02 AM11/16/19
to YALMIP
you probbly intended Pg_pieces = sdpvar(6,6,'full');

LIESEA LEUNG

unread,
Nov 16, 2019, 1:40:47 AM11/16/19
to YALMIP
Thanks! After adding the 'full', it could get the optimal solution. And I would like to ask that what's difference between adding the 'full' to sdpvar and not adding.

Johan Löfberg

unread,
Nov 16, 2019, 1:50:37 AM11/16/19
to YALMIP
Reply all
Reply to author
Forward
0 new messages