Feasible problem is unfeasible

19 views
Skip to first unread message

Fabio Paparella

unread,
Sep 20, 2021, 8:06:34 AM9/20/21
to YALMIP
This is a the problem I'm trying to solve.
I also attached a .m version

x = binvar(5,5,2)
toll=10e-5;
constraints = [];
constraints = [constraints
     sum(sum(x,3),1)' >= [0; 1; 0; 1; 1] - toll;
     sum(sum(x,3),1)' <= [0; 1; 0; 1; 1] + toll;
     sum(sum(x,3),2)  >= [1; 0; 1; 0; 1] - toll;
     sum(sum(x,3),2)  <= [1; 0; 1; 0; 1] + toll;
     ];
 
 objective = sum(sum(ones(5,5).*sum(x,3))) 
 
 options = sdpsettings('verbose',1,'solver','gurobi');
option.gurobi.QCPDual = 1;

sol4 = optimize(constraints,objective,options);

This is a solution I found analytically.
If I substitute the solution I found, every constraint is satisfied, but the solver says it is unfeasible.
I also added tolerances (transformed 2 equality constraints in 4 inequalities)
Can you help me??

solution(:,:,1)=[
     0     0     0     0     0;
     0     0     0     0     0;
     0     0     0     1     0;
     0     0     0     0     0;
     0     0     0     0     0
];

solution(:,:,2) =[

     0     0     0     0     1;
     0     0     0     0     0;
     0     0     0     0     0;
     0     0     0     0     0;
     0     1     0     0     0
     ];


Best,
Fabio
ForumYalmip_help.m

Johan Löfberg

unread,
Sep 20, 2021, 8:13:04 AM9/20/21
to YALMIP
You are constraining x to be symmetic as that is default

Reply all
Reply to author
Forward
0 new messages