# Disjunction Definition

The syntax to write a disjunction is the following:

DISJUNCTION [ chull [chull eps] | bigM [bigM Mvalue] | indic ]
[Not] Var|* { equ }
{ELSEIF [Not] Var | * {equ}}
[ELSE {equ}]

According to the GAMS syntax rules the meanings of some symbols are the following:

 [ ] enclosed construct are optional { } enclosed construct may be repeated zero or more times | or

DISJUNCTION is a mandatory word, after that you have three optional constructs:
[chull [chull eps] | bigM [bigM Mvalue] | indic]

Which are related to the relaxation and transformation of disjunctions:
• chull (convex hull)
• bigM (big M relaxation)
• indic (indicator constraint)
In this version, you can choose among different relaxations for each disjunction.
The default option is the convex hull.
The convex hull and the bigM relaxations also have additional optional definitions:
• For the convex hull, the epsilon (eps) parameter is an upper bound value to check for constraint satisfaction (it has a default value)
• In the case of BigM relaxation, the Mvalue to be defined is the value of the M parameter, which should be large enough to relax the constraint. It also has a default value, but it is important to change to avoid infeasible solutions, for those cases where that value is not appropriate.

The next specification is the variable to handle the disjunction term, by means of the following construct:
[Not] Var | *

You must specify Var or *. The first option is to replace Var with a binary variable name defined in the GAMS section; * is employed when the variable name is assigned by GAMS.
NOTE THAT: when using the Var option, make sure to write at least a dummy equation that uses them in order to avoid the GAMS compiler take out from the model if they are not used in other equation/constraint of the model.

 [Not] is the negation of the variable, by means of this sentence the disjunction term is satisfied using the FALSE value, instead of the TRUE value of the variable. { equ } represents a set of constraint names (previously defined in the GAMS section) that must be satisfied if the FIRST disjunction term is selected.

For the definition of a several terms disjunction you must also add the following construct:
{ELSEIF [Not] Var | * {equ}}

...where ELSEIF is a mandatory word and then for each term you must specify a binary variable name (Var) or *, and also the constraints set to be satisfied ({ equ})

For the definition of a two terms disjunction using just one variable to handle both terms, you must also add the following construct:
[ELSE {equ}]

...where ELSE is a obligatory word, followed by the set of constraint to be satisfied if the term is selected.
NOTE THAT since one variable is used to handle both terms the construct Var or * is not needed in the ELSE sentence.

### Examples:

From Small Example 1 – First version:
disjunction Y1 equat4 else equat5
Corresponds to a two term disjunction having the following syntax rule:
DISJUNCTION Var { equ } ELSE {equ}

From Small Example 1 – Second version:
disjunction * equat4 else equat5
Corresponds to a two term disjunction having the following syntax rule:
DISJUNCTION * { equ } ELSE {equ}

From Small Example 2:
disjunction y1 equat1 equat2 elseif y2 equat3 equat4
Corresponds to a two term disjunction having the syntax rule of a several term, with the following syntax:
DISJUNCTION Var { equ } ELSEIF Var {equ}

To define disjunctions over a domain, please see the User's Manual.