Definition of disjunctions with domain

You can define a complete set of disjunctions over a given domain. Consider the following disjunction:

which is defined over the domain j. The above represents j disjunctions (one for each value of the domain j) with two terms. Declaration and definition of the previous disjunction can be made as follows:

$ONECHO > "%lm.info%"

Disjunction D(j);

D(j) IS
        IF Y(j) THEN
                CONSTR1(j);
                CONSTR2(i,j);
        ELSE
                CONSTR3(j);
                CONSTR4(j,k);
        ENDIF;

$OFFECHO

Where i,k, j are SETs defined in GAMS section. Suppose the following definitions in GAMS section:

SET i /1*3/, k /a,b/, j/1*2/

The previous disjunction definition is equivalent to:

$ONECHO > "%lm.info%"

Disjunction D(j);

D('1') IS
        IF Y('1') THEN
                CONSTR1('1');
                CONSTR2('1','1');
                CONSTR2('2','1');
                CONSTR2('3','1');
        ELSE
                CONSTR3('1');
                CONSTR4('1','a');
                CONSTR4('1','b');
        ENDIF;

D('2') IS
        IF Y('2') THEN
                CONSTR1('2');
                CONSTR2('1','2');
                CONSTR2('2','2');
                CONSTR2('3','2');
        ELSE
                CONSTR3('2');
                CONSTR4('2','a');
                CONSTR4('2','b');
        ENDIF;

$OFFECHO

From the previous definition, since j has two elements, only two disjunctions correspond to the domain.
Both definitions presented above are equivalent and valid for the LOGMIP compiler.