You can put the first two lines in your ~/.bashrc file, or you can just type them to the prompt (in which case the gams executable will only be available as long as your terminal window is open).
Then you can run GAMS on a model just by typing "gams modelfile.gms" to the prompt.
You can also download GAMS from the GAMS website:
There is a sequence of models used in class:
The simple one-product market equilibrium model using a single equation and three equations. In this model, the supply function is given, the demand function is given, and these two functions are set to be equal at equlibrium price. Then this set of equations is solved for equilibrium price.
Task.
What do you think of the language? What do you think of the error reporting?
The simple transportation problem (Dantzig, G B, Chapter 3.3. In Linear Programming and Extensions. Princeton University Press, Princeton, New Jersey, 1963). We consider as an example a simple transportation problem. In this problem we are given a set of production plants and a set of potential markets. Each plant has a given level of production, and each market has a known level of demand. The cost of shipping one unit of the product from the plants to the markets is also given.
A simple, algebraic, statement of the problem is the following: Let i and j be indices for the plants and markets, respectively. Denot by s_i the supply of each plant, and by d_j the demand at each market. Let also x_ij denote the decision variables, indicating the amount supplied to market j by planti, and let c_ij denot the cost of shipping one unit from i to j. Then the following linear program determines the least-cost solution:
Minimize Sum_i Sum_j c_ij*x_ij,
such that Sum_j x_ij <= s_i, for all i,
and Sum_i x_ij >= d_j, for all j.
A complete, commented GAMS statement of this model is here.
Task:
The same model, but with several scenarios (different equilibria) run, is here.
A research model is here. This is a model of the world economy as described in the Stern report, but with different parameters. One thing it shows is how sensitive the model results are the the choice of the discount rate.
A large database of models is maintained at the GAMS site.
Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk Please contact our webadmin with any comments or corrections. Logging and Cookies Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh |