The original problem I have is
for i=1:L
for j=1:L
for n=1:N
if W(i,j)>0 and i<j
z(i,j)>=X(i,n)+X(j,n)-1;
end
end
end
end
where W (L,L) is a known matrix and is symmetric. X(L,N) is optimization variable.
So, I tried to reduce the size of the problem by extracting all the pairs (i,j) for which W(i,j)>0. So, I removed the if condition.
Now, let’s says there are M such pairs.
veca contains the i’s
vecb contains the j’s
Now, the constraint becomes
for m=1:M
for n=1:N
z(m)>=X(veca(m),n)+ X(vecb(m),n)-1;
end
end
Am I not doing i right?
If it is correct, I don’t know why it is taking so long for the CVX/solver to solve this? It is taking forever!