# Computational tools

This is the home page of the course "Computational tools for Economics and Management" of the degree in "Economics and management". Here you'll find information, links and schedule changes. The course begins on Wednesday 23 March 2011.

## Lectures

• Wednesday, 14.00-15.30, S. Giobbe 10B;
• Thursday, 14.00-15.30, S. Giobbe 10B;
• Friday, 14.00-15.30, S. Giobbe 10B.

## Textbook and outline of the course

The textbook is
 Kendrick D., Mercado, R., Amman H., "Computational Economics", Princeton University Press, 2006.

Download a few chapters, including the first two that are covered during the course. The authors have set up a textbook home page with useful material, files and info. Tentatively, we will study

1. The Ramsey model (Excel/OpenOffice), chapter 1.
2. Neural networks (Excel/OpenOffice), chapter 2.
3. The transportation model (GAMS), chapter 4.
4. Financial planning (GAMS), chapter 6.
5. General equilibrium models (GAMS), chapter 8.
IMPORTANT. You must have or install OpenOffice (preferred) or Excel, with a working nonlinear solver. For OpenOffice, install this extension. Get the english version if you want to have the same software we use in class.
When we cover chapters 4, 6 and 8, in a few weeks time, GAMS is needed: you can download a free demo version, that is all you need for the course, at the textbook home page. Mac users, like myself, can install a command-line GAMS and more information will be given in class.

A detailed list of the topics and material covered each week will appear here.

## First week, March 23-25

Slides of the first lecture. This is the OO file with the optimization problem we have discussed in class.

Some students have problems with the installation of OO and NLPSolver. This is what I have understood so far. This page states that "Java is required for complete OpenOffice.org functionality. Java is mainly required for the HSQLDB database engine (used by our database product Base) and to make use of accessibility and assistive technologies. Furthermore some wizards rely on Java technology". So you may want to go to this page to install Java correctly on your Windows machine.

The same argument is put forward here, where there are step-by-step instructions to install and/or check your Java installation.

Once you have tried to fix Java, install the NLPSolver extension. Please, let me know if you solve the problem and how.

## Second week

31 March: discussion on optimization and decision problems, lake and oil field examples. Download some notes and the spreadsheet we used.

1 April: intro to neural networks, Chap. 2, this is the partial spreadsheet (that will be completed next week). The full version, named breedlov.xls, can be downloaded here.

## Third week

Neural nets and GAMS.

6 April: we completed the breedlov model, this is the final file.

7 April: GAMS introduction and installation. See the previous links for the software and istructions. As an introduction, we considered the problem \begin{aligned} \min_{x,y} & 2x^2+y^2+xy-x+y \\ & y\geq 0 \end{aligned} that is solved in GAMS using this code. Download also the transport file covered in Chap. 4 of the textbook.

8 April: Transportation model and GAMS solution. Practice on this "potato", with various exercises and questions.

We have seen that filenames with spaces can create problems on Macs. So, use names without spaces for files and folders or use the underscore like in "this_is_a_long_name.txt". On Windows, copying and pasting GAMS code from a browser's windows can produce "unrecognizable errors" when you run GAMS. This is due to strange characters added in the first line. Hence, delete those characters in the GAMS window containing the source and everything will work.

## Fourth week

14 April: we run some Steiner models with four points and one junction and two junction. The correct files, once erros are fixed, are the following: steiner2.gms and steiner3b.gms.

15 April: experiments with Chap. 4, linear systems in GAMS (a more complex example). Thrift in GAMS, Chap. 6.

## Fifth week

20 April: Thrift model, examination of the code and dicussion of results.

21 April: copying and pasting the results from .lst files and plots in OpenOffice. You can always use the NEOS server for optimization. Click on "NEOS solvers" and choose the solver that you like, usually CONOPT for nonlinear problems but also BDMLP for linear optimizations (or click on the links to jump directly to the page where you have to upload the program to be solved).

22 April: General equilibrium models, chapter 8 section 1, "Leontief input-output models". Chapter 8 section 2, "Production Prices Model". All the relevant files in GAMS can be downloaded from this page.

## Sixth week

27 April (replaces 24 March): General equilibrium models, chapter 8. Check your preparation using this potato (relative to chaps. 4, 6, 8). I suggest to do it several times.

28 April (replaces 13 April): general review and downloadable trial test (multiple choices are taken from the potatoes and solutions are not needed; exercise 4 is annotated).

## Exam

Written test (close book) with multiple choices, open questions on models and computer outputs/results to comment, describe or solve.

An oral exam is required to get 25 or more.