Chapter 11
Simulation of the AAPL Agent Behaviour Model, the Agent Processing
Platforms, and the Simulation of Sensor Networks
The SeSAm Agent Simulator 364
Behavioural AAPL MAS Simulation 366
Simulation of Real-world Sensor Networks 368
PCSP Platform Simulation 369
The SEM Simulation Programming Language 373
SEJAM: Simulation Environment for JAM 383
Multi-Domain Simulation with SEJAM2P 386
Further Reading 403
S. Bosse, Unified Distributed Sensor and Environmental Information Processing with Multi-Agent Systems
epubli, ISBN 9783746752228 (2018)
Chapter 11. Simulation
This chapter addresses various simulation approaches to study the opera-
tional behaviour of MAS and the agent process platform themselves,
distinguishing between behavioural and platform simulation.
11.1 The SeSAm Agent Simulator
Agent-based simulation involves different tasks [KLU09]: The Design of a
simulation model, the implementation of a computer simulation model, the
observing and controlling of the simulation, the observing and immersive
testing, calibration and experimentation, and finally the output interpretation.
The SeSAm (Shell for Simulated Agent Systems, details can be found in
[KLU09]) offers a GUI-based modelling, simulation, and visualization environ-
ment that was developed to address most of the previously mentioned tasks.
A SeSAm simulation model describes the elements of a multi-agent model: The
structure and dynamics of agents and their environment, the configuration of
situations, instrumentation, and the experimental setup including the
For a runnable simulation the following parts must be addressed and the
steps must be performed [KLU09]:
1. Modelling of the data set with built-in and user defined primitive and
data types;
2. Declaration of Agents, Resources, and the world environment provid-
ing the structure and the dynamics of the entire system to be simu-
3. Configuration and Communication (Protocol) Declaration;
4. Integration to the Simulation Run Configuration;
5. Experiment and Interface Declaration.
In SeSAm, there are agents capable of moving in a two-dimensional world. A
geometric object can be assigned to an agent, visualizing the current position
of the agent in the world. The world is treated as a non-mobile agent, too.
Finally, there are resources that are passive. The structure diagram of the
SeSAm simulation model is shown in Figure 11.1.
An agent consists of body variables, a geometric shape (optional), and a
reasoning engine describing the agent behaviour. The reasoning engine is
modelled with an activity-transition graph, similar to the AAPL model. An activ-
ity executes actions that can have different effects (the outcome):
Modification of the body variables of the agent or the public visible
body variables of other agents, resources, and the world;
S. Bosse, Unified Distributed Sensor and Environmental Information Processing with Multi-Agent Systems
epubli, ISBN 9783746752228 (2018)
11.1 The SeSAm Agent Simulator 365
Fig. 11.1 SeSAm Simulation Model Diagram
Change of the spatial location or the geometric shape of an agent;
Creation of new or the destruction of existing agents or resources;
Social contact to other agents and perception by reading public visible
body variables of other agents.
In contrast to the AAPL behaviour model, there is only one control thread,
preventing the implementation of signal handlers directly. Furthermore,
SeSAm agents interaction bases on the shared memory paradigm. And finally,
the ATG cannot be modified at simulation time (no activities and no transi-
tions can be added, modified, or removed).
The SeSAm run-time simulator schedules all agent updates (executing activi-
ties) randomly. An agent update cycles starts with the world update first. This
is the only inherent synchronisation constraint in the simulation run and sim-
ulation environment seen by the agents.
S. Bosse, Unified Distributed Sensor and Environmental Information Processing with Multi-Agent Systems
epubli, ISBN 9783746752228 (2018)
Chapter 11. Simulation
11.2 Behavioural AAPL MAS Simulation
The behavioural simulation of the agents based on the AAPL model using
the SeSAm agent behaviour model, which represents only a partial subset of
the AAPL model, and hence requires the application of some transformation
a. Each AAPL agent class AC
is implemented with a SeSAm agent class S
b. Each AAPL subclass AC
is implemented with a SeSAm agent class S
. At
run-time different agents exist derived from each subclass;
c. Functions and procedures of an AAPL agent class AC
must be imple-
mented with SeSAm feature class F
d. AAPL signal handlers required for the parent-child agent group com-
munication must be implemented with a separated SeSAm agent class
. At simulation time each AAPL agent having signal handlers is
associated with a shadow agent of the class S
e. Signals are passed by synchronized queues;
f. AAPL activities a
that contain blocking statements (tuple space access
and waiting for time-outs) require a split into a set of computational
and blocking SeSAm activities a
, a’
, a’
g. Migration of agents is only virtual by changing the position of a SeSAm
agent and connecting the agent to the new node agent infrastructure.
Migration of agents requires the migration of the shadow agents (sig-
nal handler agents), too.
In addition to real hardware and software implemented agent processing
platforms there is the capability of the simulation of the agent behaviour,
mobility, and interaction on a functional level. The SeSAm simulation frame-
work offers the necessary platform for the modelling, simulation, and
visualization of mobile multi-agent systems deployed in a two-dimensional
world. The behaviours of agents are modelled with activity graphs (specifying
the agent reasoning machine) close to the AAPL model. Activity transitions
depend on the evaluation of conditional expressions using agent variables.
Agent variables can have a private or global (shared) scope. Basically, SeSAm
agent interaction is performed by modification and access of shared variables
and resources (static agents). In addition to the agent reasoning specification
there are global visible feature packages that define variables and function
operating on these variables. Features can be added to each agent class.
Agents can change their position in the two-dimensional world map enabling
mobility, and new agents can be created at run-time by other agents. The
SeSAm framework was chosen due to the activity-based agent behaviour and
S. Bosse, Unified Distributed Sensor and Environmental Information Processing with Multi-Agent Systems
epubli, ISBN 9783746752228 (2018)
11.2 Behavioural AAPL MAS Simulation 367
the data model, which can be immediately synthesized from the common
AAPL source and can be imported by the simulator from a text based file
stored in XML format. This model exchange feature allows the tight coupling
of the simulator to the synthesis framework.
In principle, AAPL activity graphs can be directly mapped on the SeSAm agent
reasoning model. But there are limitations that inhibit the direct mapping.
First of all, AAPL activities (IO/event-based) can block (suspend) the agent pro-
cessing until an event occurs. Blocking agent behaviour is not provided
directly by SeSAm. Second, the transition network can change during run-time.
Finally, the handling of concurrent asynchronous signals used in AAPL for
inter-agent communication cannot be established with the generic activity
processing in SeSAm (the provided exception handling is only used for excep-
tional termination of agents).
For this reason, the agent activity transitions including the dynamic transi-
tion network capability are managed by a special transition scheduler, shown
in Figure 11.2. This transition scheduler handles signals and timers, too, which
are processed prioritized and passed to the signal scheduler. Each agent activ-
ity is activated by the transition scheduler. After a specific activity was
processed, the transition scheduler is activated and entered again. An AAPL
activity can be split in computational and IO/event-based sub-activities in the
presence of blocking statements (e.g. in and rd tuple space interaction).
There is a special node agent implementing the tuple database with lists
(partitioned to different spaces for each dimension), and managing agents
and signals actually bound to this particular node.
Fig. 11.2 AAPL behavioural simulation model mapped on the SeSAm MAS model
S. Bosse, Unified Distributed Sensor and Environmental Information Processing with Multi-Agent Systems
epubli, ISBN 9783746752228 (2018)