|
Consider
the following two disjunctions:

The
definition sentence consists of an IF..THEN..ELSE..ENDIF
sentence. The syntax for a single disjunction
is:
disjunction_name
IS
IF term_condition
THEN
constraint_name_1;
…
constraint_name_i;
…
constraint_name_n;
[ELSE] |
[ELSIF term_condition
THEN]
constraint_name_n+1;
…
constraint_name_r;
…
constraint_name_z;
ENDIF;
For
the example presented we have two disjunctions
that can be declared and defined as follows:
$ONECHO > "%lm.info%"
Disjunction
D1, D2;
D1
IS
IF
Y('1') THEN
CONSTRAINT1;
EQUATION1;
ELSIF
Y('2') THEN
CONSTRAINT2;
EQUATION2;
ENDIF;
D2
IS
IF
Y('3') THEN
CONSTRAINT3;
ELSE
CONSTRAINT4;
ENDIF;
$OFFECHO
Declaration
and definition of CONSTRAINT1, CONSTRAINT2,
CONSTRAINT3, CONSTRAINT4, EQUATION1 and EQUATION2
must be made in GAMS section of the input file.
|