Definition of disjunctions with restricted domain


The constraint and disjunction’s domain can be controlled by the sentence with in conjunction with other operators:

  • Relational operators:
lt, < : less than
le, <= : less than or equal to
eq, = : equal
gt, > : greater than
ge, <= : greater than or equal to
 
  • Sets operators:
ord : order of an item in the set
card : number of items in the set
in : inclusion of a set item
 
  • Logic operators: and, or.
 
  • Using subsets

       If you have defined a disjunction over a domain and you have also the disjunction’s variables and constraints defined over the same or different domain, you can have two situations, which are:

  • constraints and variables whose domain is under the control of the disjunction domain.
  • constraints and variables with uncontrolled domains, which must be defined in order to avoid semantic errors.

        If you need to control a set domain that is already controlled by the disjunction definition, you must use an ALIAS for that set and redefine the domain over that ALIAS. See example 3 for this purpose.
        Some illustrative examples are presented with the intention of clarifying these matters.

 
Example 1: using with, ord and card to controlling disjunction domains
Example 2: using with and ord clause to controlling disjunction domains and constraints domain
Example 3: using with and ord clause to controlling disjunction domains and domains that are already controlled
Example 4: Using a subset and the GAMS GDX facilities
Example 5: A larger example using SUBSETS
Example 6: Using the operator IN