Hi,
Imagine the situation of this constraint, which can be formally written as follows:
gamma(i,j) = gamma(i) for all i
I and j represent nodes as usually. Gamma(i,j) is value of binary variable representing if edge is connected (=0) or disconnected (=1). The same for gamma(i) = 1, then node is disabled, if gamma(i) = 0, nothing happens. It should be something like - if I disable node i, this means all connected edges (nodes) are also disabled. Gamma(i) is limited by ordinary budget constraint and prices. I wanted to use loop or for cycle, but it’s not allowed. Of course, in my code I use gamma1(i,j) and gamma2(i) to have different names of those variables. Can you advice how to write this issue in GAMS?