Definition of disjunctions with restricted domain - Example 4

Example 4: Using a subset and the GAMS GDX facilities

Sometimes it is useful to restrict the disjunction domain by using a subset of the original set’s domain.
This method for controlling the set domain has the advantage of being the most general way of doing it, because you explicitly define the domain applicable for the disjunction.
Suppose the example 1 of section 4.4.1 that must be defined over the following domain of I,J: (‘1’,’2’) , (‘2’,’3’) , (‘3’,’4’), to specify this you must define in the GAMS section the following:
SET I /1*3/ , J /1*4/;
* Define the subset k *
SET K(I,J) / 1.2, 2.3, 3.4 /;

...and the following disjunction declaration and definition in LogMIP Section:

$ONECHO > "%lm.info%"

Disjunction D(I,J);
 D(I,J) with K(I,J) IS
 IF Y(I,J) THEN
  CONSTRAINT(I,J);
  CONSTRAINT(I,J);
 ELSE
  CONSTRAINT(I,J);
  CONSTRAINT(I,J);
 ENDIF;

$OFFECHO


Note the sentence using the clause with in the definition of D(I,J) it isreferencing the subset to define disjunctions D(‘1’,’2’),D(‘2’,’3’) and D(‘3’,‘4’).