# Equality constraint does not hold

(Behrooz) #1

Dear friends,
I have a weird problem. I have a simple flow conservation constraint in the VNE problem:

I wrote the code in CVX, and for some cases it must be infeasible. But CVX solved it!
As you can see in the below code, lines 32-40 for i=3 and j=2, the right-hand
side of the equality constraint is equal to 8 but the left-hand side is equal
to 0!. So, CVX must report it’s infeasible.

================================================

clear all;
cvx_clear;
%cvx_solver mosek;

s_nodes=4;
v_nodes=3;

s_net_topology=[0,0,1,1;1,0,1,0;0,0,0,0;1,0,0,0];
[row_s,col_s]=find((s_net_topology)~=0);

v_net_topology=[0,0,1;1,0,0;0,0,0];
[row_v,col_v]=find((v_net_topology)~=0);
%%%
x=zeros(v_nodes,s_nodes);
x(3,1)=1;
x(2,2)=1;
x(1,3)=1;

%%
cvx_begin

variable y(v_nodes,v_nodes,s_nodes,s_nodes) nonnegative;

minimize 1000*sum(sum(sum(sum(y(:,:,:,:)))))+1000*sum(sum(x(:,:)));

subject to

for i=1:s_nodes
[ph1]=find(s_net_topology(i,:)~=0);
[ph2]=find(s_net_topology(:,i)~=0);
%test with j=2 i=3 : row_v=2 col_v=1 => 0==8 !!!!

end
end

for i=1:sum(nonzeros(s_net_topology))

arrind=null(1,4);
for j=1:sum(nonzeros(v_net_topology))
a=[row_v(j),col_v(j),row_s(i),col_s(i)];
arrind=vertcat(arrind,a);
end

end

cvx_end

=================================================

Mosek, Gurobi or CVX bug?
(Michael C. Grant) #2

16 posts were merged into an existing topic: Mosek, Gurobi or CVX bug?

(Michael C. Grant) #3