lagom_generiC Documentation

2.0a

About this model

The code that is documented here started as an implementation of a modified version of a model from Herbert Gintis, published in "The Economic Journal", Vol. 117, Page 1280-1309.

A description of the first version of the model can be found in (Mandel, A., Furst, S., Lass, W., Meissner, F. and Jaeger, C. (2009) "Lagom generiC: an agent-based model of growing economies", ECF working paper 1/2009). This documentation assume that the reader has read this paper, especially chapter 3, because the main model structure is still the same:

Structure

The model depends mainly on seven classes:

The Foundation is the root of the model and contains the Government, the Households, the Financial System and a list of Sectors . Each Sector itself have a list of the Firms which are producing for this Sector and a corresponding ImportExport agent.

Each of these seven classes have a corresponding InitValues class (e.g. FirmInitValues) in the subpackage initvalues. They contain all the variables that are used while the model gets initialized (and some of them while the model is running, e.g. when a new Firm enters the market and this Firm gets initialized, but the variables aren't modified from the model itself). After the initialization the variables inside the InitValues classes should be fixed, but at the moment this is not insured by the implementation design itself. The structure of the InitValue classes is the same as described above with the FoundationInitValues as the root class, but there is always just one instance of each InitValue class, e.g. all Firms are using the same single FirmInitValue instance.

The state of each Agent is reflected to the "outside" world via a instance of a subclass of ProbeBase, in the current implementation the subclasses are inner classes of the Agent class itself. Expressions that are only calculated for analysing the model, but not are used inside the model itself, are part of the Probe class, and not of the Agent class itself.

Executing the Model

The model in the Java package that is described here can't be executed stand alone. Another package must create an Foundation instance, change the InitValues if the default values aren't satisfactory, call Foundation.init() afterwards and then Foundation.advanceOnePeriod() for calculating a single period. At the end of Foundation.advanceOnePeriod, all Probe instances are updated Between the Foundation.advanceOnePeriod() calls it can gather the needed informations, all functions that are necessary to access this data are being public. In the rest of the documentation, this package will be called the model driver. See also the Foundation documentation.

At the moment we have one driver for the model, which is using MASON, a fast discrete-event multiagent simulation library core. MASON is developed at the George Mason University's, and can be found at http://www.cs.gmu.edu/~eclab/projects/mason/ . The package de.pik.lagom.gintis.mason contains the code, that connect MASON with the model described here.

Coding Conventions

The Java Coding Conventions (http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html) is holding also for our code, with two exceptions, the tab-width is set to two characters, and the line length is 96 characters long.

And there are some additional naming conventions:

Methods should only start with get or set in the case that the method really only get or set a field variable, with the following exception:

Because of this limitation, the get/set methods aren't documented.


Generated on Tue Sep 14 11:11:48 2010 for lagom_generiC by  doxygen 1.5.4