Error using sdpvar/addfactors (line 70)

31 views
Skip to first unread message

yongjie wang

unread,
Mar 19, 2015, 10:21:08 PM3/19/15
to yal...@googlegroups.com
When i run my code using cplex to solve the mixed integer second order cone program problem,it displays the following:
Error using sdpvar/addfactors (line 70)
Inconsistent factors. Please report bug

Error in  +  (line 136)
        y = addfactors(y,X,Y);

What is the solution,and i do not find errors in my code

   Many thanks

Johan Löfberg

unread,
Mar 20, 2015, 3:14:03 AM3/20/15
to yal...@googlegroups.com
Sounds like you are using an old version of YALMIP. If not, please post reproducible code

yongjie wang

unread,
Mar 20, 2015, 3:51:58 AM3/20/15
to yal...@googlegroups.com
Dear Johan
        I have get the reason, because the matix does not match, the "+" is wrong. I have corrected,and it goes well.  
        Thank you for your patient answer.
        Best regards

Johan Löfberg

unread,
Mar 20, 2015, 3:55:15 AM3/20/15
to yal...@googlegroups.com
YALMIP should not crash when you have inconsistent sizes, it should generate a reasonable error message

>> sdpvar(2)+sdpvar(3)
Error using sdpvar/plus (line 149)
Matrix dimensions must agree.

Hence, I still think you are using an old version of YALMIP. If not, please show the code which generated the crash
Reply all
Reply to author
Forward
0 new messages