|
Variables |
Top Previous Next |
|
GAMS requires an identification of the variables in a problem. This is accomplished through a VARIABLES command as reproduced below for each of the three problems.
NonNegative Variables Xcorn ,Xwheat,Xcotton;
The POSITIVE and Nonnegative modifiers on the variable definitions means that these variables listed thereafter are nonnegative i.e. Xcorn , Xwheat , Xcotton, P, Qd, Qs. The use of the word VARIABLES without the POSITIVE modifier (note several other modifiers are possible as discussed in the Variables, Equations, Models and Solvers chapter) means that the named variables are unrestricted in sign as Z, ba, so4, baoh, oh, hso4, and h are above. Notes:
modifier variables comma or line feed specified list of variables ; where modifier is optional (positive for example) variable or variables is required a list of variables follows a ; ends the statement
Variables
Binary Variables
Positive Variables
Semicont Variables X,y,z;
as discussed in the Variables, Equations, Models and Solves chapter.
|