<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>MAKKSim: Dealing with Pedestrian Groups in MAS-based Crowd Simulation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lorenza Manenti</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sara Manzoni</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe Vizzari</string-name>
          <email>vizzarig@disco.unimib.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Centre of Research Excellence in Hajj and Omrah, Umm Al-Qura University Makkah</institution>
          ,
          <country country="SA">Saudi Arabia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Complex Systems and Artificial Intelligence Research Center Dipartimento di Informatica, Sistemistica e Comunicazione Universita' di Milano-Bicocca viale Sarca 336/14</institution>
          ,
          <addr-line>20126 Milano</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>-The paper presents MAKKSim, an agent-based tool for pedestrian dynamics simulation. The software is a second generation tool in which the presence of pedestrian groups and some cultural elements are explicitly modelled and can be set by the end-user. In this work, an overview on the MAKKSim model and software architecture is presented, by means of the definition of agent behaviours and the analysis of UML diagrams and enduser interface.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>The simulation of pedestrians and crowd dynamics is a
consolidated field of application for agent-based models:
successful case studies can be found in the literature and
offthe-shelf simulators are commonly employed by end-users,
decision makers and consultancy companies.</p>
      <p>
        However, these tools are the result of a first generation
of research efforts considering individuals, their interactions
with the environment and among themselves, but generally
neglecting or treating in a simplistic way aspects like (i) the
impact of cultural heterogeneity among individuals and (ii) the
effects of the presence of groups and particular relationships
among pedestrians. The last point is, in fact, an open topic in
the context of pedestrian modelling and simulation approaches
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]: the implications of particular relationships among
pedestrians in a crowd (e.g. the presence of groups) are
generally not considered by current approaches.
      </p>
      <p>In this work we present MAKKSim (MAKKa pedestrian and
crowd Simulator), a second-generation platform for pedestrian
dynamics simulation based on an agent-based model in which
groups of pedestrians and cultural attitude are explicitly
considered. MAKKSim and its relative model are the results of
CRYSTALS project, a multidisciplinary research between the
Center of Research Excellence in Hajj and Omrah (Saudi
Arabia) and Complex Systems &amp; Artificial Intelligence Research
Center (Italy): the main focus of this project is the adoption of
an agent-based pedestrian and crowd modelling approach to
investigate meaningful relationships between the contributions
of anthropology, cultural characteristics and existing results
on the research on crowd dynamics, and how the presence
of heterogeneous groups influences emergent dynamics in the
context of the Hajj (i.e. the Pilgrimage toward Makka). In the
specific context of the Hajj, the yearly pilgrimage to Makka
that involves over 2 millions of people coming from over 150
countries, the presence of groups and the cultural differences
among pedestrians represent two fundamental features of the
reference scenario.</p>
      <p>
        Modelling groups and cultural aspects were the main
requirements for MAKKSim development: with MAKKSim, we
try to consider and explicitly model the impact of cultural
heterogeneity among individuals by means of the introduction
of proxemic-driven behaviour based on the theories by E.T.
Hall [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and by E. Canetti [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]: moreover, groups can be directly
managed by the user by means of the definition of parameters
related to group cohesion. Beyond groups and cultural
attitude, other requirements were the integration of existing data
specifying the spatial structure of the environment in which
simulations must take place (e.g. CAD files), the possibility
to export data about the simulations for analyses carried out
by means of external programs, the possibility to provide an
effective 3D visualization of the dynamics generated by the
simulator.
      </p>
      <p>In the following, an introduction to MAKKSim platform
is proposed, with an explanation of the model of pedestrians
by means of agent behaviours and the description and
management of the environment. Then, an analysis of software
architecture and relatives modules is presented, in order to
show relationships among different elements of the model
which the platform is based on.</p>
    </sec>
    <sec id="sec-2">
      <title>II. MAKKSIM</title>
      <p>MAKKSim is a software simulation platform developed by
Complex Systems and Artificial Intelligence Research Center
(CSAI) that supports the development of what-if scenarios
about pedestrian dynamics within structured environments.</p>
      <p>MAKKSim allows end-users to simulate and visualize
crowd dynamics in open and closed structured spaces. The
underlying modeling approach employed by MAKKSim is based
on agent-based approach, according to which pedestrians and
groups of pedestrians within a crowd are represented by
individual behavioural and perception rules that drive agents
within the structured environment. MAKKSim agents are able
to perceive and avoid spatial elements that represents
obstacles and to follow paths throughout environmental elements.
Moreover, MAKKSim agents are able to perceive other agents
and to recognize those that belong to their group and to
behave, according to proxemic behavioral rules by maintaining
differently spatial distances in case of group members and not
group members.</p>
      <p>Considering the necessity to introduce and describe the
environment of the simulation, MAKKSim provides to
endusers design tools for the effective and efficient development
of what-if scenarios by allowing the import of a set of
CAD and 3D file formats: the use of these latter allows to
simulate populated spaces and the generation of effective 3D
visualization of crowd dynamics and to export of simulation
data for analytical aims. The integration within 3D formats
is supported by the use of Blender1: it is a free, open source
3D environment that can be used for modeling, animating and
rendering 3D scenes, and provides a Python scripting engine
and a set of primitives to support 3D drawing and 2D/3D
interactive views.</p>
      <p>MAKKSim first exploitation has been within CRYSTALS
project, in which MAKKSim has been employed for the
development of a set of what-if scenarios within Arafat
I railway station in order to demonstrate how agent-based
approach and the modeling of crowd of pilgrims taking into
account multidisciplinary issues (e.g. multicultural setting) can
effectively be employed to support decisions and operations
of organizers and crowd managers devoted to the yearly
pilgrimage at Makka.</p>
      <sec id="sec-2-1">
        <title>A. Pedestrians and environment</title>
        <p>
          As previously written, MAKKSim is based on agent-based
approach: pedestrians are modelled as agents situated in a
structured environment. The environment is managed in a
discrete way: MAKKSim is able to work on 3D images
in which relevant elements for the simulation have to be
presented. Starting from these images, MAKKSim elaborates
2D-images and creates a grid of the environment with cells
with a size of 40x40 cm according to [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
        <p>In this discrete environment, the dynamics of agents is based
on two behaviours:
the goal-driven behaviour, that represents the tendency
of a pedestrian to move toward its target;
the proxemic-driven behaviour, based on Proxemic theory
and consisting of two different rules:
– separation rule, that represents the tendency of a
pedestrian to preserve a certain distance from other
1Blender website: http://www.blender.org/
pedestrians which belong to a different group;
– cohesion rule, that represents the tendency of a
pedestrian to stay close to its group members.</p>
        <p>In order to support these rules, every agent is characterized
by a state representing individual properties of pedestrian:
group membership: every agent belongs to a group,
defined as a set of agents (groups of size equal to 1 are
allowed);
goal: every agent has only one goal to reach during the
simulation;
goal, cohesion and separation degrees: every agent is
characterized by multiplicative coefficients to manage
personal attitude related to goal-driven and
proxemicdriven behaviour;
cohesion and separation radius: every agent is
characterized by values which identify how much space has
to be considered in the management of proxemic-driven
behaviour. In fact, these values identify the largeness of
the neighbourhood interested by separation and cohesion
rules.</p>
        <p>All these values can be set by the user to obtain different
plausible simulations.</p>
        <p>Thanks to the discretization of the environment, the
goaldriven behaviour is managed by means of floor field method:
considering the set of goals in a scenario, for every target a
2D-image of the environment of the simulation is created (see
Fig. 1). Starting from the image and considering the
walkability of the environment, a weighted matrix in which every
cell represents a pedestrian position is created. Every cell has
an own weight assigned starting from the target area (in which
the weight is equal to 0): cells more distant from the target
have a greater weight respect to the others (Fig. 2(a)).</p>
        <p>Proxemic-driven behaviour works in a similar way: for every
agent, separation and cohesion rules are verified considering
neighbourhoods and according to values specified by the user
before the simulation.</p>
        <p>The overall dynamics of a pedestrian is the result of the
weighted sum of the three vectorial components representing
goal-driven behaviour and separation and cohesion rules (Fig.
2(b)):
=
s_direction</p>
        <p>Ws +
c_direction</p>
        <p>Wc
where Wg; Ws; Wc are respectively the goal, cohesion and
separation degrees presented before.</p>
      </sec>
      <sec id="sec-2-2">
        <title>B. MAKKSim Software Architecture</title>
        <p>In this section an overview on software architecture and an
analysis of relevant modules to manage the environment, the
scenario and the agents is presented.</p>
        <p>The software architecture of MAKKSim is composed by
potentially reusable modules to build personalized decision
support systems and it can be further extended by means of
scripts written in Python language.</p>
        <p>Currently, MAKKSim is based on a three layers software
architecture (Fig. 3):
1) Low level layer, that is the foundation of the software,
composed by Pithon virtual machine that runs the code
and the Blender 3D environment that is used to produce
an easy-to-read visual response;
2) Logical layer, that is the core of the project and of the
simulation engine;
3) Simulation layer, that supports end-users in the creation
of simulations, and includes the 3D model of the
environment and the configurations of the simulation (e.g.
groups, agents, targets and so on).</p>
        <p>These layers are not stand-alone modules: interactions
among layers are necessary and allowed in order to exchange
information and data from simulation to low level and vice
versa.</p>
        <p>As previously written, the logical layer represents the core
of the simulation engine, in which the code of the project, the
classes and the tools are located. This layer is composed of
five modules (Fig. 3):
1) Scenario manager, that is devoted to the management
of the configuration file for the scenario. Moreover, it
generates logs and statistics about the simulation;
2) Space manager, that is devoted to the management of
the space;
3) Agent manager, that is devoted to the management of
agent behaviour;</p>
      </sec>
      <sec id="sec-2-3">
        <title>4) Custom Simulations Modules, with the scope to allow</title>
        <p>the customisation of the simulation by the end-user;
5) Configuration GUI, to support user interface.</p>
        <p>All these modules are connected with each other and with
Blender environment, in order to exchange information and
data in the same and different layers.
A more detail explanation of Scenario Manager, Agent
Manager and Space Manager packages is now presented by
means of UML diagrams.</p>
        <p>1) Scenario Manager: This module contains information
to manage the configuration of the simulation and to create
log and statistic files (Fig. 4). In order to perform these
tasks, an interaction with Blender environment is guarantee to
support animation and pedestrian 3D models set-up. Moreover,
the module allows the configuration of simulation parameters
and provides the mechanism to update the scenario of the
simulation. Actually, this module works with Agent Manager
in order to redesign frames of the simulation after the updating
of the states of all the pedestrians involved in the scenario.</p>
        <p>2) Agent Manager: This module is devoted to the
management of agents (called vehicles in the follows) and groups (Fig.
5). The class Vehicle that implements agents can be overridden
in order to adopt different pedestrian simulation models. Class
Vehicle is connected to the Space Manager module to manage
the path with the relative pathfinding algorithm. Every vehicle
belong to a group, identified by a set of features like id, size,
initial position and so on. In particular, every group has only
one goal, that is shared among all the group members.</p>
        <p>3) Space Manager: This module is devoted to the
management of the environment by means of the definition of
the grid, the cells and the pathfinding algorithm (Fig. 6).
The environment is divided into cells of 40x40 cm: the
algorithm analyses the position of pedestrians in the environment
and computes the path for the pedestrians using floor field
method. Pathfinding algorithm also uses the grid for the agent
neighbourhood calculus to develop the cohesion rule related
to groups: in this case, every cell has a dimension of 10x10
m.</p>
      </sec>
      <sec id="sec-2-4">
        <title>C. The end-user interface</title>
        <p>MAKKSim shows a simple and user-friendly interface
composed of two main parts (Fig. 7): on the left a window in
which the scenario of the simulation is proposed. The user
can modify the environment adding spatial constraints and
relevant elements in order to define target areas. On the right,
all the utilities to set up simulation, pedestrians and groups
are presented.</p>
        <p>Fig. 7. An overview of MAKKSim interface: on the left the environment
of the simulation is shown while on the right utilities to set up simulation,
pedestrians and groups are presented</p>
        <p>Utilities support end-users in the tree main steps necessary
to create the simulation:
1) the definition of the environment of the simulation:
thanks to the integration with Blender environment,
MAKKSim is able to import 3D files in order to extract
and draw the scenario. The end-user can import 3D
and 2D file formats of the environment: working on
3D model file from CAD software, they can be directly
imported in MAKKSim. An annotation and selection of
spatial structure is then required in order to identify
the main elements of the scenario which have to be
considered in the simulation (e.g. the raw geometry of
the roads, obstacles, corridors, gateways, and so on).
Differently, considering 2D-file (in vector or bitmap
format), after the importing in MAKKSim, a map redraw
and some basic extrusion operations of relevant spatial
structure are required, to turn the map into a proper 3D
model;
2) the definition of pedestrians and groups: the user
interface (Fig. 8) allows to define the number of pedestrians
involved in the simulation and their features. It is also
possible to define parameters related to the
proxemicdriven behaviour (i.e. cohesion and separation degree)
and to the goal-driven behaviour (i.e. goal degree);
3) the definition of the parameters of the simulation: the
user interface (Fig. 9) allows to save and apply new
configurations of the parameters related to the simulation, to
create, load and save walk-ability and pathfinding grid.
The interface also allows the requests for log and statistic
files about pedestrian movements and simulations.
III. THE SCENARIO OF ARAFAT I STATION ON MASHAER</p>
        <p>LINE</p>
        <p>In this section we refer to the use of MAKKSim for the
study of affluence on Arafat I station of new Mashaer train
line during Hajj 2010.</p>
        <p>After the representation of the scenario of Arafat I station
by means of the importing of CAD file, several simulations
related to the entrance of pilgrims in the station from waiting
boxes were developed.</p>
        <p>Figure 10 represents a real situation in the area of waiting
box in Arafat I: it is possible to note the presence of groups
moving from the waiting box towards ramps. In Figure 11, the
same situation is presented using MAKKSim software.</p>
        <p>First results related to a qualitative analysis of simulations
are promising: simulations are quite similar to situations
detected in the station during Hajj2010 and allows to study how
the presence and the position of groups of pilgrims influence
in different ways the overall dynamics of the Pilgrimage.</p>
        <p>IV. FUTURE INTEGRATIONS AND DEVELOPMENTS
Future works are related to the integration of MAKKSim
with tools for simulation output analysis and for simulation
input. From this point of view, the integration with PiGro
(Pilgrim Groups granulometric distribution tool) which
provides plausible configurations of group distribution in the
environment is an ongoing work. PiGro is a tool in which it is
possible to specify the initial configuration of the simulation
specifying group features (kind, dimension, number, shape) in
a given environment.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>ACKNOWLEDGMENT</title>
      <p>This research was fully supported by the Center of Research
Excellence in Hajj and Omrah, Umm Al-Qura University,
Makkah, Saudi Arabia, grant title “Crystal Proxemic
Dynamics of Crowd &amp; Groups”. Authors would like to thank
Dr. Andrea Bonomi for his work in the development of the
platform.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C. C.</given-names>
            <surname>Challenger</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          and
          <string-name>
            <surname>R. M.</surname>
          </string-name>
          ,
          <source>Understanding Crowd Behaviours. Cabinet Office</source>
          ,
          <year>2009</year>
          , vol.
          <volume>1</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>C.</given-names>
            <surname>Rogsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Klingsch</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Schadschneider</surname>
          </string-name>
          ,
          <source>Pedestrian and evacuation dynamics 2008</source>
          . Springer Verlag,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>E. Hall,</surname>
          </string-name>
          <article-title>The hidden dimension</article-title>
          . Doubleday New York Ed.,
          <year>1966</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>E.</given-names>
            <surname>Canetti</surname>
          </string-name>
          , Crowds and Power. Victor Gollancz Ed.,
          <year>1962</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>U.</given-names>
            <surname>Weidmann</surname>
          </string-name>
          , “
          <article-title>Transporttechnik der fussga¨nger,” Institut fu¨er Verkehrsplanung, Transporttechnik, Strassen- und Eisenbahnbau IVT an der ETH Zu¨rich, ETH-Ho¨nggerberg</article-title>
          , CH-8093 Zu¨rich, Literature Research 90,
          <year>March 1993</year>
          , in German.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>