Document not found! Please try again

Dynamic Path Planning and Movement Control in ... - TU Clausthal

0 downloads 106 Views 2MB Size Report
completed as part of my master degree. .... Distance between two pedestrians (after [16], p.11) . . 57 ... calculate the
Master Thesis

Dynamic Path Planning and Movement Control in Pedestrian Simulation

submited by Fatema Tuj Johora Matriculation number: 3083340 Email: [email protected] Internet Technologies and Information Systems (ITIS) M.Sc. 6th Semester TU Clausthal Clausthal-Zellerfeld, Germany

First Examiner

:

Prof. Dr. Jörg P. Müller

Second Examiner

:

Prof. Dr. Sven Hartmann

Supervisor

:

Dipl.-Inf. Philipp Kraus

24.January. 2017

Fatema Tuj Johora: Dynamic Path Planning and Movement Control in Pedestrian Simulation, Master Thesis, © 24.January. 2017

D E C L A R AT I O N

I hereby declare that the thesis entitled "Dynamic Path Planning and Movement Control in Pedestrian Simulation ", describes my own work and has been used only the referenced sources. The thesis has not been submitted to other examining body in alike or similar format. Clausthal-Zellerfeld, 24.January. 2017

Fatema Tuj Johora

ABSTRACT

In pedestrian simulation, the movement of individual persons and of groups are simulated to predict their behavior in panic or normal situation. The analysis of pedestrian behavior is helpful for numerous important purposes such as to ensure their safety in large events, to control traffic or for urban planning. Realistically simulating pedestrian behavior is a challenging problem, due to the complexity of individual pedestrian behavior as well as the complexity of interactions of pedestrians with each other and with the environment. The aim of this study is to develop a model that can plan shortest paths for pedestrians and also controls their motion based on their individual generic or context-specific preferences and goals. In this thesis a modification of Jump Point Search (JPS), which is a popular path finding algorithm, is used to find the shortest path to a given target point or area. The movement of Pedestrian is governed by the attractive forces towards their target and points of interest perceived by them, the repulsive forces exerted by other pedestrians and static obstacles. A force model is developed based on the social force model of Dirk Helbing [1, 2, 3, 4] to calculate the introduced forces. The overall model works as a finite state machine with two states. In the first state, a shortest path to the destination is calculated. When pedestrians determine a path to follow, they enter the second state, in which they make moving decisions in a procedural way. Moreover, in case pedestrians deviate from their pre-computed path as a result of those calculated forces, they go back to the first state of the automaton for recalculating a path to the goal. The proofs of the completeness and optimality of the proposed path finding algorithm and the capability of the social force model to control the movement of pedestrians, are also presented.

v

ACKNOWLEDGEMENTS

In the beginning, I want to give many thanks to the selection committee of ITIS for giving me an opportunity to study this renowned master program. I received many help from the administration body, examination committee, exam registration office and also the professors related to the courses that I completed as part of my master degree. I feel very lucky to have Prof. Dr. Sven Hartmann as my mentor. I want to give a lot of thanks to him for helping me in every step of my master degree. I wish him a long and prosperous life. It is a huge opportunity for me to work with Prof. Dr. Jörg P. Müller, director of informatics department in TU Clausthal. He advised me a lot during my thesis and also helped me to set my future goal. He is an inspiration to me. I am eagerly thankful to him and want to wish him a healthy and prosperous life. I want to give a lot of thanks to my thesis supervisor Dipl.-Inf. Philipp Kraus, who guided my thesis works. He taught me many things, not only the related topics of my thesis work but also many strategies to become a computer scientist. He is very kind and friendly. In my opinion, he is the best supervisor ever. I want to thank him for his kind help and excellent cooperation. I want to thank our course coordinator Olivia Buber for her kind helps and friendly behaviors . I want to refer my classmates and friends for their all time supports and inspirations. The most importantly, I eagerly want to thank my parents and brothers for their unconditional love and support. I would not be able to come Germany for my higher study without their support. I am dedicating my thesis work to my parents.

vii

CONTENTS 1 introduction

1

2 background and preliminaries

5

2.1

Multi Agent Based Simulation . . . . . . . . . . . . . . . . . .

5

2.2

Behaviors of Pedestrian . . . . . . . . . . . . . . . . . . . . . .

8

2.3

Perception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.4

Path Finding Technology . . . . . . . . . . . . . . . . . . . . . . 11

2.5

Movement Control . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.6

2.5.1

Goal Attractive Force: . . . . . . . . . . . . . . . . . . . 17

2.5.2

Attraction Towards Interesting Points: . . . . . . . . . . 17

2.5.3

Repulsion from Obstacles: . . . . . . . . . . . . . . . . . 18

Finite-State Machine . . . . . . . . . . . . . . . . . . . . . . . . 19

3 state of the art 3.1

3.2

21

Path Finding Algorithms . . . . . . . . . . . . . . . . . . . . . . 22 3.1.1

A* Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 22

3.1.2

IDA* Algorithm . . . . . . . . . . . . . . . . . . . . . . . 26

3.1.3

JPS Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 31

3.1.4

Comparisons among Different Path Finding Algorithms: 35

Conventional Models for Movement Control . . . . . . . . . . 37 3.2.1

Steering Behaviors For Autonomous Characters . . . . 37

3.2.2

Social Force Model . . . . . . . . . . . . . . . . . . . . . 42

4 integrating dynamic path planning and movement control

49

4.1

Proposed Path Finding Algorithm . . . . . . . . . . . . . . . . 49

4.2

Movement Control using Social Force Model . . . . . . . . . . 56

4.3

4.2.1

Calculating Social Forces . . . . . . . . . . . . . . . . . 56

4.2.2

Implementation of Social Force Model . . . . . . . . . 58

Integrated Control Architecture . . . . . . . . . . . . . . . . . . 60

5 experimental studies

65

5.1

Evaluation Goals and Methodology . . . . . . . . . . . . . . . 65

5.2

Description of Experiments and Results . . . . . . . . . . . . . 65

5.3

5.2.1

JPSwSJP Algorithm . . . . . . . . . . . . . . . . . . . . . 66

5.2.2

Social Force Model . . . . . . . . . . . . . . . . . . . . . 71

Interpretation of Results . . . . . . . . . . . . . . . . . . . . . . 75

6 conclusion and future work 6.1

77

Achieved Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

ix

contents

6.2

Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

bibliography

79

x

LIST OF FIGURES

Figure 1.1

A logical model of pedestrian movement, here the gray pedestrian has a velocity v as an aggregation of the attraction force (a) towards his destination and the repulsive forces towards other pedestrians ( after [5], p.304) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Figure 2.1

An autonomous agent within its environment (after [6], p.29) . . . . . . . . . . . . . . . . . . . . . . . . .

Figure 2.2

3

6

A layered architecture of an intelligent agent (after [7], p.33) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

Figure 2.3

An abstract model of Multi-Agent System (after [8], p.6) 8

Figure 2.4

The three levels of pedestrian behavior(after [9],p.1) . 10

Figure 2.5

The process of Perception of an agent named self. The objects which are indicated by orange arrows, are perceptible, whereas other objects are out of its view range. The black arrow denotes its direction of movement ( after [10], p.52 ) . . . . . . . . . . . . . . . 11

Figure 2.6

The valid moves within Grid, Visibility Graph and Navigation Mesh map representation. The black arrows in grid representation show the straight moves, whereas the diagonal moves are colored in gray ( after [11], p.4 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Figure 2.7

Different graph representations of a single map ( after [11], p.5 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Figure 2.8

The execution of Dijkstra’s algorithm . . . . . . . . . . 16

Figure 2.9

Movement of a pedestrian based on different forces. Here, the black arrows denote repulsive forces, the blue arrow indicates the goal attractive force, the orange arrow denotes seeking force towards a point of interest and the green arrow denotes the moving direction as an aggregation of all these forces . . . . . 18

Figure 2.10

The finite state machine of a basic cleaning robot ( after [12], p.319 ) . . . . . . . . . . . . . . . . . . . . . . 19

Figure 3.1

Costs on the grid representation ( after [13], p.8 ) . . . 23

Figure 3.2

The execution of A* algorithm . . . . . . . . . . . . . . 25

Figure 3.3

A grid world to explain Iterative deepening A* algorithm 29

xi

List of Figures

Figure 3.4

The execution of IDA* algorithm . . . . . . . . . . . . . 30

Figure 3.5

Pruning nodes to get the normal neighbors of node x ( after [14], p.2 ) . . . . . . . . . . . . . . . . . . . . . . . 31

Figure 3.6

Pruning nodes to get the forced neighbors of node x ( after [14], p.2 ) . . . . . . . . . . . . . . . . . . . . . . . . 32

Figure 3.7

Straight and diagonal jump points of current node x . 33

Figure 3.8

The open list status of A* and JPS algorithms while finding a shortest path between two points in a identical situation . . . . . . . . . . . . . . . . . . . . . . . . 35

Figure 3.9

A comparative breakdown of total search time on three realistic video game benchmarks. Here, M.Time is the time needed to manipulate nodes on open or closed list. G.Time is the time required to generate successors nodes ( after [14], p.1 ) . . . . . . . . . . . . 35

Figure 3.10

Seek and Flee steering behaviors (after [15], p.8) . . . . 38

Figure 3.11

Arrival steering behavior (after [15], p.10) . . . . . . . . 39

Figure 3.12

Obstacle Avoidance steering behavior (after [15], p.11)

Figure 3.13

Unaligned Collision Avoidance steering behavior (af-

40

ter [15], p.14) . . . . . . . . . . . . . . . . . . . . . . . . 41 Figure 3.14

Path Following steering behavior (after [15], p.12) . . . 41

Figure 3.15

Form factor for anisotropic pedestrian behavior (after [16] p.12) . . . . . . . . . . . . . . . . . . . . . . . . . 44

Figure 3.16

Social Force Model for controlling the movement of a pedestrian (after [16], p.9 ) . . . . . . . . . . . . . . . . 46

Figure 4.1

Finding forced neighbors of a given grid node X in eight different cases . . . . . . . . . . . . . . . . . . . . 50

Figure 4.2

The execution of JPS with Static Jump Points(JPSwSJP) algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Figure 4.3

The implementation process of JPSwSJP Algorithm . . 55

Figure 4.4

Distance between two pedestrians (after [16], p.11) . . 57

Figure 4.5

The difference between two mathematical formulas to calculate the distance between a pedestrian’s current position and a line as boundary . . . . . . . . . . . . . 58

Figure 4.6

The implementation process of the numerical solution of the social force model . . . . . . . . . . . . . . . . . . 60

Figure 4.7

The architecture of the proposed system . . . . . . . . 61

Figure 4.8

Internal image of an agent with its environment, represents a pedestrian ( adapted from [10] )

Figure 5.1

. . . . . . . 63

All possible kinds of scenarios for checking available SJP nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . 67

xii

List of Figures

Figure 5.2

Finding a shortest path between two points using individually JPS and JPSwSJP algorithms in a identical situation. Here, JPS algorithm expanded one node extra than JPS with Static Jump Points algorithm . . . 68

Figure 5.3

Finding a shortest path between two points using individually JPS and JPSwSJP algorithms in a identical situation. Here, JPS and JPS with Static Jump Points algorithms found identical paths . . . . . . . . . . . . . 68

Figure 5.4

A comparison of the time required to find the optimal path for 450 agents in parallel at a time. Times are given in seconds. . . . . . . . . . . . . . . . . . . . . . . 69

Figure 5.5

Measuring the performance of JPSwSJP algorithm in terms of increasing load. Times are given in seconds. . 70

Figure 5.6

Visualizing the movement behaviors of pedestrians in a crowded environment . . . . . . . . . . . . . . . . . . 72

Figure 5.7

Visualizing the absolutes of the sums of all experienced repulsive potentials on the pedestrians from other pedestrians. Red color indicates the extreme force, thus the circle who touches another circle colored as red. . . . . . . . . . . . . . . . . . . . . . . . . . 73

Figure 5.8

A group of pedestrians are trying to pass a narrow door 74

Figure 5.9

Two oppositely directed groups of pedestrians walking through a narrow walkway . . . . . . . . . . . . . . 75

xiii

L I S T O F TA B L E S

Table 3.1

Comparing A*, Iterative deepening A* and Jump Point Search algorithms to find a suitable path finding algorithm for this thesis . . . . . . . . . . . . . . . . . . . 36

Table 5.1

Constant parameters of the pedestrian simulation

xiv

. . 71

1

INTRODUCTION

In pedestrian simulation, the movement of individuals and groups of pedes-

Dynamic Path Planning and

trians are simulated to anticipate their behavior in panic or normal situ-

Movement Control

ations. In the past two decades, pedestrian simulation has turned into a

in Pedestrian

very interesting research field, as it can provide suitable solutions for many

Simulation

challenging problems. The modeling and analysis of pedestrian behavior can be used to manage traffic, design and plan public transport stations, big buildings or shopping malls for urban development [1]. Most significantly, pedestrian simulation can be used for assuring pedestrians’ safety in any large event to avoid incidents like love parade crowd disaster in Germany, where 21 people died from suffocation [17]. The behavior of pedestrians can be modeled and simulated by three different approaches [10]: macroscopic model: Macroscopic models are only concerned with densities and flux rather than with the single entity. In this approach, the flows of pedestrians are assumed homologous with fluids or gases and modeled by using differential equations as molecular dynamics. microscopic model: In the microscopic model, the behavior of individuals is modeled with an assumption that interaction of each pedestrian with his/her surroundings will bring out the overall dynamic behaviors of crowd. Modeling pedestrians’ behavior using this approach has become possible, as the required microscopic properties such as positions, speed or velocities of the pedestrians are measurable [1]. mesoscopic model: The combination of macroscopic and microscopic models result mesoscopic models. As microscopic models work at the individual level, it can be the best choice to model the individual behavior, interaction regulations and preferences of pedestrians. Recently, multi agent-based models have become a frequently used approach in microscopic modeling of pedestrian dynamics [9], since these models can represent heterogeneous agent systems to suitably express both complex individual behavior and interaction. Therefore, this thesis performs microscopic simulation using multi agent-based model with the

1

introduction

aim to imitate the behavior of pedestrians, where agents represent individual pedestrians. The overall behavior of pedestrians can be distinguished in three different levels of behavior [18]: strategic level: At the strategic level, pedestrians prepare their abstract plan as a motivation of their overall movements [18]. As an example, a person is planning to take the train to go to XYZ city today. tactical level: At this level, pedestrians organize their activities, plan proper routes to accomplish their plan [18]. As example, a person plans to reach the train station today at 7 am, then buys one cup of coffee and finally takes the train at 7:20 am from platform 2. operational level: Pedestrians’ physical movement, the execution of their activities are handled at this level [18]. For example, a person is walking on the way to train station. To develop a comprehensive model of complex pedestrian behavior, the proper implementation of each level and also the accurate interactions among these levels are necessary. There are numerous approaches to handle individually strategical aspects, tactical decision-making (route planning and plan monitoring), and operational decision-making and execution, but it is not really clear how to integrate these levels. This thesis aims to fill this gap to a certain extent. This thesis focuses on both tactical and operational behavioral levels of pedestrians. The motivation is to model pedestrians’ individual behaviors on these two levels and also to properly manage the interactions between those levels. While the tactical level handles many perspectives of pedestrians’ behavior, this thesis only considers route planning. However, planning optimal paths for pedestrian simulation is a challenging problem as the environment is dynamic due to the dynamic nature of crowds; hence, path re-planning is often required. Moreover, simulating pedestrians’ motion is also very difficult, due to the complexity of their individual behaviors as well as the complexity of their rudimentary model of interactions. The above term "individual behavior" indicates unique preferences or behaviors of a pedestrian; for example, one person may like to walk and watch displayed posters, whereas another person may prefer to sit while both of them are waiting at a station for a train.

2

introduction

We illustrate the complexity of interaction behavior by the following example scenario: • Pedestrians strive to maintain a particular distance from unknown or barely known people and also from static obstacles like walls. • However, pedestrians prefer to get close or stay as a group with their known people like friends or family members. Figure 1.1 visualizes the interaction of a pedestrian with other pedestrians and also the determination of pedestrians to reach their destination.

Figure 1.1: A logical model of pedestrian movement, here the gray pedestrian has a velocity v as an aggregation of the attraction force (a) towards his destination and the repulsive forces towards other pedestrians ( after [5], p.304)

Therefore, a model is proposed and developed in this thesis, that can dynamically plan optimal path for pedestrians and also control their movements depending on their interaction regulations and individual behaviors. Here, the term optimal path means the shortest path in this thesis work. The structure of this thesis is as follows: first, the fundamental concepts and methods underlying the overall thesis work namely, the concepts of multi agent-based simulation, path finding, pedestrians and their behavioral level are introduced in Chapter 2. Then, several works related to this

3

introduction

thesis are described in Chapter 3. Moreover, some well known path finding algorithms and mobility models are also explained and compared in Chapter 3, to interpret which kind of optimizations are needed in this fields of studies. In Chapter 4, an optimized route planning algorithm to plan shortest path is developed. In addition, the implementation of social force model [1] to calculate the attracting forces towards attraction points and repulsive forces to obstacles or other pedestrians is explained in Chapter 4. The proposed control architecture to explain the overall model behavior by integrating path planning and movement control is also described in Section 4.3. In Chapter 5, the experimental findings are explained to justify the research work. Finally, the conclusion of the research work and some future extensions are presented in Chapter 6.

0 Executing the behavioral model of a system numerically using single computer or network of computers is called computer simulation [19].

4

BACKGROUND AND PRELIMINARIES

In this chapter, some concepts and definitions are presented which are essential for a better understanding of the thesis work. As mentioned in Chapter 1, this thesis performs Multi Agent Based Simulation, thus the detailed description of this model is given in sub-section 2.1. To model the behavior of pedestrian, it is necessary to get the detailed knowledge about it. Hence, the different levels of pedestrian behavior, the perception technique and movement behaviors of pedestrian are described in sub-section 2.2, sub-section 2.3 and sub-section 2.5 respectively. The concept of path finding is discussed in sub-section 2.4, to have a better understanding of the path finding algorithms whose are explained in Chapter 3, as the related works and also the algorithm which is developed in this thesis, to plan shortest paths for pedestrian. In sub-section 2.6, the concept of finite-state machine is explained as it can be helpful to understand our proposed integrated control architecture to handle the collaboration between two behavioral levels.

2.1

multi agent based simulation

Multi agent based simulation (MABS) is a microscopic paradigm for modeling and simulation of complex socio-technical systems. Unlike other computer-based simulation, in this criterion each entity of the simulation is modeled and implemented as agent [20]. To perform pedestrian simulation using MABS, each pedestrian can be modeled as an autonomous software agent. For example, in a computer-based shopping mall simulation, the virtual shopping mall is the environment and several software agents, who are walking through the environment represent pedestrians. The detailed descriptions of the autonomous agents and multi-agent system is given below to clear the concept of multi agent based simulation. autonomous agents:

An agent is any individual that can continu-

ously perceive its environment by sensors, make decisions based on their internal states and the perceived information and finally perform actions within it’s environment using effectors [21]. This process is known as SenseDecide-Act (SDA) cycle [6].

5

2 Dynamic Path Planning and Movement Control in Pedestrian Simulation

2.1 multi agent based simulation

Although the basic structure is same, there are different types of agents available. • A human agent, which can sense environment using his/her eyes, ears, skin, nose or touch and can use his/her hands, legs, mouth, and other body parts to act on his/her environment [21]. • A robotic agent can use cameras or laser range finders as its sensor and can act by various motors to perform its defined tasks [21]. • A software agent is a computational object that both perceives and reacts using encoded bit strings [21]. Figure 2.1 represents a conceptual image of a generic agent. Normally, an agent has continuous interaction with its environment. Usually environments are non-deterministic, hence same action may effect differently on environment. An agent has a set of actions to modify its environment. However for agent, in any specific situation, to perform the right action to satisfy its design objectives accurately, is a big challenge [6].

Figure 2.1: An autonomous agent within its environment (after [6], p.29)

There are numerous agent architectures to design intelligent agents. One of example for a hybrid agent architectures is Interrap [22]. It proposes a three layer architecture of an intelligent agent. cooperative planning layer: This layer enables explicit cooperation and coordination. local planning layer: This layer facilitates local tasks planning and goal-directed behavior of an agent depends both on it world model and mental model.

6

2.1 multi agent based simulation

behavior-based layer: In this layer, the reactive and procedural behavior of an agent are addressed based on it world model. Figure 2.2 represents the INTERRAP architecture. An intelligent agent, which is designed using the above layered architecture can be a good choice to represent each pedestrian, as each layer can handle specific behavior of pedestrian and the complex behavior can emerge as the integration of these layers. In this thesis, local planning layer instantiates the path planning behavior and behavior-based layer instantiates the movement control decisions of pedestrian. However, we choose a control architecture which is different from the one described by Mueller [22], see Section 4.3.

Figure 2.2: A layered architecture of an intelligent agent (after [7], p.33)

multi-agent systems:

A multi-agent system (MAS) is a programmed

model which constituted by a group of agents within an environment, where they jointly control their environment. In MAS, agents interact by cooperating, coordinating and negotiating with each other [6]. Individual agent can have complete or partial control over a specific portion of environment that is called their sphere of influence. Sometimes, agents sphere of influence may overlap and this may result collision among them that make their lives complicated [8]. Agents can percept complete or mostly partial information about the current state from their environment or other agents, make decision about which actions to apply based on their perception and respond through accomplishing selected actions [23].

7

2.2 behaviors of pedestrian

Figure 2.3: An abstract model of Multi-Agent System (after [8], p.6)

An agent in a multi-agent system has several important characteristics to follow [6]: autonomy: The agents are partially or fully self-dependent. local views: Normally, an agent has limited angle of view. decentralization: In MAS, no assigned agent has right to control all other agents otherwise it will became a monolithic system [24]. Multi-agent system is essential as individual agent is not always capable to handle complex systems. Multi-agent systems are used to simulate the real world for example, in computer games, traffic simulation or pedestrian simulation [23]. Some other popular applications of MAS are electronic commerce, manufacturing, robotics and telecommunications [25].

2.2

behaviors of pedestrian

Frequent similarities can be found in behaviors of pedestrians, even though sometimes they behave nearly chaotic [4]. As mentioned in Chapter 1, pedestrians overall behavior can be categorized into three categories:

8

2.2 behaviors of pedestrian

strategic level: Normally in the virtual world, the behavior of a pedestrian is conducted by his/her surroundings or local environment. However in the real world, people may organize his/her works even before entering their working environment. Hence, they prepare the general arrangement of their overall activities [26]. As an example, usually a passenger plans some basic tasks to do before he actually comes to the bus stand such as he needs to buy the ticket, then take a cup of coffee and finally head to the right platform. If the bus stand is previously known to the passenger, thus he/she would plan his route previously, otherwise he/she may follow the navigation signs within the bus stand [26]. This task is accomplished at the strategic behavioral level [26]. tactical level: The plans of pedestrians defined on a strategic level, may modify due to the changes in their local environment like sudden weather change, extreme crowd or traffic. Therefore in this level, they categorize and finalize their activities by re-examining the strategies defined on a strategic level and finally prepare corresponding routes to accomplish their finalized activities [26]. For example, a passenger would avoid other less important works such as buying tea or magazine to catch the train at right time, if he/she is already late. Another example can be the scenario that a traveler knows the train station very well, so he/she plans a shortest path to the platform when he/she is at home. However when he/she arrives at station, he/she requires to re-plan path as his preplanned path is unavailable because of some ongoing construction work [26]. operational level: At the operational level, pedestrians physically move along their predefined path from the tactical level to accomplish their activities. Therefore, they start interacting with their environment through perceiving information from it and also changing its states by their movements or activities. Moreover, they interact with other pedestrians and obstacles those come on their way. Sometimes they may need to change their predefined path to avoid collisions or because of their seeking force towards any exciting objects [26]. Figure 2.4 represents the above described three behavioral levels of pedestrians.

9

2.3 perception

Figure 2.4: The three levels of pedestrian behavior(after [9],p.1)

2.3

perception

As said in Section 2.1, agents perceive their environment to decide their next actions. Here, the term perception means sensing information from environment. As, human being can sense environment using their eyes, ears, skin, nose or touch. In this thesis, the vision of pedestrians is considered as their only sensor. They have an angle of view (AOV), the angular extent of the perceived world, that ranges from 1200 to 1800 [10] and they also cannot see any object that located much far from their position. A pedestrian can perceive other pedestrians, walls, shops or buildings those fall within their AOV. If agent can perceive all objects that captures within a defined AOV in the direction of their movement, in a limited distance, then they can also simulate human vision perception. In Figure 2.5, an agent (self) perceives its environment to know which object is captured within its angle of view and gets a wall and another agent as obstacle and the entrance of a shopping mall as a point of interest.

10

2.4 path finding technology

Figure 2.5: The process of Perception of an agent named self. The objects which are indicated by orange arrows, are perceptible, whereas other objects are out of its view range. The black arrow denotes its direction of movement ( after [10], p.52 )

2.4

path finding technology

Path finding is one of the core components of many important fields such as GPS, robotics, video games and also crowd simulation [27]. Path finding is planning the best route between two nodes in a graph [11]. In this research, it is the shortest path between the current and destination positions of a pedestrian, constituted by a set of positions that pedestrian should reach sequentially to reach their final destination. To find a path between two positions, several algorithms have been proposed. However, it is necessary to represent the path searching environment as a graph structure before performing any of these algorithms [12]. A simulation environment can be defined as a map. In addition, the representation of the map can be accomplished by dividing it into regions, where the regions are the nodes and connections between regions are the edges of the graph [12]. There are three possible ways to represent the map: grid representation: In Grid based representation, a map is divided into a lot of small cells. Some common shapes of the grid cells are square, rectangular, or any other type convex polygons that fit as a grid cell. A grid map with rectangular cells is known as tile map. Each cell of a grid map has an associated cost to indicate that it is passable or blocked, and this cost also defines the cost needed to move through

11

2.4 path finding technology

12

it, if passable. Normally, each cell is connected to its four neighboring cells, but it can be eight neighboring cells if diagonal neighbors are also take into consideration [11]. visibility graph: Visibility Graph based representation of a map contains a set of vertices and a set of edges. Where each edge is the connection between two vertices, which are visible to each other. In addition, edges in a visibility graph do not collide with any line segment that outlines any obstacle. If two required positions, start and goal, do not exists in the visibility graph, they have to be added before preforming any path finding algorithms [11]. navigation mesh: In Navigation Mesh based representation, the passable areas within a map are divided into a mesh of convex polygons [11]. Those polygons can be triangle as shown in Figure 2.7c. Polygons are connected to their neighboring polygons to make a traversable graph. The complexity of this representation depends on the complexity of the environment [11].

(a) Grid representation

(b) Visibility graph

(c) Navigation mesh

Figure 2.6: The valid moves within Grid, Visibility Graph and Navigation Mesh map representation. The black arrows in grid representation show the straight moves, whereas the diagonal moves are colored in gray ( after [11], p.4 )

In Figure 2.6, the valid moves within all possible types of map representations are depicted. Figure 2.7 shows three different graph representation of the same map. Path finding can be implemented in both static and dynamic environments. Finding path in a static environment is comparatively easier than

2.4 path finding technology

(a) Grid representation

(b) Visibility graph

(c) Navigation mesh

Figure 2.7: Different graph representations of a single map ( after [11], p.5 )

dynamic environment, as it does not require to re-plan path several times. Dijkstra’s algorithm is a well-known algorithm for the shortest path problem on a weighted, directed or undirected graph, where all edge weights are nonnegative [28]. However, it is not the right choice for path finding in pedestrian simulation. As in pedestrian simulation, pedestrians need to search an optimal path between two positions such as their current and destination position, whereas Dijkstra’s algorithm finds optimal path from a source position to all other positions, if path available. A* is the widely used algorithm to find the shortest path between two points and as Dijkstra’s algorithm is a simple form of A* algorithm, it has been explained here [12]. Hence, this explanation will help to better understand the concept of A* and some popular variants of A*, which are described in Chapter 3. dijkstra’s algorithm:

13

As said before, Dijkstra’s algorithm computes

shortest path from source to every other vertex. It uses a set S to maintain all visited vertices and a data structure P to store all non-visited vertices with their distance from the source vertex. Distance can be infinitive for any vertex, if the path from source vertex to that vertex is unknown and the distance of the source vertex is zero. The algorithm repeatedly selects the vertex u from P with the minimum estimate distance and adds u to S. Next, it computes distances of all non-visited neighbors of u from the source vertex and upgrades their distance if any neighbor inside P has higher distance than their newly calculated distance value. It also maintains the parent vertex of each visited vertex to construct the path by reverse iteration.

2.4 path finding technology

Algorithm 1: Dijkstra’s Algorithm(after [29], p.205 ) 1

Function PathFinding(graph(V, E, weight), source):

2

distance[v] ← ∞, parent[v] ← ∅ for every v ∈ V − source;

3

distance[source] ← 0, parent[source] ← null;

4

S ← ∅, P.update(source, 0);

5

P.update(v, ∞) for every v ∈ V − source ;

6

repeat

7

u ← P.extractMinDistance();

8

S.add(u);

9

foreach v ∈ neighbor(u) and v ∈ / S do if distance[u] + weight(u,v) < distance[v] then

10 11

distance[v] ← distance[u] + weight(u, v);

12

parent[v] ← u;

13

P.update(v, distance[v]);

14

until P.empty();

15

return PathConstruction(source, v, parent), distance[v] for every v ∈ V − source;

16

Function PathConstruction(source, v, parent):

17

pathStack.add(v);

18

repeat

19

pathStack.add(parent[v]);

20

v ← parent[v]

21

until v.isEqual(source);

22

return pathStack;

14

2.4 path finding technology

Every time, the distance of any neighbor vertex of u (v) is calculated by using the following formula: distance[v] ← distance[u] + weight(u, v) Where, distance[u] is the distance from source to vertex u and weight(u,v) denotes the weight of the edge that joints vertex u to v. The above description was about the general structure of the Dijkstra’s algorithm. However, Algorithm 1 shows each procedural steps of this algorithm. Lines 1 − 15 describes PathFinding() function, that creates the shortest path for all vertices from source vertex. Lines 2 − 3 initialize distance and parent values of all vertices. Lines 4 − 5 initialize the set S to empty set, add source vertex with distance 0 and all other vertices with distance ∞ to P. Every time through loop of lines 6 − 14, line 7 extracts the vertex u with minimum distance from P and line 8 adds it to set S. In addition, line 10 calculates the distance of each non-visited neighbor v of u and also compares the new value with its previous distance value. If new distance of v is smaller than its previous distance, algorithm executes lines 11 − 13 otherwise algorithm will jump to line 9 and continue with the next neighbor of u with lowest distance. This means algorithm only upgrades distance of any vertex if a better distance of that vertex is found. Lines 11 − 12 upgrade the distance and parent values of v. Then, line 13 upgrades P. As each vertex is added to P, extracted from P and also added to S exactly once, thus after |V|th iteration of the loop of lines 6 − 14, algorithm returns the shortest path from source to all other vertices in line 15. Lines 16 − 22 describe a helping function of PathFinding() to construct the shortest path from source to any vertex v ∈ V − source by reverse iteration. To simplify the concept of Dijkstra’s algorithm, Figure 2.8 is used to explain the entire task of it using an example. The given example graph has six vertices, where each vertex indicates a city and vertex A is chosen as the source. Now, it needs to find the shortest path to go from source city A to all other cities. Here, the number inside any vertex represents its distance[] value. The shaded vertices indicate the already visited vertices, pink vertices are the next visiting vertices and white vertices are non-visited vertices. As shown in Algorithm 1, the next visiting vertex is the one with lowest distance[]

15

2.4 path finding technology

(a)

(b)

(c)

(d)

(e)

(f)

(g)

Figure 2.8: The execution of Dijkstra’s algorithm. Each sub-figure denotes a state of the grid world during the execution of algorithm. The sub-figure (g) shows the final graph with the shortest path from source to all other vertices.

16

2.5 movement control

value in data structure P. Pink edges denote the successors of the currently explored vertex. The distance[] value of the successors of the currently expanding vertex is only modified, if the previous value is higher than the new calculated value. As example, in sub-figure 2.8e, node C has a successor E but it could not modify its distance value as the previous distance[E] = 6 is smaller than the new value 8. Blue edges in sub-figure 2.8g signify the shortest path. Such as, the shortest path between source A and vertex F is A→B→F with cost 6. In this research, the grid based representation of the map has been chosen as environment for path finding. The advantage of using a grid based map is that reconstruction of the environment is not necessary to absorb the changes in it [30].

2.5

movement control

The spontaneous movement of self-governing pedestrians around their environment, in a realistic way, are enabled through a combination of simple forces. These forces include the attractive force towards their goal, points of interest and known people, repulsive forces exerted by other pedestrians and static objects. These forces represent the diversity of individual pedestrian behaviors [10].

2.5.1

Goal Attractive Force:

Normally, pedestrians walk along the direct path towards their destination position from their start position within their environment. If they are not distracted by any interesting or repulsive object, they successfully reach their destination with a stable speed [1]. If somehow they deviate from their defined path, they go back to the path or calculate new direct path toward destination position.

2.5.2

Attraction Towards Interesting Points:

Pedestrians can be attracted by other people such as friends, colleagues or street artists and also by other objects like ice-cream shop, shopping mall or

17

2.5 movement control

beautiful architectures [1]. The extent of this attraction force depends on the distance between pedestrian and their point of interest, if the distance is short, the force will increase and vice versa. It also depends on the situation of pedestrian. For example, if a pedestrian has to reach his/her destination soon then he/she will not give much attention on street artists although he/she enjoys to watch their activities.

Figure 2.9: Movement of a pedestrian based on different forces. Here, the black arrows denote repulsive forces, the blue arrow indicates the goal attractive force, the orange arrow denotes seeking force towards a point of interest and the green arrow denotes the moving direction as an aggregation of all these forces

2.5.3

Repulsion from Obstacles:

Pedestrians maintain a certain distance to unknown people and obstacles like walls to avoid possible collisions. This distance is depended on their Personal space and it varies based on pedestrian’s situations or the environment. For example, this distance becomes smaller in extremely crowded environment or in panic situations [4].

18

2.6 finite-state machine

2.6

finite-state machine

A finite-state machine (FSM) or simply a state machine is a computational model with one or more states. At a time, this machine can have only one active state and it can transit from one state to another state based on some triggered conditions, which are known as transition. The currently active state is called current state [31]. FSMs are commonly used to design the work flow, which can be useful for organizing different behavioral levels of pedestrian. A graph can represent an FSM, where each node can denote single state and each edge with a label can indicate one transition with its triggered condition [31].

Figure 2.10: The finite state machine of a basic cleaning robot ( after [12], p.319 )

Figure 2.10 shows an finite state machine of a cleaning robot with three states. Here, each rectangle represents a state, the rectangle with black circle denotes the starting state and edges indicate the transitions. At the beginning, the robot is in Search state. It will be in this state until it sees trash. If that happens, it will transit to Head for trash state and remains there until it collects the trash. Then, it will go to Head for Compactor state to dispose the trash. Finally, it will go back to the Search state and continue the same transitions.

19

3

S TAT E O F T H E A R T

In last two decades, pedestrian simulation has got huge attention, as it can

Dynamic Path Planning and

provide useful solutions for many demanding problems such as, assuring

Movement Control

crowd safety. Planning the optimal path for pedestrian and controlling

in Pedestrian

their motion focusing on their individual behavior are two important and

Simulation

challenging problems in describing the behavior of pedestrians. A lot of research work has been performed in this field. The concept of steering behaviors, to model realistic movements of individual unit within its environment was introduced by Reynolds [15]. This model proposed different behavioral characteristics to support individual’s movement such as, goal seeking, goal arrival or collision avoidance behavior. The social force model of Dirk Helbing [1, 2, 3, 4] also concentrated on the movement of pedestrians. This model conducts the movement of pedestrian by combining different types of simple forces namely, pedestrian’s driving force, repulsive forces from walls, repulsive forces from other pedestrians and attractive forces towards any interesting point. The research work performed by Tsai-Yen Li and Hsu-Chi Chou planned the motion of robots in crowded environment [32]. Stephen J. Rymill and Neil A. Dodgson proposed an approach to model the motion behavior of crowds in real-time [33]. However, this work mainly focused on the visual perception and collision avoidance techniques of human being. Cherif Foudil, Djedi Noureddine, Cedric Sanza and Yves Duthen proposed a model that can plan path for crowds using A* as path finding algorithm and also supports collision avoidance for controlling their movements [34]. F. Cherif, and R. Chighoub presented the behavioral model of pedestrian’s movement considering their socio-psychological state [10].

21

3.1 path finding algorithms

As seen above, most of the previous research works only concentrated on motion control. Although, the proposed model of Cherif Foudil [34] implemented both path planning and a part of motion control that do not consider individual preferences of pedestrians. Hence, this thesis concentrates on planning shortest paths for pedestrians and also controlling their lifelike motion based on their both general and individual behaviors. To fulfill these research goals, an optimal path finding algorithm and a proper model to plan the motion of pedestrian are needed. Therefore, few well known path finding algorithms and mobility models are explained and compared to find the suitable one.

3.1

path finding algorithms

Several algorithms have been proposed to find the optimal path between two positions. A* is known as the main path finding algorithm, as A* is optimal, efficient, easy to implement and has huge scope for optimization [12]. Iterative deepening A* and Jump Point Search are two popular variants of A* algorithm 1 .

3.1.1

A* Algorithm

A* algorithm is an informed search algorithm [21], as it explores all possible paths to find the ones with the smallest cost. The algorithm starts from a specific node 2 , expanding 3 that node to get all immediate neighbor nodes, and then expanding the neighbor nodes to get their neighbors and so on, until it finds the target node. At each iteration, A* needs to choose one node to expand among all neighbor nodes, based on the estimated cost needs to go to the target node from the start node through each neighbor node. The evaluation function to estimate the cost is: f(x) = g(x) + h(x) where, g(x) denotes the needed cost to go from the start node to node x, h(x) is a heuristic that calculates the cost to get the goal node from node x and f(x) is the sum of the g(x) and h(x) values. There are many well known distance algorithms to calculate the h cost between two grid nodes such as Manhattan or Euclidean distance. 1 There are many variants of the A* algorithm including IDA* and JPS algorithm 2 Each grid cell is considered as a node 3 Expanding a node means discovering all of its immediate neighboring nodes

22

3.1 path finding algorithms

To perform the searching, A* requires two lists of nodes [34] • The open list, which contains the nodes those will expand next. • The closed list, which contains the already expanded nodes.

Figure 3.1: Costs on the grid representation ( after [13], p.8 )

Figure 3.1 shows the corresponding cost that is needed to go from one node to its neighboring nodes within the grid world 4 . The above description was about the general structure of the A* algorithm. Algorithm 2 shows each procedural step of this algorithm. Lines 1 - 20 describe PathFinding() function, that creates the shortest path from a start node to a goal node. Lines 2 - 5 initialize g, h, f costs and also the parent value of the start node. Line 6 initializes the closed list as empty list and add start node with its f value to the open list. Every time through loop of lines 7 - 19, line 8 extracts the node u with minimum f cost from open list. Line 9 checks the current node u, if u is the goal node then it returns the shortest path from start to goal node with total f cost in line 10, otherwise adds node u to closed list in line 11. In addition, line 12-18 calculates the g and f costs of each non-visited neighbor v of u and also compares the new value with its previous value, if any node is already exists in open list. It only upgrades f cost of any node if a better cost value of that node is found. This loop continues until the open list becomes empty. This algorithm returns failure if it does not find any path. Lines 21 - 28 describe a helping function of PathFinding() function to construct the shortest path from start to goal node by reverse iteration.

4 In this thesis, the grid based representation of the map has been chosen as environment for path finding.

23

3.1 path finding algorithms

Algorithm 2: A* Algorithm ( after [12], p.220 and [35]) 1

Function PathFinding(start, goal):

2

parent[start] ← null;

3

g[start] ← 0;

4

h[start] ← heuristicCost(start, goal);

5

f[start] ← g[start] + h[start];

6

closedList ← ∅, openList.update(start, f[start]);

7

repeat

8

u ← openList.extractMinF();

9

if u.isEqual(goal) then return PathConstruction(start,u,parent), f[u];

10 11

closedList.add(u);

12

foreach v ∈ neighbor[u] and v ∈ / closedList do

13

tempg [v] ← g[u] + cost(u, v);

14

tempf [v] ← tempg [v] + heuristicCost(v, goal);

15

if v ∈ / openList or f[v] > tempf [v] then

16

f[v] ← tempf [v];

17

parent[v] ← u;

18

openList.update(v, f[v]);

19

until openList.empty();

20

return failure;

21

Function PathConstruction(start, goal, parent):

22

pathStack.add(goal);

23

v ← goal;

24

repeat

25

pathStack.add(parent[v]);

26

v ← parent[v];

27

until v.isEqual(start);

28

return pathStack

24

3.1 path finding algorithms

(a)

(b)

(c)

(d)

(e)

Figure 3.2: The execution of A* algorithm. Each sub-figure denotes a state of the grid world during the execution of algorithm. The sub-figure 3.2e shows the final state of the given grid world with the shortest path from start node to goal node.

25

3.1 path finding algorithms

To simplify the concept of A* algorithm, Figure 3.2 is used to explain the entire task of it by using an example. Here, in each sub-figure black cells are obstacles, green cell is the start node, red cell is the goal node, yellow cells are the expanded nodes and white cells are all passable grid nodes. The number inside any grid cell is f cost of that cell and the direction arrows indicate its successor nodes. In each sub-figure, all white gird cells with number inside are the currently present nodes in the open list. As shown above, this algorithm chooses node with lowest f from open list as the next node to expand. As example, there are six nodes in the open list after completion of second iteration 3.2b and it chooses node (4, 4) to expand next, visualized in sub-figure 3.2c. As it can be seen, there are two grid nodes with the same lowest f in open list, thus it randomly chooses (4, 4) among the nodes. In sub-figure 3.2c, (4, 4) node has a successor (5, 3) but it could not modify its f value because the current value is smaller than the newly calculated f value. Sub-figure 3.2e shows the grid world with the shortest path from start to goal node. The resulted path is Start → (4, 4) → (3, 3) → (2, 2) → Goal with cost 4.8.

3.1.2

IDA* Algorithm

Iterative deepening A*(IDA*) is a well-known path finding algorithm. It is a variant of A* algorithm that eliminates its space complexity, but preserves solution optimality. Iterative deepening is a depth-limited searching technique, where the limit of the search depth

5

increases iteratively in a

procedural way until the target point is found [21]. In this algorithm, every iteration is a depth-first search with a given f cost as cut-off 6 . If any node exceeds the cut-off for that iteration, the search will stop to go more deep to the current path and will start with another immediate neighbor node of the current node, if any node left. Otherwise, a new search will start with a higher cost threshold in the next iteration [36]. 5 The search depth is depth of the node that has highest depth among all expanded nodes. Where, the depth of a node is the number of edges from that node to the start node. 6 Cut-off is the limit of search depth.

26

3.1 path finding algorithms

It calculates the f cost during each iteration, using the same formula as A*, f(x) = g(x) + h(x) At the first iteration, the cut-off value is the f(start) cost. Onwards, in each running iteration, the cost threshold is increased to the cost of the node with the lowest cost among all generated nodes that exceed cut-off value during the previous iteration. If the target node is reached and the calculated f cost of that node is equal or less than the current cut-off, the algorithm terminates immediately [36]. The above description was about the general structure of the IDA* algorithm. Algorithm 3 shows each procedural step of this algorithm. Lines 1 − 12 describe PathFinding() function, that creates the shortest path from a start node to a goal node. The initialization takes pale in lines 2 and 3. Every time through loop of lines 4 − 12, line 5 calls a helping function named DFS-CONTOUR() and stores the return values in t. DFS-CONTOUR() is a depth first search with a given cut-off that is described in lines 13 − 28. DFSCONTOUR() returns two values namely, parent array (t[0]) and minCutOff (t[1]). The parent array is always considered empty for those iterations where goal node are not found, whereas minCutOff contains the cut-off value for the next iteration. This algorithm continues iteratively until it finds the goal node or gets infinity as its next cut-off value. Lines from 29 to 36 describe another helping function of PathFinding() function to construct the shortest path from start to goal node by reverse iteration.

27

3.1 path finding algorithms

Algorithm 3: IDA* Algorithm ( after [21], p.107 ) 1

Function PathFinding(source, goal):

2

parent[source] ← null;

3

cutOff ← heuristicCost(source, goal);

4

repeat

5

t ← DFS-CONTOUR(source, 0, cutOff, goal);

6

if t[0] 6= ∅ then return PathConstruction(source,goal,parent), cutOff ;

7 8

if t[1] = ∞ then return failure;

9 10

parent[source] ← null;

11

cutOff ← t[1];

12 13

until cutOff 6= ∞; Function DFS-CONTOUR(node, g(node), cutOff, goal):

14

f(node) ← g(node) + heuristicCost(node, goal);

15

if f(node) > cutOff then

16

parent ← ∅;

17

return parent, f(node);

18 19

if node = goal then return parent, f(node);

20

minCutOff ← ∞;

21

foreach s ∈ neighbor(node) do

22

t ← DFS-CONTOUR(s, g(node) + cost(node, s), cutOff, goal);

23

if t[0] 6= ∅ then return parent, cutOff ;

24 25

if t[1] < minCutOff then

26

minCutOff ← t[1];

27

parent[s] ← node;

28

return parent, minCutOff ;

29

Function PathConstruction(source, goal, parent):

30

pathStack.add(goal);

31

v ← goal;

32

repeat

33

pathStack.add(parent[v]);

34

v ← parent[v];

35

until v = source;

36

return pathStack

28

3.1 path finding algorithms

Figure 3.3: A grid world to explain Iterative deepening A* algorithm

Figure 3.3 denotes a grid world that is used to explain the IDA* algorithm. Here, all black cells are the obstacles, green cell is the source node, red cell is the goal node and white cells are all passable grid nodes. A tree structure is used to simplify the concept of the algorithm, which is visualized in Figure 3.4. In this Figure, each tree node n is constituted by two values, the first value is its position and second one is its f(n) value. Each green node of the example tree denotes the cutoff value for the next iteration, which is the lowest cost among all costs that exceed the cutoff value of the current iteration. All red bordered nodes represent the nodes that beyond the cutoff value. The yellow node in sub-figure 3.4d denotes the goal node. Here, each sub-figure denotes an iteration step of this algorithm. The first iteration is shown in sub-figure 3.4a, where the cut-off value is 4.8 that is the heuristic distance between start and goal node. As seen in sub-figure 3.4b the cut-off value exceeds at the second depth, thus this algorithm does not go more deeper after that. The minimum f cost that exceeds the cut-off in this iteration is 5.4. Afterwards, the next iteration starts with cut-off 5.4. The algorithm continues next iterations in the same way. Finally it terminates in forth iteration 3.4d, as the goal is found with minimum cost value 6.2. Hence, the desired shortest path is: Source → (4, 1) → (3, 0) → (2, 1) → (1, 2) → Goal

29

3.1 path finding algorithms

(a) first iteration

(c) third iteration

(b) second iteration

(d) forth iteration

Figure 3.4: The execution of IDA* algorithm. Each sub-figure denotes a iteration step of this algorithm.

30

3.1 path finding algorithms

3.1.3

JPS Algorithm

Jump Point Search [37, 14, 38] is an uniform-cost, grid based path finding algorithm. It optimizes the A* algorithm by eliminating symmetric path problem and also expanding little amount of nodes rather than all possible nodes as A*. Jump Point Search (JPS) is the combination of A* algorithm with two sets of rules namely, pruning rules and jumping rules. pruning rules:

JPS chooses a single path among many equivalent

paths using the following pruning strategy: • If current node x can be reached through a straight move from its parent node p(x), then JPS prunes any neighbor node of x that can satisfy the following constraint: length(p(x), ..., n) − x) 6 length(p(x), x, n) • If x is diagonal move away from p(x), JPS prunes any neighbor of node x that satisfies the following constraint: length(p(x), ..., n) − x) < length(p(x), x, n) In Figure 3.5 and Figure 3.6, all shaded grid nodes are pruned as they satisfy the constraint, thus they can cause symmetric path. Moreover, black cells are obstacle and white cells are accepted neighbor nodes of current node x.

(a) Straight Pruning

(b) Diagonal Pruning

Figure 3.5: Pruning nodes to get the normal neighbors of node x ( after [14], p.2 ).

If current node does not have any neighbor those are obstacles, then the remaining nodes after applying pruning rules are called the natural neighbors of current node. As example in sub-figure 3.5a, no neighbor of

31

3.1 path finding algorithms

x is obstacle and JPS prunes its all neighbors except 2,3 and 5 number neighbors, thus these three nodes are its natural neighbors.

(a) Straight Pruning

(b) Diagonal Pruning

Figure 3.6: Pruning nodes to get the forced neighbors of node x ( after [14], p.2 ).

When any neighbor of current node is obstacle as in Figure 3.6, then any remaining node n after the application of pruning rules is the forced neighbor of current node, if it satisfies the following constraints: • n is not a natural neighbor of the current node x • length(p(x), x, n) < length(p(x), ..., n) - x) jumping rules:

JPS algorithm does not consider all non-pruned neigh-

bors of current node x as its successors. It continues moving in the direction of each non-pruned neighbor until it finds some specific nodes called jump points as the successors of x and adds them to the open list with assigned g-value. Each successor node y calculates the g-value using the following formula: g(y) = g(x) + dist(x, y) Any non-pruned neighbor y node of x, heading in a specific direction ~d, can be a jump point if y minimizes the number of steps k such that y = x + k~d and also satisfies one of the following constraints: • y is the goal node • y has at least one forced neighbor • If ~d is a diagonal move and z = y + ki d~i is a jump point from node y by satisfying constraint 1 or 2. Here, ki is a real number and d~i ∈ (d~1 , d~2 )

32

3.1 path finding algorithms

If JPS reaches an obstacle when searching for jump points in any specific direction, it deduces that further search in this direction will result dead end.

(a) Straight Jump Point

(b) Diagonal Jump Point

Figure 3.7: Straight and diagonal jump points of current node x. Here, each dashed direction arrow denotes the search for jump points that reached a dead end. Strong direction arrows indicate the searches that found successor nodes ( after [37], p.2 ).

In Figure 3.7a, a jump point y is found by satisfying constraint 2. As z is considered as a forced neighbor of node y by the definition of forced neighbor. Figure 3.7b shows another example of a jump point y that satisfies the third constraint. Here, node z can be reached with ki = 2 horizontal moves from y and it is a jump point of y by satisfying constrain 2. In this way, y is a jump point of x, as y satisfies constraint 3. Algorithm 4 shows each procedural step of finding individual’s jump point successors. The lines between 1-8 describe the IdentifySuccessors() function that finds successors for the current node x. In line 3, JPS applies pruning rules over the immediately adjacent neighbors of x to get all nonpruned neighbors. Every time through for loop of lines 4 − 7, it tries to find a jump point successor for x, using the helping function Jump(). It adds nothing to the successor list if it fails to find a jump point. This loop continues until the neighbors list of x becomes empty. Lines 9 − 21 describe the helping function Jump(). This function recursively tries to find a jump point of x in a specific direction by using the described definition of jump point. If the immediate neighbor n of x in that specific direction is not a jump point, it recurses and steps again in that direction with n as the new current node. It terminates the recursion if any

33

3.1 path finding algorithms

jump point or invalid node or obstacle is found in that direction. The lines from 17 to 20 indicate that it must fail to find any straight jump point before executing each diagonal step. Algorithm 4: JPS rules for Finding Successors (after [37], p.3 ) 1

Function IdentifySuccessor(x, p(x), start, goal):

2

successors[x] ← null;

3

neighbors[x] ← prune(x, p(x), neighbors[x]);

4

foreach v ∈ neighbors[x] do

5

v ← Jump(x, direction(x,v),start,goal);

6

if v 6= null then successors[x] ← v;

7 8 9

return successors[x]; Function Jump(x, direction, start, goal):

10

n ← step(x, direction);

11

if isObstacle(n) or isInvalid(n) then

12

return null;

13

if n = goal then

14

return n;

15

if ∃p ∈ neighbors[n] and isForced(p) then return n;

16 17

if isDiagonal(direction) then foreach i ∈ 1, 2 do

18

if Jump(n, directioni , start, goal) 6= null then

19

return n;

20

21

return Jump(n,direction,start,goal);

As mentioned before, JPS combines the given strategies in Algorithm 4 with A* algorithm to find the shortest path between the start node and goal node. Hence, in line 12 of A* Algorithm 2, JPS only considers the jump points of the extracted node u as its neighbors instead of considering all immediate nodes as neighbors. Here, these jump points are identified by Algorithm 4.

34

3.1 path finding algorithms

3.1.4

Comparisons among Different Path Finding Algorithms:

The following table 3.1 shows comparisons among A*, IDA* and JPS algorithms by using the complexity function of time and memory use, which is one of the most appropriate way to compare different path finding algorithms [39]. We also consider the path symmetry problem as a sub-criterion because it increases both time and memory use of the algorithm [40].

(a) A* Algorithm

(b) JPS algorithm

Figure 3.8: The open list status of A* and JPS algorithms while finding a shortest path between two points in a identical situation. Here, S denotes the start node and G denotes the goal node. Each dashed rectangle indicates a node situated on the open list ( after [38], p.133 )

Figure 3.9: A comparative breakdown of total search time on three realistic video game benchmarks. Here, M.Time is the time needed to manipulate nodes on open or closed list. G.Time is the time required to generate successors nodes ( after [14], p.1 )

35

3.1 path finding algorithms

36

Comparisons among Different Path Finding Algorithms Comparison

A* Algorithm

IDA* Algorithm

JPS Algorithm

An optimal solution

An optimal solution

An optimal solu-

Criteria Optimality

tion Path

Symmetry

Problem

A* path searching

As each iteration rithm is a depth first

problems by search- search

[36],

thus

path

symmetries by two simple

neighbor-

ing among all possi- only one path to the

pruning strategies,

ble paths to the solu- solution is explored

namely

tion, to find the best

rules and jumping

at a time.

path [14]. A*

pruning

rules [14].

algorithm

re- IDA* only needs

JPS has no memory

quires huge amount

limited space which

overheads,

of

memory,

as

is proportional to

only

the

whole

open

the longest path that

tain nodes in the

list

needs

to

be

saved [36]. In many applications,

Time Complexity

Algorithm

can occur symmet- step of IDA* Algo- eliminates ric path, as it solves

Space Complexity

JPS

as

stores

it cer-

it explores in each it- open list, which eration [21].

this

are

called

points

jump

[37].

Fig-

huge space require-

ure 3.8 shows the

ment of A* may

open

occur failure, such

of

an example is 15-

algorithms

puzzle [41].

an example.

list

A*

status

and

JPS using

The time complexity

The time complexity

Since JPS algorithm

of A* relies on its

of IDA* depends on

expands too less

heuristic. In worse

the number of itera- nodes as compared

case it can be which

O(bd ),

means

the

amount of expanded

tion take on. How- to

A*,

JPS

can

ever, mostly it is

speed up A* by an

similar to A* [21]

order of magnitude

nodes(b) is exponen-

and

more

[37].

tial, where the depth

Figure 3.9 shows a

of found shortest

comparative break-

path is the expo-

down based on the

nent [21]

utilization of time during search of A* and JPS algorithms.

Table 3.1: Comparing A*, Iterative deepening A* and Jump Point Search algorithms to find a suitable path finding algorithm for this thesis

3.2 conventional models for movement control

As shown in Table 3.1, JPS is an optimal solution for path finding problems and it also overcomes the path symmetric problem and memory overhead (space complexity) of A* whereas speeds up the performance (time complexity) of A*. An optimization of JPS algorithm (JPS+), to speed up the path searching performance of JPS using an offline pre-processing technique, was introduced by Daniel Harabor and Alban Grastien [14]. Here, Offline preprocessing stands for all the calculations which are performed before starting actual path finding. These calculations only perform once and need to be recalculated only if the grid map changes. JPS+ pre-calculates the first straight and diagonal jump points in eight possible directions for every traversable node on the grid map. It enhances the performance of JPS algorithm but also increases memory usages significantly. Hence, to take the advantage of offline pre-processing technique and also overcome the memory overhead of JPS+, an optimization of JPS algorithm is developed in this thesis for finding path between any given two points.

3.2

conventional models for movement control

There are many developed solutions available to model the movement of individual unit. Among those models, the social force model of Dirk Helbing [1, 2, 3, 4] and the proposed model by Reynolds [15] gained massive popularity.

3.2.1

Steering Behaviors For Autonomous Characters

Steering behaviors aim to enable the realistic and spontaneous movements of autonomous units around their world [15]. Steering behaviors are explained as the geometric computation of a vector which denotes the desired steering force. This steering behavioral model proposed different behavioral characteristics to support individual’s movement. Some basic steering behaviors that could help to accomplish Movement Control of Pedestrian sub-goal of this thesis has been discussed here. seek and flee behaviors:

Seek behavior of a character directs it

towards a specified position within their environment. This behavior keeps the velocity of the character radially aligned towards its target. The steering

37

3.2 conventional models for movement control

force vector which is indicating the seek behavior here, is calculated by the following formula: steering_force = desired_velocity − velocity

(3.1)

Here, desired_velocity is a vector, directed from the current position to the target position of the character. The length of this vector can be the maximum speed or the current speed of the character. desired_velocity = normalize(position − target) ∗ max_speed

Figure 3.10: Seek and Flee steering behaviors (after [15], p.8)

Flee behavior is the inverse of seek behavior, which steers a character away from a specified position within its environment. Hence in this case, the desired_velocity is calculated by subtracting the specified position from the character’s position. desired_velocity = normalize(specified_position − position) ∗ max_speed Here, the steering force vector is calculated using the same equation 3.1 as seek behavior. Figure 3.10 shows both seek and flee behaviors of a character. arrival steering behavior:

The seek behavior pushes a character

towards it’s target. However, seek behavior acts continuously even if the character reached its target and that makes it vibrating around the target. This can be prevented using arrival behavior instead of seek behavior. Arrival behavior does totally same as seek behavior until the character is far away from its target. This behavior forces the character to slow

38

3.2 conventional models for movement control

Figure 3.11: Arrival steering behavior (after [15], p.10)

down when it comes near to its target, to prevent it moving through the target. Here, the slowing radius is an important factor. When the character enters within this slowing radius, its desired velocity is linearly slowed down to zero. At other times, the length of its desired velocity is equal to its maximum speed. The following equations are formulated the above descriptions about the arrival behavior of a character.

target_offset = target − position distance = length(target_offset) ramped_speed = max_speed ∗ (distance/slowing_radius) clipped_speed = minimum(ramped_speed, max_speed) desired_velocity = (clipped_speed/distance) ∗ target_offset steering_force = desired_velocity − velocity obstacle and unaligned collision avoidance behaviors:

Ob-

stacle and unaligned collision avoidance behaviors assure the collision free movements of a character within its environment by avoiding both static and dynamic obstacles. Obstacle avoidance behavior only handles static obstacles and works similar to Flee behavior. However, it steers away the character only when an obstacle lies directly in front of the character with a small distance, whereas flee always pushes away the character from a specified location. Before calculating the steering force to avoid an obstacle, the obstacle needs to be identified. A line-sphere or line-circle ( 2D representation ) intersection is used to find the obstacles and the nearest one among all found obstacles

39

3.2 conventional models for movement control

from this intersection is considered as the most threatening. Each time obstacle avoidance behavior calculates the avoidance force only for the most threatening obstacle. As shown in Figure 3.12, line is a cylinder which starts from the current position of the character, lies along the direction vector of the character, has a diameter equal to the character’s diameter and its length depends on the character’s speed and agility. In addition, the sphere or circle denotes the obstacle.

Figure 3.12: Obstacle Avoidance steering behavior (after [15], p.11)

In Figure 3.12 among three obstacles, obstacle B and C intersect the cylinder. Here B is the nearest obstacle among B and C, thus it is the most threatening obstacle. Hence, obstacle avoidance behavior will make the character to steer away from B. An autonomous character can collide with other characters. Unaligned collision avoidance behavior acts to prevent the collision between two characters. In this behavior, potential collision is identified first, then a steering force is created to avoid the collision. To identify the collision, each character determines other characters’ future positions based on their current velocities to see if there is any possible collision. Each character has personal space, which is denoted by circle in Figure 3.13. If the personal space of two characters intersect with each other, then there is potential of future collision. Thus, this behavior will steer away the character from the collision site. In Figure 3.13, two characters detected a possible collision. Hence, they are changing their direction of movement to avoid this collision.

40

3.2 conventional models for movement control

Figure 3.13: Unaligned Collision Avoidance steering behavior (after [15], p.14)

path following behavior:

Path following behavior steers a char-

acter to move along any predefined path as example, walking through a corridor. In this behavior, a path is represented as spine with a radius. A spine can be represented as a sequence of line segments.

Figure 3.14: Path Following steering behavior (after [15], p.12)

During moving along a path, path following behavior of a character always calculates its next position. If the distance between the next position of this character and the nearest point on the path is greater than the path radius, then a steering force is created to push the character back towards the path. Otherwise this behavior returns a null force.

41

3.2 conventional models for movement control

Figure 3.14 shows a character which is following a predefined path. Here, the blue lines indicate that the character is following its path correctly and the red lines indicate that it goes away from its path. combining forces:

The above mentioned individual steering behav-

iors can be combined to represent the realistic movements of the autonomous characters. There are two different ways to combine the behaviors: • A character can switch from one behavior to another based on the environmental requirements. • Several behaviors can blend together to provide a complex behavior. The easiest way to do so is to calculate them individually and afterwards add them together to get the overall behavior. A corresponding priority can be assigned to each behavior, to deal with the problem of behaviors negating one another. movement decisions:

All the mentioned behavioral calculations are

performed to enable the spontaneous movements of individual character. Movement is the process of moving from one position to another. In this model, the next position of a character is calculated using the following rules: steering_force = truncate(steering_force, max_force) acceleration = steering_force/mass velocity = truncate(velocity + acceleration, max_speed) position = position + velocity Here, the steering force can be the sum of several behavioral forces or can represent only a single steering behavior. The steering force vector is truncated to the maximum force of the character. Afterwards acceleration, velocity and the next position of the character are computed respectively.

3.2.2

Social Force Model

In the social force model [1, 2, 3, 4, 16], the different motivations and interactions of a pedestrian are simply described by a equation of motion. This equation represents the temporal changes of the desired velocity of a pedestrian based on a vectorial quantity. This vector is the combination of all attractive and repulsive forces that a pedestrian faces at any specific time.

42

3.2 conventional models for movement control

The environment do not directly apply forces on pedestrian to act something, but the circumstance motivates the pedestrian to perform respective action. These motivations are known as social forces, as they denote the environmental impacts on the behavior of a pedestrian. The concept of social force model that determines the motion of a pedestrian is described below: acceleration:

Pedestrians always want to reach their point of des-

tination in a shortest possible way. Hence, the desired velocity w ~ α of a pedestrian α at any specific time (t) can be denoted by the following equation: w ~ α (t) = ~vo eα (t) α~

(3.2)

Here, ~vo eα (t) denote the desired speed and direction of α respecα and ~ tively. The desired direction ~eα (t) is calculated by: ~eα (t) =

~xn xα (t) α −~ k~xn − ~ xα (t)k α

(3.3)

Here, ~xn xα (t) are the next desired destination and current position α and ~ of pedestrian α respectively. The pedestrian α reaches his/her destination with velocity w ~ α (t) unless the movement of α distracts. If his/her velocity deviates then he/she accelerates to achieve his/her desired velocity again. This acceleration can be computed using the following formula: w ~ α (t) − ~vα (t) ~fo wα (t),~vα (t)) = α (~ τ

(3.4)

Here, ~vα (t) denotes the current velocity of α and τ is the certain relaxation time. repulsive forces from other pedestrians:

The movement of a

pedestrian can be affected by other pedestrians. Normally, pedestrian feels uneasy when he/she gets closer to any stranger, thus he/she maintains some distance from unknown pedestrians. This repulsive behavior of a pedestrian can be represented by the following force vector: ~fsoc ~ αβ (dαβ (t))

=

o Vαβ exp

 ~  −dαβ (t) n ~ αβ Fαβ σ

(3.5)

o denotes the interaction strength between two pedestrians and Here, Vαβ σ indicates the range of this repulsive interaction. ~dαβ (t) is the distance

between α and β at any specific time. n ~ αβ denotes the normalized vector

43

3.2 conventional models for movement control

which is pointing from pedestrian β to α and calculated by the following formula: n ~ αβ =

~xα (t) − ~xβ (t) k~xα (t) − ~xβ (t)k

(3.6)

Here, ~xα (t) and ~xβ (t) are the current positions of α and β respectively. In equation 3.5, Fαβ represents the anisotropic behavior of a pedestrian. The meaning of anisotropic behavior is that pedestrian is mostly influenced by other pedestrians or point of interests which captures within his/her angle of view. Moreover, the influence of others who are out of his/her angle of view is less. This behavior is formulated by the following equation: Fαβ = λα + (1 − λα )

1 + cos(ϕαβ ) 2

(3.7)

Here, λα is a constant and ϕαβ denotes the angle between the direction of motion of α and the vector pointing from α to β. That means cos(ϕαβ ) = n ~ βα .~eα (t). The value of λα needs to be less than 1 to reflect the anisotropic character of pedestrian α. The form factor for anisotropic pedestrian behavior with different λα values is shown in Figure 3.15.

Figure 3.15: Form factor for anisotropic pedestrian behavior (after [16] p.12)

The influence of β on α is greater when 00 6 ϕαβ 6 900 or 2700 6 ϕαβ 6 3600 and lower when 900 < ϕαβ < 2700 . repulsive forces from boundaries:

A pedestrian also maintains

distance from boundaries or any kind of static obstacles [42] to avoid the risk of being injured. Hence, he/she feels a repulsive force from each

44

3.2 conventional models for movement control

static obstacle on his/her way of moving, which can be represented by the following equation:   −~dαB (t) o ~fsoc ~ n ~ αB αB (dαB (t)) = UαB exp R

(3.8)

Here, Uo αB denotes the interaction strength between a boundary or obstao . R indicates the range cle B and pedestrians α, which is stronger than VαB of this repulsive interaction. ~dαB (t) is the distance between α and B at any

specific time. n ~ αB denotes the normalized vector which is pointing from B to α and can be calculated using the similar equation as depicted in 3.6. The environment usually contains more than one static obstacle, some of them or all obstacles may have influence on the motion of pedestrian. There are three possible ways to model which obstacles have influence on pedestrian: superposition: All static obstacles within the environment is considered. shortest distance: The static obstacles with the shortest distance to pedestrian are only taken into consideration. biggest impact: The static obstacles which have higher influence on pedestrian are only considered. attractive forces towards point of interests:

Pedestrian can

be attracted towards individual or general point of interests such as display posters, street artists or ice-cream shops. This attractive force ~fsoc can make αi

change his/her movement. It is time-dependent and linearly decreased to zero. It can be calculated using the same equation 3.5 as the repulsive force between two pedestrians ~fsoc . As compared to repulsive interactions, αβ

normally the interaction range of ~fsoc αi is larger and the strength of this interaction is smaller, negative and time-dependent. joining behavior:

Pedestrian wants to stay together as a group with

his/her family members, friends or tourist partners. This behavior can also be represented as a force vector, which is known as the joining behavior [43]. The joining behavior of pedestrian rejoins the group members, if by chance they have been separated by other pedestrians. This force vector can be calculated using the following formula: ~fsoc_att = Cαβ n ~ βα αβ

(3.9)

45

3.2 conventional models for movement control

Here, Cαβ denotes the interaction strength between pedestrian α and β. n ~ βα is the normalized vector pointing from α to β and calculated by the equation: n ~ βα =

~xβ (t) − ~xα (t) k~xβ (t) − ~xα (t)k

(3.10)

combing forces to control movement:

All of these social forces

are sum up together to get the overall motion behavior of a pedestrian. This combined force 3.11 describes the temporal change of pedestrian’s velocity based on the various influences he/she faces in reality. d~vα (t) ~o X ~soc X ~soc X ~soc X ~soc_att fαβ + ξ (3.11) fαi + fαB + fαβ + = fα + dt β

B

i

β

Here, ξ denotes the fluctuations of the normal motion behavior of a pedestrian. These fluctuations arise in many situations as example, the ambiguous scenario where two or more alternative behaviors are equivalent and the unexpected or deliberate deviations from the normal behavioral model of pedestrian’s motion. All of the forces do not need to be calculated in every situation such as, a pedestrian is walking alone thus he/she does not need to calculate the respective force of joining behavior.

Figure 3.16: Social Force Model for controlling the movement of a pedestrian (after [16], p.9 )

The social force model considers different behavioral perspective of pedestrian’s movement realistically. In Figure 3.16, the overall behavioral characteristics of pedestrian’s motion is represented using the social force model .

46

3.2 conventional models for movement control

The social force model and steering behavioral model both presented effective solutions to control the movements of individual autonomous units. However in this thesis, the social force model has been chosen for controlling the movement of pedestrian because of the following reasons: • Social force model specifically focused on pedestrian dynamics. • Social force model individually explained the goal_attractive force and attractive effects towards any point of interest of a pedestrian. On the other hand, steering behavioral model only explained the seek force of a character towards its goal.

47

I N T E G R AT I N G D Y N A M I C PAT H P L A N N I N G A N D

4

MOVEMENT CONTROL

The aim of this chapter is to propose a solution that can dynamically plan

Dynamic Path Planning and

optimal path for pedestrians and also control their movements depend-

Movement Control

ing on their interaction regulations and individual behavior in pedestrian

in Pedestrian

simulation. The proposed model can be divided into three sub-modules:

Simulation

path finding: An optimization of JPS algorithm is proposed to find the optimal path for pedestrian, see sub-section 4.1. movement control: In this thesis as mentioned in the previous Chapter 3, social force model is considered as the best choice for controlling pedestrian movements, see sub-section 4.2. cooperation between two behavioral levels: As path finding is handled at the tactical level and pedestrian’s motion is controlled at the operational level, the proper interaction between these two levels is needed to get the overall result, see sub-section 4.3. The implementation of the first two sub-modules of this proposed model, namely Path Finding and Movement Control are performed separately. The last sub-module to control the interaction between first and second modules is proposed but not implemented in this thesis. The implementation is described in this chapter and the results of this implementation are presented in Chapter 5.

4.1

proposed path finding algorithm

In this thesis, the proposed algorithm to plan the shortest path for pedestrian is named JPS with Static Jump Points(JPSwSJP). It is an uniform-cost, grid based path finding algorithm. It is a variant of A* and Jump Point Search (JPS) algorithms. JPSwSJP optimizes JPS using an offline pre-processing technique. Unlike JPS+ [14], the JPSwSJP algorithm pre-calculates only the surrounding jump 0 In this thesis, autonomous software agents are used to simulate pedestrians.

49

4.1 proposed path finding algorithm

points of the static obstacles on the grid map. As shown in Figure 4.1, the immediate top, bottom, left and right side nodes of each static obstacle can be evaluated as force neighbors. JPSwSJP pre-calculates all these possible forced neighbors 3.1.3 as jump points. As these jump points will be unchanged until the map changes, these are called static jump points.

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

Figure 4.1: Finding forced neighbors of a given grid node X in eight different cases. Here, node P(X) is the parent of node X. All nodes with J indicate the forced neighbors of X.

The path searching procedures of JPS and JPSwSJP algorithms are similar, except that during searching jump point successor in diagonal direction, JPSwSJP algorithm first checks the static jump points list before searching recursively in that direction as JPS 4. If it finds any static jump point in that direction, it considers this jump point as the successor of the currently expanding node.

50

4.1 proposed path finding algorithm

Before starting path finding, JPSwSJP algorithm filters the static jump points list using the given start and goal positions to get all static jump points within the search range. This helps to avoid checking irrelevant static jump points. The above description was about the general structure of the JPSwSJP algorithm. Algorithm 5 shows each procedural steps of JPSwSJP to find individual’s jump point successors. Lines 1 − 8 describe the IdentifySuccessors() function to find successors for the current node x, which is same as JPS algorithm. However, the helping function Jump() of IdentifySuccessors() function described in lines 9-24, is different from the Jump function of JPS Algorithm. Jump() function recursively tries to find a jump point of current node x in a specific direction. The steps of this algorithm till line 16 are same as JPS. During searching in diagonal direction ( Lines 17-23), if it does not find any straight jump points in both horizontal and vertical directions, it checks the static jump points list (Lines 21-23). If it finds any static jump point in that direction (Line 22), it returns this jump point as the successor of x (Line 23). Otherwise, it recurses and steps again in that direction with n as the new current node (Line 24). It terminates the recursion in any specific direction if any jump point or invalid node or obstacle is found in that direction. As the JPS algorithm, JPSwSJP also combines the given strategies in Algorithm 5 with the A* algorithm to find the shortest path between start node and goal node. To simplify the concept of JPSwSJP algorithm, Figure 4.2 is used to explain the entire task of it by using an example. Here in each sub-figure, all black cells are the obstacles, green cell is the start node, red cell is the goal node and white cells are all passable grid nodes. Each orange node indicates the already expanded node, whereas each blue node denotes the currently expanding node. Moreover, white nodes with SJ denote all pre-calculated static jump points and gray shaded nodes with SJ or J denote the jump point successors of the expanded nodes. Finally, the direction arrows of each expanded node indicate its jump point successors.

51

4.1 proposed path finding algorithm

Algorithm 5: JPSwSJP for Finding Successors 1

Function IdentifySuccessor(x, p(x), start, goal, staticJumpPoints):

2

successors[x] ← null;

3

neighbors[x] ← prune(x, p(x), neighbors[x]);

4

foreach v ∈ neighbors[x] do

5

v ← Jump(x, direction(x,v),start,goal,staticJumpPoints);

6

if v 6= null then

7 8 9

successors[x] ← v; return successors[x]; Function Jump(x, direction, start, goal, staticJumpPoints):

10

n ← step(x, direction);

11

if isObstacle(n) or isInvalid(n) then

12

return null;

13

if n = goal then

14

return n;

15 16 17 18 19

if ∃p ∈ neighbors[n] and isForced(p) then return n; if isDiagonal(direction) then foreach i ∈ 1, 2 do if Jump(n,directioni ,start,goal,staticJumpPoints) 6= null then

20 21 22

return n; foreach j ∈ staticJumpPoints do if isDiagonalJumpPoint(j) and directionj = direction then

23

24

return j; return Jump(n,direction,start,goal,staticJumpPoints);

52

4.1 proposed path finding algorithm

(a)

(b)

(c)

(d)

(e)

Figure 4.2: The execution of JPS with Static Jump Points(JPSwSJP) algorithm. Each sub-figure denotes a state of the grid world during the execution of this algorithm. The sub-figure (e) shows the final state of the given grid world with the shortest path from start node to goal node.

53

4.1 proposed path finding algorithm

Sub-figure 4.2a shows the state of the grid world before starting path searching. In sub-figure 4.2b, algorithm starts expanding the start node and gets one straight (3, 0) and one diagonal (3, 3) jump point successors. It stores both successors in the open list. Next, it chooses the node with lowest f cost from the open list, (3, 3) and starts expanding (3, 3) as shown in sub-figure 4.2c. Here, it gets two successors of the current node (3, 3). This process goes continuously until it gets goal nodes as the current node in sub-figure 4.2c. The shortest path from the start node to goal node is: Start → (3, 3) → (2, 4) → Goal Here, all nodes except node (3, 3) are found by satisfying the jumping constraints of JPS algorithm whereas, node (3, 3) is found from the static jump points list. Figure 5.2 and Figure 5.3 show how the path searching of JPS and JPSwSJP differs. implementation of jpswsjp:

Figure 4.3 shows the simple image of

the implementation process of JPSwSJP algorithm. Here, CEnvironment is the environment class that calls the route method of CJPSPlus class using its route method, to find the shortest path between two points. CJPSPlus class performs the path finding task with its two inner classes. CStaticJumpPoints class is for creating the static jump points for a given grid map.

54

4.1 proposed path finding algorithm

Figure 4.3: The implementation process of JPSwSJP Algorithm

Pedestrian gets a set of points as his/her desired path using JPSwSJP algorithm. Each point excepts the start and goal points is considered as the intermediate goal and pedestrian has to reach each intermediate goal sequentially to reach the final goal. When they come nearby to an intermediate goal, it considers that this point is reached, thus it continues walking towards the next intermediate goal or the goal point. The movement of pedestrian from his/her current position to next goal position is handled by the social force model, which is explained in the next section. Since social force model accommodate the dynamic behavior of pedestrian, JPSwSJP is the suitable choice for finding path despite it only works in static environment as JPS algorithm.

55

4.2 movement control using social force model

4.2

movement control using social force model

The social force model, described in Chapter 3.2.2 is simulated on a computer for many pedestrians approaching each other. To simulate the movement of a pedestrian, the all active repulsive and attractive forces on this pedestrian need to calculate. Although, different pedestrians might be influenced by different objects as they have their individual likes and dislikes. To preserve pedestrian’s individuality, this thesis introduces that each pedestrian can have two lists, one is the list of the type name of his/her liked items, labeled as like and another one control the type name of his/her disliked items, labeled as dislike. As example, one pedestrian likes coffee, thus coffee is the type and all coffee shops are the items under this type. Pedestrian can identify the obstacles and his/her point of interests among all found objects, by checking his/her lists. For simplicity, only the goal-attractive and repulsive forces of the pedestrian among all social forces are simulated in this thesis. As mentioned before, pedestrian gets repulsive forces from other pedestrians and boundaries.

4.2.1

Calculating Social Forces

To calculate all active repulsive forces on a pedestrian using the Equations 3.5 or 3.8, the distance between pedestrians or pedestrian to any boundary needs to calculate first. distance between two pedestrians:

Each pedestrian has a radius

to represent his/her occupied space. In this thesis, the actual distance (dαβ ) between two pedestrians is calculated by subtracting the summation of their radii (rαβ ) from the distance (d~xα~xβ ) between their current positions. This calculation is formulated in the following equations and visualized in Figure 4.4. rαβ = rα + rβ d~xα~xβ = k~xα (t) − ~xβ (t)k dαβ = d~xα~xβ − rαβ Here, ~xα (t) and ~xβ (t) are the current positions of pedestrian α and β respectively. In Figure 4.4, blue line indicates the actual distance between the pedestrians α and β.

56

4.2 movement control using social force model

Figure 4.4: Distance between two pedestrians (after [16], p.11)

distance between pedestrian and boundary:

Each boundary

is considered as a polygon, where polygon is a closed plane shape constituted by straight lines [44]. Hence, the distances from pedestrian’s current position to each line of each polygon need to calculate. Although only the lines with shortest distance and higher influence are considered for calculating repulsive forces. A line of the polygon is comprised by joining two vertices. In this thesis, two different mathematical formulas are applied to calculate the distance between a polygon line and pedestrian’s current position. The first formula gives the minimal perpendicular distance between a position and a line [45, 46], which is represented in the following equations: ~s = ~p + heˆ qp , (x~α − ~p)i ∗ eˆ qp d~xα B = k~s − ~xα k Here, p and q are the end points of the line. ~s denotes the perpendicular base point on the line and eˆ qp is the normalized vector directed from p to q. The second formula gives the distance between a point and the closest point between the two end points of the line, which is represented in the following equation [16].    k~p − x~α k, for hx~α − ~p, ~eqp i 6 0    d~xα B = k~p − x~α − h~eqp , ~p − x~α i~eqp k, for 0 < hx~α − ~p, ~eqp i 6 k~q − ~pk      k~q − x~α k, for k~q − ~pk 6 hx~α − ~p, ~eqp i (4.1) In both formulas, hx, yi indicates the scalar product of any two vectors ~x and ~y. The difference between these two formulas is visualized in Figure 4.5.

57

4.2 movement control using social force model

(a) First Formula: Perpendicular Distance

(b) Second Formula: Distance to Closest Point

Figure 4.5: The difference between two mathematical formulas to calculate the distance between a pedestrian’s current position and a line as boundary

As it can be seen from Figure 4.5 that the first formula 4.5a calculates the shortest distance between a point and a line, thus in this thesis the first one is considered as the right choice. The following equation 4.2 is used to check that if the perpendicular base point ~s is on the examined line segment or outside the line segment. If it results true for any polygon line then this line is considered as the candidate for further distance or force calculation, otherwise that line is skipped.   true, k~s − ~pk + k~s − ~qk = k~p − ~qk c= (4.2)  false, otherwise Although, the distance (d~xα B ) between pedestrian’s current position and the line is calculated from the first formula, but the actual distance (dαB ) from pedestrian to a line is calculated using the following equation. dαB = d~xα B − 2 ∗ rα

4.2.2

Implementation of Social Force Model

In social force model, the movement of a pedestrian is modeled by differential equation 3.11. Hence, this model needs to be solved numerically for simulating the movement of pedestrian. In this thesis, Euler’s method is used as the numerical solver.

58

4.2 movement control using social force model

euler intregation:

Euler method is a first order numerical solver [16]

for solving ordinary differential equations by approximating the result. It is the most basic and simple numerical integration method [47]. Euler’s method is defined by the following equation [48]: (4.3)

yn+1 = yn + hf(xn , yn )

with a initial value yo . Here, h denotes a positive increment in x and f(x, y) =

dy dx

is the derivative of y with respect to x. Generally, this equation calcu-

lates the next step value of y (yn+1 ) regarding its current step value (yn ). The following equations are represented the numerical solution of the social force model for conducting the movement of any pedestrian α, using Euler’s method 1 : f(frame,~vα ) = ~fo α+

X

~fsoc αβ +

β

X

~fsoc αB

B

~vαn+1 = ~vαn + hf(frame,~vαn ) f(frame, ~xα ) = ~vαn+1 ~xαn+1 = ~xαn + hf(frame, ~xαn ) 2 with given two initial values ~vo xo α and ~ α .

This solution is simulated on a computer for a large number of pedestrians. Figure 4.6 shows the simple image of the implementation process of the numerical solution of the social force model. Here, each object of the CPedestrian class represents single pedestrian with his/her basic properties such as position or velocity. CEnvironment is the environment class that calls the call method of CPedestrian class for each pedestrian using its update method, to perform the movements of all pedestrians. CForce class is used for performing all force calculations. CStatic class is used to create the static objects within the environment. CWall class is used to create a class data type named CWall to classify each straight line of a polygon ( boundary or static object). The parameters and results of the simulation are discussed in the next Chapter 5. 1 In this thesis, only the acceleration and repulsive effects of the pedestrian among all social forces are simulated. 2 In this thesis, the simulation is performed as frame by frame basis. Such as, the unit of measurement of the velocity vector is pixels per frame.

59

4.3 integrated control architecture

Figure 4.6: The implementation process of the numerical solution of the social force model

4.3

integrated control architecture

To handle the collaboration between tactical and operational behavioral levels, this paper proposes the representation of each level as a state of the finite state machine. Unlike InteRRaP architecture, here each state is directly connected to the perceiving input and action output (Horizontal layering), whereas in InteRRaP all behavioral levels are structured vertically and the sensory input arrives at the lowest layer [22]. As described in section 2.6 of Chapter 2, only one state among all states of a FSM can be active at a time. Hence, just one level between tactical and operational levels has control of the pedestrian at any specific time. Pedestrian can transit from one level to another based on their requirements. The decision of transition is made depend on the currently active state, perceiving input and transition conditions. If the perceptual input trigger any transition condition of the

60

4.3 integrated control architecture

current state then that transition will be conducted. However in InteRRaP, different levels are interacting by bottom-up activation (pass control to a higher layer) or top-down execution (use the provided facilities of the lower layer) [6]. The proposed control architecture of this thesis is presented in Figure 4.7.

Figure 4.7: The architecture of the proposed system

In Figure 4.7, calculation of the shortest path to goal is accomplished in the tactical state. Pedestrians moving decisions are handled by operational state. During the simulation, pedestrians can switch from one state to another multiple times, depending on their needs. In the beginning of the simulation or every time when pedestrians want to calculate their path, pedestrians stay at the tactical state until they prepare their landmarks. When pedestrians get route to follow, they switch to the operational state. If pedestrians deviate from their precalculated route because of the introduced avoidance or attraction forces, they again swap to the tactical state for recalculating the path. To make the decision of switching to the tactical state as the result of the deviation from precalculated route, pedestrians need to detect the deviation first. This deviation can be identified using the similar strategy as Path Following behavior of Steering behavioral model of Reynolds [15], described in paragraph 3.2.1 of Chapter 3, where a path is represented as a spine with a radius. In this behavior, if a character deviates from its predefined path, then it steers back on its path. However in this thesis, if a pedestrian deviates from his/her path then he/she comes back to the tactical state to create a new shortest path towards his/her destination.

61

4.3 integrated control architecture

As an example of this overall scenario, a person wants to catch train and also has desire to drink one cup of coffee. However, he/she does not have enough time to have coffee hence he/she plans a shortest path directly to the desired train platform. He/she starts walking along his planned path and sees a coffee shop on the way to platform. As he/she still has a desire to have coffee and shop is near thus he/she goes to take coffee. He/she again starts walking towards platform. As train station is a crowded place, he/she goes far from his planned path as a result of the exerted avoidance forces from other people. He/she feels that his planned route is not the shortest path anymore. Hence, he/she plans a new path and finally reaches platform by following his new route. In this example, path planning represents tactical behavioral level and movement control based on the person’s desires and dislikes represent the operation level behavior. Figure 4.8 shows the internal model of a pedestrian in this proposed system. Each sub-model in this model performs some specific tasks. Pedestrian perceives their environment according to their position and individuality in the perception sub-module. Based on the perceived information, the internal state and individual preferences of the pedestrian, Decision Making sub-model decides the next action to perform. This action can be behavioral level switching or changing positions or deciding next goal point or any movement-aware action. In the Action sub-module, pedestrian executes the decided action and this Sense-Decide-Act cycle continued until simulation terminates.

62

4.3 integrated control architecture

Figure 4.8: Internal image of an agent with its environment, represents a pedestrian ( adapted from [10] )

63

5

E X P E R I M E N TA L S T U D I E S

In this chapter, the result of our experiments are presented, discussed and interpreted to justify the thesis work.

Dynamic Path Planning and Movement Control in Pedestrian Simulation

5.1

evaluation goals and methodology

This thesis develops a model to dynamically plan optimal paths for pedestrians and also control their movements depending on their interaction regulations and individual behaviors. We perform several experiments to justify that our proposed model is efficient. For analyzing our results, the research goal can be divided into the following questions: • Is JPSwSJP complete (find solution if exist) and plans shortest paths by optimizing JPS algorithm? How it optimizes JPS algorithm? How JPSwSJP performs with increased number of path planning requests in parallel? • Can the social force model of Helbing [1, 2, 3, 4] control the movement of pedestrians by satisfying their dynamic behaviors? • How to integrate the path planning and movement control behaviors of pedestrian in a desirable way? Hence, to justify our model completely, the above three questions need to be answered. To answer these questions, we perform two computer simulations separately, one for performing experimentation on JPSwSJP algorithm and another one to experiment the force model.

5.2

description of experiments and results

Both simulation based on JPSwSJP algorithm and social force model are implemented using programming language Java under an Intelr Core™i5 processor with 3 GB RAM.

65

5.2 description of experiments and results

JPSwSJP Algorithm

5.2.1

Like JPS, JPSwSJP also finds shortest paths by expanding jump point nodes instead of expanding a large amount of nodes as A*. In paper [37], Harabor and Grastien proved that the optimal shortest path (if exists) between any two positions in a grid map, can be found by only expanding jump point during search. As stated in section 4.2 of Chapter 4, the JPSwSJP algorithm optimizes the JPS algorithm by pre-calculating the surrounding jump points of all static obstacles (static jump points) on the given grid map. Hence in the following paragraph 5.2.1.1, we only prove that the extension of the pre-processing technique with JPS maintains the optimality and completeness of JPS. The properties of JPSwSJP algorithm which make it perform better than JPS in terms of needed time to find path, is discussed in sub-section 5.2.1.2, but the results of the experiments are shown and discussed in sub-section 5.2.1.3. 5.2.1.1

Optimality of JPSwSJP

The only difference between JPS and JPSwSJP is that during searching successor of current node in diagonal direction, JPSwSJP checks the list of static jump points (SJPs) before searching recursively in that direction as JPS. The proof of this extension can be derived by proving the following two properties: current node and its sjp successor should be aligned: An optimal shortest path can be divided into a series of adjacent segments (sub-path). As proved in JPS algorithm, all moves of each sub-path should involve traveling in the same direction. Hence, the line between current node and its SJP successor should be diagonally aligned. As shown in Line 22, Algorithm 5, JPSwSJP only choose the SJP which is diagonally aligned from the current node. no path segments collide with obstacles: Figure 5.1 presents all possible kinds of scenarios of checking available SJP nodes within the previously calculated list of SJPs. In both sub-figures of Figure 5.1, there are two SJPs in each diagonal direction 1 . For example, if JPSwSJP searches for next successor of S1 in the bottom-right direction, it gets (1,1) and (3,3) nodes or searches from S to the top-right direction, it gets (3,3) and (2,4) nodes in the list of SJPs. JPSwSJP always considers (1,1) as the successor of S1 instead of (3,3) because 1 There can be more SJPs, for simplicity we used small grid map.

66

5.2 description of experiments and results

the line between S1 and (3,3) collides with an obstacle. In addition, between (3,3) and (2,4), JPSwSJP always considers (2,4) as the successor of S because it avoids unnecessary expanding of (3,3) node (here, G2 is the goal node).

(a)

(b)

Figure 5.1: All possible kinds of scenarios for checking available SJP nodes. Here S1, S2 and S are source nodes, whereas G1 and G2 are goal nodes.

As it is clear from the above descriptions in 5.2.1.1 that the extension of the pre-processing technique in JPSwSJP, preserves the optimality and completeness of JPS. Therefore, it can be said that JPSwSJP always finds optimal shortest paths. 5.2.1.2

Applied Techniques to Optimize JPS:

JPSwSJP optimizes the JPS algorithm by taking less time than JPS to find shortest paths. It becomes possible because JPSwSJP uses an offline preprocessing technique, creates less or equal jump point successors than JPS and also it expands less or equal nodes to find the goal node. As example in Figure 5.2 and Figure 5.3, both algorithms find the same optimal shortest path for two given problems but JPSwSJP expands less nodes and creates less jump point nodes than JPS in Figure 5.2 and Figure 5.3 respectively. In Figure 5.2 and Figure 5.3, all gray shaded nodes with SJ or J indicate the jump point successors of the expanded nodes. The direction arrows indicate the shortest path between start and goal nodes.

67

5.2 description of experiments and results

(a) JPS

(b) JPS with Static Jump Points

Figure 5.2: Finding a shortest path between two points using JPS and JPSwSJP algorithms individually in a identical situation. Here, JPS algorithm expanded one node extra than JPSwSJP. However, both algorithms found optimal solutions.

(a) JPS

(b) JPS with Static Jump Points

Figure 5.3: Finding a shortest path between two points using JPS and JPSwSJP algorithms individually in a identical situation. Here, JPS and JPS with Static Jump Points algorithms found identical paths although JPS algorithm needed to create more jump points( J ) to find the optimal solution.

68

5.2 description of experiments and results

5.2.1.3

Performance Test

A grid-based map with 250 × 250 cells is used as the environment for performing path planning using JPSwSJP Algorithm. Two different tests are conducted to measure the performance of the JPSwSJP algorithm in terms of the following metrics: speedup: The relative improvement to the needed time to solve a given problem. stress testing: To test response of the algorithm with increased number of path planning requests in parallel. In both tests, we simply assign the start position to agents randomly but each agent receives the same destination position. As we selected the starting point randomly, it may have an influence on performance of the algorithms. In this case, our assumption was that, in each time while random selection of start points, some agents may start from near the goal and others may start from farther, even though, every agent will change their positions, the end scenario of the starting positions will be almost the same. Moreover, the 40 times visual representation of the starting points of the agents, support our assumption.

Figure 5.4: A comparison of the time required to find the optimal path for 450 agents in parallel at a time. Times are given in seconds.

69

5.2 description of experiments and results

If there is no obstacle between start and destination positions of an agent, then JPSwSJP performs exactly as the JPS algorithm does, because if there is no obstacle, there is also no static jump point. Otherwise, the JPSwSJP algorithm performs better than JPS. The results of the first test prove this statement. In the first test, both JPS and JPSwSJP algorithms find the optimal shortest path for 450 agents in parallel at a time. Both algorithm This test is performed 40 times. The Figure 5.4 shows the results of this test. The JPS algorithm takes average 8.225 seconds to find paths for 450 agents. On the other hand, JPSwSJP takes average 7.75 seconds. Hence in average, JPSwSJP actually takes less time than JPS. In the second test, the number of agents who runs the JPSwSJP algorithm in parallel is increased, to see how this increment affects the performance of JPSwSJP algorithm. The following images show the results of this test.

Figure 5.5: Measuring the performance of JPSwSJP algorithm in terms of increasing load. Times are given in seconds.

The JPSwSJP algorithm takes average 10.39 seconds to find path for 1500 agents, whereas it takes average 7.99 seconds to find path for 450 agents, in parallel at a time. Hence, the running time of JPSwSJP is increased by 2.4 seconds, because of the increment of the number of agents by 1050.

70

5.2 description of experiments and results

5.2.2

71

Social Force Model

As descried in the previous chapter in sub-section 4.2.2, the movements of pedestrians are simulated based on their acceleration, the repulsive effects with other pedestrians and the interactions with boundaries. The calculation of this forces depends on some parameters such as maximum speed or different interaction strengths. The applied values of this parameters in the performed simulation are discussed below. parameter: vo

As stated by Helbing [1], the desired speed of pedestrians

can be modeled as Gaussian distribution with a mean = 1.34 m/s and

standard deviation = 0.26 m/s. In this thesis, same values are used but with pixels/frame as the unit of measurement. The maximum speed of pedestrians is set to 2.5 pixels/frame. The interaction strength and range among pedestrians are also set same as mentioned by Helbing [1]. However, the interaction strength between pedestrian and boundary is set differently such that it prevents the pedestrian to steer too far from the boundary and also to get too close to the boundary. This value is mentioned by Apel [16]. All applied parameters in the simulation are outlined in Table 5.1.

Parameter

Symbol

mean of desired speed

hvo i √ θ

1.34 pixels/frame

maximum speed

vmax

2.5 pixels/frame

interaction strength pedestrians

o Vαβ

Equation 3.5

2.1

interaction range pedestrians

σ

Equation 3.5

0.3 pixels

anisotropic_character

λα

Equation 3.7

0.2 [16]

interaction strength boundaries

Uo αB

Equation 3.8

5.1

interaction range boundaries

R

Equation 3.8

0.2 pixels

radius of pedestrians

r

standard deviation of desired

Equation

Value

0.26 pixels/frame

speed

5 pixels

Table 5.1: Constant parameters of the pedestrian simulation

In this thesis, the movement behavior of pedestrians conducting by the social force model, is examined in three different scenarios. In all scenar-

5.2 description of experiments and results

ios, the driving force (acceleration) of each pedestrian, all active repulsive forces on this pedestrian which are exerted from the boundaries and other pedestrians, are considered. In the first scenario, a test is performed to check pedestrian’s behaviors in a crowded environment. In this simulation, 200 pedestrians enter a room at random positions. Each pedestrian has given a set of intermediate goal points and a goal point as his/her planned path. The snapshots of this simulation are shown in Figure 5.6, which visualize how each pedestrian reaches his/her destination by avoiding collisions with other pedestrians and obeying his/her planned path.

(a)

(b)

(c)

(d)

Figure 5.6: Visualizing the movement behaviors of pedestrians in a crowded environment. Here, each circle represents a pedestrian.

72

5.2 description of experiments and results

As mentioned before 3.2.2, pedestrians experience repulsive forces when they come closer to other pedestrians, which steer them away from each other. This repulsive force decreases when they go far from each other. Figure 5.7 visualizes the repulsive potentials of the pedestrians. Here, each circle represents a pedestrian and the colors of the circles are a measure for their currently experienced repulsive forces.

Figure 5.7: Visualizing the absolutes of the sums of all experienced repulsive potentials on the pedestrians from other pedestrians. Red color indicates the extreme force, thus the circle who touches another circle colored as red.

73

5.2 description of experiments and results

The second test is performed to simulate the situation when a group of pedestrians try to pass a narrow door. The snapshots of this simulation are shown in Figure 5.8, which visualizes that pedestrians pass the door sequentially without creating any collision.

(a)

(c)

(b)

(d)

Figure 5.8: A group of pedestrians are trying to pass a narrow door. Here, each circle represents a pedestrian.

74

5.3 interpretation of results

In the third scenario, two groups of pedestrians enter a narrow walkway at random positions. This two groups are directed opposite to each other. The snapshots of this simulation are shown in Figure 5.9, where the groups of pedestrians successfully cross each other within this narrow walkway.

(a)

(b)

(c)

(d)

Figure 5.9: Two oppositely directed groups of pedestrians walking through a narrow walkway. Here, each circle represents a pedestrian.

5.3

interpretation of results

From the above experiment in 5.2.1.3, it is clear that the performance of JPSwSJP algorithm is better than JPS algorithm and it also performs significantly good in terms of increased number of path finding requests. The results of the experiments on social force model in 5.2.2 verify that this force model can suitably accommodate the dynamic behavior of pedestrian. Therefore, first two research questions of this thesis which are given in the

75

5.3 interpretation of results

section 5.1 are answered. Now, it can be said that each individual state of our proposed integrated architecture works ideally. To answer our third research question, we explain that our proposed integrated control architecture can integrate the path planning and movement control behaviors of pedestrian properly, in terms of the following metrics 2 : correctness: JPSwSJP always plans optimal shortest path as proved in 5.2.1.1 and the force model always implement that plan correctly as verified in 5.2.2. adaptivity and robustness: As described in section 4.3, in our proposed model, if a pedestrian deviates from his/her pre-calculated path, he/she adapts the deviation, re-plans his/her path and starts to follow the newly planned path. efficiency: The proposed path planning algorithm is very time efficient. The social force model efficiently enables pedestrians to move along their planned path as the result of their goal attractive force. As stated in section 4.3, path is represented as a spine with a radius in this thesis, thus pedestrians strictly follow their path.

2 This architecture is proposed but did not implemented

76

CONCLUSION AND FUTURE WORK

In the previous chapters, the importance of pedestrian simulation, its vari-

6 Dynamic Path Planning and

ous applications, state of the art and the contribution of this thesis work in

Movement Control

this field have been explained. This chapter summarizes the achieved goals

in Pedestrian

of this research work and discusses the future implementations that could

Simulation

be accomplished.

6.1

achieved goals

As mentioned in the previous chapters, the overall behavior of a pedestrian can be categorized into three different levels. This thesis focused on the tactical (only path planning) and operational (motion control) behavioral levels of pedestrians. The main goal of this thesis was to model the behaviors of pedestrians on these two levels and to control the coordinations between those levels. To fulfill our research goal, an optimal path finding algorithm, a proper model to plan the motion of pedestrian and an integrated control structure to control the interactions between these levels were needed. In Chapter 4, to achieve our research goal, we developed an algorithm that fulfills the route planning behavior of pedestrians. In addition, we implemented the social force model of Helbing [1, 2, 3, 4], which conducts the movement of pedestrians by considering their all potential forces. Finally, we proposed a integrated model that enables the proper interactions between these two levels. In Chapter 5, two experiments are performed on the proposed path finding algorithm (JPSwSJP) to justify its performance. Separately, three experiments are conducted to justify the usefulness of social force model as the motion control model for pedestrians. Nevertheless, this thesis work still have some limitations. Few ideas to overcome these limitations are given in the next section 6.2 as future works.

77

6.2 future works

6.2

future works

Some further implementations could rise from this thesis, which are listed bellow: • As said before, the proposed model is divided into three sub-models. Two of them are implemented and tested. However, the third submodule which combines the results from the first two sub-models did not implemented. This implementation could perform in future. • In this thesis, only the repulsive effects of the pedestrians are simulated. The other potentials of pedestrian behavior can be simulated in future to see the full picture. • As the behavior of pedestrian is classified into three behavioral levels, a work could be done based on all of these levels. However, this thesis only considers one tactical and all operational levels behaviors of pedestrians. • In this thesis, pedestrians are the only dynamic objects in the environment. This work could be extended by getting other dynamic objects such as cars.

78

BIBLIOGRAPHY

[1] Dirk Helbing and Peter Molnar. Social force model for pedestrian dynamics. Physical review E, 51(5):4282, 1995. [2] Dirk Helbing, Lubos Buzna, Anders Johansson, and Torsten Werner. Self-organized pedestrian crowd dynamics: Experiments, simulations, and design solutions. Transportation science, 39(1):1–24, 2005. [3] Anders Johansson, Dirk Helbing, and Pradyumn K Shukla. Specification of a microscopic pedestrian model by evolutionary adjustment to video tracking data [c]. Advances in Complex System© World Scientific Publishing Company, 25, 2008. [4] Dirk Helbing, Illes J Farkas, Peter Molnar, and Tamás Vicsek. Simulation of pedestrian crowds in normal and evacuation situations. Pedestrian and evacuation dynamics, 21(2):21–58, 2002. [5] Stefania Bandini, Sara Manzoni, and Giuseppe Vizzari. Crowd behavior modeling: From cellular automata to multi-agent systems. Multi-Agent Systems: Simulation and Applications. CRC Press, Boca Raton, pages 204– 230, 2009. [6] Michael Wooldridge. An Introduction to Multiagent Systems 2e. John Wiley & Sons, May 2009. [7] Lecture on agent architectures: Hybrid agents.

https://goo.gl/

EHd9h6, accessed: 2017-05-01 (archived by WebCite® at ).

[8] Rafael H Bordini, Jomi Fred Hübner, and Michael Wooldridge. Programming multi-agent systems in AgentSpeak using Jason, volume 8. John Wiley & Sons, 2007. [9] Lorenza Manenti, Sara Manzoni, Giuseppe Vizzari, and Jan Dijkstra. Towards modeling activity scheduling in an agent-based model for pedestrian dynamics simulation. In WOA, volume 892, 2012. [10] F Cherif and R Chighoub. Crowd simulation influenced by agent’s socio-psychological state. arXiv preprint arXiv:1004.4454, 2010. [11] Andreas Koefoed-Hansen and Gerth Stølting Brodal. Representations for Path Finding in Planar Environments. PhD thesis, Citeseer, 2012.

79

bibliography

[12] Ian Millington and John Funge. Artificial intelligence for games. CRC Press, 2016. [13] Howie Choset. Robotic motion planning: A* and d* search. https: //goo.gl/BnOKaN, 7-23, accessed: 2016-18-11 (archived by WebCite® at http://www.webcitation.org/6m7BTsCQk).

[14] Daniel Damir Harabor, Alban Grastien, et al. Improving jump point search. In ICAPS, 2014. [15] Craig W Reynolds. Steering behaviors for autonomous characters. In Game developers conference, volume 1999, pages 763–782, 1999. [16] Marko Apel and KT WALDEER. Simulation of pedestrian flows based on the social force model using the verlet link cell algorithm. Institute of Computing Science Laboratory of Computing Systems: Poznan University of Technology, 2004. [17] Dirk Helbing and Pratik Mukerji. Crowd disasters as systemic failures: analysis of the love parade disaster. EPJ Data Science, 1(1):1, 2012. [18] Luca Crociani, Andrea Piazzoni, Giuseppe Vizzari, and Stefania Bandini. When reactive agents are not enough: Tactical level decisions in pedestrian simulation. Intelligenza Artificiale, 9(2):163–177, 2015. [19] S Strogatz. The end of insight,[in:] what is your dangerous idea, 2007. [20] Paul Davidsson. Multi agent based simulation: beyond social simulation. In Multi-Agent-Based Simulation, pages 97–107. Springer, 2000. [21] Stuart Jonathan Russell, Peter Norvig, John F Canny, Jitendra M Malik, and Douglas D Edwards. Artificial intelligence: a modern approach, volume 2. Prentice hall Upper Saddle River, 2003. [22] Jörg P Müller. The design of intelligent agents: a layered approach, volume 1177. Springer Science & Business Media, 1996. [23] Peer-Olaf Siebers and Uwe Aickelin. Introduction to multi-agent simulation. arXiv preprint arXiv:0803.3905, 2008. [24] Liviu Panait and Sean Luke. Cooperative multi-agent learning: The state of the art. Autonomous agents and multi-agent systems, 11(3):387– 434, 2005. [25] Paulo Leitão, Udo Inden, and Claus-Peter Rückemann. Parallelising multi-agent systems for high performance computing. In Third

80

bibliography

International Conference on Advanced Communications and Computation (INFOCOMP’13), volume 6, page 1. IARIA, 2013. [26] Michel Frémond.

Collisions Engineering: Theory and Applications.

Springer, 28 Jul 2016. [27] Zeyad Abd Algfoor, Mohd Shahrizal Sunar, and Hoshang Kolivand. A comprehensive study on pathfinding techniques for robotics and video games. International Journal of Computer Games Technology, 2015:7, 2015. [28] Thomas H Cormen. Introduction to algorithms. MIT press, 2009. [29] Dr. Arne Meier. Lecture: Efficient algorithms, 2013. https://goo. gl/KJ4cD7, 188-216, accessed: 2016-16-11 (archived by WebCite® at http://www.webcitation.org/6m476KVGH).

[30] Maarja Kruusmaa, Jan Willemson, and Kristo Heero. Path selection for mobile robots in dynamic environments. In Proc. of the 1st European Conference on Mobile Robots, pages 113–118, 2003. [31] Fernando Bevilacqua. Finite-state machines: Theory and implementation. https://goo.gl/u0jO2j, accessed: 2016-16-11 (archived by WebCite® at http://www.webcitation.org/6m46lk4No). [32] Tsai-Yen Li and Hsu-Chi Chou. Motion planning for a crowd of robots. In Robotics and Automation, 2003. Proceedings. ICRA’03. IEEE International Conference on, volume 3, pages 4215–4221. IEEE, 2003. [33] Stephen J Rymill and Neil A Dodgson. Psychologically-based vision and attention for the simulation of human behaviour. In Proceedings of the 3rd international conference on Computer graphics and interactive techniques in Australasia and South East Asia, pages 229–236. ACM, 2005. [34] Cherif Foudil, Djedi Noureddine, Cedric Sanza, and Yves Duthen. Path finding and collision avoidance in crowd simulation. CIT. Journal of Computing and Information Technology, 17(3):217–228, 2009. [35] A* search algorithm. https://goo.gl/tm4L6D, accessed: 2016-19-12 (archived by WebCite® at http://www.webcitation.org/6msVLGhAV). [36] Richard E Korf. Depth-first iterative-deepening: An optimal admissible tree search. Artificial intelligence, 27(1):97–109, 1985. [37] Daniel Damir Harabor, Alban Grastien, et al. Online graph pruning for pathfinding on grid maps. In AAAI, 2011.

81

bibliography

[38] Steven Rabin. Game AI Pro 2: Collected Wisdom of Game AI Professionals. CRC Press, 2015. [39] Ehsan Mohammadi and Andrew Hunter. Multi-criteria path finding. ISPRS-International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 1:157–159, 2012. [40] Rectangular symmetry reduction. https://goo.gl/SekJRA, accessed: 2017-05-01 (archived by WebCite® at http://www.webcitation.org/ 6nIX1faAf).

[41] Alexander Reinefeld and T. Anthony Marsland. Enhanced iterativedeepening search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 16(7):701–710, 1994. [42] Highway Capacity Manual. Special report 209. Transportation Research Board, Washington, DC, 1:985, 1985. [43] AK Dewdney. Diverse personalities search for social equilibrium at a computer party. Scientific American, 257(3):112–115, 1987. [44] Definition of polygon. https://goo.gl/BXR60D, accessed: 2016-13-12 (archived by WebCite® at http://www.webcitation.org/6mjHStCaz). [45] Lines and distance of a point to a line. https://goo.gl/hiQgXl, accessed: 2016-14-12 (archived by WebCite® at http://www.webcitation. org/6mjeH2jSk).

[46] Minimal perpendicular vector between a point and a line. https: //goo.gl/XpamfG, accessed: 2016-14-12 (archived by WebCite® at http: //www.webcitation.org/6mjeSb37K).

[47] SO Ayinde and RB Ogunrinde. On error analysis comparison of some numerical experimental results. [48] Kendall E Atkinson. An introduction to numerical analysis. John Wiley & Sons, 2008.

82

Suggest Documents