hello, I do an optimization to divide a network into two parts. I want to make sure that in the same partition, each node at least has one connection with the node in the same partition. My code is as below, Could anyone one help? Thanks a lot.
Set conex 'Bus connectivity matrix'/p1.p2
conex(n,j)$(conex(n,j)) = 1;
eq1(n,k).. sum(j$m(j,k), m(n,k)*conex(n,j))+ sum(n$m(j,k), m(j,k)*conex(n,j)) =g= 1
Problems with modeling
1 post • Page 1 of 1