EMP Keywords

Some words act as keywords in the context of the EMP annotations in the file emp.info, but they are not GAMS reserved words, i.e. they are not keywords in the GAMS code apart from the EMP annotations. In this section we present an overview of all GAMS EMP keywords, ordered according to the type of programming where they are used.

GAMS EMP Keywords for Soft Constraints

EMP Keyword Description
abs Penalty function: absolute value of the equation.
adjustequ Indicates that the specification(s) that follow relate to equations that are converted from constraints to penalty terms in the objective function.
maxz Penalty function: the maximum of the equation and zero. An example is given above.
sqr Penalty function: least squares applied to the equation. An example is given above.

GAMS EMP Keywords for Variational Inequalities

EMP Keyword Description
VI Indicates that the specifications that follow are a variational inequality. See the discussion of EMP specifications for VI and the example above.
QVI Indicates that the specifications that follow are a quasi-variational inequality. See the discussion of EMP specifications for QVI and the example above.

GAMS EMP Keywords for Equilibrium Problems

EMP Keyword Description
dualvar See below.
Equilibrium Indicates that the specifications that follow define the structure of an equilibrium problem. For examples, see sections Equilibrium Problems with EMP: A Simple Example and Equilibrium Problems with EMP: Example with Dual Variables. The general syntax of EMP annotations for equilibrium problems is introduced in section EMP Syntax for Equilibrium Problems.
implicit Specifies a shared variable and its defining constraint. For details, see section Equilibrium Problems with Shared Variables.
max This keyword is followed by the objective variable, the decision variable(s) and the equation(s) of the maximization problem of one agent.
min This keyword is followed by the objective variable, the decision variable(s) and the equation(s) of the minimization problem of one agent.
VI Indicates that the specifications that follow define a VI, as in this example.
VIsol Specifies that the equation that follows is a shared constraint and prompts the EMP framework to use the MCP reformulation where a variational inequality is associated with the shared constraint. For more information and an example, see section Equilibrium Problems with Shared Constraints.

GAMS EMP Keywords for Embedded Complementarity Systems

EMP Keyword Description
DualEqu This keyword is followed by an equation-variable pair. It establishes a complementarity relationship between an external equation and the named variable of the model. An example is given above. See also the spatial price equilibrium model [HARK-MONOP].
DualVar This keyword is followed by a variable-equation pair. It specifies that the variable is the dual of the equation. Examples are discussed in sections Equilibrium Problems with EMP: Example with Dual Variables and Embedded Complementarity Systems.

Note that problems with embedded complementarity systems can be recast as equilibrium problems. Details are given in section Embedded Complementarity Systems.

GAMS EMP Keywords for Bilevel Programming

EMP Keyword Description
bilevel Indicates that the specifications that follow relate to a bilevel programming problem. The keyword is follwed by the decision variable(s) of the upper-level problem and the definitins(s) of the lower-level problem(s). For examples and more details, see section Bilevel Programs.
dualvar See above.
max This keyword is followed by the objective variable, the decision variable(s) and the equation(s) of the maximization problem of one agent.
min This keyword is followed by the objective variable, the decision variable(s) and the equation(s) of the minimization problem of one agent, as in this example.
VI Indicates that the specifications that follow define a VI, as in this example.

GAMS EMP Keywords for Disjunctive Programming

EMP Keyword Description
bigM Indicates that the big M reformulation method shall be used.
chull Indicates that a convex hull shall be used for the reformulation. Note that this is the default method.
default Indicates that the specification that follows is the reformulation method.
disjunction Indicates that the specification that follows is a disjunction. For a discussion of the general syntax following this keyword, see above.
indic Indicates that indicator constraints shall be used as reformulation method.
star (*) The symbol * will be replaced by internal default binary variables, thus explicit binary variables that model the Boolean variables are not needed. Note that default binary variables may only be used if there are no logic equations in the model. For an example and more details, see above.

GAMS EMP Keywords for Stochastic Programming

EMP Keyword Description
chance Defines individual or joint chance constraints.
cvar Synonym to cvarup.
cvarlo This keyword assigns a variable to have the value \(\underline{CVaR}_{\alpha}\), where \(\alpha\) is a scalar that represents the confidence level for the Conditional Value at Risk. Note that cvarlo refers to the left tail of the distribution. For more details and examples, see section Conditional Value at Risk (CVaR).
cvarup This keyword assigns a variable to have the value \(\overline{CVaR}_{\alpha}\). \(\alpha\) is a scalar that represents the confidence level for the Conditional Value at Risk. Note that cvarup refers to the right tail of the distribution.
discrete Indicates that the specification that follows is the discrete distribution of one or more random variables.
ExpectedValue This keyword is used to state that a variable is the expected value of a random variable.
jrandvar This keyword is used to define discrete random variables that are jointly distributed. At least two random variables must be named. For an example, see the news vendor model [NBDISCJOINT].
randvar This keyword declares that a parameter of the model is in fact a stochastic random variable. The keyword is followed by the name of the parameter and details about the probability distribution (discrete or parameteric). A list of all supported parametric distributions is given in Table 4.
sample This keyword allows users to customize the size of the sample of one or more random variables from a continuous distribution and - optionally - to determine the variance reduction method to be used. An example and further details are given above. Note that without a valid LINDO license this is limited to the Normal and Binomial distributions with a maximum sample size of 10.
setSeed This keyword sets the seed for the random number generator of the sampling routines that are called via the keyword sample. If setSeed is used in EMP annotations, the seed will be set once before all samples will be generated. Note that a valid LINDO license is required to use this keyword.
stage This keyword is followed by a number and the names of the random variables, variables and equations that are assigned to the respective stage. Stage 1 is the default stage for all random variables, variables and equations that are not assigned a stage explicitly except for objective equation and variable. Their default stage is the highest stage in the model.
stageDefault This keyword is followed by a number. This specifies the default stage for all random variables, variables and equations that are not assigned a stage explicitly (except for objective equation and variable). If this keyword is not used explicitly, the default is 1.
var Synonym to varup.
varlo This keyword assigns a variable to have the value \(\underline{VaR}_{\alpha}\), where \(\alpha\) is a scalar that represents the percentile of the Value at Risk. Note that varlo refers to the left tail of the distribution. For more details and examples, see section Value at Risk (VaR).
varup This keyword assigns a variable to have the value \( \overline{VaR}_{\alpha}\), where \(\alpha\) is a scalar that represents the percentile of the Value at Risk. Note that varup refers to the right tail of the distribution and \(\alpha\) typically equals 0.95 or 0.9. For further information, see section Value at Risk (VaR).

Currently, two GAMS solvers can be used to solve stochastic programming models with EMP: DE and LINDO. Not all keywords mentioned above are supported by both solvers. The following table specifies which keywords can be used with which solvers. The keywords not mentioned in the table are supported by all solvers mentioned.

DE LINDO
chance \(\surd\) \(\surd\)
jrandvar \(\surd\) \(\surd\)
randvar(discrete) \(\surd\) \(\surd\)
randvar(parametric) \(\surd\) \(\surd\)
sample \(\surd\) \(\surd\)
setSeed \(\surd\)
var \(\surd\)
cvar \(\surd\)
ExpectedValue \(\surd\)

Table 8: Solver capabilities

Note
In general, JAMS is the default solver for models of type EMP. However, since JAMS cannot handle stochastic EMP models, GAMS switches the solver to DE automatically when, a stochastic EMP model is tried to be solved with JAMS.

Further information about these solvers can be found in the corresponding solver manuals. The stochastic programming options for the solver LINDO might be of particular interest.