<!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>Towards Modeling Activity Scheduling in an Agent-based Model for Pedestrian Dynamics Simulation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lorenza Manenti, Sara Manzoni</string-name>
          <email>fmanenti, manzoni, vizzarig@disco.unimib.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jan Dijkstra</string-name>
          <email>j.dijkstra@tue.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Design Systems Group, Eindhoven University of Technology</institution>
          ,
          <addr-line>Eindhoven</addr-line>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>and Giuseppe Vizzari, Complex Systems and Artificial Intelligence Research Center, University of Milano-Bicocca</institution>
          ,
          <addr-line>Viale Sarca 336/14, 20126, Milano</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>-In this paper we present an extension of an agentbased model representing pedestrian dynamics in order to include elements related to activity scheduling and the management of events. In particular, we will focus on the guidelines to analyze the scenario, identifying activities and the temporal relationships among them, such as how events that happen in an environment and change its configuration can be represented by means of the operational model and how the decision process of agents is influenced by them. An analysis of modeling activities in a real-word case scenario will be presented.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        Crowding phenomena are an interesting topic traditionally
studied in the context of human sciences (e.g. Sociology and
Anthropology [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]), but also scientific disciplines (e.g. Physics
and Computer Science) have recently developed models and
tools to satisfactory describe behaviors and interactions
between individuals into a crowd [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. According to the last works
presented in the literature, models for pedestrian dynamics
can be classified into three main classes [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]:
forcebased models, models based on Cellular Automata (CA) and
models based on Multi Agent Systems (MAS). In force-based
models the dynamic of spatial features is studied through
spatial occupancy of individuals, represented as moving
particles subjected to forces: each pedestrian is attracted by its
goal and repelled by obstacles (e.g. see Social Force Model
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]). Models based on Cellular Automata explicitly represent
environment as a regular grid [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], where the size of each
cell is the space occupied by a pedestrian. The state of the
cell includes the representation of: presence of individuals
and environmental obstacles, and direction of pedestrians.
According to MAS approach [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] pedestrians have the
ability to perceive information from the environment and to
interact with the environment and the other agents. Recently
MAS approach to pedestrian (and crowd) modeling has been
largely encouraged and proposed, since a MAS can represent
a potentially heterogeneous system of agents in a partially
known environment [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>
        Considering the works which can be found in the
literature, a part of the models are devoted to the description
of pedestrian behavior focusing on walking process, taking
into account the interactions with other pedestrians and with
obstacles. All these information belong to the so-called
operational level [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Despite that, in order to create more
complex scenarios and a comprehensive theory of pedestrian
behavior, it is necessary to take into account also tactical and
strategical aspects. According to Fig. 1, tactical and strategic
level are respectively focused on the schedule of activities and
on routes to follow, and on the order in which the activities are
performed. Actually, levels are not stand-alone but they need
to interact each other in order to represent a whole process of
modeling the behavior of a pedestrian in an environment.
Fig. 1: The three levels of modeling pedestrian behavior, from
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]
      </p>
      <p>Sometimes, strategic and tactical levels are considered to
be exogenous to the pedestrian simulation. For these reasons
the majority of the models in the literature just point out the
operational level or the tactical and strategical level: in fact,
it is very difficult to develop and to validate a comprehensive
model considering all the three levels.</p>
      <p>
        Related to the tactical and strategical levels there are a
lot of dedicated theories and models describing pedestrian
route choice: the main question is which are and in which
order pedestrians perform activities. In order to reach this
scope, the majority of the models works considering network
decision analysis in which pedestrians can make decisions
about where to move, applying basic discrete choice modeling
and determining a finite number of routes through the walking
infrastructures [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Other models [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] describe how
pedestrians move from one node of the network to another
by means of Markov-chain model. Far from this approach,
[
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] are based on the assumption that pedestrians are
expected cost minimizers: they schedule their activities, choose
the activity areas and the routes connecting these activity
areas simultaneously to maximize the expected utility of their
efforts.
      </p>
      <p>
        More similar to our model, in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] authors present a
multi-agent model to simulate shopping pedestrian dynamic
destination, route and scheduling behavior, with a shopping list
to be completed by means of the perception of the environment
and adapting pedestrian behavior. This model is based on early
studies [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] to simulate individual route choice behavior
of pedestrians in downtown shopping areas, where decision
of pedestrians depend on a set of variables like distance,
preferences and desires.
      </p>
      <p>In this paper we want to present an ongoing work about
the extension of an agent-based model for the simulation of
pedestrian dynamics, based on CA-method for the
management of the environment, in order to include some elements
of the tactical level starting from a model developed for
the operational level. Considering the complexity of dealing
with tactical level, in this work we just want to point out
some guidelines to start modeling activities, by means of an
analysis of the scenario, identifying activities and the temporal
relationships among them (if any), such as how events that
happen in an environment and change its configuration can be
represented by means of the operational model and how they
influence the decision process of agents. Our assumption is
that every agent has its own route and that events can change
the schedule of activities and can influence the decision of the
agents during the simulation.</p>
      <p>The paper is organized as follows: first, the basic elements
of the model are presented (Sec.II), in order to introduce how
the operational level works (Sec. III). Then, the extension of
the model to include the schedule of activities is presented
(Sec. IV). The paper ends with an application about modeling
activity scheduling to a real word scenario (Sec. V) and
indications about future works (Sec. VI).</p>
    </sec>
    <sec id="sec-2">
      <title>II. THE BASIC ELEMENTS OF THE MODEL In this section we introduce the basic elements of the model focusing in particular on the definition of the environment and the formalization of pedestrians.</title>
      <sec id="sec-2-1">
        <title>A. Environment</title>
        <p>The environment is modeling in a discrete way both in space
and time.</p>
        <p>
          1) Space: The physical environment is represented with a
discrete grid of square cells with cell size of 40cm 40cm
(according to literature [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]).
        </p>
        <p>Env = fc0; c1; c2; c3; :::g</p>
        <sec id="sec-2-1-1">
          <title>8ci : ci 2 Cell</title>
          <p>Every cell has a row and a column index, which indicates its
position in the grid.</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Row(ci) : Cell ! N</title>
        </sec>
        <sec id="sec-2-1-3">
          <title>Col(ci) : Cell ! N</title>
          <p>Every cell is linked with other cells, that are considered its
neighbors. In the basic model we assume the Moore
neighborhood, all the cells surrounding the cell being considered,
even in diagonal directions.</p>
          <p>Every cell can be in three possible states: free, occupied
by an obstacle, or occupied by a pedestrian. In this third case
the cell contains also a reference to the specific pedestrian
occupying it.</p>
          <p>
            State(c) = s : s 2 fF ree; Obstacle; P edestrianig
2) Floor fields as virtual grids: Following the approach
of the floor field model [
            <xref ref-type="bibr" rid="ref21">21</xref>
            ], [
            <xref ref-type="bibr" rid="ref22">22</xref>
            ], the environment of the
basic model is composed also of a set of superimposed virtual
grids, each one similar to the environment grid, that contains
different floor fields that influences pedestrian behavior. The
goal of these grids is to represent long range interactions by
representing them in terms of field modifications. In this way, a
local perception for pedestrians is sufficient to actually gather
the necessary information to carry out a plausible and effective
decision making activity about his/her movement. This reduce
computational complexity and then time resources required
by the simulation (at the price of a relatively small increase
in memory resources requirements). Some of the floor fields
are static (they are created at the beginning of the simulation
and they do not change) or dynamic (they change during the
simulation). The floor fields considered in our basic model are:
the path fields, one for each destination area, that
indicates the distance from the relative destination, acting as
a potential field that drive pedestrian towards it (static
floor field);
the obstacles field, that indicates for every cell the
minimum distance from an obstacle or a wall (static floor
field);
the density field that indicates for each cell the
pedestrian density in the surroundings at the current time-step
(dynamic floor field).
          </p>
          <p>All these fields can be seen as grids identical to the
environment grid, and we define a function that extract the
value of the field for the given cell:</p>
          <p>Val (f; c) : F ield</p>
        </sec>
        <sec id="sec-2-1-4">
          <title>Cell ! R</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>We also define the following notations:</title>
      <p>P athFj;k = V al(P athF; c)
ObsFj;k = V al(ObsF; c)</p>
      <p>DensFj;k = V al(DensF; c)
where c 2 Env ^ (Row(c) = j) ^ (Col(c) = k).
3) Spatial markers: Space can be annotated at design-time
with different markers, that are a set of cells that have the
function of assigning particular roles for these cells.</p>
      <p>The main kinds of marker conceived for the model are the
following:
start area, cells where pedestrian are generated, all at
once (en-bloc generation) or with a certain frequency
distribution. A start area contains also information on
the kind of pedestrians it must be generated and the
probability to assign the routes they must follow;
destination area, places where pedestrians want to go,
either final or intermediate;
obstacle area, non-walkable cells that represent obstacles
and walls.</p>
      <p>Each destination is associated to a path field indicating (as a
discrete version of a gradient) the shortest path between each
cell in the environment and this (intermediate) destination. An
example of the use of path field is shown in Fig. 2.
Fig. 2: Path fields in a simple scenario of a linear corridor with
two exits. Figures show respectively the path field associated to
the exit on left and to the exit one right. Cells in red represent
obstacles, while cells in blue represent destination areas
4) Time: Time is discrete, divided into steps of equal
duration. We chose to set the maximum velocity of a pedestrian to
1 cell per step so, given that the size of the cell 40cm 40cm,
we can calculate the duration of the single time-step in terms
of seconds, given the fact that average pedestrian velocity
measured empirically is about 1:2m=s. According to these
assumptions, we have a ratio of 3 steps=second.</p>
      <sec id="sec-3-1">
        <title>B. Definition of Pedestrians</title>
        <p>The pedestrian of the basic model is fundamentally an
utility-based agent with state. Functions are defined for utility
calculation and action choice, and rules are defined for
statechange. Pedestrians have associated, in addition to their
identifier, the route they must follow according to the initialization
of the simulation, the identifier of the group they belong to,
and their state.</p>
        <sec id="sec-3-1-1">
          <title>P edestrian : hid; route; group; statei</title>
          <p>The state of the pedestrian is composed of different variables:</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>State : hposition; oldDirection; routeIndex; attitudei:</title>
          <p>Position is the cell where the agent is on, oldDirection is
the last chosen action, routeIndex indicates the current goal
on the route, and attitude indicates the motivational state of
the agent (e.g. normal, hurry, panic and so on). From this
state components we can derive the current path field and the
weights for the utility function that allow to choose the next
movement of an agent in the simulation:
currentP athF ield = P athF ields(routerouteIndex)
weights = W eights(attitude)</p>
          <p>The decision of what happens when an agent arrives at the
final destination or complete one activities is not a destination
task: it is the agent that decides what to do (i.e. if it must
disappear, it can reappear in another place, it can choose which
is the next activity according to its route ).</p>
          <p>1) Agent actions: Possible actions (A) are movements in
one of the eight neighbor cells (indicated as cardinal points),
plus the action of remaining in the same cell (indicated by an
‘X’):</p>
          <p>A = fN; S; W; E; N E; SE; N W; SW; X g
Usually, just a subset of actions are admissible because agents
can move only in the cells that are free at the moment in
which it is update. The chosen cell becomes an “occupied by
pedestrian” cell while the old cell becomes free. Moreover, the
effect of an action is to update the density field by reducing
density in the surroundings of the previous cell and increasing
it in the surroundings of the chosen cell.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>III. THE OPERATIONAL LEVEL</title>
      <p>As introduced in Section I, we now show the modeling
of pedestrian dynamics considering first the operation level
in which walking behavior respect to the environment is
described. In our model agents work in a fundamentally
utilitybased way considering operational level: at each time-step t
agents choose their next action ai by evaluating the utility of
all admissible actions.</p>
      <sec id="sec-4-1">
        <title>A. Utility calculation</title>
        <p>Agents assign a desirability value to each of the possible
actions, based on five influencing factors: the floor field
value (G), indicating the path to the goal, the obstacles field
value (O), indicating the presence of obstacles, the proxemic
separation value (S), indicating if there are other pedestrians
near the agent, the group cohesion value (Co), indicating the
presence of the other components of the group (if any) and
the direction value (D), that indicates if the next direction is
the one adopted for the previous movement.</p>
        <p>The utility of a destination cell (which corresponds to
an action/direction) is the weighted sum of all these factors
(this allows also having different types of pedestrian, or even
different states of the same pedestrian, changing dynamically
its weights):
kgG(c) + koO(c) + ksS(c) + kcoCo(c) + kdD(c)
d
where d is the distance of the new cell from the current
position (1 or p2) for diagonal cells.</p>
      </sec>
      <sec id="sec-4-2">
        <title>B. Action choice</title>
        <p>Given the list of possible actions (that in the basic model
correspond to possible movement directions), two strategies
are implemented to choose the next action: deterministic
behavior, in which action with the higher probability is always
chosen, and stochastic weighted behavior, in which an action
is randomly chosen with a probability that is function of utility.
In particular, the probability of choosing an action a is given
by the exponential of the utility, normalized on all the possible
actions pedestrian can take in the current turn:</p>
        <p>p(a) = N eU(c)
where N is the normalization factor and c = a(currentCell)
is the cell chosen according to action a.</p>
      </sec>
      <sec id="sec-4-3">
        <title>C. Calibration and Validation</title>
        <p>
          Several turns of simulations for calibration of utility
function parameters such as for validation of the model with data
from real experiments and literature were conducted and the
outputs fit with other results and information presented in the
pedestrian dynamics literature. A complete overview about
calibration and validation phases is out of the scope of this
paper, see [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ] for a more detail explanation.
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>IV. EXTENSION OF THE MODEL: TOWARDS THE</title>
      <p>DEFINITION OF TACTICAL LEVEL</p>
      <p>In this section we introduce an extension of the basic
elements presented in Sec. II in order to expand the model
from the operational level to the tactical level. The extension
of the model is an ongoing-work, with the scope to improve
the basic model allowing the representation and the simulation
of more complex scenario in which the behavior of pedestrians
can be influenced by schedule of activities such as the presence
of events.</p>
      <p>Modeling activities is a complex task that needs an analysis
of the scenario in order to identify activities, and an analysis of
the constraints among activities and the relationships between
activities and the environment. In the follows we point out all
the phases that are necessary for the definition of tactical level.</p>
      <sec id="sec-5-1">
        <title>A. Identification of activities</title>
        <p>As written above, scheduling of activities requires an
analysis of the environment of the simulation in order to identify
all the relevant activities that have to be modeled in the
particular scenario. Every scenario has a set of activities
ACT = fact1; : : : ; actng where every acti is an activity that
can be performed by agents.</p>
        <p>It is necessary to consider that some activities can be
mandatory for pedestrians to reach their final destination (e.g.,
to buy a ticket and to pass through turnstiles in the scenario
of a station) while other activities can be optional (e.g., to buy
something to drink or to eat). On the basis of the time-table of
the simulation and on the changing in the scenario by means
of events presence, it could happen that an optional activity
was not performed.</p>
        <p>In order to model these features, we define every activity as
acti(mandi) where mandi 2 N : mandi 2 [0; 1]: mandi = 1
if an activity is mandatory, mandi = 0 if it is optional.</p>
        <p>After the identification of all the relevant activities that
can be performed in a scenario, it could be necessary to
model temporal relationships among them: some activities
have to be done following a precise temporal order while
others can be done in concurrency. A way to try to model
all the activities and the relationships among them is to use
an UML activity diagram, in which the flow of activities is
represented by oriented edges which indicates the temporal
sequence. In addition to activities, the other main components
allow the representation of starting and ending point such as
fork and join of activities that can be performed in parallel.</p>
      </sec>
      <sec id="sec-5-2">
        <title>B. Building the Graph of the Environment</title>
        <p>After the modeling of the relevant activities in the scenario,
it is necessary to take into account the spatial connection
among them. In fact, every activity is located in a portion
of the environment in which the simulation will take place:
the evaluation of spatial connections is essential in order to
build and initialize the routes followed by agents.</p>
        <p>Starting from the activity diagram, the main idea is to build
a graph of the environment identifying nodes and edges. More
formally, we can design a finite graph of the environment G :
hV; Ei where V is a set of vertices (nodes) and E V V is
a set of edges. Two vertices are called adjacent if they share a
common edge, in which case the common edge is said to join
the two vertices. An edge and a vertex on that edge are called
incident. A walk is an alternating sequence of vertices and
edges, beginning and ending with a vertex, where each vertex
is incident to both the edge that precedes it and the edge that
follows it in the sequence, and where the vertices that precede
and follow an edge are the end vertices of that edge. A walk
is closed if its first and last vertices are the same, and open
if they are different. The length l of a walk is the number of
edges that it uses (open walk: l = jnodesj 1, closed walk
l = jnodesj). Traditionally, with the term path is indicated a
“simple” walk, meaning that no vertices (and thus no edges)
are repeated.</p>
        <p>For our scope, every node represents an activity (and the
spatial area in which it has to be performed) and every edge
represents the spatial connection between activity areas: two
spatial areas are directly connected iff an edge exists between
them. The edges in our graph are oriented, in order to model
temporal orders: in fact, the graph of the environment is
building taking into account all the information related to
concurrency and temporal relationships expressed by activity
diagram. We are also interested in the study of open paths
(not walks) starting from starting areas and ending with final
destinations, as modeled in the activity diagram. For this
reason, the dimension of the graph in terms of nodes is equal
to jV j = jactivityj + jstartpointj. Considering edges, it is
necessary to model all the allowed spatial relationships among
activities, in order to build all the possible spatial paths in the
environment.</p>
        <p>Considering the definition of nodes as activities, we define
a set P = fp1; : : : ; png including all allowed paths, and every
path is defined as a list of activities pi = hact1; : : : ; actmi.
The set P can be obtained by an analysis of the scenario and
by a survey in which collected data allow to understand the
behavior of pedestrians in terms of activity scheduling and
routes, try to establish the probability that a pedestrian will
follow a particular route in the simulation. For this reason we
assign to every path pi a probability P r i.e., the probability
that an agent assumes that path as its own in the simulation.
In particular, this probability is obtained as the composition
of the probabilities of all the activities which pi is composed
of, that are independent and consistent events:</p>
        <p>P r(pi) = P r(act1) : : : P r(actm) =
m
Y P r(acti)
i=1</p>
      </sec>
      <sec id="sec-5-3">
        <title>C. Modeling Events</title>
        <p>Events are something that happen in the environment and
that can modify the scenario and the pedestrian activities. We
introduce in the model a new kind of floor field, the event
field, that is dynamics and that shares information about some
event happened in the scenario. The event floor field expands
information related to the event and, if an activity is involved
in the definition of the event (e.g. a train is leaving the station,
some emergency situation happens), a priority flag for this
activity is shared in the environment and it can be perceived
by agents.</p>
        <p>Moreover, the event floor field shares a value
valueattitude 2 N that can change the attitude of pedestrians.
Sometimes, events modify the motivational state of pedestrians
(i.e. the attitude of agents): considering the scenario of a
station in which a train is leaving, pedestrians could modify
their attitude being hurry respect to the normal situation.
It is also possible to model panic or emergency situation,
changing the attitude of pedestrians and notifying that exits
or safety points have priority respect to the current schedule.
According to the definition of pedestrians (Sec. II-B) the
attitude modifies the weights considered in the calculation of
the utility function that allow to choose the next movement
of an agent in the simulation. In particular, we define a
maximum valueattitude that is used to model emergency or
panic situation:in this way, the activity notified becomes a
mandatory destination, even if it is not included in the agent
path.</p>
        <p>In conclusion, we can indicate with the function
emit(acti; valueattitude) the information shared by means of
event floor field in the environment that agents can perceive
by means of event floor field.</p>
      </sec>
      <sec id="sec-5-4">
        <title>D. Scheduling Activities</title>
        <p>In this section we show how the schedule of activities is
influenced by events and how agents can change their own
schedule on the basis of event perceptions and also considering
that, at the beginning of the simulation, every agent has a route
to follow that is assigned by the starting area according to a
given probability.</p>
        <p>1) Schedule Without Event Perception: The way in which
agents perform their activity list depends on the situation
(the presence of events): in general, every agent has just
to perform the activity list that has in its mind. Agent
starts with the first activity in the list and reaches this
(intermediate) destination according to the corresponding
path field (currentP athF ield = P athF ields(act1)). Then,
agent checks which is the next activity in the list and
starts to follow the new path field (currentP athF ield =
P athF ields(act2)). The turn of the simulation ends
when the agent performed all the activities in its list
(currentP athF ield = P athF ields(actm)). Activity
diagram in Fig. 3 shows overall process of activity schedule in
the without event case. This simple behavior changes if some
event happens in the environment.</p>
        <p>2) Schedule With Event Perception: Starting from the
simple scenario without events, different situations have to be
analyzed in order to understand the scheduling of activities in
complex cases. An overview of the decision process of agents
in the case of event perception is shown in Fig. 4a. Note that
the activity diagram refers only to the process associated to
the management of a notified event, and it is a part of the
simulation cycle of every agent.</p>
        <p>When an agent perceives information related to an event,
it first checks the value of attitude: if it corresponds to
the maximum valueattitude, the activity notified becomes a
mandatory destination, even if it is not included in the agent
path. If the valueattitude is not the maximum, it is necessary to
verify if the activity is part of the agent list of activities: agent
only considers the notification if the activity is part of its path.
In this case, a rescheduling of the activity list is necessary.</p>
        <p>3) Reschedule of Activities: In the case in which a
reschedule of activities is necessary, a more complex behaviour is
expected from the agent. If the current activity is the notified
activity, agent just completes the activity and then, eventually,
(a)
(b)
continues the normal schedule. Differently, if the agent is
occupied to reach another destination, if it is mandatory agent
completes the current activity else it considers next activity
in the list, until the latter is equal to the notified activity.
Fig. 4b shows the activity diagram representing the process
of reschedule of activities.</p>
        <p>V. CASE STUDY: MODELING ACTIVITIES IN THE CONTEXT</p>
        <p>OF CRYSTALS PROJECT</p>
        <p>In this section we introduce a real scenario in which
modeling activities is an important step in order to understand
and to express the management of the pedestrian flows: we
apply the extension of the basic model to the Arafat I station,
on the Mashaer Rail line, in the context of the CRYSTALS
project1, a joint research effort between the Complex Systems
and Artificial Intelligence research center of the University of
Milano–Bicocca, the Centre of Research Excellence in Hajj
and Omrah and the Research Center for Advanced Science
and Technology of the University of Tokyo, with the main
aim of supporting designers and organizers involved in the
management of Hajj, the annual pilgrimage to Mecca. More
in detail, we focus on the identification of the activities by
means of the analysis of the scenario and on the building of
the graph of the environment. Due to the particular constraints
in the management of pedestrian flow in this scenario (see
below) no events are hereby presented.</p>
        <p>The goal of building Mashaer Rail line is to reduce the
congestion caused by the presence of other collective means
of pilgrim transportation (i.e. buses) during the Hajj: the yearly
pilgrimage to Mecca that involves over 2 millions of people
coming from over 150 countries and some of its phase often
result in congestion of massive proportions. For this reason,
it is necessary that the management of the pilgrim flow is
under control during the process of entry the station. The size
of the platforms was determined to allow hosting in a safe
1http://www.csai.disco.unimib.it/CSAI/CRYSTALS/
and comfortable way a number of pilgrims also exceeding the
potential number of passengers of a whole train. Each train is
made up of 12 wagons, each able to carry 250 passengers for
a total of approximately 3000 persons. In order to achieve
an organized and manageable flow of people from outside
the station area to the platforms, the departure process was
structured around the idea of waitingboxes (WB): pilgrims
are subdivided into groups of about 250 persons that are
led by specific leaders (generally carrying a pole with signs
supporting group identification). The groups start from the
tents area and flow into these fenced queuing areas located
in immediately outside the station, between the access ramps.
Groups of pilgrims wait in these areas for an authorization by
the station agents to move towards the ramps (R) or elevators
(E). In this way, it is possible to stop the flow of pilgrims
whenever the number of persons on the platforms (or on their
way to reach it using the ramps or elevators) is equal to the
train capacity, supporting thus a smooth boarding operation.
The inner station is organized into two parts: an initial waiting
area (WAR) for people coming from elevators and ramps, and
a boarding area (BA), one for every carriage (C). See Fig. 5
for a complete overview on the scenario.</p>
        <p>Previous studies support the requirement of strictly
organizing pedestrian flow, underlining that unexpected and anomaly
situations can produce a noticeably worse performance not
only from the perspective of the size of the area
characterized by a medium-high space utilization, but also from the
perspective of the highest value of space utilization of the
environment. According to these results, the management of
the movement of group of pilgrims from the tents area to
the ramps should try to avoid exceptions to the waiting box
principle as much as possible.</p>
        <p>We apply our guidelines for modeling activities to this
scenario identifying first the set of activities performed by
pedestrians: actually, the majority of the them are
timedependent (i.e. an order to execute activities exists and has
to respected) and they are all mandatory, in the sense that it is
(a)
(b)
not possible to skip any activity. The first step was the analysis
of the scenario (see Fig. 5a), the identification of activities (see
Fig. 5b) and the analysis of temporal-order relationships, by
means of the building of UML activity diagram (see Fig. 6a).</p>
        <p>Fig. 6b shows the graph related to the scenario of Arafat
I station: note that the number of nodes is equal to the sum
between the number of activities and the number of starting
area. Moreover, the probabilities for every route is obtained as
a product among the probabilities of single activity. According
to the analysis of the scenario, P r(W B1) = P r(W B1) =
P r(W B1) = 33%, P r(W AR) = 100%, P r(R1) = 90%,
P r(E1) = 10%, P r(BA1) = P r(BA2) = 50%, P r(C1) =
P r(C2) = 100%. From these values and according to the
UML activity diagram, we obtain that there are 12 allowed
(a) UML activity diagram
(b) Graph of the environment
Fig. 6: Activity diagram and graph of the environment, with
all the allowed routes and the relative probabilities
routes and that 6 of them have the probability value equal to
15% (obtained as P r(W B) P r(R1) P r(W AR) P r(BA)
P r(C)) while the others have the probability value equal to
1:5% (obtained as P r(W B) P r(E1) P r(W AR) P r(BA)
P r(C)).</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>VI. FUTURE WORKS</title>
      <p>This is an ongoing work in which an extension of the basic
elements of an agent-based model for pedestrian dynamics
modeling and simulation is presented. Next steps are related
to the inclusion of temporal duration of activities, in order to
model the time spending, an element necessary to build more
realistic and complex simulation. Another part of the work will
be devoted to the modeling activities for pedestrian groups.</p>
      <p>
        Moreover, an implementation of this model is necessary to
test the model: while the operational level is already been
developed [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], the work will be focued on the development
of decision processes of agents (according to activity diagrams
here presented) and the definition of all possible routes with
the relative probabilities in the beginning of the simulation.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Reicher</surname>
          </string-name>
          , “
          <article-title>The psychology of crowd dynamics,” Blackwell handbook of social psychology: Group processes</article-title>
          , pp.
          <fpage>182</fpage>
          -
          <lpage>208</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>G.</given-names>
            <surname>Gilbert</surname>
          </string-name>
          and
          <string-name>
            <given-names>K.</given-names>
            <surname>Troitzsch</surname>
          </string-name>
          ,
          <article-title>Simulation for the social scientist</article-title>
          .
          <source>Open Univ Pr</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>W.</given-names>
            <surname>Challenger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Clegg</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Robinson</surname>
          </string-name>
          , “
          <article-title>Understanding crowd behaviours: Guidance and lessons identified,” Technical Report prepared for UK Cabinet Office</article-title>
          , Emergency Planning College, University of Leeds,
          <source>Tech. Rep.</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <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="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Peacock</surname>
          </string-name>
          , E. Kuligowski, and
          <string-name>
            <given-names>J.</given-names>
            <surname>Averill</surname>
          </string-name>
          , Pedestrian and
          <string-name>
            <given-names>Evacuation</given-names>
            <surname>Dynamics</surname>
          </string-name>
          . Springer Verlag,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Helbing</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Molnar</surname>
          </string-name>
          , “
          <article-title>Social force model for pedestrian dynamics</article-title>
          ,”
          <string-name>
            <surname>Physical Review</surname>
            <given-names>E</given-names>
          </string-name>
          , vol.
          <volume>51</volume>
          , no.
          <issue>5</issue>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Schadschneider</surname>
          </string-name>
          , “
          <article-title>Cellular automaton approach to pedestrian dynamics-theory,” Pedestrian</article-title>
          and Evacuation Dynamics, pp.
          <fpage>75</fpage>
          -
          <lpage>85</lpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M. C.</given-names>
            <surname>Toyama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. L. C.</given-names>
            <surname>Bazzan</surname>
          </string-name>
          , and R. da Silva, “
          <article-title>An agent-based simulation of pedestrian dynamics: from lane formation to auditorium evacuation</article-title>
          ,” in AAMAS,
          <year>2006</year>
          , pp.
          <fpage>108</fpage>
          -
          <lpage>110</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>F.</given-names>
            <surname>Klu</surname>
          </string-name>
          <article-title>¨gl and</article-title>
          G. Rindsfu¨ser, “
          <article-title>Large-scale agent-based pedestrian simulation</article-title>
          ,” in MATES,
          <year>2007</year>
          , pp.
          <fpage>145</fpage>
          -
          <lpage>156</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>R.</given-names>
            <surname>Axtell</surname>
          </string-name>
          and
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Axtell</surname>
          </string-name>
          , “
          <article-title>Why agents? on the varied motivations for agent computing in the social sciences</article-title>
          ,” in Working Paper 17, Center on Social and Economic Dynamics, Brookings Institution,
          <year>2000</year>
          , p.
          <fpage>17</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A.</given-names>
            <surname>Schadschneider</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Klingsch</surname>
          </string-name>
          , H. Klu¨pfel, T. Kretz,
          <string-name>
            <given-names>C.</given-names>
            <surname>Rogsch</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Seyfried</surname>
          </string-name>
          , “
          <article-title>Evacuation dynamics: Empirical results, modeling and applications</article-title>
          ,” Arxiv preprint arXiv:
          <volume>0802</volume>
          .1620,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>P.</given-names>
            <surname>Gipps</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Marksjo</surname>
          </string-name>
          ¨, “
          <article-title>A micro-simulation model for pedestrian flows</article-title>
          ,
          <source>” Mathematics and Computers in Simulation</source>
          , vol.
          <volume>27</volume>
          , no.
          <issue>2-3</issue>
          , pp.
          <fpage>95</fpage>
          -
          <lpage>105</lpage>
          ,
          <year>1985</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>H.</given-names>
            <surname>Hamacher</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Tjandra</surname>
          </string-name>
          , “
          <article-title>Mathematical modelling of evacuation problems-a state of the art</article-title>
          ,
          <source>” Pedestrian and Evacuation Dynamics</source>
          , vol.
          <year>2002</year>
          , pp.
          <fpage>227</fpage>
          -
          <lpage>266</lpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>G.</given-names>
            <surname>Løva</surname>
          </string-name>
          <article-title>˚s, “Modeling and simulation of pedestrian traffic flow</article-title>
          ,
          <source>” Transportation Research Part B: Methodological</source>
          , vol.
          <volume>28</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>429</fpage>
          -
          <lpage>443</lpage>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>S.</given-names>
            <surname>Hoogendoorn</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Bovy</surname>
          </string-name>
          , “
          <article-title>Normative pedestrian behaviour theory and modelling,” in Transportation and Traffic Theory in the 21st Century</article-title>
          .
          <source>Proceedings of the 15th International Symposium on Transportation and Traffic Theory</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16] --, “
          <article-title>Pedestrian route-choice and activity scheduling theory and models</article-title>
          ,” Transportation Research Part B: Methodological, vol.
          <volume>38</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>169</fpage>
          -
          <lpage>190</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>J.</given-names>
            <surname>Dijkstra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Timmermans</surname>
          </string-name>
          , and B. de Vries, “
          <article-title>“modelling behavioral aspects of agents in simulating pedestrian movement”,”</article-title>
          <source>in Proceedings of CUPUM conference London, CD-ROM paper</source>
          , vol.
          <volume>63</volume>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>A.</given-names>
            <surname>Borgers</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.</given-names>
            <surname>Timmermans</surname>
          </string-name>
          , “
          <article-title>A model of pedestrian route choice and demand for retail facilities within inner-city shopping areas,” Geographical analysis</article-title>
          , vol.
          <volume>18</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>115</fpage>
          -
          <lpage>128</lpage>
          ,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19] --, “
          <article-title>Modelling pedestrian behaviour in downtown shopping areas</article-title>
          ,”
          <source>in Proceedings of CUPUM conference London CD-ROM paper</source>
          , vol.
          <volume>83</volume>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <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 id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>A.</given-names>
            <surname>Schadschneider</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kirchner</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Nishinari</surname>
          </string-name>
          , “
          <article-title>Ca approach to collective phenomena in pedestrian dynamics</article-title>
          ,”
          <source>in Proceedings of the 5th International Conference on Cellular Automata for Research and Industry, ser. ACRI '01</source>
          . London, UK, UK: Springer-Verlag,
          <year>2002</year>
          , pp.
          <fpage>239</fpage>
          -
          <lpage>248</lpage>
          . [Online]. Available: http://dl.acm.org/citation.cfm?id=
          <volume>647299</volume>
          .
          <fpage>723448</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>K.</given-names>
            <surname>Nishinari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kirchner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Namazi</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Schadschneider</surname>
          </string-name>
          , “
          <article-title>Extended floor field ca model for evacuation dynamics</article-title>
          ,”
          <source>Special Issue on Cellular Automata of IEICE Transactions on Information and Systems</source>
          , vol. E84- D,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>L.</given-names>
            <surname>Manenti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Manzoni</surname>
          </string-name>
          , G. Vizzari,
          <string-name>
            <given-names>K.</given-names>
            <surname>Ohtsuka</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Shimura</surname>
          </string-name>
          , “
          <article-title>An agent-based proxemic model for pedestrian and group dynamics: Motivations and first experiments,” in MABS, ser</article-title>
          . Lecture Notes in Computer Science, D. Villatoro,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sabater-Mir</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>J. S.</given-names>
            <surname>Sichman</surname>
          </string-name>
          , Eds., vol.
          <volume>7124</volume>
          . Springer,
          <year>2011</year>
          , pp.
          <fpage>74</fpage>
          -
          <lpage>89</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bonomi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Manenti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Manzoni</surname>
          </string-name>
          , and G. Vizzari, “Makksim:
          <article-title>Dealing with pedestrian groups in mas-based crowd simulation,” in WOA, ser</article-title>
          . CEUR Workshop Proceedings, G. Fortino,
          <string-name>
            <given-names>A.</given-names>
            <surname>Garro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Palopoli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Russo</surname>
          </string-name>
          , and G. Spezzano, Eds., vol.
          <volume>741</volume>
          . CEUR-WS.org,
          <year>2011</year>
          , pp.
          <fpage>166</fpage>
          -
          <lpage>170</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>