Why is this simple problem infeasible?

48 views
Skip to first unread message

Hantao Cui

unread,
Jun 19, 2014, 1:14:39 PM6/19/14
to yal...@googlegroups.com
Hi Johan,

I'm trying to restrict binary variables in this way:

clear
bt = bt(2, 2);
stc = [bt(1,2) + bt(2, 1) == 1];
obj = 2*bt(1, 2) + bt(2, 1);
solvesdp(stc, obj)

Why is it infeasible with CPLEX? It seems that bt(1, 2) == 0 and bt(2, 1) == 1 could be a feasible solution.
Thanks for your help in advance.

Hantao Cui

unread,
Jun 19, 2014, 1:16:50 PM6/19/14
to yal...@googlegroups.com
Sorry, I had a typo while shortening the variable name.
Please copy the code from here:

clear
bt = binvar(2, 2);

Johan Löfberg

unread,
Jun 19, 2014, 1:18:38 PM6/19/14
to yal...@googlegroups.com

Hantao Cui

unread,
Jun 19, 2014, 1:19:31 PM6/19/14
to yal...@googlegroups.com
Sorry for my ignorance... Thanks a lot!
Reply all
Reply to author
Forward
0 new messages