0

I'm new in the Gams and I try to solve a problem for my term project. Although the code does not give errors, I am not sure of its correctness.

kisit5(i,h,k)$( (ord(i)>=2) and (ord(h)<ord(i)) and (ord(h) < ord(k)) )

In the conditional part, I wanted to write that expression: ∀i=2,...,n and h<i,k.

Is it correct or should I write it in a different form?

Markus
  • 5,976
  • 5
  • 6
  • 21
Ceyda
  • 1

1 Answers1

0

This looks correct. You can just write some dummy code to verify it yourself:

Set i /1*4/
    h /1*4/
    k /1*4/
    kisit5(i,h,k);

kisit5(i,h,k)$( (ord(i)>=2) and (ord(h)<ord(i)) and (ord(h) < ord(k)) ) = yes;

display kisit5;

The result will be printed to the lst file. Or you run it with GDX creation (F10 in GAMS Studio), and look at it in the GDX Viewer of GAMS Studio.

Lutz
  • 2,197
  • 1
  • 10
  • 12