Hi,

I have a very basic question as I am not an experienced User in GAMS, but I couldn’t figure this one out.

Does anyone know, how to write this in GAMScode? My problem is to include the j<>i correctly.

Best regards

Hi,

I have a very basic question as I am not an experienced User in GAMS, but I couldn’t figure this one out.

Does anyone know, how to write this in GAMScode? My problem is to include the j<>i correctly.

Best regards

Hi, I guess you have to define the set, subset and alias.

for example:

```
sets
i /i1*i10/
v /v1*v10/
N0(i) /i1,i3,i4,i5/
;
alias(i,j);
eq(i,v)$N0(i).. sum(j$(N0(j) and ord(j) ne ord(i)),x(i,j,v)) =e= sum(j$(N0(j) and ord(j) ne ord(i)),x(j,i,v))
```

Hi

You could also use

```
$(not sameas(i,j))
```

instead of

```
$(ord(i) ne ord(j))
```

.

Cheers

Renger

I thank both of you for your quick and helpful answers!