Advanced: changing RegMAS structure

If agents should behave in a different way that the default one (profit maximisation), or if the model should work with more agent types, RegMAS needs to be modified to achieve such tasks.

It doesn't yet provide a plug-in architecture, so changes have to be done directly in its source tree. However the design is made in a way to separate as much as possible the core model logic from those of the agents. The logic of the agents is described by two main classes: Manager_base and Agent_base. The former is the agent-side interface with the model, and manages the behaviour of the individual agents (that are instances of the latter class). As the name suggests, they are base classes that are derived in more specialised classes, like Agent_space and Agent_farmer.

The equivalent interface at the model-side is SuperAgentManager and there is only one instance of this class. It doesn't know anything of individual agents, as its relationship is only with the different managers.

The model run sequentially following two main functions: Init::setInit
Level()
during initialisation stage and Scheduler::run() during simulation. The latter function performs a loop for each iteration that is due (see the Flowchart, Fig. 2)

Other important classes are those managing the regional data (RegData), the model objects (ModelObject) the regional level activities and resources (respectivelly RegActivities and RegResources) and finally the optimisation problem associated to each agent (Opt).

All classes are documented in the Reference Manual that is build directly from the source code using Doxygen.

RegMAS is know to compile using Gcc on both Linux and Windows. In the CVS a project file is provided for two user-friendly Integrated Development Environment (IDE) for both the OSes, KDevelop and Dev-C++. Using one of this two IDE is strongly recommended, as fully tested.

Source code is available under the GPL license, see the appendix for details.

Regional Multi Agent Simulator 2011-06-19