|
Model |
Top Previous Next |
|
Once all the model structural elements have been defined then one employs a MODEL statement to identify models that will be solved. Such statements occur in the each of the three example models:
Notes:
Model modelname optional explanatory text / model contents/ ; where Model or models is required a modelname follows that can be up to 63 characters long as discussed in the Rules for Item Names, Element names and Explanatory Text chapter the optional explanatory text is up to 255 characters long as discussed in the Rules for Item Names, Element names and Explanatory Text chapter the model contents are set off by beginning and ending slashes and can either be the keyword all including all equations, a list of equations, or a list of equations and complementary variables. Each of these is discussed in the following bullets. a ; ends the statement
Using /ALL/ includes all the equations. One can list equations in the model statement like that below. MODEL FARM /obj, Land,labor/;
and one does not need to list all the equations listed in the Equations statements. Thus, in (optimize.gms), one could omit the constraints called labor from the model MODEL ALTPROBLEM / obj,land/;
MODEL PROBLEM /Pdemand.Qd, Psupply.Qs,Equilibrium.P/; (econequil.gms)
which imposes the complementary relations from our equilibrium problem above.
|