Implementation

Initialisierung der Agenten

During inistialisation needs to defined, how many (super) agents are initialised in which area. The composition of milieus is then defined by data in the DB.

Configuration of Components

Components are designed as objects rather than static components. It is easier and more robust to define objects as parameters than to define switches that cause different static code to be called. Furthermore, the user code becomes slim.

Linking with LARA

Embedding in the Context-Priciple of Repast Simphony

Assignment of Contexts

Contexts generated by GShapefileLoader get their super context assigned by calling assignSuperContext(context). This way, parameters for initialised contexts' constructor do not need to be restricted. As a consequence, one needs to make sure that the context's constructors or any method do not assign contexts to super contexts, too ( at least not those that are handled by GShapefileLoader).

Custom group context

Using a custom group context usually requires casting to to custom class, e.g. in the agents class (the one that implements GimMilieuAgent). The only way to prevent casting is to use parameter types for the group context. This would be very complicated since also the agent class needs the be parameterized.

What about multiple references to agents in the Repast Simphony context hierarchy?

When an agent is added twice to a context in the Repast Simphony context hierarchy it is also counted twice and given twice by any iterator over one of its parent contexts. When an agent is added to a GimMilieuContext and to a GimGroupContext a special implementation of the parent context GimMarketCellContext is required that overrides size() and iteratorInternal().

Random Numbers in SesamGIM

SesamGIM performs a kind of lazy initialisation of random number generators and distributions. Generators are initialised in GManager#init() in case they have not been registered at URaNuS before. Distributions are initialised in the classes where they are needed in case they have not been registered at URaNuS before.