-1

Can anyone help me figure out how to introduce these constraints in GAMS software? Thanks. enter image description here

Xijkl = 0, i ={3}, j={1,2}, for all k that belong to K, for all l that belong to L

Xijkl = 0, i ={2}, j={3}, for all k that belong to K, for all l that belong to L

1 Answers1

0

Here some insights: What you described are specific values for a variable X rather than an equation. So:

1- Define the sets:

sets
i /i1,i2,i3,i4/ *assuming 4 elements in each set
j /j1,j2,j3,j4/
k /k1,k2,k3,k4/
l /l1,l2,l3,l4/

2- Define the variable:

Positive variables
X(i,j,k,l) 

3- Define the specific combination of indexes when X is fixed to 0.

X.fx(i,j,k,l)$(ord(i)=3 and (ord(j)=2 or ord(j)=3))=0;
X.fx(i,j,k,l)$(ord(i)=2 and ord(j)=3)=0;