Difference between revisions of "Simulator Composition"

From SIMA wiki
Jump to: navigation, search
(Simulation setup and organisation)
(Simulation setup and organisation)
Line 5: Line 5:
  
  
[[File:sequence.png | 400px]]
+
[[File:scheduler.png | 400px]]
  
 
== clsSimplePropertyLoader ==
 
== clsSimplePropertyLoader ==

Revision as of 14:54, 30 October 2013

Simulation setup and organisation

The starting point of a simulation is the scenario file. Each simulation scenario is defined by such a file, which is basically a list of all properties and entities that make up a particular scenario. When the Scenario Selector GUI is called, it scans all the available scenario files and gives a list with descriptions. The user can then select a scenario and start the simulation by clicking on Start Scenario. This calls the class SimulatorMain which takes care of the simulators graphical interface and calls clsMain to handle the non graphical simulator background.

SimulatorMain and clsMain both extend modules of the MASON multiagent simulation toolkit that provides the simulation framework. The central module that MASON supplies is the scheduler. Before starting the simulation, the scheduler invokes a start procedure in clsMain which is configured to call clsSimplePropertyLoader to manage the scenario setup (create all entities decision units etc. and apply properties according to the scenario file). Everytime a entity is created, it is registered at the scheduler. Once the simulation is running, the scheduler calls 4 procedures (one after another for all registered objects) for each simulation step. The following diagram shows the principle


Scheduler.png

clsSimplePropertyLoader

This class sets up the simulation according to the selected scenario file. Most important, it manages the creation of the memory(s), decision units and entities. This process happens in 3 steps. If the entity that is to be created is a ARSIN, than it creates a instance of the memory ( clsSearchSpaceManager and clsLongTermMemoryHandler), otherwise this step is skipped. Then a decision unit (which one is defined by the scenario file) is created and for the case ARSIN the memory handlers are passed to the DU. Last the entity is created and the DU is passed to it.

Entities

Body

Decision Units

Inspectors