UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Development of an agent based simulation model for pedestrian interactions Hussein, Mohamed 2016

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
24-ubc_2017_february_hussein_mohamed.pdf [ 4.8MB ]
Metadata
JSON: 24-1.0340534.json
JSON-LD: 24-1.0340534-ld.json
RDF/XML (Pretty): 24-1.0340534-rdf.xml
RDF/JSON: 24-1.0340534-rdf.json
Turtle: 24-1.0340534-turtle.txt
N-Triples: 24-1.0340534-rdf-ntriples.txt
Original Record: 24-1.0340534-source.json
Full Text
24-1.0340534-fulltext.txt
Citation
24-1.0340534.ris

Full Text

DEVELOPMENT OF AN AGENT BASED SIMULATION MODEL FOR PEDESTRIAN INTERACTIONS by  MOHAMED HUSSEIN  B.Sc., Ain Shams University, 2004 M.Sc., Ain Shams University, 2010  A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF  DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE AND POSTDOCTORAL STUDIES (Civil Engineering)  THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) December 2016  © Mohamed Hussein, 2016  ii  Abstract Developing a solid understanding of pedestrian behavior is important for promoting walking as an active mode of transportation and enhancing pedestrian safety. Computer simulation of pedestrian dynamics has gained recent interest as an important tool in analyzing pedestrian behavior in many applications. As such, this thesis presents the details of the development of a microscopic simulation model that is capable of modeling detailed pedestrian interactions. The model was developed based on the agent-based modeling approach, which outperforms other existing modeling approaches in accounting for the heterogeneity of the pedestrian population and considering the pedestrian intelligence. Key rules that control pedestrian interactions in the model were extracted from a detailed pedestrian behavior study that was conducted using an automated computer vision platform, developed at UBC. The model addressed both uni-directional and bi-directional pedestrian interactions.  A comprehensive methodology for calibrating model parameters and validating its results was proposed in the thesis. Model parameters that could be measured from the data were directly calibrated from actual pedestrian trajectories, acquired by means of computer vision. Other parameters were indirectly calibrated using a Genetic Algorithm that aimed at minimizing the error between actual and simulated trajectories. The validation showed that the average error between actual and simulated trajectories was 0.35 meters. Detailed validation of the accuracy of simulating pedestrian behavior during different interactions showed that the model successfully reproduced the actual behavior taken by pedestrians in the actual data in 95% of the cases.  The simulation model was then applied to analyze pedestrian behavior in two case studies in Vancouver and Oakland. The two case studies addressed different pedestrian flow conditions and iii  different walking environments. The average errors between actual and simulated trajectories for the two studies were found to be 0.28 m and 0.49 m, respectively. The average speed errors were 0.06 m/s and 0.04 m/s in the two studies, correspondingly.  The accuracy of reproducing the actual behavior of pedestrians exceeded 87% for most of interactions considered in the two studies. The accuracy of simulating group behavior during different interactions was found to be 96% and 92% in the two studies, respectively.   iv  Preface Portions of the introductory text in Chapter 1, portions of the literature review in Chapter 2, portions of the methodology in chapter 3, and a version of Chapter 4 have been published [Hussein M. and Sayed T., "Microscopic Pedestrian Interaction Behavior Analysis Using Gait Parameters," Transportation Research Record: Journal of the Transportation Research Board, vol. 2519, pp. 28-38, 2015]. I conducted all the analysis and wrote most of the manuscript. Portions of the introductory text in Chapter 1, portions of the literature review in Chapter 2, portions of the methodology in chapter 3, and a version of Chapter 5 have been published [Hussein M. and Sayed T., "A Uni-directional agent-based pedestrian microscopic model," Canadian Journal of Civil Engineering, vol. 42, no. 12, pp. 1114-1124, 2015]. I conducted all the analysis and wrote most of the manuscript. Portions of the introductory text in Chapter 1, portions of the literature review in Chapter 2, portions of the methodology in chapter 3, and a version of Chapter 6 have been published [Hussein M. and Sayed T., “A Bi-directional agent-based pedestrian microscopic model”,  Transportmetrica A: Transport Science., 2016, In print. doi: 10.1080/23249935.2016.1266531]. I conducted all the analysis and wrote most of the manuscript. Portions of the introductory text in Chapter 1, portions of the literature review in Chapter 2, portions of the methodology in chapter 3, and a version of Chapter 7 have been submitted for publication [Hussein M. and Sayed T., “Validation of a microscopic pedestrian simulation model in a crowded pedestrian walking environment”, (under review]. I conducted all the analysis and wrote most of the manuscript. v  Portions of the introductory text in Chapter 1, portions of the literature review in Chapter 2, portions of the methodology in chapter 3, and a version of Chapter 8 have been submitted for publication [Hussein M. and Sayed T., “Validation of an agent-based microscopic pedestrian simulation model at a scramble phase signalized intersection”, (under review)]. I conducted all the analysis and wrote most of the manuscript.   vi  Table of Contents Abstract ........................................................................................................................................... ii Preface............................................................................................................................................ iv Table of Contents ……………………………………………………………………………….. vi List of Tables ................................................................................................................................. xi List of Figures .............................................................................................................................. xiii List of Abbreviations ................................................................................................................... xvi Acknowledgements ..................................................................................................................... xvii Dedication .................................................................................................................................. xviii 1. Introduction ............................................................................................................................. 1 1.1 Background ...................................................................................................................... 1 1.2 Research Objectives ......................................................................................................... 5 1.3 Significance ...................................................................................................................... 9 1.4 Thesis Structure .............................................................................................................. 10 2. Literature Review .................................................................................................................. 11 2.1 Pedestrian Modeling Approaches................................................................................... 12 2.2 Pedestrian Microsimulation Models............................................................................... 15 2.3 Applications of Existing Simulation Models ................................................................. 17 2.4 Evaluation of Existing Simulation Models .................................................................... 19 2.5 Calibration of Simulation Model Parameters ................................................................. 21 2.6 Understanding Pedestrian Behavior ............................................................................... 23 2.7 Gait Parameters .............................................................................................................. 25 2.8 Computer Vision ............................................................................................................ 27 vii  3. Methodology .......................................................................................................................... 29 3.1 The Simulation Model .................................................................................................... 29 3.1.1 Basics of Agent-Based Modeling ........................................................................... 29 3.1.2 The Simulation Platform ......................................................................................... 35 3.1.3 Managing the Passage of Time in the Simulation Model ....................................... 38 3.1.4 Lifecycle of Pedestrian Agents in the Simulation Model ....................................... 39 3.1.5 Border Types and Boundary Conditions................................................................. 43 3.2 Computer Vision Platform ............................................................................................. 44 3.2.1 Extracting Pedestrian Trajectories .......................................................................... 44 3.2.2 Extracting Gait Parameters ..................................................................................... 46 4. Microscopic Pedestrian Interaction Behavior Analysis ........................................................ 49 4.1 Data Collection ............................................................................................................... 51 4.2 Results and Discussion ................................................................................................... 52 4.2.1 Interactions with Pedestrians in the Same Direction .............................................. 54 4.2.2 Interactions with Opposing Pedestrians .................................................................. 59 4.2.3 Interactions with Fixed Objects .............................................................................. 60 4.2.4 Interaction with Turning Vehicles .......................................................................... 64 4.2.5 Running ................................................................................................................... 67 4.2.6 Distracted Pedestrians ............................................................................................. 68 4.3 Summary of Key Rules of Pedestrian Interactions ........................................................ 70 5. Uni-directional Behavior Model ............................................................................................ 73 5.1 Behavior Rules ............................................................................................................... 73 5.1.1 Following a Slower Pedestrian ............................................................................... 77 5.1.2 Overtaking a Slower Pedestrian .............................................................................. 79 viii  5.1.3 Interaction with Multiple Pedestrians ..................................................................... 81 5.2 Model’s Key Parameters ................................................................................................ 83 5.3 Model Calibration .......................................................................................................... 85 5.3.1 Calibration Methodology ........................................................................................ 85 5.3.2 Extracting Density - Speed Relationship from the Simulation ............................... 88 5.3.3 Extracting Density - Flow Relationship from the Simulation ................................ 88 5.3.4 Calibration Results .................................................................................................. 89 5.4 Model Validation............................................................................................................ 91 5.4.1 Data Collection ....................................................................................................... 92 5.4.2 Validation of Simulated Trajectories ...................................................................... 92 5.5 Conclusion ...................................................................................................................... 95 6. Bi-directional Behavior Model .............................................................................................. 97 6.1 Behavior Rules of Bi-directional Conflicts .................................................................... 97 6.1.1 Bi-directional Conflict Identification ...................................................................... 98 6.1.2 Individual Behavior Rules ...................................................................................... 99 6.1.3 Group Behavior Rules........................................................................................... 101 6.1.4 Behavior Rules of Pedestrians in Conflict with Multiple Opposing Pedestrians . 106 6.2 Conflict with Fixed Objects ......................................................................................... 109 6.2.1 Identifying Conflict with Fixed Objects ............................................................... 109 6.2.2 Avoiding Collision with Fixed Object .................................................................. 111 6.2.3 Conflict with Multiple Fixed Objects ................................................................... 112 6.2.4 Combined Conflict with Opposing pedestrians and Fixed objects ....................... 114 6.3 Updating Pedestrian’s Position and Behavior in Case of Collisions ........................... 115 6.4 Model’s Key Parameters .............................................................................................. 118 ix  6.5 Parameter Calibration and Model Validation............................................................... 120 6.5.1 Data Collection ..................................................................................................... 120 6.5.2 Calibration of Model’s Key Parameters ............................................................... 121 6.5.3 Validation .............................................................................................................. 127 6.6 Conclusion .................................................................................................................... 130 7. Case Study I: Validation of the Agent-Based Model in a Crowded Pedestrian Walking Environment ................................................................................................................................ 132 7.1 Data Collection ............................................................................................................. 133 7.2 Parameter Calibration ................................................................................................... 134 7.2.1 Direct Calibration.................................................................................................. 134 7.2.2 Indirect Calibration ............................................................................................... 135 7.3 Pedestrian Simulation ................................................................................................... 136 7.4 Evaluation of the Accuracy of Simulating Pedestrian Interactions .............................. 138 7.4.1 Interactions with Fixed Objects ............................................................................ 140 7.4.2 Interactions with Stopping Pedestrians ................................................................. 141 7.4.3 Overtaking Maneuvers .......................................................................................... 142 7.4.4 Following Behavior .............................................................................................. 143 7.4.5 Group Behavior Validation ................................................................................... 144 7.4.6 Bi-directional Interactions .................................................................................... 146 7.4.7 Interaction with a Moving Vehicle ....................................................................... 147 7.5 Conclusion .................................................................................................................... 150 8. Case Study II: Validation of the Agent-Based Model at a Scrambled Phase Signalized Intersection .................................................................................................................................. 152 8.1 Data Collection ............................................................................................................. 152 x  8.2 Parameter Calibration ................................................................................................... 154 8.2.1 Direct Calibration.................................................................................................. 154 8.2.2 Indirect Calibration ............................................................................................... 155 8.3 Pedestrian Simulation ................................................................................................... 158 8.4 Evaluation of Simulated Trajectories ........................................................................... 160 8.5 Evaluation of the Accuracy of Simulating Pedestrian Interactions .............................. 163 8.5.1 Interactions with Fixed Objects ............................................................................ 164 8.5.2 Uni-directional Interactions .................................................................................. 165 8.5.3 Bi-directional Interactions .................................................................................... 167 8.5.4 Group Behavior Validation ................................................................................... 169 8.6 Conclusion .................................................................................................................... 170 9 Conclusions and Future Research........................................................................................ 172 9.1 Summary and Conclusions ........................................................................................... 172 9.2 Future Research ............................................................................................................ 176 9.3 Study Limitations ......................................................................................................... 179 Bibliography ............................................................................................................................... 182     xi  List of Tables Table 4-1. Speed and gait parameters for different pedestrian classes ......................................... 53 Table 4-2. Comparison between speed and gait parameters for normal walking behavior and during the overtaking maneuver ................................................................................................... 55 Table 4-3. Speed and gait parameters for different pedestrian classes during the overtaking maneuver ....................................................................................................................................... 56 Table 4-4. Comparison between speed and gait parameters for normal walking behavior and while following slower pedestrians .............................................................................................. 58 Table 4-5. Speed and gait parameters for different pedestrian classes while following slower pedestrians..................................................................................................................................... 59 Table 4-6. Speed and gait parameters for pedestrians interacting with opposing pedestrians ..... 60 Table 4-7. Comparison between speed and gait parameters for normal walking behavior and while interacting with fixed objects .............................................................................................. 62 Table 4-8. Speed and gait parameters for different pedestrian classes for pedestrians interacting with fixed objects .......................................................................................................................... 63 Table 4-9. Gait parameter at different phases of pedestrian - turning vehicle interaction............ 67 Table 4-10. Speed and gait parameters for runners ...................................................................... 68 Table 5-1. GA control parameters for uni-direction model calibration ........................................ 86 Table 5-2. Key uni-directional model parameters' values ............................................................ 90 Table 5-3. Summary of errors of the validation process ............................................................... 93 Table 6-1. GA control parameters .............................................................................................. 123 Table 6-2. Parameter configuration for the optimum solution ................................................... 125 Table 7-1. Model parameters indirectly calibrated using GA for Vancouver case study ........... 135 xii  Table 7-2. Summary of accuracy of predicting pedestrian behavior during different interactions..................................................................................................................................................... 139 Table 8-1. Model parameters indirectly calibrated using GA in Oakland case study ................ 156 Table 8-2. Summary of accuracy of predicting pedestrian behavior during different interactions..................................................................................................................................................... 164   xiii  List of Figures Figure 1-1. Main Research Components ........................................................................................ 7 Figure 3-1.Typical REPAST display for a typical simulation run................................................ 37 Figure 3-2. Pedestrian’s life cycle in the simulation model.......................................................... 42 Figure 3-3.Trajectory extraction process ...................................................................................... 45 Figure 3-4. Extraction of gait parameters process ........................................................................ 47 Figure 4-1. Data collection Location ............................................................................................ 52 Figure 4-2. An example of typical behavior of pedestrian - fixed pedestrian interaction ............ 64 Figure 4-3. An example of typical behavior of pedestrian - turning vehicle interaction .............. 66 Figure 4-4. Example of a distracted pedestrian interacting with a left turn vehicle ..................... 69 Figure 5-1. Conflict Identification and Different Collision Avoidance Strategies ....................... 77 Figure 5-2. Estimating pedestrian’s position when interacting with multiple leading pedestrians....................................................................................................................................................... 82 Figure 5-3. Simulation Environment for Model Calibration ........................................................ 88 Figure 5-4. Model Macroscopic Calibration  ................................................................................ 91 Figure 5-5. Sample of extracted trajectories for uni-directional model Validation ...................... 92 Figure 5-6. Sample Actual Versus Simulated Trajectories for Four Pedestrians ......................... 94 Figure 5-7. Sample Actual Versus Simulated Speed Profiles for Two Pedestrians ..................... 95 Figure 6-1. Bi-directional conflict identification .......................................................................... 99 Figure 6-2. Different conflict avoidance strategies ..................................................................... 101 Figure 6-3. Strict and flexible groups ......................................................................................... 103 Figure 6-4. An example of flexible group behavior ................................................................... 106 Figure 6-5. Behavior rules for pedestrians involved in conflict with multiple pedestrians ........ 109 xiv  Figure 6-6. Identifying conflict with fixed objects ..................................................................... 110 Figure 6-7. Resolving conflict with a fixed object ..................................................................... 112 Figure 6-8. Resolving conflict with multiple fixed objects ........................................................ 114 Figure 6-9. Resolving conflict that includes fixed objects and opposing pedestrian.................. 115 Figure 6-10. Collision situation detection and avoidance ........................................................... 117 Figure 6-11. Estimating pedestrian’s position next update in case of collision.......................... 118 Figure 6-12. Sample of extracted trajectories for the bi-directional model calibration .............. 121 Figure 6-13. Preferred lateral distance distribution .................................................................... 122 Figure 6-14. An example of an interaction during the Calibration process ................................ 126 Figure 6-15. Example of an interaction during the validation process ....................................... 128 Figure 6-16. Validation of the ability of the model to estimate the collision avoidance strategy..................................................................................................................................................... 130 Figure 7-1.Data collection location for Vancouver case study ................................................... 133 Figure 7-2.Simulated and actual trajectories for Vancouver case study ..................................... 137 Figure 7-3. Examples of pedestrian trajectories and the corresponding speed profiles from Vancouver case study ................................................................................................................. 138 Figure 7-4. Actual and simulated lateral distance between pedestrians and fixed objects in the walking environment .................................................................................................................. 141 Figure 7-5. Results of assessing pedestrian behavior while interacting with stopping pedestrians..................................................................................................................................................... 142 Figure 7-6. Results of evaluating pedestrian passing behavior................................................... 143 Figure 7-7. Actual versus simulated following distance for pedestrians who follow slower pedestrians................................................................................................................................... 144 Figure 7-8. Group behavior assessment ...................................................................................... 146 xv  Figure 7-9. Evaluation of pedestrian behavior during Bi-direction interactions ........................ 147 Figure 7-10. Interaction with a crossing vehicle ......................................................................... 148 Figure 7-11. Speed profiles of pedestrians involved in interaction with vehicle ........................ 150 Figure 8-1. Data collection location for Oakland case study ...................................................... 154 Figure 8-2. Lateral distance distribution ..................................................................................... 155 Figure 8-3. Simulated versus actual trajectories for Oakland case study ................................... 158 Figure 8-4. Snapshots of simulation at different time instances ................................................. 159 Figure 8-5. Examples of pedestrian actual and simulated trajectories and the corresponding speed profiles ........................................................................................................................................ 161 Figure 8-6. Average speed assessment ....................................................................................... 163 Figure 8-7. Distribution of conventional and diagonal crossing speeds ..................................... 163 Figure 8-8. Examples of Interaction with stopping vehicles ...................................................... 165 Figure 8-9. Actual versus simulated following distance for pedestrians who follow slower pedestrians ahead ........................................................................................................................ 166 Figure 8-10. Results of evaluating pedestrian passing behavior................................................. 167 Figure 8-11. Evaluation of pedestrian behavior during interactions with pedestrians in other directions ..................................................................................................................................... 169 Figure 8-12. Average distance between group members ............................................................ 170    xvi  List of Abbreviations ABM Agent-based modeling CA Cellular automata DST Deceleration to Safety Time DW Do not Walk EDFT Extended decision field theory FDW Flashing Do not Walk HCM Highway Capacity Manual ICBC Insurance Corporation of British Columbia GA Genetic algorithm GIS Geographical information system GT Gap time GUI Graphical user interface LE Location error LHS Latin Hypercube Sampling method OOP Object oriented programming PD Perceived density PET Post-Encroachment Time PSD Power spectral density REPAST Recursive Porous Agent Simulation Toolkit RMSE Root mean square error SE Speed error SFM Social force model TTC Time-to- Collision UBC University of British Columbia   xvii  Acknowledgements I would like to express my deepest gratitude to my advisor, Dr. Tarek Sayed, for his excellent guidance, caring, patience, and providing me with an excellent atmosphere for doing research. I would like to thank my colleagues from the transportation group for their friendship and help in several aspects of my thesis. I would also like to thank my parents and my sister. They were always supporting me and encouraging me with their best wishes. Finally, I would like to thank my wife, Rasha. She was always there cheering me up and stood by me through the good and bad times.   xviii  Dedication To my Daughters   1  1. Introduction 1.1 Background Surface transportation is facing considerable challenges especially in urban areas. Road congestion continues to increase and fatalities and injuries resulting from road accidents are considered a global epidemic causing 1.3 million annual fatalities worldwide [1]. Many urban areas worldwide are witnessing massive growth in vehicular traffic. The inevitable result has been ever increasing traffic congestion and a road safety epidemic, along with the enormous damage to underlying economic activities. Therefore, the issue of sustainability of urban areas is coming to the forefront of the public and policy makers. As a result, non-motorized modes of transportation such as walking are receiving more emphasis in transportation planning and engineering. For example, new transportation planning concepts are being re-defined to emphasize walkability and to recognize the pedestrian as a key road user [2]. Walking is the main non-motorized mode of transport that connects different elements of a multi-model transport network. Providing walking-friendly and safe facilities for pedestrians is central to encouraging and accommodating walking activities. Municipalities around the world are developing policies that promote pedestrian activities. There is also increasing funding allocated for safety programs that focus on improving pedestrian safety [3]. Non-motorized active modes of travel such as walking are vital contributors to a healthy and livable environment. Walking is a practical and effective way to increase the physical activity level of the population, which leads to considerable health benefits. Increasing physical activity levels minimizes or delays variety of medical problems, including cardiovascular diseases, bone and joint injuries, diabetes, and obesity. Unfortunately, it is estimated that there are 3.2 million deaths per 2  year worldwide attributable to physical inactivity. This number can be significantly reduced by encouraging the adaption of active transportation [4]. Furthermore, active transportation modes have a significant effect in reducing the external causalities of motorized traffic. The adaptation of sustainable transportation modes would reduce traffic congestion, accident risk, energy consumption, and pollution emissions. The annual economic benefits of shifting from vehicular travel to active transportation modes, for short and moderate trip distances, were estimated to be about $ 6,600 per person based on average trip distances in the USA [5]. Although many studies have demonstrated the importance of walking, pedestrians are generally understudied and overlooked compared to vehicular traffic. Understanding pedestrian behavior is a research area that has not been developed to a level that matches vehicular travel. Solid understanding of pedestrian behavior usually experiences two main challenges: the lack of reliable data and the tools required to analyze pedestrian data and model detailed pedestrian behavior. Pedestrian behavioral analysis requires collecting considerable amounts of data and identifying many decision making parameters, which are very difficult to extract in most cases. The collection of observational pedestrian data is difficult due to the complex nature of pedestrian movements [6]. In addition, it is extremely costly to manually obtain individual (microscopic) observations of pedestrian movement that are vital in understanding pedestrian behavior in many situations. The use of computer vision techniques for pedestrian data collection, automated analysis of the video data, and the extraction of pedestrian indicators that affect walking behavior can overcome many of the challenges that face detailed pedestrian behavioral studies. Recently, computer simulation of pedestrian dynamics is being advocated as an important tool that could be used to analyze pedestrian behavior in different walking environments. However, modeling pedestrian interactions is a difficult task due to the complexity that characterizes the 3  pedestrian systems [7]. First of all, the pedestrian system encompasses a large degree of heterogeneity and randomness that complicates the pedestrian models. Pedestrians continuously interact with each other and with other objects in their walking environment, which results in frequent changes in walking speed and direction. Pedestrian behavior during interactions is usually sophisticated and, in some cases, cannot be predicted as it is affected by various factors including age, gender, physical, and psychological characteristics. Modeling pedestrian behavior requires defining a large number of parameters that are usually difficult to determine. The Parameters that affect individual pedestrian behavior are usually correlated with each other, making it very difficult to isolate specific parameters responsible for specific behavior. This complex nature of the parameters needed to model pedestrian interactions leads to difficult tasks associated with the modeling process, mainly calibrating model parameters and validating its results. Furthermore, the behavior of individuals in a pedestrian system is significantly affected by the behavior of other pedestrians in the walking environment in addition to the internal parameters and attributes of system individuals.  A variety of simulation models developed over the past two decades have been successfully used to address different pedestrian applications including pedestrian evacuation in emergency situations, planning pedestrian routes in large events, designing pedestrian facilities at railway stations and airport terminals, among others. Despite the relative success of existing models, they still suffer from some shortcomings that limit their capabilities. Firstly, pedestrian movements and their interactions with other road users are usually modeled based on unrealistic methodology. For example, in the well-known physical based modeling approach [8], pedestrians are modeled as particles and their interactions with other elements are simulated through physical forces. The concept of physical (social) forces is still common even for more advanced modeling approaches 4  such as agent-based modeling (ABM). In recently developed agent-based pedestrian simulation models [e.g. [9], [10]], the behavioral rules that govern pedestrians’ interactions are expressed using the social force concept. Another commonly used modeling approach, the cellular automata (CA), assumes that pedestrians move from one cell to another depending on pre-defined transitional rules (mainly dependent on a probability of choosing the target cell).  Clearly, many of these assumptions neglect the fact that pedestrians are thinking decision makers who logically assess the walking environment and take rational decisions based on their characteristics, attributes and experience. Secondly, it is difficult to address the heterogeneity of the pedestrian system in any existing pedestrian models [11]. The variability of many pedestrian characteristics (e.g., desired speed) cannot be considered in the majority of existing pedestrian simulation packages, which affects the overall accuracy of the simulation. Lastly, the calibration of model parameters and the validation of the results represent major shortcomings of existing simulations. Calibration and validation of existing models are usually conducted by comparing model macroscopic results with macroscopic relations extracted from real data or controlled experiments. For example, evacuation models are usually assessed through the average egress time and flow through exits. Crowd simulation models are commonly validated through observing self-organization phenomena, flow through bottlenecks and the relation between flow parameters (flow, speed and density). Although it is important to assess the capability of the model to reproduce reasonable macroscopic results, this approach does not guarantee that the model is able to simulate individual pedestrian trajectories with high accuracy, which limit the use of simulation models in many applications. Therefore, it is of great importance to develop a pedestrian simulation model for studying pedestrian interactions that overcomes the shortcomings of existing simulation models. The model should 5  focus on producing accurate trajectories for pedestrians, which reflect pedestrian behavior during different interactions. Such a model would be very beneficial in studying many pedestrian applications that require accurate representation of pedestrian microscopic behavior.   1.2 Research Objectives The main objective of the research is to develop a microscopic pedestrian simulation model for modeling pedestrian interactions and producing accurate pedestrian trajectories. The model is supported by the automated computer vision framework that provides an important source for capturing important elements of pedestrian behavior required for simulating their movement, calibrating the model parameters and validating the model results. The main components of the research are presented in Figure 1-1. The specific objectives of this research include: 1. Collecting pedestrian video data in order to establish a video library required to conduct a detailed pedestrian behavioral analysis, calibrate the simulation model parameters, and validate its results. The video data should cover a variety of conditions that considers different level of pedestrian densities and different walking environments. 2. Conducting a detailed pedestrian behavioral analysis in which pedestrian behavior during different interactions with other road users is investigated. The analysis will be conducted using pedestrian video data acquired in the previous phase. Data will be analyzed by means of an automated computer vision platform that was developed at the University of British Columbia (UBC) in order to extract pedestrian trajectories. Important parameters required to understand pedestrian behavior will be extracted automatically from pedestrian trajectories including pedestrian speed and pedestrian gait parameters (step frequency and step length). The results of the study can be used to identify a set of rules 6  that control pedestrian behavior during different interactions. These rules are to be used to simulate pedestrian interaction in the microscopic pedestrian simulation model. 3. Developing a pedestrian simulation model for simulating microscopic pedestrian interactions. The goal is to develop a novel microscopic pedestrian simulation model that is capable of addressing pedestrian behavior in different walking environments. The model should utilize a state of the art, agent-based modeling approach to model detailed pedestrian interactions with other pedestrians and objects that exist in the walking environment. The model should incorporate detailed pedestrian behavior in order to simulate interactions and produce accurate trajectories. 4. Proposing a methodology for calibrating model parameters and validating model results that ensures the accuracy of the produced trajectories and guarantees that the simulation reflects the actual behavior of pedestrians. The calibration and validation will be conducted using actual pedestrian data. The objective of the calibration process is to select the parameter configuration that minimizes the difference between simulated and actual trajectories. The model ability to produce the same behavior taken by pedestrians in the actual data will be investigated. This approach of calibration and validation guarantees that the model is able to simulate individual pedestrian trajectories with high accuracy, which should expand the range of applications that could be addressed by the simulation model. As well, obtaining accurate trajectories and behavior that reflects the actual pedestrian behavior would implicitly ensure the accuracy of macroscopic results of the model (e.g. average speeds, pedestrian flow, etc.).  5. Investigating the applicability of the developed model in other walking environments and different density conditions. Two different case studies in the cities of Vancouver and 7  Oakland will be considered. The first case study was conducted during a popular social event in the city of Vancouver. Streets were closed for traffic to allow pedestrians to leave the area safely. The area was very crowded as the event attracted thousands of people, which provided good source to examine the model performance in a high density environment. The second case study was conducted at an untypical intersection in the city of Oakland. The intersection has a scramble phase in which only pedestrians were allowed to cross the intersection, which creates many conflicts between pedestrians in different directions. The two studies will provide the opportunity to confirm the model applicability in different environments and the ability of the model to simulate complex pedestrian interactions using other data sets.  Figure 1-1. Main Research Components  Detailed pedestrian behavioral analysis  Simulation Model  Developing an agent-based pedestrian simulation model  Evaluation  Calibration and Validation using pedestrian trajectories  Case studies Vancouver Simulation of pedestrian movement in crowded intersection while leaving a social event in downtown area Oakland Simulation of pedestrian movement at a signalized intersection with a scramble phase Video Data Develop solid Understanding of pedestrian behavior   Automated tracking of pedestrians using computer vision  Automated extraction of speed & gait parameters  Case study Specific Evaluation Identify pedestrian simulation rules  8  The developed simulation model provides several contributions to existing pedestrian micro-simulation models. Specifically, the model utilizes the ABM approach which is very suitable to model a complex heterogeneous system like the pedestrian system. In this approach, pedestrians are modeled as agents who interact with each other and with other elements of the environment according to set of defined rules, which represent a realistic approach for modeling pedestrian that is similar to the decision making process considered by pedestrians in reality. Furthermore, the ABM modeling approach outperforms other modeling approaches in considering the heterogeneity of the pedestrian population. Different parameter distributions and different behavioral rules can be easily assigned to different categories of pedestrian agents (according to age, gender, physical characteristics, among others). The model can be easily extended to include additional rules and parameters required to address new pedestrian behavior and interactions with other road users. Behavior rules introduced in the model were extracted from actual data by means of computer vision, which ensure that results of the model are accurate and realistic. Furthermore, the calibration and validation methodologies utilized in the research overcome several issues associated with existing calibration and validation techniques. The calibration of model parameters on the microscopic level, the detailed validation of the resulted trajectories, and the validation of the accuracy of executing specific behavior during specific interactions should ensure that the simulated trajectories are accurate and reflect the actual behavior of pedestrians. This provides the ability to consider wider range of pedestrian applications that are difficult to be addressed using existing models (e.g. conflict analysis and interactions between pedestrians and other road users in shared space facilities). Finally, the model was developed using an open source simulation platform, REPAST, which enables modelers and users to make use of the benefits of the open source software. 9  1.3 Significance There is widespread interest in pedestrian studies which is motivated by popular and political awareness of environmental issues and the need to develop a sustainable transportation system. However, despite this awareness, considerable effort is still needed to build such a system and to understand the requirements of the planning and the design of the facilities of non-motorized transportation modes. Locally, the city of Vancouver is promoting sustainable modes of transportation such as walking and cycling as major drivers of a healthy and viable society. Translink, the transport authority in the southern coast of British Columbia, Canada, has set a long term plan for transportation planning in the area to 2045. Their goal is to shift at least 50% of trips made within the area to sustainable modes (walking, cycling and public transit).  Another important issue that gained more interest recently is pedestrian safety. Pedestrians are the most physically vulnerable road users who get involved in a high number of fatal road collisions. Locally, there are considerable concerns about pedestrian safety in Canada. The social and economic burden of road collisions in Canada is enormous. According to Transport Canada, 2227 people died in 2010 in Canada as a result of road collisions with pedestrians suffering 13.3% of these fatalities. The percentage of pedestrian fatalities is much higher if we only consider collisions that occur in urban areas where pedestrians represent about 32% of total fatalities. In British Columbia, pedestrian fatalities represent about 18% of the total fatalities according to Insurance Corporation of British Columbia (ICBC).  As such, understanding pedestrian behavior and developing a reliable simulation model that produces microscopic pedestrian trajectories is of great importance. Such a model can support many important applications related to pedestrians including facility planning and design, and 10  pedestrian safety evaluation. This can help to promote walking as a safe and convenient non-motorized mode of transportation, and encourage road users to shift from vehicular traffic towards other sustainable transportation choices, particularly walking. 1.4 Thesis Structure This thesis is divided into nine chapters organized as follows: The first chapter provided an introduction to the thesis, background information related to the research, and the main objectives of the study. Detailed literature review of previous research related to the topics addressed in the thesis is presented in the second chapter. The third chapter provides detailed illustration of the methodology used to conduct the study; mainly the computer vision techniques used to extract pedestrian behavior and the structure of the agent-based simulation model. In the fourth chapter, the details of the pedestrian behavioral study and rules of pedestrian interactions are presented. The fifth chapter provides the details of the uni-directional model including the implementation of interaction rules in the model, parameter calibration and model validation. In the sixth chapter, the behavior rules that control pedestrian bi-directional interactions and interaction with fixed objects are presented in details. Chapters seven and eight provide details of two case studies conducted in the city of Vancouver and the city of Oakland, respectively, in order to investigate the model performance in different environments and different flow conditions. The ninth chapter includes the conclusions of the research and suggestions for future work.   11  2. Literature Review This chapter presents an overview of the previous research related to different topics addressed in this thesis. As it was difficult to cover all previous studies in this chapter, the literature review focused on selected key studies that have high impact in the field of pedestrian microsimulation modeling. The literature review conducted in this chapter covers three main topics. The first five sections of this chapter focus on the main topics of this thesis; the pedestrian microsimulation modeling. Different modeling approaches that were used to model microscopic pedestrian interactions are addressed in the first section. The second section of this chapter presents a selected list of key pedestrian microsimulation models that were developed in the past two decades. Different applications that were considered by existing simulation models are addressed in the third section of the chapter. The fourth section highlights some important studies that surveyed existing pedestrian simulations and conducted comprehensive evaluation for different models. In this section, key issues associated with existing simulations were identified.  The fifth section summarizes different techniques used to calibrate and validate pedestrian simulation models.  The second topic addressed in this chapter is related to pedestrian behavioral studies. This topic is covered in the sixth and seventh sections of the chapter. The sixth section provides a brief summary of previous studies that explored pedestrian behavior at different pedestrian facilities, mostly through studying pedestrian walking speed. The seventh section provides a brief discussion on pedestrian gait parameters, mainly step length and step frequency. Analyzing gait parameters is a microscopic analysis that provides in-depth understanding of pedestrian behavior. In this thesis, gait parameters were utilized along with pedestrian speed in order to develop a comprehensive understanding of pedestrian behavior during different interactions. As such, it was important to 12  provide an overview of the past research that studied gait parameters, including how these parameters were extracted and what are their targeted applications. The third main topic discussed in this chapter is related to computer vision. Computer vision played an important role throughout this research. It was used to extract pedestrian trajectories from video data. These trajectories provided an important source for conducting detailed analysis of pedestrian behavior. As well, extracted trajectories were used to calibrate and validate the developed simulation model. As such, Section 8 of this chapter was dedicated to present state of the art research related to computer vision. Different approaches used to detect road users from video data and the details of an automated computer vision platform that was developed at UBC are presented in this section. 2.1 Pedestrian Modeling Approaches Microscopic pedestrian models relied on many modeling approaches in order to simulate pedestrian movement and study the crowd dynamics. However, the vast majority of existing microscopic models were developed based on two modeling approaches: the physical based modeling approach and the cellular automata modeling approach. In the physical based modeling approach, pedestrians are simulated as particles that are subject to different physical forces. These forces are initiated due to interaction between pedestrian themselves and between pedestrians and other elements in the environment. The movement of pedestrians in each model update is dependent on the direction and magnitude of the resultant force. The social force model (SFM), originally developed by Helbing and Molnár in 1995 [8] represents one of the first adaptations to the physical based approach in addressing pedestrian dynamics. In the model, each pedestrian is subject to two kinds of forces, "social" and "granular" forces. The social forces include repulsion forces that reflect the intentions of a pedestrian to stay away from other pedestrians or obstacles, and attraction forces that reflect the pedestrian desire to move towards a specific location (e.g., a 13  destination). The granular forces of pushing and friction represent pedestrian behavior at very high-density situations (panic situations) where pedestrians are forced to collide. Each simulation update, the acceleration vector of a pedestrian is determined based on the magnitude and direction of the physical forces and pedestrians move according to the equations of motion.  The CA modeling approach was originally used to model vehicular movement [12] before it started to be an appealing approach to address pedestrian movement. The CA modeling approach employs a discrete spatial representation of the environment and the entities it comprises. The environment is divided into fixed size cells that can only be occupied by one object at a certain time instant. Transition rules must be defined in order to specify the evolution of every cell’s state. Pedestrian movement is realized through the change of the state (vacant or occupied) of the cell which a pedestrian is occupying and the adjacent one, the target cell. The CA model developed by Blue and Alder [ [13], [14]] represents the first model that was developed based on this modeling approach. In this model, transition rules that described the rules of moving from one cell to another and from one lane to another, if there is an available gap, were defined [ [13], [14]]. The rules were deemed adequate, as the model successfully captures the aggregate behavior of pedestrians presented in the Highway Capacity Manual (HCM) for fundamental relationships [15]. Additionally, few studies can be found in the literature that adopted other modeling approaches to study pedestrian dynamics. For example, Hoogendoorn and Bovy (2004) introduced the (Nomad) model, in which pedestrian movement was explained through the theory of pedestrian behavior under uncertainty, based on the concept of utility maximization [16]. Pedestrians were assumed to optimize a utility function, representing a trade-off between the benefits gained from specific activities at a specific location, and the penalty resulted from walking. Robin et al. (2009) proposed a discrete choice modeling approach that was used to describe pedestrian behavior while moving 14  freely (unconstrained movement) and while interacting with other pedestrians (constrained movement) [17]. The constrained model was characterized by a leader-follower model for the uni-directional flow and a collision avoidance model for the bi-directional flow [17].  As shown from the previous review, the modeling approaches adopted by existing simulation models are to some degree inadequate to address pedestrian interactions. Commonly used approaches such as social force and CA modeling approaches neglect the fact that pedestrians are intelligent and take rational decisions based on their experience and characteristics. Pedestrians do not move based on some probability rules and they are not particles that are affected by forces due to interactions with other pedestrians. Other modeling approaches applied to study pedestrian interactions were not developed based on solid understanding of pedestrian behavior. As well, existing modeling approaches neglect the fact that the pedestrian system is a very heterogeneous system. Different pedestrian categories have different behavior when they are involved in the same interaction. There is a need to adopt a modeling approach that provides a more realistic technique to model pedestrian behavior and accounts for pedestrian intelligence and the heterogeneity of pedestrian population. Recently, the agent-based modeling [ [18], [19], [20]] was advocated as a suitable approach that could be used for the computer simulation of pedestrian systems [7]. ABM is a relatively new modeling approach that was adopted by studies in many domains including economics, biology,   ecology and social science. In this technique, the individuals of interests are represented as agents, which are embedded in an environment. Agents interact with other agents in the environment and with the environment itself through a set of predefined decision rules. Although a few models were developed using the ABM approach [e.g. [9], [10]], they suffer from the inaccurate and unrealistic representation of behavioral rules that control pedestrian interactions. 15  Some models used the basics of SFM to develop the behavior rules required to control pedestrian behavior during the simulation. Other studies conducted controlled experiments to study pedestrian behavior and develop the simulation models based on the results of these experiments. This is problematic, as the behavior of pedestrians participating in such experiments cannot be considered as the natural walking behavior of pedestrians when they walk in normal conditions. There is a need to develop comprehensive pedestrian behavioral analysis, which helps understanding pedestrian behavior during different interactions. Such an analysis should be the basis of defining the behavior rules of the ABM in order to ensure that pedestrian behavior is accurate and reflects the actual behavior of pedestrians. 2.2 Pedestrian Microsimulation Models Over the past two decades, many microscopic pedestrian simulation models were developed in order to address wide range of pedestrian applications. One of the most famous microscopic simulation models is the SFM, originally developed by Helbing and Molnar (1995) [8], and Helbing et al. (1997) [21]. Several adaptations and modifications to the original SFM were developed to improve the performance of the model and address specific applications. For example, Xi et al. (2011) developed a pedestrian behavioral model that utilizes the SFM combined with an extended decision field theory (EDFT), and a dynamic planning algorithm [22]. The study explicitly addressed group behavior and the interactions between group members. Another well-known pedestrian microscopic model is the CA model, originally developed by Blue and Alder [ [13], [14]]. Several adaptions to the original model were introduced in order to address different issues associated with the original model. For example, Schadschneider (2002) enhanced the CA model performance in handling complicated environments by introducing a so-called floor field and the concept of diffusion and decay [23]. The model presented in that study was effective in 16  simulating large crowds and was successful in addressing pedestrian collective effects and self-organization behavior [23]. A similar concept was introduced by Burstedde et al (2001), in which the floor field is used to eliminate the long range interactions between pedestrians by modifying the transition rates to neighbouring cells [24]. The study showed that such a floor field is sufficient to model collective behavior and self-organization phenomena observed in pedestrian flow such as lane formation in bi-directional flow through a corridor. Sarmady et al. (2010) proposed a small scale movement layer of multi-agent to be added to the CA model in order to provide more smooth movement and different speeds for pedestrians [25]. Teknomo and Gerilla (2005) presented a model to simulate pedestrian movement for pedestrian traffic analysis [26]. The pedestrians were modeled as autonomous agents with non-linear system differential equations in a way that is similar to the social force approach. Behavior such as avoiding opposing pedestrians, passing and overtaking slower pedestrians moving in the same direction, and lane formation were successfully reproduced by the simulation model [26]. The model was validated using real world data by minimizing the difference between the speed distributions of real and simulated pedestrians [26]. Ronald et al. (2007) investigated the different techniques used for pedestrian modeling and suggested that the agent-based modeling approach is suitable for modeling pedestrian system [27]. The paper presented the development of a sample model using “Prometheus”, an agent-oriented design methodology, which is suitable for planning purposes [27]. Wong et al. (2010) developed a bi-directional pedestrian simulation model that was successfully utilized to investigate pedestrian bi-directional interactions at different intersecting angles [28]. The calibration of the model was performed using results from a set of controlled experiments representing the cases being modeled. Pretto et al. (2011) proposed a hybrid model that integrates the social force modeling approach and the behavior rule concept to study pedestrian 17  gap acceptance behavior at intersections [29]. In this work, the authors conducted a test to examine the capability of the model to simulate pedestrian gap acceptance. In this test, gap acceptance values obtained from simulation are compared with gap values obtained from a video data collection of pedestrians at a crossing facility. The tests indicate that the model provided good representations of realistic conditions. Waizman et al. (2015) developed a multi-agent microscopic three-dimensional simulation model to study driver and pedestrian behavior during vehicle - pedestrian interactions [30].  2.3 Applications of Existing Simulation Models The existing simulation models were applied to address a variety of pedestrian applications. However, evacuation studies and crowd behavior in large events were the two main focuses of the vast majority of existing models. Starting with the evacuation studies, Helbing et al. (2002) applied the SFM to study a variety of issues related to pedestrian behavior during evacuation process, such as pedestrian behavior at bottlenecks and the “faster is slower” phenomena [31]. Kirncher et al. (2002) studied the evacuation from a room with one or two exits using a CA model [32]. The model relied on ideas from chemotaxis and proposed a bionics approach to describe the interaction between the pedestrians [32]. The research concluded that the evacuation times are dependent on the strength of the herding behavior of the pedestrians. The minimum evacuation time found for proper combination of herding behavior (pedestrians follow other pedestrians with no clue of the exit location) and the use of knowledge about the shortest way to the exit. Huang et al. (2008) developed a CA model with a modified floor field in order to study evacuation from rooms with multiple exits and internal obstacles [33]. The study showed that for pedestrians who are unaware with the room geometry, additional exits are not helpful and can cause extra delay to the evacuation process [33]. 18  Existing models were also used to plan pedestrian movements and understand their behavior at large events such as street parades and carnivals. For example, Batty et al. (2003) used an agent-based model in the planning phase of the Notting Hill Carnival in England [34]. The model that relies on ‘swarm intelligence’ was used to design pedestrian routes between the carnival attractions [34]. Several studies applied the legion simulator [35], a multi-agent modeling simulation model, to study the movement of large crowds in different applications. For example, Yue et al. (2009) applied the legion package in developing measures to improve the pedestrian circulation at the world expo 2010 in Shanghai, China [36]. Monteleone et al. (2008) applied the same model to address several key issues related to pedestrian movement at the World Trade Center Memorial in New York City, including an evaluation of the physical design (queuing, ticketing, etc.), operational efficiency, and security and safety concerns [37]. Klüpfel et al. (2007) developed an empirical pedestrian simulation model in order to manage pedestrian circulation at the World Youth Day 2005 in Cologne, Germany and pedestrian evacuation from football stadiums [38].  Other applications of pedestrian microscopic simulation models were also found in the literature. For example, Moldovan et al. (2007) used a microscopic simulation software “SmartCrowd” to study pedestrian access to a football stadium [39]. The simulation model relied on the concept of social forces with the ability to introduce behavioral patterns that represent pedestrian collective behavior [39]. The macroscopic results of the simulation, particularly densities and pedestrian flow, were compared to observations made in the real system. Schultz et al. (2007) applied a discrete microscopic pedestrian dynamics model to address pedestrian characteristics during emergency evacuation from airport terminals [40]. Kim et al. (2013) proposed a model that relies on the social force theory in order to study pedestrian queuing at a cinema ticketing booth [41]. 19  As presented in this section, existing models were used to study many pedestrian applications. Existing models focused on studying pedestrian movement in big events and large pedestrian facilities as well as pedestrian evacuation studies. Studies focused on the ability of the models to describe the aggregate characteristics of pedestrians and observing some basic phenomena associated with the application being studied. Applications that require accurate trajectories and detailed understanding of pedestrian behavior have not been considered by existing models. Applications such as safety studies using traffic conflict techniques, understanding pedestrian behavior at shared space facilities are very difficult to be addressed using existing models. These applications require a simulation modeling platform that is developed based on solid understanding of pedestrian behavior. Such a platform must be capable of producing accurate microscopic results, mainly accurate trajectories and accurate execution of specific behavior during specific interactions.  2.4 Evaluation of Existing Simulation Models Existing simulation models were evaluated in several studies and several shortcomings were identified. For example, Shiwakoti et al. (2008) criticized the SFM, as it neglects the ability of pedestrians to think and take rational decisions based on their observation of changes in the walking environment [42]. The study also reported that it is not easy to account for pedestrian heterogeneity in the model and that the model might not be sufficient in simulating complex scenarios, where route finding is important [42]. Pan (2006) reported that it is very difficult to consider the heterogeneity of the pedestrian system in the CA model, particularly the pedestrian speed variation as the movement each time step is limited by the fixed cell size [11]. The CA model also suffers from visualization problems, as pedestrians appear to be hopping across cells instead of a more realistic continuous movement in space [11]. 20  Zhou et al. (2010) provided detailed evaluation of existing simulation models [43] and several issues were discussed, particularly various calibration and validation approaches. Existing calibration and validation approaches do not ensure the model is capable of producing accurate pedestrian trajectories and simulating pedestrian behavior during interactions correctly. Duives et al. (2013) assessed several existing pedestrian simulation modeling approaches (e.g., cellular automata, social force models, hybrid models, behavioral models and network models) with respect to the movement of crowds [44]. Aspects such as the ability of the model to reproduce known crowd movement phenomena (such as self-organization phenomena), the capability of models to consider multiple pedestrian classes, and computational time were investigated. The study reported that current pedestrian simulation models are inadequate for applications that require both precision and speed of calculations [44]. The ABM approach was recently reviewed as a potential approach that is suitable to model complicated systems such as the pedestrian system. Helbing (2012) reported that the ABM approach has many merits that make it suitable to model a complex social system like pedestrians [7]. The ABM approach is very flexible and capable of accommodating different agent types and different behavior rules that can vary between different agents. Thus, the ABM provides the ability to handle such a heterogeneous system as pedestrians [7]. The ABM approach could be easily integrated with another modeling approach to address specific applications [7]. The ABM is ideal for testing different hypotheses and the consequences of specific intervention on agent behavior. Finally, the ABM approach allows the modelers to aggregate the outcomes of the individual agents to get macroscopic results for the system without making any prior assumptions about the overall performance of the system [7]. The major shortcoming of the ABM approach was the computational complexity, especially at high-density levels [7]. 21  2.5 Calibration of Simulation Model Parameters The calibration of microscopic pedestrian models is a difficult task, which does not have a well-established approach yet. The complexity of the calibration process is attributed to the large number of parameters that need to be calibrated. As well, it is difficult to isolate specific parameters that are responsible for specific pedestrian behavior. Traditionally, the calibration and validation of microscopic pedestrian models are usually accomplished by adjusting model parameters in order to achieve an acceptable match between some aggregate measures resulting from the model (e.g. speed, density and flow) to macroscopic relationships extracted from data or from fundamental diagrams. Recently, many studies adopted direct and indirect approaches to extract values for micro-simulation model parameters from data. For example, Daamen and Hoogendoorn (2012) [45] used maximum likelihood estimation to calibrate the pedestrian simulation parameters from the results of a laboratory evacuation experiments. Bauer et al. (2010) [46] conducted controlled walking experiments in London-based walking laboratory (PAMELA). The purpose of the experiments was to calibrate social force model’s parameters to simulate pedestrian stopping and turning movements. Pedestrian trajectories were extracted by means of laser scanner measurements. The study reported that calibrating pedestrian desired velocity directly from data is sufficient to model observed behavior with reasonable accuracy.  Cao et al. (2012) [47] calibrated a commercial pedestrian micro-simulation system directly from video data recorded at a railway Station in China. The simulation system calibrated in that study was based on the SFM. The authors used data to develop a statistical expression of the relationship between pedestrian flow and average speed of pedestrians. This expression was then used to input pedestrian speed into the model depending on the flow rates being simulated. Zeng et al. (2014) [48] adjusted the social force modeling theory to study pedestrian behavior at signalized 22  intersections. The study classified model parameters into two main groups: measurable parameters directly estimated from pedestrian data set and non-measurable ones, indirectly derived by maximum likelihood estimation. The paper identified few measurable parameters that were extracted from video data recorded at a signalized intersection in Nagoya City, Japan. The measurable parameter set was pedestrian speed-related parameters (desired speed, maximum acceptable speed and velocity change), direction change of conflicting pedestrians, and relaxation time (defined as the time for a pedestrian recovering from current speed to the personal desired speed without any disturbance), which was extracted from the acceleration profile of pedestrian. Overall, calibration and validation represent the major shortcomings of the existing simulation models. Traditional calibration and validation techniques aim at ensuring that the aggregate model results agree with some fundamental relations or some macroscopic results observed in reality. This approach is not ideal for modeling a complex system such as pedestrians, as the aggregate behavior of the system is highly dependent on the behavior of individual pedestrians. As well, this approach does not guarantee that the simulated pedestrian trajectories are accurate and reflect the actual behavior of pedestrians. Recently, several studies adopted more advanced techniques for calibration and validation in order to overcome these issues. However, neither the accuracy of individual trajectories nor the individual behavior of pedestrians was targeted in the calibration and the validation process. As well, many of these studies relied on controlled experiments to extract pedestrian behavior needed for the calibration and validation.  There is a need to propose new approaches for calibrating and validating pedestrian simulation models in order to ensure that pedestrian behavior at different interactions and pedestrian trajectories are accurate. The behavior of pedestrians and their trajectories used in the calibration and validation should be extracted from 23  actual data in order to ensure that the behavior produced by the simulation represent the natural behavior of pedestrians. 2.6 Understanding Pedestrian Behavior Traditionally, pedestrian walking speed was considered a fundamental parameter of pedestrian flow that was used to understand pedestrian behavior in different applications. Many pedestrian-related applications in the field of transportation engineering require an accurate estimation of pedestrian walking speed, including design of pedestrian facilities (such as train stations and shopping centers) and the design of pedestrian signals. Understanding the variation of walking speed among different pedestrian categories or among individuals of the same category for different characteristics of a pedestrian facility were considered of great importance in designing better facilities. For example, the variation of pedestrian crossing speed at signalized intersections with age, gender, group size, and length of crosswalk was studied intensely in order to provide better signal timing plans that ensure the safety of all pedestrians at the intersection. Earlier studies applied manual methods in order to extract the crossing speeds for different pedestrian categories. For example, Knoblauch et al. (1996) conducted a series of field studies at sixteen signalized crosswalks in urban areas in order to study the walking speed of different categories of pedestrians under different flow conditions [49]. The study concluded that pedestrians tend to have higher crossing speeds on wider streets and that pedestrians who start crossing the intersection during the Walk phase tend to have lower walking speeds than temporal violators who start crossing on Flashing Do not Walk (FDW) or Do not Walk (DW) phases. The study also reported that age has a significant effect on crossing speed and the current crossing speed values used for designing pedestrian signals are not adequate for older pedestrians. 24  Continuing with pedestrian behavior at signalized intersections, the effect of group size on crossing speed was also investigated. Several studies reported that pedestrians who walk alone have faster crossing speeds compared to pedestrians who walk in groups [ [49], [50]]. The variation of crossing speed of the same pedestrian along the crosswalk was explored in [51]. The study reported that the crossing speed of the pedestrian decreases in the second half of the crosswalk compared to the first half. Recently, automated methods were applied to extract pedestrian speed. For example, Hediyeh et al. (2014) investigated changes in pedestrian crossing speed after the implementation of a scramble phase at a signalized intersection in Oakland, CA [52]. Pedestrian speeds were extracted automatically by means of computer vision techniques. The study reported that the average crossing speed is higher after the implementation of the scramble phase. Furthermore, the average crossing speed was found to be higher for the diagonal crossing compared to the crossing speed for the side crosswalks.  Numerous other studies were found in literature that utilized walking speed to understand pedestrian behavior in other applications. For example, Lam and Cheung (2000) surveyed different types of walking facilities in Hong Kong in order to define key pedestrian flow characteristics [53]. Surveyed facilities included indoor and outdoor walkways, signalized crosswalks with and without midblock, signalized and non-signalized crosswalks leading to light-rail transit stations, and five types of walking facilities in railway stations. The main objective of the survey was to establish a relationship between pedestrian speed and flow for the considered facilities in order to calibrate the travel time function for each facility. The authors reported that collected data and established fundamental relationships could be used to calibrate pedestrian simulation models in Hong Kong or similar Asian cities. Lee and Lam (2006) studied the walking speed variation on uni-directional and bidirectional stairways of three mass transit railway stations in Hong Kong 25  [54]. The behavior of pedestrians on stairways at different density levels was expressed in terms of the variation in the walking speed of pedestrians using the facility. The authors reported that the results obtained in the study could be used to evaluate pedestrian simulation models at railway stations. Montufar et al. (2007) explored the difference between pedestrian normal walking behavior and their behavior at signalized crosswalks over the course of 18 months [55]. The study explored the variation in the normal walking speed and crossing speed across different pedestrian categories in different seasons. The study reported that the normal walking speed was always less than the crossing speeds for all cases investigated. 2.7 Gait Parameters Gait analysis is a microscopic-level process, which allows true estimates of objective walking measures such as stride frequency and length. This analysis can improve the understanding of pedestrian walking behavior. Gait is identified as useful as biometric for human recognition [ [56], [57]]. Pedestrians are recognized to have a unique rhythm during walking that is periodic and oscillatory [ [56], [57], [58]]. The qualitative properties of walking patterns such as periodicity can be used for pedestrian detection and behavioral analysis. Earlier studies applied manual methods to measure gait parameters and establish their relationship with walking speed. For example, Yamasaki et al. (1991) reported that the relationship between stride length and walking speed is linear up to a certain speed (2.0 m/s for males and 1.83 m/s for females) then this relationship starts to deviate from linearity [59]. Crowe et al. (1996) found that both stride frequency and length are highly correlated with walking speed, but walking speed is more sensitive to step length than to step frequency [60]. Elble et al. (1991) found that younger people walk faster by increasing their stride length rather than stride frequency compared to older people [61]. The study reported that the pedestrian speed and step length for older people are about 17-20% lower than the 26  corresponding values of young adults. Judge et al. (1996) reported that step length for older pedestrians is 10% shorter compared to younger adults [62]. The effect of gender was also studied in several studies. For example, Crowe et al. (1996) found that females have significantly shorter stride length and larger stride frequency compared to males, while there was not a significant difference in walking speed between the two genders [60]. Recently, studies started to adopt an automated methodology to extract gait parameters from pedestrian speed profiles. For example, Hediyeh et al. (2014) conducted a study in which they relied on computer vision techniques to collect data from the city of Vancouver, BC. The results showed that the gait parameters (mainly step frequency and step length) are influenced by factors such as crosswalk grade, gender, age, and group size [63].  Furthermore, gait analysis was adopted by several studies to understand pedestrian behavior and automatically classify pedestrian into different categories according to age and gender. For example, Crosbie et al. (2000) utilized video cameras to record step time and step length of pedestrians while walking across a curb under natural environmental conditions [64]. The results showed that pedestrians were able to predict accurately the need to make an adjustment to step length in order to walk across the curb successfully. The selection of step length was found to be independent of walking speed as it only depends on the predicted foot position with respect to the curb. Lowery et al. (2007) investigated age-related changes in gait parameters when pedestrians are avoiding obstacles within their walking environment [65]. Shkuratova et al. (2008) examined the influence of age on gait adjustments during the transition from a wide to a narrow pathway [66]. Makihara et al. (2010) introduced a video-based gait feature analysis for human age and gender classification using a large-scale multi-view gait database [58]. The study used stride and body frame as specific features for classifying adult males and females. Zaki et al. (2013) proposed 27  a method for discriminating pedestrians from vehicles by comparing the velocity profiles of each road user type [67]. The study estimated step frequency and step length of walking pedestrians from the oscillations in their speed profiles. Hediyeh et al. (2013) developed a methodology for automated identification of gender and age using gait parameters [68]. The methodology was validated on two data sets from Vancouver, BC and Oakland, CA and results showed that the accuracy of this approach is 80% for gender classification and 86% for age classification.  2.8 Computer Vision Computer vision techniques have gained recent interest as effective tools that could be used to study road user behavior and conduct automated safety analysis applications [ [69], [70], [71]]. Several advantages were identified for the computer vision approaches used to analyze video data. First, video cameras are easy to install and provide the ability to collect rich and detailed traffic data [72]. Second, automated video-based computer vision algorithms overcome the limitations of manual approaches used to collect and analyze different road users’ data including the cost, the reliability of collected data, and the ability to extract useful information that help developing better understanding about road users’ behavior. Different approaches were found in the literature for detecting and tracking road users from video data including 3D model-based tracking, region-based tracking, and feature-based tracking. The 3D-model based approach applied supervised learning algorithms, in which the prior knowledge of road users is used to develop models that are applied to detect road users from the video scene. The accuracy of this approach is very good but it suffers from the dependence on detailed geometric models, which must be developed first before the tracking process could be initiated [ [72], [73]]. 28  The second tracking approach is the region-based tracking, in which the background image is subtracted from the video image in order to identify connected regions (blobs) for each road user in the current video frame. These blobs can be tracked over time using information such as size, shape, and color of the road user in order to produce the road user trajectory. While this approach is ideal for tracking road users in light traffic conditions, it suffers from the problem of over-grouping in crowded video scenes [72]. The over-grouping occurred when multiple road users are grouped together as one large object, which is a known problem in crowded video scenes. The feature-based tracking approach searches for distinct points (features) on moving objects in the video scene. Features that share similar movement patterns in terms of speed and movement direction, and exist in close proximity are grouped together to form one object. These objects are tracked over the video frames to extract the road user trajectories [72]. This feature-based tracking approach was adopted by the transportation group at UBC in order to develop an automated system for analyzing the behavior of road users and conducting automated safety studies. The automated computer vision platform developed at UBC is composed of two modules: 1) a video processing module for road user detection and tracking, and 2) interpretation modules for calculating different surrogate safety indicators, the classification of road users, violation detection, and the analysis of road user behavior. Several successful applications of the system have been described [ [71], [74]]. The current system can detect and track road users in complex traffic environments such as urban intersections. The tracking accuracy has been measured between 84.7% and 94.4% on three different sets of video data. It has also been shown that it can detect and measure the severity of traffic conflicts for safety applications with a very high accuracy. More details about the different components of the system are provided in the following chapter.  29  3. Methodology This chapter provides a detailed discussion regarding the methodology applied to conduct different components of this research. The chapter addresses two main components: the microsimulation model and the computer vision platform. The first component provides detailed description of the modeling approach utilized to develop the simulation model presented in this thesis. An overview of the simulation model structure and the life cycle of the pedestrian agents within the simulation are presented in this component. The second components considers the details of the automated computer vision algorithm used to conduct detailed pedestrian behavioral analysis and extract trajectories required for the calibration and the validation of the simulation model. A detailed description of extracting trajectories of road users from video and extracting important pedestrian parameters from trajectories, including speed and gait parameters, are provided in this component.  3.1 The Simulation Model  3.1.1 Basics of Agent-Based Modeling As discussed earlier, the agent-based modeling [[18], [19], [20]] is a relatively new modeling approach that was successfully applied to address different applications in many domains including economics, biology, ecology, and social science. ABM is gaining recent interest as a suitable mechanism that could be used for the computer simulation of the pedestrian systems as it can overcome many shortcomings associated with other modeling approaches [7]. As such, the ABM approach was utilized to develop the microscopic simulation model presented in this thesis. A typical ABM usually consists of three major components: the agents, the environment, and the behavior rules. Agents represent different entities of the system while the environment represents the space where these agents are situated. Agents interact with each other and with their 30  environment according to set of behavior rules, defined by the modeler. The three components of the model are discussed in details in the following: 3.1.1.1 Agents Agents are the core component of an ABM as they represent the actual entities being studied. The behavior of the agents and the changes that occur to their behavior as the simulation evolves determine the outcomes of the model. Regardless of the objective of the ABM, agents usually share some general characteristics. As described in details in [ [75], [76]], agents in any ABM are:   Situated in an environment and they react to the observed changes in the environment  Autonomous and independent, as each agent is free to move in the environment and take actions, independently, according to a set of predefined rules of interactions  Goal oriented, as the objective of agents in the simulation is always to achieve a certain goal (e.g. reach a destination; maximize a certain utility function …etc.)  Social, as they continuously communicate and exchange information with other agents, which may result in change of the behavior of the agent  Reactive to the change that occurs in the environment and changes in the state of other types of agents or other instances of the same agent type  Proactive, as they used their past knowledge and experience to predict changes that might occur in the surrounding environment and take actions based on their judgement  Heterogeneous as each instance of an agent type may take different values of a parameter or may be assigned to different behavior rules Normally, an ABM will include more than one agent type, representing different categories of entities being studied. For example, in the model presented in this thesis, different agent types 31  were defined including pedestrians and fixed objects (e.g. stopping vehicles, trees, and light posts), in addition to some agent types that were introduced to study specific cases, such as (moving objects) that were used to represent a moving vehicle that interacted with pedestrians in the case study presented in chapter 7. It is always possible to introduce new agent types to the model (such as bikes, buses, among others) to address other applications. Typically, the model will include many instances from each agent type, representing different individuals of each type. Each agent type can be represented by a different geometric shape. In the proposed model, pedestrian agents were represented as circles with diameter equals to the average shoulder width of the pedestrian. Fixed and moving objects were modeled as polygons. Any curved or irregular lines in the actual fixed object were approximated by straight lines in the model in order to reduce computational cost. Each agent type is defined by set of attributes and characteristics, as well as set of rules that govern the interaction between instances of this agent type themselves and instances of other agent types. A pedestrian agent type for example is defined by set of attributes including age, gender, and physical characteristics (e.g. height and weight) as well as set of parameters that affect the behavior of this agent type including desired walking speed and preferred personal distance (the distance which the pedestrian prefers to keep from any other element in the walking environment). Fixed objects are defined by attributes such as height and size. The assigned parameters for each agent type can vary among agent instances depending on instance’s attributes. For example, older pedestrians can have different desired speed distribution than younger ones. Female pedestrians can have larger personal distance compared to male pedestrians. The parameters assigned to each individual can also vary depending on the environment conditions. For example, pedestrian can accept smaller personal distance if the density of the walking environment is high and vice versa. 32  The flexibility of the model is not limited to the variation of parameters among individual agents, but it is extended to include the behavior rules as well. Behavior rules that define agent behavior during interactions with other agents can also vary depending on agent’s attributes and environment conditions. For example, males interacting with opposing pedestrians can behave differently compared to females involved in the same interaction. A pedestrian walking alone can have a different behavior when interacting with another pedestrian than if this pedestrian is walking in a group.  3.1.1.2 Environment The environment is the space in which agents exist and interact with each other. The degree of complexity in the environment representation in ABM varies significantly depending on the purpose of the model and the available resources. The simplest form of the environment is a two-dimensional featureless grid which is very efficient in terms of computations. However, this form limits the movement of the agents and does not provide the flexibility to consider speed variation among agent instances. A more complex representation of the environment is the continuous space, in which exact location, speed, and movement direction of an agent can be expressed. Normally, the space will be a two dimensional space, however for some applications, it will be important to introduce a third dimension. As well, a featureless space could be inadequate to address certain applications. For example, if a model is developed to study different scenarios of a building evacuation, the environment must include a three dimensional representation of the building with details like corridors, stairs, and doors.  In the current model, two layers were utilized to represent the environment. The first layer is a continuous two dimensional space while the second layer is a two dimensional grid of fixed size cells (50 cm × 50 cm). The first layer is the actual layer in which all agents are situated and all 33  movements and interactions took place. The continuous space layer enables each agent to walk at any desired direction with any walking speed, which provides the degree of flexibility essential for modeling the pedestrian system. This continuous space layer used in the model does not contain any features, which means that all elements that existed in the environment and affect the behavior of pedestrians (e.g. trees, buildings) must be introduced to the model as independent agent types. This representation of the environment was adequate to address all cases considered in this thesis. However, it is still possible to introduce a more complicated representation of the environment if it is needed in other applications or case studies. The continuous space layer was overlaid with the second layer (the fixed size grid), which was mainly used for data collection. This sole purpose of the second layer was to extract some model outcomes including pedestrian density and flow. However, there are no interactions or movements that took place on the grid layer of the environment. 3.1.1.3 Behavior rules The third component of the ABM, and the most important one, is the rules that define the behavior of agents during different interactions. Conceptually, two types of rules are usually defined for any agent type: rules that are independent of other agents and rules that result from interaction between different agent types [77]. The first type defines general behavior that agents will execute regardless the state of other agents. For example, a pedestrian walks with speed (V) towards a desired destination. Each model update, pedestrians seek to execute this behavior, regardless of the state of other agents and the environment. The later type is executed only if specific conditions are satisfied. For instance, if a pedestrian is moving towards a destination interacts with an opposing pedestrian, the pedestrian will change the movement direction to resolve this conflict and avoid collision with the opposing pedestrian. This means that this type of rules is usually 34  defined as if-then statements. This does not mean that behavior rules are expressed in verbal statements. Actually, behavior rules are usually expressed using complex mathematical expressions that define what to do if certain conditions or certain states of other agents are satisfied.  In most of ABM, behavior rules are the most important components, which will determine the outcome of the model. As such, the rules defined in the current model will be described in details in two chapters. Specifically, chapter 5 is dedicated to address rules that define pedestrian behavior during interaction with other pedestrians moving in the same direction (uni-directional interactions). Chapter 6 focuses on rules that govern interaction between pedestrians moving in opposite directions and interaction between pedestrians and fixed objects. As well, Chapter 6 provides detailed discussion of pedestrian behavior while walking in groups. Mainly, the key rules of interactions were extracted from the results of a detailed pedestrian behavior study presented in chapter 4. It is always possible to introduce new rules that are required to address new applications. For example, if it is required to study pedestrian – bike interactions for a particular application, the model could easily be expanded by introducing a new agent type (bikes) and defining the rules of interactions between pedestrians and this new agent type.  The possibility of expanding the behavior rules enables the model to be flexible and capable of handling new applications or special cases within a particular study as occurred in the case study presented in chapter 7. In this case study, the model was used to study pedestrian movement in a crowded environment. All interactions occurred between pedestrians themselves and between pedestrians and fixed objects in the walking environment. The behavior rules defined in chapters 5 and 6 were sufficient to address all interactions. However, one vehicle appeared at the study location and interacted with few pedestrians involved in the study. It was essential to introduce this vehicle to the model as the behavior of the pedestrians was affected by its presence. As such, 35  the vehicle was introduced to the model as new agent type (moving object), and simple interaction rules were defined. Accordingly, the model was successful in reproducing the behavior of pedestrians involved in the interaction, as will be discussed in details in chapter 7. 3.1.2 The Simulation Platform Agent-based simulation models could be developed from scratch using many computer languages (C, C++, and Java, among others).  However, this requires investing significant efforts in handling other issues than the core model itself, such as the graphical user interface (GUI), data export, and visualisation of the simulation. As such, the use of an available agent-based simulation platform could be very beneficial. Such platforms provide important tools to handle many basic operations required by any agent-based simulation, which allows modelers to focus on the important parts of the model (defining agent classes and the behavioral rules) [ [78], [79]]. Many platforms are available for creating agent-based models including Swarm [80], REPAST [81], and NetLogo [82]. In this research, REPAST simulation platform was utilized to develop the microsimulation pedestrian model. REPAST (Recursive Porous Agent Simulation Toolkit) is a comprehensive agent-based modeling environment that was originally developed at the University of Chicago’s Department of Social Science Research [83]. REPAST toolkit was selected for many reasons. Firstly, it is a free open source application that has been under continuous development and update in the past fifteen years. Secondly, REPAST provides all tools required to create, run, display, and collect data from agent-based models. Furthermore, models in REPAST can be implemented using variety of programming frameworks including Java (RepastJ), Microsoft.NET (Repast.NET), and Python (RepastPy) with many future implementations to be explored. The platform can efficiently run on all common operating systems (Microsoft Windows, Mac, and Linux).  Finally, there are 36  considerable amount of demonstration models and tutorials available through the REPAST website, which provides reliable user support and better understanding of the platform facilities. Among the available versions of REPAST, RepastJ was selected to conduct this research as it has several advantages. Java is a popular programming language that runs independently on different operating systems. Java is an object oriented programming (OOP) language, which is considered ideal for implementing agent-based simulations due to the similarity between the concepts of classes and objects in the (OOP) and the agent types and agent instances in the agent-based models [77]. Java is an open source language and consequently, it has a considerable set of very useful third-party libraries that aid the modelers in designing the agent-based models. Lastly, Java was the original implementation language for REPAST; thus, there are more tutorials and demonstration models available for RepastJ compared to any other version of REPAST.  The REPAST platform integrates two layers: the core layer that runs a background code essential for the simulation and an external layer, in which the user defines different agent types and behavioral rules using one of the available implementation languages [79]. The core layer in REPAST mainly provides templates for representing the environment in which agents are situated, handling events scheduling, generating a visual display for the model, and managing results’ output. REPAST provides three representations for the environment: cellular space, continuous space, and network space. REPAST has numerous cellular space options that range from typical square cells to special grid shapes such as the hexagonal grids. REPAST also provides a set of classes that enables users to import their space from a raster image or a GIS application into the models. It is also possible to combine two or more realisations of space into the model. Another powerful tool provided by REPAST is the scheduling mechanism, which enables the user to set 37  up specific state of changes within the simulation. The platform provides three different approaches for scheduling model changes [84]:  Events may be scheduled to occur repeatedly at specific intervals through the simulation  Events may be scheduled to occur at specific time instances in the simulation   Events may be scheduled to occur depending on the occurrence of other events Figure 3-1 shows a typical display of a simulation run in REPAST. As shown in the figure, the display includes a module for controlling the simulation option, change specific parameter values, and defining data output files (module A). The second module (module B) enables the modelers to visualize agent state during simulation. The third module (module C) contains different buttons to control the simulation run and extract different outputs from the simulation. The current tick (simulation time) is displayed in the last module (module D).  Figure 3-1.Typical REPAST display for a typical simulation run 38  3.1.3 Managing the Passage of Time in the Simulation Model Generally, there are two common approaches that can be used to control the passage of time in any agent-based model: time-driven (synchronous) approach and event-driven (asynchronous) approach. The time-driven approach approximates the real continuous time into discrete fixed time steps (∆T). In every step, each agent updates its current status according to changes corresponding to the length of the model step. For example, suppose that a pedestrian is walking freely in a walking environment towards a destination with speed 1.2 m/s. If the model step is 0.25 seconds, each model update the pedestrian agent will update its location so that the distance covered during this step is 0.3 m. The smaller the model step, the better the resolution of the events and the accuracy of simulation. On the other hand, decreasing model step increases the complexity of the simulation and reduces the speed of simulation significantly. This trade-off between the step length and complexity of the simulation depends mainly on the application being considered and the available resources. The model step used for a pedestrian ABM in which pedestrians continuously interact with each other and change their direction and speed is certainly going to be different than the step of a model used to study a slow chemical reaction in which changes in reality occur over longer times.  The event-driven approach is usually used to model scenarios where changes in the status of agents are dependent on the occurrence of particular events that occur from time to time. In this case, the model is updated only if a specific event occurs and agents do not have to update their status continuously. The elapsed time between events is variable, and consequently, agents update their status at variable time intervals related to the occurrence of those events. Every update, only agents that are affected by the occurrence of a particular event are updated while the status of other agents remains constant. For example, if the ABM is used to model a chemical process where reactions 39  only occur if the temperature rise above specific threshold. As the temperature is below that threshold (the event of rising temperature has not occurred), the agents’ status does not change. As such, there is no need to update the model until the temperature rises above the defined threshold. Every time the event is observed, the agents update their status but otherwise, their status remains constant.    The current model utilized a time-driven (synchronous) approach with a model step of 0.1 seconds to handle the progress of time. This approach is suitable for modeling pedestrians who interact frequently with each other and with other elements in their walking environment. The time step of 0.1 seconds was selected to achieve the balance between simulation speed and accuracy of simulation. Preliminary testing showed that decreasing model step below 0.1 seconds did not exhibit a significant improvement in either the visualization of the pedestrian movement or the accuracy of the produced trajectories.  3.1.4 Lifecycle of Pedestrian Agents in the Simulation Model  As the model initializes, the platform sets up the environment and starts the simulation schedule. Once the model is initialized, instances of different agent types can enter the simulation. As pedestrians are the major agent type in the developed model, this section focuses on pedestrian agents and provides an overview of their life cycle in the simulation. Pedestrians can enter the simulation using different mechanisms. The modeler can define specific time for each instance (pedestrian) to enter the simulation. This mechanism is useful for model validation where the model is used to replicate the pedestrian movement in an actual case study. In this case, it is important to imitate the actual conditions including the exact time at which pedestrians appear in the walking environment. Another mechanism that can be used to control pedestrian entry to the simulation is to set a start time for the first pedestrian to enter the simulation and define an arrival 40  rate so that pedestrians enter the simulation according to this arrival rate. In this mechanism, the modeler controls the number of pedestrians entering the simulation each arrival. Regardless of the pedestrian entry mechanism, each pedestrian needs an origin in order to finalize the entry process. The origin of each pedestrian can be defined as a specific point with coordinates that are set by the modeler. Alternatively, the pedestrian can randomly enter the simulation at any point of a specific areas reserved to represent entrances to the environment (e.g. a door or a crosswalk entrance). Entrances are defined by the modeler as an area of known coordinates, and each pedestrian can enter the simulation at any point within this area. In case there are many entrances to the environment, the modeler can set specific entrance for each pedestrian or the pedestrian can choose an entrance randomly based on predefined distribution of the percentage of pedestrians using each entrance. Once a pedestrian agent enters the simulation, it is assigned to basic parameters and attributes as well as a specific objective to be achieved as the simulation evolves.  Attributes like gender, age, and parameters such as the desired speed can be randomly assigned according to predefined distributions. Alternatively, each pedestrian can be assigned to a specific value of any parameter or attribute as required by the modeler. The objective of each pedestrian agent is usually to reach a specific destination. It is possible to define multiple intermediate destinations that the pedestrian wants to visit before reaching the final destination. The behavior of the pedestrian at the intermediate destinations is defined by the modeler (for example, pedestrian wait for some time at an intermediate destination). Similar to the origin, the destination could be introduced as a specific point defined by its coordinates or as area that represents an actual destination in reality (a door for example). When the pedestrian agent reaches the final destination, the agent is usually removed from the simulation unless otherwise defined by the modeler.  41  The behavior of pedestrian agent from the moment it enters the simulation until it reaches the final destination is illustrated in Figure 3-2. As shown in the figure, each pedestrian in the simulation observes other pedestrians and objects that exist in the pedestrian’s perception area, including their current location, the current speed, and movement direction of other pedestrians. Based on the collected information, the pedestrian assesses the possibility of future conflicts with other pedestrians and/or objects in the walking environment. If a conflict is expected, the pedestrian reacts to resolve the conflict situation before colliding with the pedestrian or object in conflict. First, the pedestrian checks conflicts with opposing pedestrians and fixed objects. If conflicts are defined, the current pedestrian modifies the current walking direction αc and/or walking speed (𝑣𝑑)𝑐 according to rules defined in chapter 6. Before proceeding in the new movement direction, pedestrian will check conflict with leading pedestrians who move in the same direction (uni-directional conflicts). If uni-directional conflicts are defined, the pedestrian considers determining the location next model update (t + ∆T) according to rules defined in chapter 5. Otherwise, pedestrian proceeds in the required movement direction with the current desired speed. However, all these rules are skipped if the pedestrian is involved in a collision with other entity in the environment. A collision in this context means that other pedestrian or any object exists in close proximity to the pedestrian so that the distance between them is less than the personal distance of the current pedestrian. In this case, pedestrian gives priority to resolve the collision situation. The behavior of pedestrians involved in a collision is determined based on rules presented in chapter 6. 42  Figure 3-2. Pedestrian’s life cycle in the simulation model Pedestrian enters simulation (T = t) Conflict detected Parameters and attributes assigned, mainly:   1- Origin & Destination(s), and hence αc 2- Desired walking speed (𝑣𝑑)𝑐 3- Group status Gather information about other pedestrians and objects in perception area Evaluate bi-directional conflicts and/or conflicts with fixed objects Update (α) and (V) according to rules presented in chapter 6 Evaluate uni-directional conflicts based on the final α and V  Conflict detected Determine location next update according to rules presented in chapter 5 Determine location next update normally based on Equations (5)through (7) Update location next model update (T = t + ∆T) Final destination reached? Currently involved in collision False True True False Determine location next update according to rules presented in chapter 6 False True False Remove pedestrian from simulation 43  3.1.5 Border Types and Boundary Conditions Two important features in any ABM are the type of the border of the environment and the boundary conditions, which simply defines the behavior of agents at the borders of the environment. The two features vary significantly according to the application being considered by the ABM. Different type of borders are available in the simulation platform, (REPAST), including strict borders that agents cannot cross from any side, semi-strict borders that agents can go through from one side only, and infinite borders that agents can move freely across. Considering a scenario of evacuating a room that has one door as an example, the modeler defines a walking environment (the room) that is surrounded by borders (the walls). As pedestrians cannot go through the wall at any time, so, the borders of the walking environment must be defined as strict borders. Additionally, the behavior of agents at the borders of the walking environment must be carefully defined. In the previous example, a behavior like keeping specific distance from the border (the wall) could be defined for the pedestrian agents. As well, rules of interactions could be different at the border of the environment.  In the model presented in this thesis, all applications considered involved pedestrians moving in open environments (crosswalks or open streets). Crosswalks are usually surrounded by marking lines. Marking lines do not represent actual borders that pedestrian cannot cross, however, pedestrian should stay within the crosswalk and do not move outside the crosswalk limits. As such, borders were defined as finite boundaries in all applications considered in this thesis, so pedestrian can cross the borders in both directions if needed. However, additional rules were defined for pedestrians moving close to the borders. Simply, pedestrians need to change the direction of motion to avoid conflict with other pedestrians and meanwhile, they will always try to stay within the crosswalk or the intersection limits. The pedestrian will choose to walk for longer distance 44  and/or with slower speed to avoid collision if this option guarantees that the pedestrian will not cross the borders of the walking environment. Pedestrian can cross the borders if this is the only option available to avoid conflict. However, in this case the pedestrian gives priority to return to the limits of the considered walking environment once the conflict is resolved (cross the border in the other direction to get back to the crosswalk or the intersection limits). In future, research could by conducted to tune these boundary conditions, including for example defining a utility function that defines when a pedestrian can cross the border of the environment and when to get back into the limits of the walking environments.  3.2 Computer Vision Platform 3.2.1 Extracting Pedestrian Trajectories The role of Computer vision in this research is very important. Computer vision algorithms were used in this research in order to detect and track pedestrians from video data. Extracted pedestrian trajectories were used for two purposes: First, to conduct a detailed pedestrian behavioral study required to understand pedestrian behavior during different interactions. The study, which is presented in chapter 4, was used to identify the interaction rules that control pedestrian behavior in the simulation model. The second goal is that extracted trajectory will be used in the calibration of the model parameters and validation of model results. The calibration and validation aim at ensuring that simulated trajectories resulting from the model are accurate compared to actual trajectories. Acquiring actual pedestrian trajectories from the video data was conducted through an automated video processing system that was developed at UBC [ [85], [86], [71]]. Different components of the system are illustrated in Figure 3-3.   45  Video Footage    Camera Calibration         Trajectories      Feature Grouping  Feature Tracking      Figure 3-3.Trajectory extraction process As shown in Figure 3-3, the process starts with the camera calibration, which is an essential step required to create mapping between the real world coordinates and the image space [87]. Such mapping is essential so that road user trajectories could be represented in real world coordinates. Furthermore, precise camera calibration increases the accuracy of the feature grouping algorithm and, hence, the accuracy of the tracked trajectories from the computer vision platform [87]. The process depends on restoring some internal camera parameters (focal length, skew angle, and radial lens distortion) and external transformation parameters (shift and rotation) to construct a transformation matrix (the homography matrix) between the image and real world system. This is done by defining some features on the image plane (distinct points like curb corners or marking lines, known lengths, known angles, etc.) and the corresponding features on the real world image (any orthophoto of the site obtained from google earth for example). A cost function is defined in terms of the difference between observed and back projected feature on the world image. The transformation parameters are developed by minimizing the cost function using the Nelder-Mead 46  (NM) simplex algorithm. The whole process was described in details in [87]. The accuracy of the process was examined and the process was found to be accurate enough for positioning slow-moving road users such as pedestrians [87]. The next step is to detect moving features from each video frame (the feature tracking). The system utilizes the Kanade-Lucas-Tomasi Feature Tracker algorithm to detect discrete points (features) on any moving objects (pedestrians or other road users) in the video sequence [72]. Once features are detected in each video frame, the system decides which group of features should be grouped together to create one object in the feature grouping process. In this task, features that exist within close proximity and have similar movement patterns are grouped together to create one object [72]. This algorithm depends on the real world location and speeds of features in the grouping process, which were obtained in the camera calibration task described earlier. The overall accuracy of the tracking and grouping algorithm was assessed to be 88.4% [72]. The position of an object in each video frame produces the object trajectory T, which is represented as finite set of tuples [88] along (n) video frames as follow: T = {(X1, Y1, Vx1, Vy1)… (Xi, Yi, Vxi, Vyi)… (Xn, Yn, Vxn, Vyn)} (1) Where Xi, Yi are the spatial coordinates of the pedestrian at any frame (i) and Vxi, Vyi are the corresponding velocities. 3.2.2 Extracting Gait Parameters The pedestrian behavioral study presented in the next chapter depends on speed profile of pedestrians and the profile of gait parameters; mainly step frequency and step length, in understanding pedestrian behavior during different interactions with other road users. Once pedestrian trajectories are extracted, the speed profile of each pedestrian is implicitly defined. 47  Pedestrian speed profile (S) is represented as a time series obtained from the corresponding trajectory as S = norm (Vx, Vy). Pedestrian speed is not uniform with respect to time. Rather, pedestrian speed profile shows cyclic fluctuations that are repeated continuously over time as shown in Figure 3-4. It was observed that each fluctuation in speed profiles is corresponding to a new step taken by the pedestrian [63]. This means that each cycle in the speed profile represents one forward step and the step frequency could be estimated from the reciprocal of cycles [88].    Speed Profile   Signal Analysis        Figure 3-4. Extraction of gait parameters process Simply, the speed signal is first smoothened and normalized (the mean speed is subtracted from instantaneous speed). Identifying step frequency profile includes detecting the dominant periodicity in the signal of the speed profile for each pre-specific time segment. In the pedestrian behavioral study presented in chapter 4, two seconds were used as a segment length for step frequency calculations with an overlap of 1.0 second between each two segments. The step frequency each segment is determined by evaluating the power spectral density (PSD) of the speed profile [89]. The PSD shows the strength of variations in terms of frequency of calculating the Step Frequency and Step Length Walking speed Power Spectral Density Function (PSD) 48  periodogram of the speed profile signal; i.e., mean square of the Discrete Fourier Transform of the signal. The PSD estimate along k number of video frames is given by: 𝑃𝑆𝐷 =1𝐹𝑠𝑘|∑𝑆𝑖. 𝑒−−𝑗(2𝜋𝑓)𝑖𝐹𝑠𝑘𝑖=1|2 (2) Where Fs is the sampling frequency. Once step frequency of each segment is determined, the average step length during that segment can be calculated from the fundamental linear relationship:  Walking Speed = Step Frequency × Step Length (3) In which the walking speed is the average speed of the pedestrian during the segment analyzed.   49  4. Microscopic Pedestrian Interaction Behavior Analysis Understanding pedestrian behavior is a research area that has not been developed to a level that matches vehicular travel. Developing detailed analysis of pedestrian behavior is essential to promote walking as an active mode of transportation. Solid understanding of pedestrian behavior aids designers and transportation planners in developing better designs for pedestrian facilities, which encourages more people to walk, enhance the pedestrian safety, and the level of service of the facilities. Understanding pedestrian behavior also leads to develop better pedestrian simulation models that address pedestrian actual behavior in different applications. The major challenges facing detailed pedestrian behavior studies are the lack of reliable pedestrian data and lack of tools required to analyze these data. This chapter presents the details of a comprehensive pedestrian behavior study that was conducted in the city of Vancouver. Pedestrian data were collected by means of video sensors at a typical urban intersection. Computer vision algorithms were applied to detect and track pedestrians and other road users from the video scene using the automated computer vision platform, developed at UBC. The trajectories of pedestrians involved in interactions with other pedestrians or objects were extracted and analyzed in order to understand pedestrian behavior during these interactions. The interactions considered include interactions with other pedestrians, either pedestrians walking in the same direction or opposing pedestrians, interactions with fixed objects existing in the walking environment (e.g. stopping vehicles, trees, and street seats, among others), and interaction with turning vehicles. Other less frequent interesting behaviors observed in the video data were also investigated including running and distraction, mainly by talking on the phone.  50  For each pedestrian considered in the analysis, the changes in the walking speed before and during studied interactions were examined in order to understand how pedestrians react to specific interactions. Additionally, the study investigated the potential use of parameters, other than walking speed, in providing more in-depth understanding of pedestrian behavior. As such, profiles of gait parameters (pedestrian step frequency and step length) were automatically extracted from the speed profiles of each pedestrian according to the methodology presented in chapter 3. The disparity in gait parameters during normal walking and during studied interactions was investigated. Furthermore, the study explored the effect of pedestrian attributes on pedestrian behavior during studied interactions. The variation of pedestrian speed and the corresponding gait parameters among different pedestrian attributes (gender and group size) were examined. Results revealed important information about pedestrian behavior during studied interactions. Gait parameters and speed profiles successfully described pedestrian behavior in details and were successful in distinguishing between the behaviors of different categories of pedestrians during different interactions as well. The main objectives of the study presented in this chapter were:  Examine the role of the computer vision as an effective tool of pedestrian data collection and pedestrian data analysis  Investigate the benefits of the automated computer vision platform in extracting important parameters required to understand pedestrian behavior during specific interactions  Identify the main set of rules required to model specific interactions in the agent-based simulation model. Extracting the behavioral rules from actual data is expected to develop more realistic simulation of pedestrian interactions and enhance the accuracy of trajectories produced by the model 51   Investigate the potential benefits of utilizing other parameters and indicators along with pedestrian walking speed (such as gait parameters) in developing better understanding of pedestrian behavior 4.1 Data Collection Video data were collected at the signalized intersection of Robson and Broughton Streets in downtown Vancouver area. Robson Street is a major commercial and business corridor in Vancouver Downtown area with an active walking environment that attracts many pedestrians. The intersection is a signalized four-leg intersection. Each leg has one traffic lane and one parking/reserved lane. A camera was fixed on the roof of a multi-storey building at the North West corner of the intersection. A total of one hour of video data was collected. The collected data focused on pedestrians moving on the west crosswalk (crosswalk 1) as shown in Figure 4-1. Pedestrian trajectories were extracted from the video sequence according to the methodology described in chapter 3. For each trajectory, the speed profile, frequency profile, and step length profile were produced according to the methodology described in chapter 3. In total, 186 pedestrian trajectories were selected for analysis. The selected pedestrians were involved in at least one of the following interactions or behaviors:  Interaction with slower pedestrians walking in the same direction. Two collision avoidance strategies were observed for this interaction: o Faster pedestrians reduce speed to keep a safe distance with slower pedestrians o Faster pedestrians apply swerving maneuvers to overtake slower pedestrians  Interaction with opposing pedestrians  Interaction with a fixed pedestrian/object 52   Interaction with turning vehicles  Running  Distracted pedestrians, mainly talking on cell phones.   Data collection location Camera view Figure 4-1. Data collection Location 4.2 Results and Discussion Table 4-1 shows summary statistics of the average walking speed, step frequency, and step length of the 186 pedestrians considered for the analysis. As shown in the table, the average speed of pedestrians involved in the study was relatively high (1.43 m/s). This may be contributed to many factors including age, as most of pedestrians considered in the study were relatively young. The average values show that males are generally faster than females, but they have different walking mechanism as they have longer step length and lower frequency compared to females. As well, the results show that walking speed and the corresponding gait parameters decrease as the group size increases. These findings agree with the results obtained in many previous studies [e.g. [90], [50], [91], [92]]. 53  Table 4-1. Speed and gait parameters for different pedestrian classes  Gender Group Size Total Male Female Single  Size = 2 Size = 3+ Count 91 95 71 83 32 186 Step Frequency (steps/s) 1.90 [σ = 0.20] 2.01 ** [σ = 0.49] (0.03) 2.06 [σ = 0.59] 1.91 ** [σ = 0.15] (0.03) 1.87 * [σ = 0.11] (0.06) 1.96 [σ = 0.39] Speed (m/s) 1.49 [σ = 0.47] 1.38 ** [σ = 0.24] (0.03) 1.58 [σ = 0.53] 1.37 ** [σ = 0.21] (0.00) 1.27 ** [σ = 0.15] (0.00) 1.43 [σ = 0.37] Step Length (m) 0.77 [σ = 0.15] 0.70 ** [σ = 0.08] (0.00) 0.77 [σ = 0.16] 0.71 ** [σ = 0.08] (0.00) 0.68 ** [σ = 0.07] (0.01) 0.73 [σ = 0.12] ** indicates statistically significant difference (at 95% confidence level) compared to the cell directly to the left.  * indicates statistically significant difference (at 90% confidence level) compared to the cell directly to the left.  Values in parentheses represent the p-value of the T-test  For each pedestrian, the start and end of the interaction in which this pedestrian is involved was identified manually from the video data. Trajectory segments corresponding to the time interval between the beginning and the end of the interaction were assumed to represent the behavior of pedestrians during that specific interaction. The rest of the trajectory was assumed to represent the normal walking behavior for the pedestrian. Gait parameters and walking speed during interactions were then separated from those corresponding to normal walking intervals in order to investigate 54  the effect of each interaction on walking behavior. A detailed discussion about the analysis of each interaction/behavior considered in this study is presented in the following sections. 4.2.1 Interactions with Pedestrians in the Same Direction Interaction with pedestrians moving in the same direction occurred when fast pedestrians are obstructed by slower pedestrians ahead. Sixty four pedestrians were involved in interaction with slower pedestrians moving in the same direction. It was observed that faster pedestrians reacted to this interaction by applying one of two possible collision avoidance strategies. In the first strategy, faster pedestrians reduced their walking speed and followed the slower pedestrians in order to keep adequate personal distance with the leading pedestrians. In the second strategy, faster pedestrians changed their walking direction and overtook the slower leading pedestrian in order to maintain the walking pace. A detailed discussion of the two strategies is provided below. 4.2.1.1 Overtaking slower pedestrian This strategy was usually applied by pedestrians when the density of the crosswalk is relatively low. Less crowded crosswalk enables faster pedestrian to change their direction easily and overtake the slower pedestrians. As well, pedestrians who applied this collision avoidance strategy were significantly faster than pedestrians who chose to follow slower pedestrians (the average speed of the two categories were 1.52 m/s and 1.41 m/s, respectively). Speed and gait parameters of thirty pedestrians who applied this collision avoidance strategy are summarized in Table 4-2. On average, pedestrians increase their speed by about 5% in order to overtake slower pedestrians. This increase in speed during interaction is achieved by increasing both step length and step frequency. However, different pedestrians’ categories reacted differently to the interaction. Pedestrian walking alone increases their speed by about 13% during the maneuver while the speed 55  of pedestrians walking in groups was almost constant. This suggests that pedestrians walking in groups execute the overtaking maneuver only if they are obstructed by very slow pedestrians. As the leading pedestrian is very slow, group members do not have to increase their speed to overtake him/her. Pedestrians walking alone are more likely to overtake slower pedestrians even if the speed difference is not very high. However, single pedestrians usually need to increase speed to overtake the slower pedestrian successfully.   Table 4-2. Comparison between speed and gait parameters for normal walking behavior and during the overtaking maneuver  Parameter Gender Group size Total Male Female Single Pedestrians Pedestrian in groups Normal During interaction Normal During interaction Normal During interaction Normal During interaction Normal During interaction Freq.  (Hz) 1.91 [σ = 0.15]  1.95 ** [σ = 0.12]  (0.04) 2.03 [σ = 0.15] 2.08 ** [σ = 0.16] (0.05) 1.94 [σ = 0.17]  2.06 ** [σ = 0.17]  (0.00) 1.98 [σ = 0.16] 1.98 [σ = 0.14] (0.47) 1.97  [σ = 0.16] 2.01 ** [σ = 0.16] (0.02) Speed  (m/s) 1.53 [σ = 0.28] 1.62 ** [σ = 0.26] (0.02) 1.52 [σ = 0.25] 1.58 [σ = 0.24] (0.07) 1.51 [σ = 0.28] 1.71 ** [σ = 0.21] (0.00) 1.53 [σ = 0.26] 1.54 [σ = 0.25] (0.41) 1.52  [σ = 0.27] 1.60 ** [σ = 0.25] (0.01) Step Length (m) 0.80 [σ = 0.12] 0.83 ** [σ = 0.12] (0.04) 0.74 [σ = 0.10] 0.76 [σ = 0.1] (0.19) 0.77 [σ = 0.12] 0.83 ** [σ = 0.09] (0.00) 0.77 [σ = 0.12] 0.78 [σ = 0.12] (0.35) 0.77  [σ = 0.11] 0.80 **  [σ = 0.11] (0.03) 56  The gait parameters appear to be important in distinguishing between some pedestrian categories during the overtaking maneuver as summarized in Table 4-3. Speed variation was not found to be significant among males and females during the maneuver. However, the step frequency and the step length during the interaction were significantly different (Step frequency of females is 7 % higher than males while their step length is 8% lower compared to males). These results suggest that gait parameters can provide more insight on pedestrian behavior than depending solely on pedestrian speed in understanding this interaction.   Table 4-3. Speed and gait parameters for different pedestrian classes during the overtaking maneuver Parameter Gender Group size Total Male Female Single pedestrians Pedestrians in group (N = 2+) Frequency (Hz) 1.95 [σ = 0.12]  2.08 ** [σ = 0.16]  (0.00) 2.06  [σ = 0.17]  1.98 ** [σ = 0.14]   (0.01) 2.01  [σ = 0.16] Speed (m/s) 1.62 [σ = 0.26] 1.58 [σ = 0.24] (0.18) 1.71 [σ = 0.21] 1.54 ** [σ = 0.25]  (0.00) 1.60  [σ = 0.25] Step Length (m) 0.83 [σ = 0.12] 0.76  ** [σ = 0.10] (0.00) 0.83 [σ = 0.09] 0.78 ** [σ = 0.12] (0.00) 0.80  [σ = 0.11] 57  4.2.1.2 Following slower pedestrian  This strategy was usually observed when the density of the crosswalk is relatively high. Crowded crosswalks make it difficult for faster pedestrians to change their movement direction easily, which forces the faster pedestrian to reduce the walking speed and follow the leading pedestrian. As well, pedestrians who applied this collision avoidance strategy were significantly slower than pedestrians who chose to overtake slower pedestrians. The trajectories of thirty four pedestrians involved in this interaction were analyzed. The speed and gait parameters during the interaction were extracted and compared to the normal walking values as presented in Table 4-4. On average, the faster pedestrian reduced walking speed by about 16%. However, the percentage of speed reduction was mainly dependent on the speed of the slower pedestrian. As shown in Table 4-4, the speed during the interaction was about 1.19 m/s for almost all categories considered in the analysis, despite the large variation of the normal walking speed for these classes. Faster pedestrians, regardless of their group size or gender, slow down so that their speed equals to the speed of the leading pedestrians. The reduction in speed is mainly dependent on step length, which is reduced for the total sample by 11 %, while the average reduction in step frequency is only 3.7%. The same observation was noticed for different pedestrian categories.       58  Table 4-4. Comparison between speed and gait parameters for normal walking behavior and while following slower pedestrians   The importance of considering gait parameters in providing better understanding of different pedestrian classes during this interaction was also explored. Similar to the overtaking strategy, gait parameters were found to be important in distinguishing between pedestrian categories while following slower pedestrians. As shown in Table 4-5, step frequency and step length are significantly different between males and females during interaction while speed is almost unchanged. As well, only step frequency shows a significant difference between pedestrians walking alone and those who walk in groups during this interaction. Parameter Gender Group size Total Male Female Single Pedestrians Pedestrian in groups Normal During interaction Normal During interaction Normal During interaction Normal During interaction Normal During interaction Freq. (Hz) 1.88 [σ = 0.16]  1.83 ** [σ = 0.15]  (0.02) 1.94 [σ = 0.18]  1.89 ** [σ = 0.13]  (0.01) 1.91 [σ = 0.22]  1.79 ** [σ = 0.14]  (0.00) 1.91 [σ = 0.15]  1.87 ** [σ = 0.14]  (0.01) 1.91  [σ = 0.18] 1.84 ** [σ = 0.12]  (0.00) Speed (m/s) 1.45 [σ = 0.41] 1.20 ** [σ = 0.19] (0.00) 1.36 [σ = 0.22] 1.18 ** [σ = 0.15] (0.00) 1.48 [σ = 0.47] 1.16 ** [σ = 0.22] (0.00) 1.37 [σ = 0.22] 1.20 ** [σ = 0.16] (0.00) 1.41  [σ = 0.33] 1.19 ** [σ = 0.10] (0.00) Step Length (m) 0.76 [σ = 0.14] 0.65 ** [σ = 0.09] (0.00) 0.70 [σ = 0.09] 0.63 ** [σ = 0.07] (0.00) 0.76 [σ = 0.16] 0.64 ** [σ = 0.09] (0.00) 0.71 [σ = 0.09] 0.64 ** [σ = 0.08] (0.00) 0.73  [σ = 0.12] 0.65 ** [σ = 0.05] (0.00) 59  Table 4-5. Speed and gait parameters for different pedestrian classes while following slower pedestrians Parameter Gender Group size Total Male Female Single pedestrians Pedestrians in group (N = 2+) Frequency (Hz) 1.83 [σ = 0.15]  1.89 ** [σ = 0.13]  (0.00) 1.79 [σ = 0.14]  1.87 ** [σ = 0.14]  (0.00) 1.84  [σ = 0.12]  Speed (m/s) 1.20 [σ = 0.19] 1.18 [σ = 0.15] (0.20) 1.16 [σ = 0.22] 1.20 [σ = 0.16] (0.07) 1.19 [σ = 0.10]  Step Length (m) 0.65 [σ = 0.09] 0.63 ** [σ = 0.07] (0.00) 0.64 [σ = 0.09] 0.64 [σ = 0.08] (0.46) 0.65 [σ = 0.05]   4.2.2 Interactions with Opposing Pedestrians Forty four pedestrians were involved in interactions with opposing pedestrians in the analyzed data set. The pedestrians involved in the interaction have to react in order to avoid collision with opposing pedestrian. The collision avoidance maneuver involved changing the current direction for at least one of the two pedestrians involved in the interaction, so that the two pedestrians pass each other safely. Speed profile and the profiles of gait parameters of the forty four pedestrians involved in this interaction were extracted for the analysis. Neither speed nor gait parameters during interaction showed significant difference compared to normal walking behavior as shown 60  in Table 4-6. The results suggest that pedestrians depend only on direction change to avoid collision with opposing pedestrians, without changing the speed or any of the gait parameters. In order to simulate this interaction in a simulation model, the focus should be given to identify the longitudinal distance at which a pedestrian starts to change direction and the lateral distance between the two pedestrians when they cross each other. Neither the speed nor the gait parameters should be changing during the collision avoidance maneuver. Table 4-6. Speed and gait parameters for pedestrians interacting with opposing pedestrians  4.2.3 Interactions with Fixed Objects This interaction involved pedestrians obstructed by fixed objects (such as stopped vehicles, trees, and light posts) or stopped pedestrians. Pedestrians involved in this interaction need to change Parameter Gender Group size Total Male Female Single Pedestrians Pedestrian in groups Normal During interaction Normal During interaction Normal During interaction Normal During interaction Normal During interaction Freq. (Hz) 1.85 [σ = 0.20]  1.89 [σ = 0.26]  (0.21) 1.88 [σ = 0.25] 1.90 [σ = 0.27] (0.32) 1.90 [σ = 0.21]  1.96 [σ = 0.25]  (0.09) 1.85 [σ = 0.24] 1.85 [σ = 0.26] (0.42) 1.87  [σ = 0.23] 1.89  [σ = 0.26] (0.20) Speed (m/s) 1.46 [σ = 0.49] 1.52 [σ = 0.60] (0.27) 1.31 [σ = 0.32] 1.28 [σ = 0.35] (0.25) 1.50 [σ = 0.46] 1.64 [σ = 0.59] (0.07) 1.28 [σ = 0.33] 1.23 [σ = 0.33] (0.14) 1.37  [σ = 0.40] 1.38  [σ = 0.49] (0.41) Step Length (m) 0.78 [σ = 0.18] 0.79 [σ = 0.18] (0.37) 0.69 [σ = 0.11] 0.67 [σ = 0.15] (0.10) 0.78 [σ = 0.16] 0.83 [σ = 0.18] (0.07) 0.69 [σ = 0.12] 0.66 ** [σ = 0.14] (0.04) 0.73  [σ = 0.15] 0.72  [σ = 0.17] (0.35) 61  their movement direction to avoid collision with the fixed pedestrian/object. Although it was expected that walking behavior of pedestrian involved in this interaction is similar to the behavior of avoiding opposing pedestrians, the results of 29 pedestrians involved in this interaction indicated otherwise. While the speed and gait parameters were almost constant during the interaction with opposing pedestrians, the speed and step length changed significantly during the interaction with fixed objects. As shown in Table 4-7, the speed and step length showed significant difference between normal walking behavior and during the interaction for the total sample and across most of categories as well. On average, speed was reduced by 7% during the swerving maneuver required to avoid a fixed object. This reduction in speed was mainly dependent on step length, which was reduced by 7% while the step frequency was almost constant. This behavior was observed across both males and females, although the reduction in speed was much higher for males. Pedestrians walking alone did not reduce speed during the interaction while pedestrians walking in groups reduced their speed significantly by about 13%. The reduction in the speed for group members was mainly achieved by reducing step length, which was reduced by about 11%.  The difference between the behavior of pedestrians involved in this interaction and those who interacted with opposing pedestrians can be explained by the distance at which the pedestrian starts to execute the collision avoidance maneuver. During interactions with opposing pedestrians, pedestrians have to observe actions taken by the opposing pedestrian in order to adjust their direction according to the location of the opposing pedestrians. They start changing direction at relatively large distance from the opposing pedestrian in order to have enough time to avoid collision in case the opposing pedestrian executed any unpredicted movement. As the maneuver starts early, the direction change occurs gradually and pedestrians do not need to adjust either walking speed or the gait parameters. On the contrary, it was observed that the pedestrians start 62  the swerving maneuver at relatively shorter distances when interacting with a fixed object, as pedestrians do not expect the location of the fixed objects to change. As such, the direction change does not occur gradually as the change of direction during the interaction with moving pedestrians. The direction change is executed by adjusting the foot position immediately when the direction change starts, which results in shorter step length at the beginning of the maneuver.  Table 4-7. Comparison between speed and gait parameters for normal walking behavior and while interacting with fixed objects  The importance of gait parameters in distinguishing between pedestrian categories during the interaction is still noticeable as shown in Table 4-8. While there is no significant difference in speed across gender, both step length and step frequency are significantly different between males Parameter Gender Group size Total Male Female Single Pedestrians Pedestrian in groups Normal During interaction Normal During interaction Normal During interaction Normal During interaction Normal During interaction Freq. (Hz) 1.89 [σ = 0.11]  1.82 ** [σ = 0.15]  (0.04) 1.91 [σ = 0.19] 1.94 [σ = 0.21] (0.27) 1.92 [σ = 0.18]  1.93 [σ = 0.23]  (0.38) 1.89 [σ = 0.15] 1.85 [σ = 0.14] (0. 09) 1.90  [σ = 0.16] 1.89  [σ = 0.19] (0.36) Speed (m/s) 1.50 [σ = 0.22] 1.33 ** [σ = 0.16] (0.00) 1.32 [σ = 0.22] 1.28 [σ = 0.26] (0.23) 1.40 [σ = 0.30] 1.40 [σ = 0.27] (0.47) 1.40 [σ = 0.19] 1.21 ** [σ = 0.12] (0.00) 1.40  [σ = 0.24] 1.30 ** [σ = 0.23] (0.00) Step Length (m) 0.79 [σ = 0.10] 0.73 ** [σ = 0.07] (0.00) 0.69 [σ = 0.09] 0.66 [σ = 0.10] (0.06) 0.73 [σ = 0.13] 0.72 [σ = 0.09] (0.35) 0.74 [σ = 0.09] 0.66 ** [σ = 0.08] (0.00) 0.74  [σ = 0.11] 0.69 ** [σ = 0.09] (0.00) 63  and females. There is also a significant difference in speed during the interaction between single pedestrians and those who are walking in groups. This difference is mainly attributed to difference in step length between the two categories. Figure 4-2 shows an example of an interaction between a moving pedestrian and a stopping pedestrian, along with the profiles of speed and gait parameters of the moving pedestrian. The figure shows that the speed reduction associated with the collision avoidance maneuver. The figure clearly shows that the reduction in speed is controlled by reducing step length, while the step frequency does not change during the interaction. The trajectory of the moving pedestrian shows that the change in the movement direction occurs in a relatively short distance from the location of the stopping pedestrian.  Table 4-8. Speed and gait parameters for different pedestrian classes for pedestrians interacting with fixed objects Parameter Gender Group size Total Male Female Single pedestrians Pedestrians in group (N = 2+) Frequency (Hz) 1.82 [σ = 0.15]  1.94 ** [σ = 0.21] (0.01) 1.93 [σ = 0.23]  1.85 [σ = 0.14] (0. 06) 1.89  [σ = 0.19] Speed (m/s) 1.33 [σ = 0.16] 1.28 [σ = 0.26] (0.19) 1.40 [σ = 0.27] 1.21 ** [σ = 0.12] (0.00) 1.30  [σ = 0.23] Step Length (m) 0.73 [σ = 0.07] 0.66 ** [σ = 0.10] (0.00) 0.72 [σ = 0.09] 0.66 ** [σ = 0.08] (0.00) 0.69  [σ = 0.09]   64      Figure 4-2. An example of typical behavior of pedestrian - fixed pedestrian interaction 4.2.4 Interaction with Turning Vehicles A frequent interaction that was observed in the data set involves conflict between pedestrians crossing the studied crosswalk and west bound left turning vehicles from Robson Street. Twenty nine pedestrians were involved in the interaction. In all conflicts considered in the analysis, the 00.511.522.50 2 4 6 8 10Time (s)frequency (step/s) speed (m/s) step length (m)Start of interaction End of interaction 65  vehicle stopped to allow pedestrians on the crosswalk to clear the intersection before completing the left turn. Based on the analysis of gait parameters and speed profile of the twenty nine pedestrians, the interaction process was classified into four phases.  Phase 1: Pedestrians are walking normally before noticing the turning vehicle  Phase 2: Pedestrians see the turning vehicle and respond by reducing their speed as they are not sure yet of the action of the driver of the vehicle  Phase 3: The vehicle stops or reduces its speed to provide the right of way to pedestrians. Pedestrians respond by increasing their speed to clear the conflict course.  Phase 4: After pedestrians pass the conflict course safely, they reduce their speeds again to return to their normal walking behavior. Figure 4-3 shows an example of a pedestrian involved in a conflict with a left turning vehicle. The figure illustrates how his gait parameters and walking speed profiles change during each phase.  66    Figure 4-3. An example of typical behavior of pedestrian - turning vehicle interaction Table 4-9 shows the mean and standard deviation of gait parameters and walking speed for all pedestrians involved in this type of interaction. As shown in the table, the step frequency clearly distinguishes the four phases discussed earlier. The difference in the mean step frequency for each phase is statistically significant compared to the value of the previous phase. The step length is almost unchanged except when pedestrians increase their speed in phase 3. Pedestrian speed variation through phases is significant except for the change from phase 3 to 4. This clearly shows the importance of studying the gait parameters of pedestrian along with pedestrian speed as they provide a better understanding of pedestrian behavior during the interaction. Table 4-9 also shows that after the completion of the interaction, pedestrians reduce their speeds to restore their normal walking behavior. However, the average values in phase 4 are relatively high compared to phase 1 (step frequency is 7% higher, speed is 27% higher, and step length is 17% higher). Results suggest that the frequency variation between phase 2 and phase 3 could be seen as an evasive 00.511.522.531 3 5 7 9Time (s)frequency (step/s) Speed (m/s)step length (m)Ph. 1 Ph. 2 Ph. 3 Ph. 4 67  action applied by pedestrians to avoid collision with turning vehicles. Hence, the step frequency profile could be potentially used to extract conflict indicators for interactions between crossing pedestrians and turning vehicle to complement existing conflict indicators such as the time to collision (TTC). Table 4-9. Gait parameter at different phases of pedestrian - turning vehicle interaction  Phase 1 Phase 2 Phase 3 Phase 4 Frequency (step/s) 1.88 [σ = 0.15]  1.76 [σ = 0.28] ** (0.02) 2.21 [σ = 0.31] ** (0.00) 2.02 [σ = 0.20] ** (0.01) Speed (m/s) 1.24 [σ = 0.19]  1.10 [σ = 0.28] ** (0.02) 1.74 [σ = 0.42] ** (0.00) 1.57 [σ = 0.34] (0.06) Step Length (m) 0.66 [σ = 0.07]  0.63 [σ = 0.14] (0.21) 0.79 [σ = 0.12] ** (0.00) 0.77 [σ = 0.12] (0.25)  4.2.5 Running Twelve runners were found in the analyzed data set. Although the sample size was very small to draw any statistically significant conclusion about the speed distribution or the distribution of gait parameters, the values obtained for those twelve runners were reported for reference. The average values of speed and gait parameters for runners were reported in Table 4-10. The average speed of runners was found to be 2.32 m/s, about 1.6 times the average normal walking speed of pedestrians within the data set. The males’ speed was found to be 1.5 times females’ speed while running. This high difference in running speed is mainly contributed to the step length. There was no significant difference in step frequency between males and females. The values of the gait parameters reported in Table 4-10 suggested that males and females run using two completely different mechanisms. 68  The running speed for males was almost double the normal walking speed. This increase in speed is achieved by increasing step length by about 50% while the step frequency is increased by 33%. On the contrary, females depend mainly on increasing step frequency to increase speed while running. On average, the speed of females was increased by 43%. This increase was achieved by increasing the step frequency by about 33%. The step length for females was increased by only 6% while running. Obviously, more data are needed to support these observations. Table 4-10. Speed and gait parameters for runners Parameter Gender Total Male Female Frequency (Hz) 2.54  [σ = 0.12] 2.68  [σ = 0.12] (0.10) 2.63  [σ = 0.35] Speed (m/s) 2.97  [σ = 0.77] 1.98 ** [σ = 0.17]  (0.00) 2.32  [σ = 0.77] Step Length (m) 1.15  [σ = 0.08] 0.74 ** [σ = 0.01]  (0.00) 0.88  [σ = 0.27]  4.2.6 Distracted Pedestrians Only eight pedestrians were identified as distracted pedestrians, mainly talking on the phone or texting. Although the number is small to reach valid description of this behavior, the eight pedestrians share one interesting behavior. For the eight pedestrians, the step frequency was almost 69  constant regardless of the interaction in which they are involved. Clearly, those pedestrians do not follow the typical profile of gait parameters or speed of non-distracted pedestrians involved in the same interaction. Figure 4-4 shows an example of a distracted pedestrian involved in an interaction with a left turning vehicle along with her speed and gait parameters’ profiles. As shown in the figure, the pedestrian reduces speed, gradually from the moment she observed the turning vehicle. However, she applies constant frequency while the speed is controlled only by reducing the step length. After she passes the conflict course, the pedestrian increases speed gradually, also by increasing only step length. This trend is completely different from the pedestrian-vehicle interaction behavior discussed earlier. This suggests that distracted pedestrians tend to maintain a constant frequency regardless of the interaction type. More data are needed to study this behavior in details and the effect of pedestrian non-compliance with the evasive action taken during conflicts.    Figure 4-4. Example of a distracted pedestrian interacting with a left turn vehicle 00.511.522.50 2 4 6 8 10Time (S)frequency (step/s) Speed (m/s)step length (m)Start of interaction End of interaction 70  4.3 Summary of Key Rules of Pedestrian Interactions  This chapter presented the details of a behavioral analysis of pedestrians involved in different interactions with other road users. The study utilized the variation of walking speed and gait parameters as indicators that describe pedestrian behavior during interactions. Speed profiles were obtained from pedestrian trajectories, extracted automatically from video data by means of computer vision. Gait parameters were obtained by analyzing speed profiles of pedestrians. Based on the results of the study, the main rules that will be used to model pedestrian interactions, particularly, interaction with other pedestrians and with fixed objects are summarized as follows:   Pedestrian interactions with other pedestrians can be classified into interaction with pedestrians moving in the same direction (uni-directional interactions) and interactions with opposing pedestrians (bi-directional interactions)  Pedestrians involved in uni-directional interactions may reduce speed and follow slower pedestrians in conflict or swerve and overtake the pedestrian in conflict. The choice of the collision avoidance strategy depends on desired speed of the pedestrian and the density of walking environment  Pedestrians overtaking slower pedestrians increase speed by about 5% during the interaction (starting from the moment they change movement direction to begin the overtaking maneuver until they completely pass the slower pedestrian in conflict)  Pedestrians following slower pedestrians reduce their walking speed in order to keep safe distance with the leading pedestrians. The reduction in speed depends on the speed of the leading pedestrian 71   Pedestrians involved in interactions with opposing pedestrians change direction of movement at a specific distance from the opposing pedestrian to avoid collision. The distance at which pedestrian starts to swerve varies among pedestrians. The pedestrian that tends to start the swerving maneuver earlier will change movement direction first. The objective of the maneuver is to pass the pedestrian in conflict while keeping a preferred lateral distance from the opposing pedestrian. The opposing pedestrian may need to swerve if he/she thinks that the maneuver taken by the opposing pedestrian will not satisfy the required lateral distance needed by him/her. The maneuver is not associated with a change in the walking speed of both pedestrians  Pedestrians interacting with fixed objects/stopping pedestrians have to swerve to avoid collision with the obstacle. The maneuver is associated with reduction in speed of about 7% (from the moment the swerving maneuver starts till the pedestrian passes the obstacles) Other interactions considered in this study, such as interaction with turning vehicle, were not considered in the model presented in this thesis so far. However, as one of the future directions of the research is to consider pedestrian – vehicle interactions, the behavior reported in this chapter was used to extract rules required to model this interaction as summarized below:  The pedestrian in conflict reduces speed once observing the turning vehicle (the speed is reduced by about 11%)  The pedestrian waits to check the response of the vehicle   If vehicles provide the right of way to the pedestrian (by reducing speed or stopping), the pedestrian speeds up to clear the conflict area (the speed is increased up to 40% of the original normal walking speed) 72   Once the conflict area is cleared, pedestrian reduces speed to restore the normal walking behavior  It should be noted that other possibilities of the pedestrian-vehicle conflict were not addressed in this study. Specifically, the driver of the vehicle may decide to continue the turning without giving the right of way to the pedestrian. In this case, it’s expected that the pedestrian will stop until the vehicle clears the crosswalk. However, further work is needed to understand this behavior in details and to identify the factors that affect the driver’s decision (to wait for pedestrian to pass or to turn before the pedestrian)  73  5. Uni-directional Behavior Model As discussed earlier, the simulation model presented in this thesis was developed in two phases. In the first phase, the rules that define the behavior of pedestrians involved in interactions with pedestrians moving in the same direction (uni-directional interactions) were introduced. In the second phase, interaction rules were expanded in order to accommodate more complex situations including interactions with opposing pedestrians (bi-directional interactions) and interactions with fixed objects in the walking environment. It is expected that understanding pedestrian behavior during uni-directional interactions and confirming that the simulation model is capable of handling these interactions with high accuracy is essential before the model could be expanded to handle more complicated interactions. The behavior of pedestrians during interactions with pedestrians moving in the same direction is not only important for uni-directional flow conditions. Pedestrians still need to handle uni-directional conflicts in bi-directional or multi-directional flow conditions. Existing simulation models gave less interest to understand pedestrian behavior during uni-directional interactions and the associated collision avoidance strategies. The uni-directional flow was mainly considered in some specific cases like evacuation scenarios, in which pedestrians interact under panic and their behavior cannot be generalized to address normal (non-panic) behavior. The details of uni-directional interaction rules as well as the details of the calibration of the uni-directional model parameters and the validation of its results are presented in this chapter. 5.1 Behavior Rules At each model update (∆T), each pedestrian in the simulation collects information about other pedestrians that exist within his/her perception area. Every pedestrian observes the current location of other pedestrians as well as an estimation of their current speed and direction of movement. 74  Based on this information, a pedestrian assesses whether a uni-directional conflict with any other pedestrian is identified or not. A uni-directional conflict usually occurs between a faster pedestrian led by a slower pedestrian. The following pedestrian defines a uni-directional conflict if the estimated distance with any leading slower pedestrian will be less than a preferred personal distance (Sc), if the current speed and movement direction remain constant according to Equation (4): √((𝑥𝑡+𝑛.∆𝑇)𝑖 − (𝑥𝑡+𝑛.∆𝑇)𝑐)2 + ((𝑦𝑡+𝑛.∆𝑇)𝑖 − (𝑦𝑡+𝑛.∆𝑇)𝑐)2 < 𝑆𝑐  , (𝑓𝑜𝑟 𝑖 =1 𝑡𝑜 𝑁 𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛𝑠)  (4) Where: ((𝑥𝑡+𝑛.∆𝑇)𝑐 , (𝑦𝑡+𝑛.∆𝑇)𝑐): Expected future location of current pedestrian (c) after (n) model updates ((𝑥𝑡+𝑛.∆𝑇)𝑖 , (𝑦𝑡+𝑛.∆𝑇)𝑖): Expected future location of a leading pedestrian (i) after (n) model updates If there is no conflict detected, the current pedestrian considers updating the current location (xt, yt) to new location (xt+∆T, yt+∆T) using the desired walking speed (vd) according to Equations (5) through (7). (𝑥𝑡+∆𝑇)𝑐 = (𝑥𝑡)𝑐 + (𝑣𝑑)𝑐 . cos ∝𝑐 × ∆T (5) (𝑦𝑡+∆𝑇)𝑐 = (𝑦𝑡)𝑐 + (𝑣𝑑)𝑐 . sin ∝𝑐 × ∆𝑇 (6) 𝛼𝑐 = tan−1𝑦𝑑𝑒𝑠𝑡 − (𝑦𝑡)𝑐𝑥𝑑𝑒𝑠𝑡 − (𝑥𝑡)𝑐 (7) In which (xdest, ydest) are the coordinates of the destination of the current pedestrian. If a conflict with any leading pedestrian within the perception area is detected, the current pedestrian has to 75  take an action to resolve the conflict and avoid colliding with the pedestrian(s) in conflict. It should be noted that as the perception area in this model is always in front of the pedestrian, the current pedestrian only has a perception of pedestrians ahead of them. Therefore, the conflict resolving maneuver is always taken by the following pedestrian while the leading pedestrian moves normally according to Equations (5) through (7). As illustrated in chapter 4, the collision avoidance strategy taken by the following pedestrian depends on many factors including pedestrian desired speed and density of the walking environment. The following pedestrian involved in a uni-directional conflict may execute one of two collision avoidance strategies: 1) reduce the walking speed in order to keep safe following distance with the slower pedestrian(s) or 2) execute an overtaking maneuver and pass the slower pedestrian. Consider two pedestrians; a slower leading pedestrian (pedestrian A) and a fast pedestrian (pedestrian B) walking in the same direction as shown in Figure 5-1-a. As pedestrian A leads pedestrian (B), he will continue moving towards his destination with his desired speed (va) according to Equations (5) through (7). Pedestrian B estimates that if he continues to move with the current desired speed (vd)b and the current movement direction, a collision will occur after (n) model updates as shown in Figure 5-1-a. Pedestrian B can reduce his walking speed to keep a safe distance with pedestrian A as shown in Figure 5-1-b. This strategy is usually preferred in case that the difference in walking speed between the two pedestrians is not significant and when the walking environment is crowded. Another strategy that the faster pedestrian (pedestrian B) can apply is to overtake the slow pedestrian (pedestrian A) as shown in Figure 5-1-c. The overtaking maneuver could be associated with a slight increase in the walking speed of the overtaking pedestrian as concluded in the behavioral study presented in chapter 4. This strategy is usually preferred when the pedestrian density in the walking environment is relatively low.  76  In the model, the choice of collision avoidance strategy is controlled by the “bypass tendency” parameter. This parameter defines the minimum speed at each density level of the walking environment needed to consider the overtaking maneuver. Pedestrians walking with speed equal to or higher than the speed defined by the “bypass tendency” parameter at the current density level tend to overtake slower pedestrians. Other pedestrians walking with a lower walking speed will slow down and follow the slow pedestrians instead. Detailed description of the “bypass tendency” parameter is provided later in this chapter.   a. Identifying Conflict Condition b. Collision Avoidance Strategy 1 77    c. Collision Avoidance Strategy 2  Figure 5-1. Conflict Identification and Different Collision Avoidance Strategies 5.1.1 Following a Slower Pedestrian If the following pedestrian (pedestrian B) decides to follow the slower pedestrian ahead, the following pedestrian estimates his location after (n) model updates according to Equation (8) as follows: [(𝑋𝑡+𝑛.∆𝑇)𝑏 , (𝑌𝑡+𝑛.∆𝑇)𝑏] = {[𝑦 = 𝑚𝑥 + 𝑏] ∩ [(𝑥 − (𝑥𝑡+𝑛.∆𝑇)𝑎)2 + (𝑦 −(𝑦𝑡+𝑛.∆𝑇)𝑎)2 = (𝑆𝑏)2]}|𝑑𝑏 ≤((𝑉𝑑)𝑏 × 𝑛. ∆𝑇)  ... (𝑉𝑑)𝑏 < 𝑏𝑝𝑏|𝑃𝐷𝑏     (8) According to Equation (8), if the desired speed of the following pedestrian (pedestrian B) is less than the threshold provided by the bypass tendency parameter,  𝑏𝑝𝑏|𝑃𝐷𝑏, pedestrian B will maintain the current movement direction but with reduced speed in order to keep a safe distance with the leading pedestrian (pedestrian A). The solution vector, [(𝑋𝑡+n.∆𝑇)𝑏 , (𝑌𝑡+n.∆𝑇)𝑏], resulting from solving Equation (8), includes up to two points as described in Equations (9) through (14).  78  (𝑋𝑡+𝑛.∆𝑇)𝑏 =(2(𝑥𝑡+𝑛.∆𝑇)𝑎 − 2𝑚𝑏∗) ± √𝑍2(1 +𝑚2) (9) (𝑌𝑡+𝑛.∆𝑇)𝑏 = 𝑚(𝑋𝑡+𝑛.∆𝑇)𝑏 + 𝑏 (10) In which:  𝑍 = (2𝑚𝑏∗ − 2(𝑥𝑡+𝑛.∆𝑇)𝑎)2 − 4(1 +𝑚2)((𝑥𝑡+𝑛.∆𝑇)𝑎2 + 𝑏∗2 − 𝑆𝑏2) (11) 𝑚 =𝑦𝑑𝑒𝑠𝑡 − (𝑦𝑡)𝑏𝑥𝑑𝑒𝑠𝑡 − (𝑥𝑡)𝑏 (12) 𝑏 = (𝑦𝑡)𝑏 −𝑚(𝑥𝑡)𝑏 (13) 𝑏∗ = 𝑏 − (𝑦𝑡+𝑛.∆𝑇)𝑎 (14) The number of solution points in the vector [(𝑋𝑡+n.∆𝑇)𝑏, (𝑌𝑡+n.∆𝑇)𝑏] depends on the sign of the indicator Z. If this sign of Z is positive, the solution vector will include two points. Only one of the two points will satisfy the condition of Equation (8); 𝑑𝑏 ≤ ((𝑉𝑑)𝑏 × 𝑛. ∆𝑇), which aims at ensuring that the pedestrian speed will not exceed the desired speed. If Z equals zero, this means that there will be only one solution in the solution vector. If the sign of Z is negative, this means that there will be no solution to Equation (8). This case is very unlikely to occur, because pedestrian B will apply Equation (8) if a conflict is already defined, which means that it is always expected to find a valid solution to Equation (8). However, if for any reason the sign of Z is negative, pedestrian B is set to move normally according to Equations (5) through (7). As the estimated location in (n) model updates is set, the following pedestrian (pedestrian B) calculates the location in the next model update according to Equations (15) through (17) as follow: 79  (𝑥𝑡+∆𝑇)𝑏 = (𝑥𝑡)𝑏 +𝑑𝑛.∆𝑇𝑛cos ∝𝑏 (15) (𝑦𝑡+∆𝑇)𝑏 = (𝑦𝑡)𝑏 +𝑑𝑛.∆𝑇𝑛sin ∝𝑏 (16) 𝑑𝑛.∆𝑡 = √((𝑥𝑡+𝑛 .∆𝑇)𝑏 − (𝑥𝑡)𝑏)2 + ((𝑦𝑡+𝑛 .∆𝑇)𝑏− (𝑦𝑡)𝑏)2 (17) 5.1.2 Overtaking a Slower Pedestrian If the following pedestrian (pedestrian B) decides to overtake the leading pedestrian, the location of the following pedestrian in (n) model updates is determined according to Equation (18) as follows: [(𝑋𝑡+𝑛.∆𝑇)𝑏 , (𝑌𝑡+𝑛.∆𝑇)𝑏] = {[(𝑥 − (𝑥𝑡)𝑏)2 + (𝑦 − (𝑦𝑡)𝑏)2 = ((𝑉𝑑)𝑏 ×(∆𝑉𝑝𝑎𝑠𝑠)𝑏 × 𝑛. ∆𝑇)2] ∩ [(𝑥 − (𝑥𝑡+𝑛.∆𝑇)𝑎)2 + (𝑦 − (𝑦𝑡+𝑛.∆𝑇)𝑎)2 =(𝑆𝑏)2]} |𝑚𝑖𝑛(𝑑𝑑𝑒𝑠𝑡𝑖𝑛𝑎𝑡𝑖𝑜𝑛)  ... (𝑉𝑑)𝑏 ≥ 𝑏𝑝𝑏|𝑃𝐷𝑏     (18) In which (∆𝑉𝑝𝑎𝑠𝑠)𝑏 is the increase in the walking speed of pedestrian B during the overtaking maneuver. According to Equation (18), if the desired speed of the following pedestrian (pedestrian B) is greater than the threshold provided by the bypass tendency parameter,  𝑏𝑝𝑏|𝑃𝐷𝑏, pedestrian B will change the movement direction in order to overtake pedestrian A instead of reducing the walking speed to follow him. The solution vector [(𝑋𝑡+𝑛.∆𝑇)𝑏 , (𝑌𝑡+𝑛.∆𝑇)𝑏], resulting from solving Equation (18) includes up to two points as described in Equations (19) through (26). 80  (𝑋𝑡+𝑛.∆𝑇)𝑏 =(2(𝑥𝑡+𝑛.∆𝑇)𝑎 + 2𝐾3𝐾1𝐾22 − 2(𝑦𝑡+𝑛.∆𝑇)𝑎𝐾1𝐾2) ± √𝑍∗2(1 + (𝐾1𝐾2)2) (19) (𝑌𝑡+𝑛.∆𝑇)𝑏 =𝐾3 − 𝐾1𝑋1𝐾2 (20) Where:  𝑍∗ = (2(𝑦𝑡+𝑛.∆𝑇)𝑎𝐾1𝐾2− 2(𝑥𝑡+𝑛.∆𝑇)𝑎 − 2𝐾3𝐾1𝐾22 )2− 4(1 + (𝐾1𝐾2)2) (𝐾4 + (𝐾3𝐾2)2− 2(𝑦𝑡+𝑛.∆𝑇)𝑎𝐾3𝐾2)  (21) 𝐾1 = 2(𝑥𝑡)𝑏 − 2(𝑥𝑡+𝑛.∆𝑇)𝑎 (22) 𝐾2 = 2(𝑦𝑡)𝑏 − 2(𝑦𝑡+𝑛.∆𝑇)𝑎 (23) 𝐾3 = 𝑆𝑏2 − 𝑑2 + (𝑥𝑡)𝑏2 − (𝑥𝑡+𝑛.∆𝑇)𝑎2 + (𝑦𝑡)𝑏2 − (𝑦𝑡+𝑛.∆𝑇)𝑎2 (24) 𝐾4 = (𝑥𝑡+𝑛.∆𝑇)𝑎2 + (𝑦𝑡+𝑛.∆𝑇)𝑎2 − 𝑆𝑏2 (25) 𝑑 = (𝑣𝑑)𝑏 × 𝑛. ∆𝑇 × (∆𝑉𝑝𝑎𝑠𝑠)𝑏 (26) The number of solution points in the vector [(𝑋𝑡+n.∆𝑇)𝑏, (𝑌𝑡+n.∆𝑇)𝑏] depends on the sign of the indicator Z*. If this sign of Z* is positive, the solution vector will include two points. If the following pedestrian (pedestrian B) is not involved in conflict with other leading pedestrians, pedestrian B will chose the point that is closest to his destination as the final choice for the position next (n) model updates according to the condition described in Equation (18). If Z* equals zero, this means that there will be only one solution in the solution vector. If the sign of Z* is negative, this means that there will be no solution to Equation (18). However, this case is very unlikely to occur as mentioned earlier because pedestrian B will apply Equation (18) only in case of conflict and it is always expected to find a valid solution to Equation (18). If for any reason the sign of Z* is negative, pedestrian B is set to move normally according to Equations (5) through (7). As the 81  estimated location in (n) model updates is set, the following pedestrian (pedestrian B) calculates the location in the next model update according to Equations (27) through (29) as follow: (𝑥𝑡+∆𝑇)𝑏 = (𝑥𝑡)𝑏 +𝑑𝑛.∆𝑇𝑛cos(𝛼𝑜𝑣𝑒𝑟𝑡𝑎𝑘𝑖𝑛𝑔)𝑏 (27) (𝑦𝑡+∆𝑇)𝑏 = (𝑦𝑡)𝑏 +𝑑𝑛.∆𝑇𝑛sin(𝛼𝑜𝑣𝑒𝑟𝑡𝑎𝑘𝑖𝑛𝑔)𝑏 (28) (𝛼𝑜𝑣𝑒𝑟𝑡𝑎𝑘𝑖𝑛𝑔)𝑏 = tan−1(𝑦𝑡+𝑛.∆𝑇)𝑏− (𝑦𝑡)𝑏(𝑥𝑡+𝑛.∆𝑇)𝑏 − (𝑥𝑡)𝑏 (29) 5.1.3 Interaction with Multiple Pedestrians  The process gets more complex as the number of pedestrians in the walking environment increases. In this case, each pedestrian might be involved in conflict with more than one leading pedestrian at the same time. Instead of having one new location to move to in the next model step, a pedestrian will now have a vector {PT} that includes all points resulted from solving the previous equations for each leading pedestrian in conflict. The current pedestrian chooses the final location next model update according to Equation (30).  ((𝑥𝑡+∆𝑇)𝑐 , (𝑦𝑡+∆𝑇)𝑐) = 𝑝𝑡 ∈ {𝑃𝑇}, 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜: {    √(𝑥𝑝𝑡 − (𝑥𝑡+∆𝑇)𝑖)2+ (𝑦𝑝𝑡 − (𝑦𝑡+∆𝑇)𝑖)2≥ 𝑆𝑐min(√(𝑥𝑝𝑡 − 𝑥𝑑𝑒𝑠𝑡)2+ (𝑦𝑝𝑡 − 𝑦𝑑𝑒𝑠𝑡)2)           (30) In which, (𝑥𝑝𝑡, 𝑦𝑝𝑡) are the coordinates of the current point in vector {PT}. The first condition of Equation (30) aims at ensuring that the current pedestrian will not be involved in collision with any other leading pedestrian in conflict. The objective of the second condition of the equation is to guarantee that the current pedestrian will always choose a location that is closer to the final destination. It is possible in some rare cases that there will not be a feasible solution for Equation 82  (30). In this case, the current pedestrian tries to find a location that satisfies the two conditions of Equation (30), but with reduced speed according to the algorithm presented in Figure 5-2. The algorithm is a simple iterative process in which the faster pedestrian reduces speed by specific percentage each search iteration (5% in the current algorithm). The pedestrian estimates new locations to move to {PTnew} using the reduced speed of the current iteration. Each point in {PTnew} is checked with regard to Equation (30). If a location that satisfies Equation (30) is obtained, the pedestrian will consider updating the current position to that new position in the next model update. If the two conditions of Equation (30) were not satisfied, the search continues for a new iteration. If a position that satisfies Equation (30) was not obtained after all iterations are exhausted, the current pedestrian will remain at the current location in the next model update.  Set step = 0.05 For K = 1 : (1/ step) For pt ϵ {PT} 𝑑𝑝𝑡−𝑐𝑢𝑟𝑟.𝑝𝑒𝑑 = √(𝑥𝑝𝑡 − (𝑥𝑡)𝑐)2+ (𝑦𝑝𝑡 − (𝑦𝑡)𝑐)2 𝜌 = tan−1𝑦𝑝𝑡 − (𝑦𝑡)𝑐𝑥𝑝𝑡 − (𝑥𝑡)𝑐 𝑑𝑛𝑒𝑤 = 𝑑𝑝𝑡−𝑐𝑢𝑟𝑟.𝑝𝑒𝑑 × (1 − (𝑠𝑡𝑒𝑝 × 𝐾)) (𝑥𝑝𝑡)𝑛𝑒𝑤 =(𝑥𝑡)𝑐 + (𝑑𝑛𝑒𝑤 × cos 𝜌) (𝑦𝑝𝑡)𝑛𝑒𝑤 =(𝑦𝑡)𝑐 + (𝑑𝑛𝑒𝑤 × sin 𝜌) 𝑝𝑡𝑛𝑒𝑤 = ((𝑥𝑝𝑡)𝑛𝑒𝑤, (𝑦𝑝𝑡)𝑛𝑒𝑤) 𝑃𝑇𝑛𝑒𝑤 . 𝑎𝑑𝑑(𝑝𝑡𝑛𝑒𝑤) END Check points of {PTnew} with respect to Equation (30) Solution found? True Return the final location = solution of Equation (30) Break False  If K = (1/ step) “all iteration exhausted” Return the final location = pedestrian current location “pedestrian will not move” END Figure 5-2. Estimating pedestrian’s position when interacting with multiple leading pedestrians 83  5.2 Model’s Key Parameters The following are the main parameters of the model:  Desired speed (Vd): The desired speed (free walking speed) is defined as the pedestrian’s preferred walking speed when they are walking freely in the walking environment. The desired speed is not the maximum speed of a pedestrian; rather, it is the most comfortable speed of the pedestrian under normal conditions when the pedestrian is not involved in interactions with other road users. The desired speed varies significantly among individuals as it is affected by many factors including pedestrian attributes (e.g. height, weight, gender, and age), the characteristics of the walking infrastructure, (e.g. grade, length, and the type of pedestrian facility), and weather and other external conditions. The vast majority of previous studies reported that the pedestrian desired speed follows normal distribution with a mean that ranges from 1.08 m/s to 1.6 m/s and a standard deviation that ranges from 0.15 m/s to 1 m/s [93]. Desired walking speed is usually considered the most important parameter in pedestrian simulation models  Personal distance (S): The personal distance is the distance each pedestrian prefers to keep from other pedestrians in the walking environment. The personal distance varies among individuals depending on many factors including the density of the walking environment, gender, and cultural aspects. It is expected that pedestrians accept less personal distance in crowded walking environments compared to less dense facilities. Theoretically, at very high densities, the personal distance could reach zero. Gender is another important factor that affects the personal distance as females tend to have larger personal distances compared to males in many societies. In the current model, the personal distance was assumed to follow the uniform distribution since there is no much information available about it. The upper and lower limit of the uniform 84  distribution were obtained in the calibration process. It should be noted that S in the current model is measured from the center of a pedestrian to the center of another pedestrian. This means that the personal distance already includes the body size of the pedestrian   Perception area: The area in front of each pedestrian that is considered effective in making decisions. The perception area is defined by the angle of vision (θ) and a radius (R)  Tendency to bypass (𝑏𝑝|𝑃𝐷): As discussed earlier, when a pedestrian is involved in a conflict with slower pedestrian ahead, the following pedestrian might follow the leading pedestrian or overtake the leading pedestrian. It was hypothesized that the choice of the collision avoidance strategy is affected by the density of the walking environment as perceived by the current pedestrian. At low densities any pedestrian can easily change walking direction to overtake slower pedestrians ahead. However, as density increases, it becomes more difficult for a pedestrian to change the movement direction to overtake a leading pedestrian. As such, more pedestrians may prefer to slow down except those with higher desired speeds. Pedestrians with higher desired speeds prefer to keep up their high pace and overtake the slower pedestrians and not to slow down. The tendency to bypass parameter reflects this hypothesis as it defines the minimum speed at each density level so that pedestrians walking with that speed or higher may consider overtaking slower pedestrians in case of conflict. If the pedestrian speed is less than the threshold defined by the tendency to bypass parameter at the current perceived density level, the pedestrian will slow down and follow the slower pedestrians. The tendency to bypass parameter is expressed as follow: 85  𝑏𝑝|𝑃𝐷 = {      𝐴𝑙𝑙 𝑠𝑝𝑒𝑒𝑑𝑠                                               (𝑃𝐷 < 0.67 𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ )𝑣1                       (0.67𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ ≤ 𝑃𝐷 < 0.93 𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ )𝑣2                       (0.93𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ ≤ 𝑃𝐷 < 1.33 𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ )𝑣3                       (1.33𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ ≤ 𝑃𝐷 < 1.67 𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ )𝑣4                       (1.67𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ ≤ 𝑃𝐷 < 2.00 𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ )𝑣5                                                                    (𝑃𝐷 ≥ 2.00 𝑝𝑒𝑑𝑒𝑠𝑡𝑟𝑖𝑎𝑛 𝑚2⁄ ) Where v1 through v5 are minimum speed for a pedestrian to overtake slower pedestrians at each density level. The values of v1 through v5 are estimated in the calibration process. The limits of each density level were selected to divide the range of densities considered by the model into reasonable divisions.   Perceived density: The choice of the collision avoidance strategy is dependent on the density of the walking environment. When taking decisions, pedestrians are affected by the density of the neighboring area, not the average density of the walking environment. As such, the density perceived by each pedestrian at the current location is considered for all calculations in the current model. The perceived density is obtained as the density of pedestrians in a rectangle area around each pedestrian of size (a × b) 5.3 Model Calibration 5.3.1 Calibration Methodology Since it was difficult to isolate enough number of pedestrians moving in the same direction without interacting with opposing pedestrians, the microscopic level calibration was not possible at this stage of model development. As such, the calibration of the uni-directional model parameters was conducted on the macroscopic level. The microscopic calibration for model parameters was left to next phase of the model (the bi-directional model), when it is possible to collect enough individual trajectories for the calibration process. The calibration of the uni-directional model parameters 86  involved identifying the set of parameters that provides a good fit between the macroscopic relations derived from the model outcomes (Density – speed and Density - flow relationships) and the fundamental diagrams provided by Weidmann (1993) [94].  Fundamental curves developed by Weidmann were selected as they consider different factors that could have an effect on pedestrians’ fundamental diagrams including  individual pedestrian attributes (e.g. age and gender), trip attributes (e.g. trip purpose), characteristics of the walking environment (e.g. grade) and external factors such as weather conditions [94]. Genetic Algorithm (GA) [95] was applied in order to identify the parameter configuration that leads to the best fit between macroscopic model outcomes and the Fundamental diagrams. GA was selected as it has several advantages. The GA starts searching for the optimum solution from more than one point within the search space, which reduces the possibility of converging to a local optimum [96]. As well, the GA usually converges to a solution that is close to the global optima in relatively small number of simulations. In the GA applied in this study, initial population was selected using Latin Hypercube Sampling method (LHS) [ [97], [98]] to ensure the uniform covering of parameter space. Table 5-1 summarizes the GA control parameters used in the calibration process.  Table 5-1. GA control parameters for uni-direction model calibration GA control Parameter Value Population per generation  10 Maximum generation size 20 Crossover rate 1.0 Mutation rate 0.01 Elitism Best chromosome  87  In order to calibrate the model parameters, a crosswalk of 20 meter length and 3 meters wide was considered as shown in Figure 5-3. The model parameters corresponding to the current parameter configuration (chromosome) were set and pedestrians were allowed to enter the simulation at predefined rate of arrival. Each pedestrian was assigned to an origin which was randomly selected at the beginning of crosswalk (Xorigin ~ U (0-3), Yorigin = 0). Each pedestrian’s goal was to reach the other side of the crosswalk (Y=20). Simulation was run for one hour using the current arrival rate and the (density - speed) and (density - flow) relationships were extracted. Twelve predefined arrival rates were applied in order to examine the fundamental relations at different density levels. A cost function was defined in order to assess the current chromosome as follow: min (𝑅𝑀𝑆𝐸𝑑−𝑠 +𝑅𝑀𝑆𝐸𝑑−𝑓) (31) where  𝑅𝑀𝑆𝐸𝑑−𝑠 =√∑ (𝑣 − 𝑣𝑓)2𝑛𝑡=1𝑛 (32) 𝑅𝑀𝑆𝐸𝑑−𝑓 =√∑ (𝑓 − 𝑓𝑓)2𝑛𝑡=1𝑛 (33) In which, (?̂?) and (𝑓) are the average pedestrian speed and flow estimated from the model at specific density value, while (𝑣𝑓) and (𝑓𝑓) are the speed and flow corresponding to the same density level in the Weidmann fundamental diagrams. The cost function defined in Equation (31) aims at minimizing the error between the macroscopic relations resulted from the model and the fundamental relations. The cost function associated with each chromosome was evaluated and used to select parents for next generations according to the GA control parameters. The process continues until the maximum number of generations is reached. Due to the stochastic nature of the 88  model parameters, three simulations were conducted for each chromosome and the average cost function for the three runs was used.  Figure 5-3. Simulation Environment for Model Calibration 5.3.2 Extracting Density - Speed Relationship from the Simulation In order to obtain the relationship between density and speed, density is calculated at each time step in the middle of the crosswalk (between Y = 10 and Y = 15), as shown in Figure 5-3. The average speed of all pedestrians existing in the calculation area during the current model step was also recorded. Density and speeds are recorded each model step for all runs and plotted against the fundamental density speed diagram for comparison.  5.3.3 Extracting Density - Flow Relationship from the Simulation In order to obtain the relationship between density and flow, the number of pedestrians who pass across the crosswalk during a specific period is recorded along with the corresponding average pedestrian density of the crosswalk. The selection of appropriate period for the density - flow relationship estimation is important. If the selected period is too long, the density may vary significantly with time and hence, the obtained flow-density relation will be inaccurate. Similarly, if the chosen period is too short, the flow might appear to be very low for any range of densities. Ten seconds was selected to be an appropriate period for density - flow relationship. The number 89  of pedestrians who cross the screen line A-A, shown in Figure 5-3 each 10 seconds was measured. The flow was then divided by (10 × crosswalk width) in order to obtain the flow per second per meter. Finally, the flow was plotted against corresponding average density and the results were compared to the Weidmann fundamental diagram. 5.3.4 Calibration Results The optimum solution was reached in the 14th generation with average errors in the density – speed relationship and the density – flow relationship of 0.037 m/s and 0.040 pedestrian/m/s, respectively. The final parameter configuration is presented in Table 5-2. Figure 5-4 presents the Density - speed relationship compared to Weidmann fundamental relationship as well as the corresponding Density-Flow relationship. It is worth mentioning that the fundamental relations were investigated up to a density level of 2.25 pedestrian/m2. Higher densities could be achieved by introducing higher pedestrian arrival rates and higher variability in pedestrian speed to the simulation. Although the model is capable of handling higher pedestrian densities, it appears to be impractical to consider higher arrival rates or higher desired speed variation in a uni-directional flow under normal condition.       90  Table 5-2. Key uni-directional model parameters' values Parameter Calibration Method Value Desired Speed (Vd) A distribution for Vd was taken from Literature [94] Vd ~ Normal distribution (μ = 1.34 m/s, σ = 0.26 m/s) personal distance (S) Calibration with GA S ~ Uniform distribution (0.53 m- 0.72 m) Perception Area: defined by radius (R) and angle of vision (θ) R was Calibrated using GA R = 9 m θ was set to a value θ = 170° Increase in speed during overtaking maneuver (∆Vpass) Results of pedestrian behavior study presented in the previous chapter ∆Vpass = 1.05 Bypass tendency 𝑏𝑝𝑏|𝑃𝐷𝑏  v1 through v4 were Calibrated with GA  v5 was set to a  conservative percentile from the speed distribution 𝑏𝑝|𝑃𝐷= {      𝐴𝑙𝑙 𝑠𝑝𝑒𝑒𝑑𝑠                       (𝑃𝐷 < 0.67)𝑣1 = 0.91𝑚 𝑠⁄  (0.67 ≤ 𝑃𝐷 < 0.93)𝑣2 = 1.35𝑚 𝑠⁄  (0.93 ≤ 𝑃𝐷 < 1.33)𝑣3 = 1.62𝑚 𝑠⁄  (1.33 ≤ 𝑃𝐷 < 1.67)𝑣4 = 1.80𝑚 𝑠⁄  (1.67 ≤ 𝑃𝐷 < 2.00)𝑣5 = 2.00𝑚 𝑠⁄                (𝑃𝐷 ≥ 2.00) Neighboring area used to calculate perceived density Calibration with GA (3 m × 5 m)  91    Figure 5-4. Model Macroscopic Calibration  5.4 Model Validation Parameters obtained from the calibration process were validated using individual trajectories for pedestrians moving in the same direction in order to ensure the accuracy of the simulated trajectories. Pedestrian trajectories were extracted from video data collected at a busy intersection R² = 0.998600.20.40.60.811.21.41.61.80 0.25 0.5 0.75 1 1.25 1.5 1.75 2 2.25Speed (m/s)Density (Ped/m2)Average speed (    95th and 5th percentile) Simulated curve Fundamental curveR² = 0.913900.20.40.60.811.21.41.60 0.5 1 1.5 2Flow (ped/m/s)Density (Ped / m2)Average flow (     95th and 5th percentile) Simulated curve Fundamental curve92  in the Vancouver Downtown area. The model was run to simulate the pedestrian movements and reproduce the trajectories. The simulated trajectories produced by the proposed model were compared to the actual trajectories in terms of location and speed difference. The details of the validation are presented in the following sections. 5.4.1 Data Collection Video data were collected at the signalized intersection of Robson and Broughton Streets in downtown Vancouver area; the same location used to collect data for the pedestrian behavior study, presented in Figure 4-1. Pedestrians trajectories were extracted from the video sequence according to the methodology described in Chapter 3. A total of forty pedestrians where considered for the validation process. Pedestrians considered for validation were selected during periods when pedestrians were moving only in one direction, without interacting with any opposing pedestrians. Figure 5-5 shows a sample of pedestrian trajectories considered for the validation.   Figure 5-5. Sample of extracted trajectories for uni-directional model Validation 5.4.2 Validation of Simulated Trajectories Each pedestrian was assigned to an origin and a destination corresponding to the starting and the ending points of the actual trajectory, respectively. As well, each pedestrian was assigned to a 93  desired walking speed that was estimated from the actual trajectory as the average speed at segments where a pedestrian is moving freely without interacting with other pedestrians. The simulation was run and pedestrians were allowed to move according to the behavior rules described earlier. Simulated trajectories were produced and compared to actual trajectories in order to assess the accuracy of the simulation. For each trajectory, the error in both X and Y coordinates and the error in the total distance was calculated each 0.5 seconds. The errors were then averaged over the life time of the trajectory and used to assess its accuracy. This estimate of the error does not only consider the location difference between the actual and simulated trajectories, but it also takes into account the speed variation of pedestrians along the trajectory. This is essential in order to evaluate the accuracy of the model in reproducing the uni-directional behavior, which is usually associated by frequent changes in walking speed. Table 5-3 summarizes the estimated errors for the 40 pedestrians considered for validation. As shown in the table, the model is capable of reproducing the actual trajectories with a very good accuracy. The average error of the 40 pedestrians was found to be 0.50 meters. It should be noted that the actual trajectories extracted from video footage are subject to tracking error and are not totally accurate. The errors reported in Table 5-3 represent the combined error of the simulation model and the trajectory tracking process errors Table 5-3. Summary of errors of the validation process  15th percentile average median 85th percentile Error in  X (m)  0.03 0.20 0.16 0.39 Error in Y (m) 0.12 0.40 0.34 0.77 Error in Distance (m) 0.19 0.50 0.44 0.84  94  Figure 5-6 shows examples of actual against simulated trajectories for four selected pedestrians. As shown in the figure, the model is capable of producing accurate trajectories in terms of the closeness to the actual trajectories and the ability to reproduce the same behavior taken by the actual pedestrian. For example, pedestrian 3 overtake slower pedestrian ahead from the right side in the actual video. The same behavior was observed in the simulation as shown in the simulated trajectory.     Actual Trajectory                                                      Simulated Trajectory Figure 5-6. Sample Actual Versus Simulated Trajectories for Four Pedestrians 10710911111311511798 99 100 101 102 103 104Y (meter)X (meter)Pedestrian 110410610811011211411611898 99 100 101 102 103 104Y (meter)X (meter)Pedestrian 210210410610811011211411698 99 100 101 102 103 104Y (meter)X (meter)Pedestrian 310410610811011211411611898 99 100 101 102 103 104Y (meter)X (meter)Pedestrian 495  Furthermore, the error in speed along the trajectories was assessed separately. The difference in the average walking speed between the actual and simulated trajectory was calculated each 0.5 seconds. The error was then averaged over the speed profile in order to obtain an expression for the speed error of this specific trajectory. The average error for the 40 pedestrians was found to be 12.8%. Figure 5-7 shows examples of actual against simulated speed profiles for two selected pedestrians. As shown in the figure, the speed profile resulted from the model matches the actual speed profiles with good accuracy. The model was successful in reproducing the overall trends of speed variation taken by the pedestrian in actual data.   Actual Trajectory                                                 Simulated Trajectory Figure 5-7. Sample Actual Versus Simulated Speed Profiles for Two Pedestrians 5.5 Conclusion This chapter presented the details of the interaction rules that define pedestrian behavior during uni-directional interaction in the simulation model. As well, the details of the calibration of the uni-directional model parameters and the validation of its results were addressed. Model parameters were calibrated using a GA that aims at minimizing the error between the macroscopic 0.511.522.50 2 4 6speed (m/s)time (seconds)Pedestrian 10.511.522.530 2 4 6speed (m/s)time (seconds)Pedestrian 296  results of the simulation model and fundamental relationships of pedestrian, developed by Weidmann (1993) [94]. The results were validated by comparing the simulated trajectories produced by the model to the actual trajectories of forty pedestrians, extracted from video data by means of computer vision. The results showed that the model is capable of reproducing pedestrian trajectories with high accuracy. The average errors in the X and Y coordinates for the forty trajectories were 20 cm and 40 cm, respectively. Results also showed that the model is capable of predicting pedestrian speed profile with an average accuracy of 87.2 %. The results indicated that the interaction rules defined in this chapter are sufficient to accurately simulate pedestrian uni-directional interactions.    97  6. Bi-directional Behavior Model This chapter presents the details of the second phase of the agent-based simulation, the bi-directional model. The rules defined in the previous chapter were expanded in order to accommodate pedestrian interactions with opposing pedestrians (bi-directional interactions) and interactions with fixed objects in the walking environment. In fact, the rules described in this chapter were found to be adequate to address pedestrian multi-directional interactions as confirmed in the case study presented in chapter 8 of this thesis. Additionally, the details of the calibration of model parameters and the validation of its results are also provided in this chapter. 6.1 Behavior Rules of Bi-directional Conflicts While moving towards a destination, each pedestrian continuously gathers information about other pedestrians and objects that exist within the pedestrian’s perception area. The collected information includes the current location of other pedestrians and objects and an estimation of the speed and movement direction of other pedestrians. Based on this information, the pedestrian assesses whether a conflict situation with other pedestrians and/or objects is identified or not. A pedestrian involved in a conflict with opposing pedestrians (a bi-directional conflict) will change the movement direction and swerve to avoid collision. The swerving maneuver could be taken by either of the opposing pedestrians in conflicts or by both pedestrians as will be illustrated in details later in this chapter. The swerving maneuver is not associated with a significant change in walking speed of the two pedestrians according to results of the pedestrian behavioral study presented in chapter 4. The rules of interaction with opposing pedestrian are presented in the following. Three cases were considered: behavior of individual pedestrians in conflict, behavior of conflicting 98  pedestrians when they are walking in groups, and behavior of pedestrians involved in conflict with multiple opposing pedestrians. 6.1.1 Bi-directional Conflict Identification A conflict with an opposing pedestrian is defined according to Equation (34) as follows: |((𝑥𝑡+𝑡𝑝)𝑖− (𝑥𝑡)𝑐) × 𝑠𝑖𝑛 𝛼𝑐 − ((𝑦𝑡+𝑡𝑝)𝑖− (𝑦𝑡)𝑐) × 𝑐𝑜𝑠 𝛼𝑐| < 𝐿𝑐 , (𝑓𝑜𝑟 𝑖 =1 𝑡𝑜 𝑛 𝑜𝑝𝑝𝑜𝑠𝑖𝑛𝑔 𝑝𝑒𝑑𝑒𝑡𝑠𝑟𝑖𝑎𝑛)  (34) Where: ((𝑥𝑡)𝑐 , (𝑦𝑡)𝑐): The current location of the current pedestrian (c)  ((𝑥𝑡+𝑡𝑝)𝑖 , (𝑦𝑡+𝑡𝑝)𝑖): Expected location of an opposing pedestrian (i) after prediction time (tp) αc: Movement direction of the current pedestrian Lc: The lateral distance each pedestrian prefers to keep from any opposing pedestrian when passing each other The current pedestrian predicts the future location of each opposing pedestrian in the perception area after specific time (tp). If the lateral distance between the current pedestrian and any opposing pedestrian is less than the preferred lateral distance of the current pedestrian (Lc), a conflict situation is identified as shown in Figure 6-1. The pedestrian will consider applying a swerving maneuver, if necessary, to resolve the conflict situation. The conflict resolving strategy depends on the group size of the current and the opposing pedestrian in conflict and the number of opposing pedestrians in conflict with the current pedestrian. A detailed discussion of the behavior rules that control different bi-directional conflict avoidance strategies is provided in the following sections.  99   Figure 6-1. Bi-directional conflict identification 6.1.2 Individual Behavior Rules If a pedestrian (A) identifies a conflict situation with an opposing pedestrian (B), the current pedestrian will continue moving towards the final destination as long as the distance between the two pedestrians in conflict is greater than a specific threshold (the Swerving distance of the current pedestrian, Dswerve). If pedestrian (A) gets closer to the opposing pedestrian so that the distance between them becomes equal to or less than the swerving distance while the conflict is still identified, pedestrian (A) will start to swerve to a new movement direction (α*) and move to an intermediate destination (Xint-dest, Yint-dest) to avoid collision as described in Equations (35) through (40).  100  𝛼𝑎∗ = tan−1𝑦(𝑖𝑛𝑡−𝑑𝑒𝑠𝑡) − (𝑦𝑡)𝑎𝑥(𝑖𝑛𝑡−𝑑𝑒𝑠𝑡) − (𝑥𝑡)𝑎 (35) 𝑥(𝑖𝑛𝑡−𝑑𝑒𝑠𝑡) = (𝑥𝑡+𝑡𝑝)𝑏−Ω|Ω|× 𝐿𝑎 × sin𝛼𝑎 (36) 𝑦(𝑖𝑛𝑡−𝑑𝑒𝑠𝑡) = (𝑦𝑡+𝑡𝑝)𝑏+Ω|Ω|× 𝐿𝑎 × cos ∝𝑎 (37) Ω = (𝑥𝑡+𝑡𝑝)𝑏− (𝑥𝑡)𝑎 −𝐷𝑃𝑎𝑃𝑏 . cos(𝛽 − 𝛼𝑎) . cos𝛼𝑎 (38) 𝛽 = tan−1(𝑦𝑡+𝑡𝑝)𝑏− (𝑦𝑡)𝑎(𝑥𝑡+𝑡𝑝)𝑏− (𝑥𝑡)𝑎 (39) 𝐷𝑃𝑎𝑃𝑏 = √((𝑥𝑡+𝑡𝑝)𝑏− (𝑥𝑡)𝑎)2+ ((𝑦𝑡+𝑡𝑝)𝑏− (𝑦𝑡)𝑎)2 (40)  The goal is to ensure that the lateral distance between pedestrian (A) and the predicted future location of opposing pedestrian (B) equals to or larger than the preferred lateral distance of the current pedestrian (La) as shown in Figure 6-2-a. The direction of the swerving maneuver is determined based on the side of the predicted future position of the opposing pedestrian (B) with respect to the line representing the movement direction of pedestrian (A). Pedestrian (A) will execute the maneuver in the opposite side of the opposing pedestrian (B) according to the sign of parameter (Ω) described in Equation (38). As the swerving maneuver is not associated with a significant change in walking speed of the two pedestrians, the two pedestrians will keep their walking speed as long as there is no conflict with other pedestrians or fixed objects detected. The swerving maneuver ends when the two pedestrians pass each other and the two pedestrians will return to move towards the initial destination. 101    a) An example of a conflict avoidance maneuver for two opposing pedestrians b) An example of estimating the opposing group internal distance [C = (X1+X2)/2]   c) An example of conflict avoidance maneuver for a pedestrian and opposing group d) An example of conflict avoidance maneuver between two opposing groups Figure 6-2. Different conflict avoidance strategies 6.1.3 Group Behavior Rules Pedestrian groups can be classified into two main categories with regard to their behavior during interactions with other pedestrians or objects; strict and flexible groups. As shown in Figure 6-3, members of strict groups tend to remain together and move as one unit. When interacting with opposing pedestrians, strict group members do not split up to allow the opposing pedestrians passing through. They walk in the same direction and swerve together to avoid colliding with 102  opposing pedestrians. This group type is usually observed in specific group classes such as parents with kids. On the contrary, members of flexible groups prioritize keeping the walking pace over maintaining the unity of the group. When interacting with opposing pedestrians, flexible group members may choose to split up so that each member goes on a different direction to resolve the conflict situation while keeping the relatively high walking pace. This group type is usually observed in groups with young pedestrians who have higher walking speed.  In the model, the type of group is set as an attribute for pedestrians who walk in groups, and thus group members decide how they will react when involved in a conflict situation. However, the opposing pedestrians have to estimate the type of the conflicting group in order to determine the appropriate conflict resolving strategy. If a pedestrian identifies the opposing group as a strict group, the pedestrian will not consider going in between group members and will always choose to swerve to avoid the whole group. If the pedestrian identifies the opposing group as a flexible group, the pedestrian may consider going in between group members if this is optimum for the pedestrian. The identification of the opposing group type in the model is based on the average distance between opposing group members. The pedestrian estimates the average internal distance between group members (Cg) over a time (tg) as shown in Figure 6-2-b. If the average observed distance (Cg) is less that than a specific threshold (Gth), the group will be considered as a strict group. Otherwise, the group will be considered as a flexible group. The behavior of strict groups, flexible groups, pedestrians in conflict with opposing strict groups, and pedestrians in conflict with opposing strict groups are described in details in the following sections. 103      Two opposing groups in a conflict situation. The South bound group (surrounded by red circle) is a flexible group. The group split up and each member swerve to a different direction to avoid the opposing strict group (surrounded by blue circle) Two opposing groups in a conflict situation. Both groups are identified as strict group. Group members move together as a unit and never split up. Figure 6-3. Strict and flexible groups 6.1.3.1 Behavior rules of pedestrian in conflict with opposing strict groups The pedestrian swerves to a new movement direction (α*) and move to an intermediate destination (Xint-dest, Yint-dest) to resolve the conflict with the opposing group according to Equation (35). The pedestrian will select the side of the swerving maneuver according to the side of the future predicted position of the opposing group center with respect to the line representing the movement direction of the pedestrian. Pedestrian (A) will execute the maneuver in the opposite direction of the group center, according to the sign of parameter (Ω) described in Equation (43). The pedestrian swerves so that the preferred lateral distance of the current pedestrian (La) is satisfied with the 104  predicted future position of the group member on the selected side of the maneuver, as shown in Figure 6-2-c. Equations (36) through (40) are slightly adjusted to describe this case as shown in Equations (41) through (45). 𝑋(𝑖𝑛𝑡−𝑑𝑒𝑠𝑡) = (𝑥𝑡+𝑡𝑝)𝑃𝑠𝑖𝑑𝑒−Ω|Ω|× 𝐿𝑎 × sin ∝𝑎 (41) 𝑌(𝑖𝑛𝑡−𝑑𝑒𝑠𝑡) = (𝑦𝑡+𝑡𝑝)𝑃𝑠𝑖𝑑𝑒+Ω|Ω|× 𝐿𝑎 × cos ∝𝑎 (42) Ω = (𝑥𝑡+𝑡𝑝)𝑜.𝑔.𝑐𝑒𝑛𝑡𝑒𝑟− (𝑥𝑡)𝑎 − 𝐷𝑃𝑎−𝑜.𝑔.𝑐𝑒𝑛𝑡𝑒𝑟 . cos(𝛽 −∝𝑎) . cos ∝𝑎 (43) 𝛽 = tan−1(𝑦𝑡+𝑡𝑝)𝑜.𝑔.𝑐𝑒𝑛𝑡𝑒𝑟− (𝑦𝑡)𝑎(𝑥𝑡+𝑡𝑝)𝑜.𝑔.𝑐𝑒𝑛𝑡𝑒𝑟− (𝑥𝑡)𝑎 (44) 𝐷𝑃𝑎−𝑔.𝑐𝑒𝑛𝑡𝑒𝑟= √((𝑥𝑡+𝑡𝑝)𝑜.𝑔.𝑐𝑒𝑛𝑡𝑒𝑟− (𝑥𝑡)𝑎)2+ ((𝑦𝑡+𝑡𝑝)𝑜.𝑔.𝑐𝑒𝑛𝑡𝑒𝑟− (𝑦𝑡)𝑎)2 (45) Where: ((𝑥𝑡+𝑡𝑝)𝑃𝑠𝑖𝑑𝑒, (𝑦𝑡+𝑡𝑝)𝑃𝑠𝑖𝑑𝑒): is the future predicted position of the group member that is on the same side of the swerving maneuver ((𝑥𝑡+𝑡𝑝)𝑜.𝑔.𝑐𝑒𝑛𝑡𝑒𝑟, (𝑦𝑡+𝑡𝑝)𝑜.𝑔.𝑐𝑒𝑛𝑡𝑒𝑟): is the predicted position of the opposing group center 6.1.3.2 Behavior rules of a strict group in conflict If strict group members apply a swerving maneuver in order to avoid an opposing pedestrian (or opposing group of pedestrians), the desired direction of the swerving maneuver is determined depending on the future predicted position of the opposing pedestrian (or the center of the opposing group) with respect to the line representing the movement direction of the group. For example, in Figure 6-2-d, the future predicted position of the center of the southbound group (B1 & B2) is to 105  the left side of the centerline of movement direction of the northbound group (A1 & A2). As a result, pedestrians (A1 & A2) will select to swerve to the right side. In this case, the pedestrian on the left side of the group (A1) will swerve to a new direction of movement (α*) that satisfies the preferred lateral distance (LA1) with the pedestrian on the same side of the maneuver of the opposing group (B2). The other group member (A2) will adjust the movement direction to the same direction selected by the other member to maintain the unity of the group. 6.1.3.3 Behavior rules of flexible groups in conflict  Each member of the group assesses the conflict situation individually and chooses a direction to swerve, if needed, to resolve the conflict according to rules defined in Equations (35) through (40). Group members who decided to swerve to the same side of the opposing pedestrian will move together with the direction of pedestrian who requires the largest deviation from the current movement direction in order to maintain the unity of this part of the group as shown in Figure 6-4-a. Once the swerving maneuver ends, the two parts of the group will change the movement direction in order to regain the original formation of the group as shown in Figure 6-4-b. The new movement direction each part of the group chooses to regain the original formation of the group was set in the model to α ± 30° depending on the side of each part of the group. When the two parts of the group meet each other, group members will start to walk towards the original destination as shown in Figure 6-4-c. 106     (Time = T1): Pedestrian A2 & A3 are at one side of opposing pedestrian B1, thus they will swerve to the right together. Pedestrian A3 will adjust the calculated direction of movement to maintain unity with pedestrian A2. On the other side, pedestrian A1 will swerve to the left to resolve conflict with opposing pedestrian   (Time = T2): The swerving maneuver ends as the group already pass pedestrian B1. Group members will now start to regain the original formation of the group.  (Time = T3): The group has returned to the original formation. They are now moving towards the original destination. Figure 6-4. An example of flexible group behavior 6.1.3.4 Behavior rules of pedestrians in conflict with opposing flexible group If a pedestrian identifies a conflict with an opposing flexible group, the pedestrian will apply the same rules applied when during the interaction with multiple opposing pedestrians. Interaction with multiple pedestrian rules are described in details in the following section. 6.1.4 Behavior Rules of Pedestrians in Conflict with Multiple Opposing Pedestrians  A conflict with multiple pedestrians is identified in two cases as shown in Figure 6-5-a. The first case is defined when more than one opposing pedestrian, who are not part of a strict group, satisfies the condition of Equation (34). The second case is defined if only one pedestrian satisfies the condition of Equation (34), but as the current pedestrian tries to change direction to resolve the conflict, the pedestrian will be in conflict with another opposing pedestrian before completing the swerving maneuver. Once a conflict with multiple pedestrians is identified, the pedestrian will apply the following rules: 107  a) The current pedestrian (c) considers (n) opposing pedestrians situated within a specific distance (η) measured from the closest pedestrian in conflict. The current pedestrian evaluates the available gaps between those opposing pedestrians. Intermediate gaps are calculated between the future predicted positions of the opposing pedestrians, perpendicular to the current movement direction (αc) according to Equation (47). The gaps at the two edges are measured to either the edge of the perception area as described in Equations (46) and (48) or to the boundary of the walking environment (e.g. wall, crosswalk border), as shown in Figure 6-5-b. 𝑔1 = 𝑚𝑖𝑛{𝐷1 cos 𝜀1 tan𝜃2− 𝐷1 sin 𝜀1𝑅 sin 𝜀3 −cos 𝜀1|cos 𝜀1|sin 𝜀1 (46) 𝑔𝑖 = |((𝑥𝑡+𝑡𝑝)𝑃𝑖− (𝑥𝑡+𝑡𝑝)𝑃𝑖+1) sin ∝𝑎−((𝑦𝑡+𝑡𝑝)𝑃𝑖− (𝑦𝑡+𝑡𝑝)𝑃𝑖+1) cos ∝𝑎| , 𝑖 = 1 𝑡𝑜 𝑛  (47)  𝑔𝑛+1 = 𝑚𝑖𝑛{𝐷2 cos 𝜀4 tan𝜃2− 𝐷2 sin 𝜀2𝑅 sin 𝜀4 −cos 𝜀2|cos 𝜀2|sin 𝜀2 (48) In which, 𝐷1 = √((𝑥𝑡+𝑡𝑝)𝑃1− (𝑥𝑡)𝑎)2+ ((𝑦𝑡+𝑡𝑝)𝑃1− (𝑦𝑡)𝑎)2 (49) 𝐷2 = √((𝑥𝑡+𝑡𝑝)𝑃𝑛− (𝑥𝑡)𝑎)2+ ((𝑦𝑡+𝑡𝑝)𝑃𝑛− (𝑦𝑡)𝑎)2 (50) 𝜀1 = tan−1((𝑦𝑡+𝑡𝑝)𝑃1− (𝑦𝑡)𝑎)((𝑥𝑡+𝑡𝑝)𝑃1− (𝑥𝑡)𝑎)− 𝛼𝑎 (51) 108  𝜀2 = tan−1((𝑦𝑡+𝑡𝑝)𝑃𝑛− (𝑦𝑡)𝑎)((𝑥𝑡+𝑡𝑝)𝑃𝑛− (𝑥𝑡)𝑎)− 𝛼𝑎 (52) 𝜀3 = cos−1|𝐷1 cos 𝜀1|𝑅 (53) 𝜀4 = cos−1|𝐷2 cos 𝜀2|𝑅 (54) b) The pedestrian considers moving towards a center of a gap according to equation (55). The selected gap (gi) should be wide enough so that the current pedestrian can pass through the opposing crowds easily and in the meantime, minimizes the deviation from the current movement direction (αc). (𝑔𝑖𝜖𝐺) ≥ 2𝐿𝑐 × 𝑟0     , 𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜min ∝𝑔𝑖− 𝛼𝑐̇   (55) In which G is a vector that includes all available gaps between opposing pedestrians and r0 is reduction factor applied to the ideal gap width (2.Lc), obtained during the calibration process  c) The pedestrian will move towards that gap that satisfies Equation (55). When the maneuver ends, the pedestrian will return to move towards the initial destination as shown in Figure 6-5-b & Figure 6-5-c.   d) If a gap that satisfies Equation (55) was infeasible, the current pedestrian will continue moving in the current direction. In this case, the pedestrian will be in direct conflict with two pedestrians (B1 and B2). The current pedestrian will work on resolving the conflict with the first conflicting opposing pedestrian, (B1). Once the swerving maneuver ends, the pedestrian will change the direction again to resolve conflict with the other pedestrian, (B2) as shown in Figure 6-5-e.  109      a) Two examples of Conflict with multiple pedestrians b) a swerving maneuver taken by pedestrian (A1) to the largest gap c) swerving maneuver ends     d) Another example of the maneuver taken by pedestrian (A1) e) Details of the swerving maneuver when sufficient gap is not found Figure 6-5. Behavior rules for pedestrians involved in conflict with multiple pedestrians 6.2 Conflict with Fixed Objects 6.2.1 Identifying Conflict with Fixed Objects Fixed objects existing in the walking environment (e.g. trees, light posts, and street seats) represent obstacles that pedestrians need to avoid. Pedestrian involved in conflict with a fixed object has to 110  change the movement direction and swerve to avoid hitting the obstacle. The maneuver may be associated with a reduction in the walking speed (about 7%) as concluded in the behavior study presented in chapter 4.  A conflict with a fixed object is defined if one of the following two conditions is satisfied: 1- The current movement direction of the pedestrian is obstructed by the fixed object as shown in Figure 6-6-a 2- The fixed object is not obstructing the pedestrian route, however the pedestrian expects to pass very close to the object, so that the lateral distance between the pedestrian and the object will be less than the preferred lateral distance of the current pedestrian (Lc) as shown in Figure 6-6-b   Figure 6-6. Identifying conflict with fixed objects In the model, each pedestrian checks if the first condition is satisfied by calculating the deflections from horizontal axis (∝𝑜𝑏𝑗)𝑖 of the lines connecting the pedestrian’s current position ((𝑥𝑡)𝑐, (𝑦𝑡)𝑐) and each of the corners of the fixed object ((𝑥𝑜𝑏𝑗)𝑖, (𝑦𝑜𝑏𝑗)𝑖). These deflections are used to determine the side of each corner point with respect to the movement direction (αc) of the current pedestrian. If {(∝𝑐− 180) < (∝𝑜𝑏𝑗)𝑖 <∝𝑐}, then the current point will be on the right side of the 111  pedestrian route. If {𝛼𝑐 < (∝𝑜𝑏𝑗)𝑖 <(180 + 𝛼𝑐)}, then the current point will be on the left side of the pedestrian route. The first condition is satisfied if some object corner points are at one side of the current movement direction (αc) and the rest of the corner points are on the other side. If the first condition is not satisfied, the current pedestrian checks the perpendicular distance from each corner point to the current movement direction (di), according to Equation (56). If the distance to any of the corner points is less than the preferred lateral distance of the current pedestrian (Lc), the second condition is satisfied. 𝑑𝑖 =|(𝑦𝑑𝑒𝑠𝑡 − (𝑦𝑡)𝑐)(𝑥𝑜𝑏𝑗)𝑖 −(𝑥𝑑𝑒𝑠𝑡 − (𝑥𝑡)𝑐)(𝑦𝑜𝑏𝑗)𝑖 + 𝑥𝑑𝑒𝑠𝑡(𝑦𝑡)𝑐 − 𝑦𝑑𝑒𝑠𝑡(𝑥𝑡)𝑐|√(𝑦𝑑𝑒𝑠𝑡 − (𝑦𝑡)𝑐)2 + (𝑥𝑑𝑒𝑠𝑡 − (𝑥𝑡)𝑐)2 (56) 6.2.2 Avoiding Collision with Fixed Object  If a conflict with a fixed object is identified, the current pedestrian has to change the direction of movement to avoid hitting the object. The pedestrian starts the swerving maneuver at a distance (dobs) from the fixed object. The pedestrian in conflict can swerve to either sides of the object to avoid hitting it, however, the pedestrian will always try to minimize the additional effort required to reach the destination. As such, pedestrian evaluates the two possible directions to avoid hitting the object (αR and αL) according to Equations (57) and (58).  ∝𝑅= (tan−1(𝑦𝑜𝑏𝑗)𝑅 −(𝑦𝑡)𝑐(𝑥𝑜𝑏𝑗)𝑅 −(𝑥𝑡)𝑐) −( tan−1𝐿𝑐√((𝑥𝑜𝑏𝑗)𝑅 −(𝑥𝑡)𝑐)2+ ((𝑦𝑜𝑏𝑗)𝑅 −(𝑦𝑡)𝑐)2)  (57) ∝𝐿= (tan−1(𝑦𝑜𝑏𝑗)𝐿 −(𝑦𝑡)𝑐(𝑥𝑜𝑏𝑗)𝐿 −(𝑥𝑡)𝑐) +( tan−1𝐿𝑐√((𝑥𝑜𝑏𝑗)𝐿 −(𝑥𝑡)𝑐)2+ ((𝑦𝑜𝑏𝑗)𝐿 −(𝑦𝑡)𝑐)2)  (58) Where: 112  ((𝑥𝑜𝑏𝑗)𝑅 , (𝑦𝑜𝑏𝑗)𝑅): The corner point of the fixed object that is on the far right with respect to αc (the corner point on the right side of αc that has largest |(∝𝑜𝑏𝑗)𝑖 −∝𝑐 |) ((𝑥𝑜𝑏𝑗)𝐿 , (𝑦𝑜𝑏𝑗)𝐿): The corner point of the fixed object that is on the far left with respect to αc (the corner point on the left side of αc that has largest |∝𝑐− (∝𝑜𝑏𝑗)𝑖 |) The pedestrian selects the direction closest to the current movement direction as the final direction of movement (∝𝑐)∗ as shown in Figure 6-7. The current pedestrian estimates the location next model update {(𝑥𝑡+∆𝑇)𝑐 , (𝑦𝑡+∆𝑇)𝑐} according to Equations (5) through (7) with a reduced walking speed {(∆𝑉𝑜𝑏𝑗𝑒𝑐𝑡)𝑐(𝑣𝑑)𝑐} and new movement direction (∝𝑐)∗. The reduction in speed during the maneuver (∆𝑉𝑜𝑏𝑗𝑒𝑐𝑡)𝑐was set to 0.93 based on the results of the behavior study presented in chapter 4.  Figure 6-7. Resolving conflict with a fixed object 6.2.3 Conflict with Multiple Fixed Objects  If other fixed objects existed in the walking environment, the current pedestrian could be involved in conflict with other objects while trying to resolve a conflict with the initial object. In this case, pedestrian considers swerving around all objects unless there is a sufficient gap between the two 113  objects that is wide enough, so that the pedestrian can walk through. A wide gap here means that the distance between the two objects is at least double the preferred lateral distance of the current pedestrian (Lc), so that the pedestrian has a minimum lateral distance of (Lc) with each object. Consider the case presented in Figure 6-8, the current pedestrian is in conflict with (object 1). The current pedestrian estimates two options for new movement directions according to Equations (57) and (58). However, as other objects exist beside (object 1), both directions (αR and αL) are obstructed by other objects (object 3 and object 2), respectively. The gap between object 1 and object 2 is narrow (< 2Lc), so the current pedestrian cannot walk between the two objects. As such, the current pedestrian will consider new movement direction from the left side to avoid object 2. The new movement direction is calculated according to Equation (58). Since there are no other objects to the left of object 2, the calculated movement direction will be considered as the final swerving angle from the left side of existing objects (αL-final). On the contrary, the gap between object 1 and object 3 is large enough to accommodate the current pedestrian (≥ 2Lc). As such, the current pedestrian can consider (αR) as the final swerving angle from the right side of existing objects (αR-final). The final direction of movement (∝𝑐)∗ is selected among (αR-final) and (αL-final) so that the deviation from the current movement direction is minimum. 114   Figure 6-8. Resolving conflict with multiple fixed objects 6.2.4 Combined Conflict with Opposing pedestrians and Fixed objects The previous concept can be applied if pedestrian is involved in conflict with fixed objects and opposing pedestrians at the same time. Consider the case presented in Figure 6-9, the current pedestrian is involved only in conflict with an opposing pedestrian. According to the behavior rules described in Equations (35) through (40), the current pedestrian should change the movement direction to a new direction (αp*) in order to avoid collision with the opposing pedestrian. However, this walking direction is obstructed by a fixed object as shown in the figure. In this case, the pedestrian would consider two new movement directions (αR and αL). The former (αR) results from Equation (57), as the pedestrian considers avoiding the fixed object from the right side. The later (αL) is obtained by examining the other possible direction to avoid the opposing pedestrian by changing the sign of the parameter Ω in equations (36) and (37). The final direction of movement α* is selected so that the deviation from the current movement direction is minimum. 115   Figure 6-9. Resolving conflict that includes fixed objects and opposing pedestrian 6.3 Updating Pedestrian’s Position and Behavior in Case of Collisions Based on the rules presented in this chapter, the current pedestrian updates the movement direction and, in some cases, the walking speed to resolve conflict with opposing pedestrians and fixed objects. As the movement direction and speed are set, pedestrian will calculate the location in the next model update according to Equations (5) through (7). However, the current pedestrian must check first for any uni-directional conflict. If a uni-directional conflict is detected, the current pedestrian will determine the location next model update based on the rules presented in the previous chapter.   As the walking environment gets more complex, it is possible that the current pedestrian would not be able to avoid conflict with all other pedestrians, so that the current pedestrian may got involved in a collision situation. The collision situation is defined when a pedestrian or an object exists within the personal distance of the current pedestrian (Sc), as shown in Figure 6-10-a. This situation could be attributed to many factors including the existence of an obstacle that prevents 116  the mutual vision between two pedestrians, too crowded walking environment, among other reasons. If a collision situation in detected, the current pedestrian will give priority to resolve the collision. Resolving collision can be seen as an optimization problem, in which the pedestrian aims to move to a new location {(xt+∆T)c, (yt+∆T)c} to resolve the collision situation while minimizing the change in the movement direction and the desired walking speed, as described in Equation (59). The first condition in Equation (59) aims at ensuring that pedestrian A will always move forward. The second condition ensures that pedestrian A will not exceed the desired walking speed while the last condition ensures that the distance between the current pedestrian and each of the (n) pedestrians or objects in collision is greater than the personal distance (Sc). argmin(𝑥𝑡+∆𝑇)𝑐∈𝑅,(𝑦𝑡+∆𝑇)𝑐∈𝑅|tan−1 ((𝑦𝑡+∆𝑇)𝑐 − (𝑦𝑡)𝑐(𝑥𝑡+∆𝑇)𝑐 − (𝑥𝑡)𝑐)−𝛼𝑐| ,𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜:{      (𝑦𝑡+∆𝑇)𝑐 − (𝑦𝑡)𝑐sin 𝛼𝑐+ ((𝑥𝑡+∆𝑇)𝑐 − (𝑥𝑡)𝑐 −(𝑦𝑡+∆𝑇)𝑐 − (𝑦𝑡)𝑐tan𝛼𝑐) cos𝛼𝑐 ≥ 0√((𝑥𝑡+∆𝑇)𝑐 − (𝑥𝑡)𝑐)2 + ((𝑦𝑡+∆𝑇)𝑐 − (𝑦𝑡)𝑐)2 ≤ ((𝑣𝑑)𝑐 × ∆𝑇)                   √((𝑥𝑡+∆𝑇)𝑐 − (𝑥𝑡)𝑖)2 + ((𝑦𝑡+∆𝑇)𝑐 − (𝑦𝑡)𝑖)2 ≥ 𝑆𝑎 , 𝑓𝑜𝑟 𝑖 = 1,… , 𝑛           (59) An approximate solution of Equation (59) can be obtained through the algorithm presented in Figure 6-11. The algorithm presents a simple iterative process in which a pedestrian searches for a new location that satisfies the conditions of Equation (59). The search process starts from the original movement direction αdest (direction to the destination). First, pedestrian search in a range of {αdest − 90 ≤ αnew ≤ αdest + 90} with a pre-set search step (5° in the current application). If a location that satisfies Equation (59) was not found, the search is repeated with reduced speed. Speed is reduced gradually by a predefined step (5% in the current application) until a solution is found. If all iterations were exhausted without obtaining a feasible solution for Equation (59), the 117  pedestrian will remain at the current locations in the next model update. If a pedestrian stops for a certain predefined time (ts), pedestrian moves one step perpendicular to movement direction (α) with the desired walking speed (Vd) in the direction that is opposite to the center of opposing pedestrian involved in the collision situation as shown in Figure 6-10-c. The current pedestrian starts a new search for a solution of Equation (59) in the following model update.    a) pedestrian (A) identifies a collision situation as pedestrian (B) exists within his personal space (Sa) b) An example of collision avoidance strategy taken by pedestrian (A). The shaded area represent the area where pedestrian (A) can safely move to in order to resolve the collision. O.L.a is the optimum location to move to in this case according to Equation (59) b) An example of collision avoidance strategy taken by pedestrian (A) when there is no feasible solution to Equation (59) Figure 6-10. Collision situation detection and avoidance         118  Set {angle step} = 5° Set {speed step} = 0.05 ∝𝑑𝑒𝑠𝑡= tan−1𝑦𝑑𝑒𝑠𝑡 − (𝑦𝑡)𝑐𝑥𝑑𝑒𝑠𝑡 − (𝑥𝑡)𝑐 For K = 0 : (1 / speed step) 𝑣𝑛𝑒𝑤 = (𝑣𝑑)𝑐 × (1 − (𝑠𝑝𝑒𝑒𝑑 𝑠𝑡𝑒𝑝 × 𝐾)) 𝑑 = 𝑣𝑛𝑒𝑤 × ∆𝑇 For J = 0 : (90 / angle step) For tt = -1 : 1 : step 2 𝜌1 =∝𝑑𝑒𝑠𝑡+ (𝑡𝑡 × 𝐽 × 𝑎𝑛𝑔𝑙𝑒 𝑠𝑡𝑒𝑝) 𝑥𝑛𝑒𝑤 = (𝑥𝑡)𝑐 + (𝑑 × cos 𝜌1) 𝑦𝑛𝑒𝑤 = (𝑦𝑡)𝑐 + (𝑑 × sin 𝜌1) 𝑝𝑡 = (𝑥𝑛𝑒𝑤, 𝑦𝑛𝑒𝑤) Check point {PT} with respect to Equation (59) Equation satisfied? True Return the final location = {PT} Break all loops False All iteration were exhausted? False continue True Return the final location = {(𝑥𝑡)𝑐, (𝑦𝑡)𝑐}  END END  END Figure 6-11. Estimating pedestrian’s position next update in case of collision 6.4 Model’s Key Parameters The following are the key parameters added to the model to address bi-directional interactions and interactions with fixed objects:  Preferred lateral Distance (L): the lateral distance each pedestrian prefers to keep when passing an opposing pedestrian or a fixed object. This distance varies among individuals according to many attributes including age, gender, and the density of the walking environment. The preferred lateral distance in this model is measured from the center of a pedestrian to the center of the opposing pedestrian or the edge of a fixed object  119   Swerving distance (Dswerve): the distance at which a pedestrian starts to make a swerving maneuver in order to resolve the conflict situation with an opposing pedestrian. This distance is highly variable among pedestrians depending on many factors including speed and group size. It was observed in the video data used for parameter calibration that faster pedestrians tend to start the swerving maneuver earlier compared to slower pedestrians. Moreover, pedestrians walking alone change direction earlier compared to those walking in groups and pedestrians in conflict with an opposing group of pedestrians apply the swerving maneuver earlier compared to those who are in conflict with a walking-alone pedestrian. As such, the swerving distance utilized in the model is expressed as follow: 𝐷𝑠𝑤𝑒𝑟𝑣𝑒 = (𝑑𝑠𝑝𝑒𝑒𝑑 × 𝑣𝑑) + (𝑑𝑔𝑟𝑜𝑢𝑝 × 𝐺𝑟𝑜𝑢𝑝) + (𝑑𝑜𝑝𝑝𝑜𝑠𝑖𝑛𝑔_𝑔𝑟𝑜𝑢𝑝 × 𝑂𝑝𝑝𝑜𝑠𝑖𝑛𝑔_𝐺𝑟𝑜𝑢𝑝) (60) In which, (Group) is a dummy variable that takes the value of 1 if a pedestrian is walking in a group and 0 otherwise and (Opposing_Group) is a dummy variable that has the value of 1 if the opposing pedestrian is walking in a group and 0 otherwise. (dspeed, dgroup, and dopposing_group) are three parameters to be estimated from data. A minimum value of 1.68 m was set for the swerving distance which is the minimum distance extracted from the calibration data.  Strict Group Threshold (Gth): If the average distance between opposing group members (Cg) over specific time (tg) is less that the strict group threshold (Gth), a pedestrian will consider an opposing group in conflict as a strict group. Otherwise, the group will be considered as a flexible group.  Prediction time (tp): the time used by the pedestrian to predict the future position of opposing pedestrians {(𝑥𝑡+∆𝑇)𝑖, (𝑦𝑡+∆𝑇)𝑖}, knowing their current location {(𝑥𝑡)𝑖, (𝑦𝑡)𝑖}, an estimate of 120  their current speed (vi), and an estimate of their current movement direction (βi) according to the following equations (𝑥𝑡+∆𝑇)𝑖 = (𝑥𝑡)𝑖 + 𝑣𝑖𝑡𝑝 cos𝛽𝑖  (61) (𝑦𝑡+∆𝑇)𝑖 = (𝑦𝑡)𝑖 + 𝑣𝑖𝑡𝑝 sin𝛽𝑖 (62)  Opposing pedestrians range (η): this parameter defines the range within which, opposing pedestrians will be considered when planning a navigation path to resolve conflict with opposing pedestrians as shown in Figure 6-5. 6.5 Parameter Calibration and Model Validation The calibration methodology utilized to calibrate the model parameters aims at minimizing the location error between actual pedestrian trajectories, extracted from video data by means of computer vision, and the corresponding simulated trajectories produced by the proposed model. The calibration and the validation of the bi-directional model were conducted using pedestrian data sets from an urban intersection in the city of Vancouver as described in details in the following section. 6.5.1 Data Collection Video data were collected at signalized intersection of Robson and Broughton Streets in downtown Vancouver area, the same location used to collect data for the pedestrian behavior study, shown in Figure 4-1. Pedestrian trajectories were extracted from the video sequence according to the methodology described in Chapter 3. A sample of tracked trajectories is presented in Figure 6-12. Eighty pedestrian trajectories were selected for the calibration and validation process. Two thirds of the selected trajectories were used for calibrating model parameters and the other third was left 121  to the validation process. The selected pedestrians were involved in most of the interactions considered in the model.  Figure 6-12. Sample of extracted trajectories for the bi-directional model calibration 6.5.2 Calibration of Model’s Key Parameters Model key parameters can be divided into two groups with regard to calibration process, directly measured parameters and indirectly measured ones. The first category includes parameters that could be directly extracted from the data. This category includes two parameters, the desired speed and the preferred lateral distance. The second category includes the rest of model key parameters, which cannot be directly extracted from data.  6.5.2.1 Direct calibration Desired speeds were extracted for each pedestrian as the average speed of the pedestrian during periods when the pedestrian is moving freely and not interacting with other pedestrians. The distribution of the preferred lateral distance (L) was extracted from the pedestrian trajectories as the lateral distance between each pair of opposing pedestrians when they pass each other. Fifty four passing maneuvers between opposing pedestrians were observed in the calibration dataset. 122  Figure 6-13 shows the distribution of the 54 values extracted. The preferred lateral distance was found to follow the log normal distribution with (mean = 0.731 m and standard deviation = 0.181 m), which was confirmed by the chi-squared test as shown in Figure 6-13. The model randomly assigns a value of the preferred lateral distance (L) for each pedestrian according to the previous distribution.  Figure 6-13. Preferred lateral distance distribution 6.5.2.2 Indirect calibration The calibration of the rest of the model parameters involves identifying the parameter configuration, which results in the minimal location error between actual and simulated trajectories. A Genetic Algorithm was applied to identify the best model parameters configuration. Same as discussed in the uni-directional model calibration, initial population was selected using Latin Hypercube Sampling method (LHS) [ [97], [98]] to ensure the uniform covering of parameter space. Table 6-1 summarizes the GA control parameters used in the calibration process. The number of population per generation was increased compared to the GA considered for uni-02468101214160.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 MoreFrequencyLateral Distance (m)Frequency Lognormal distributionChi-Squared = 4.44at p=0.05, χ2 = 14.07 (Good fit at 95 % confidence level)123  directional model calibration in order to handle the increased number of parameters. Same values of uni-directional parameters obtained during the calibration of the first phase of the model were used except for the tendency for bypass parameter (𝑏𝑝|𝑃𝐷). This parameter depends on the speed distribution of pedestrians. As the speed distribution for the current data set is different than the speed distribution used in the calibration of the first phase of the model, the tendency for bypass parameter was recalibrated using the current data set. Table 6-1. GA control parameters GA control Parameter Value Population per generation  15 Maximum generation size 20 Crossover rate 1.0 Mutation rate 0.01 Elitism Best chromosome  For each pedestrian within the calibration data set, the pedestrian was assigned to an origin and a destination extracted from the trajectory as well as a desired speed and a specific time to enter the simulation, extracted from the video sequence. The simulation was then run using the parameter configuration corresponding to the current parameter configuration (chromosome) and the simulated trajectories were extracted. The average and maximum location error between the actual and simulated trajectory were calculated for each trajectory. A cost function was defined in order to assess the current chromosome as follows:  𝑚𝑖𝑛(0.5 𝐴𝑣. 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑒𝑟𝑟𝑜𝑟 + 0.5 𝐴𝑣.𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑒𝑟𝑟𝑜𝑟) (63) The cost function defined in Equation (63) aims at minimizing the mean value of the average error 124  among the trajectories as well as the mean value of the maximum error for all the trajectories. The former error provides an indication of the overall quality of the simulated trajectories while the later gives an idea of the accuracy of the model in reproducing specific behaviors. It was assumed that both objectives have the same relative significance and hence, the two weights were set to 0.50. However, the effect of the values of these weights on the calibration process should be investigated in future work. The cost function associated with each chromosome was evaluated and used to select parents for next generations according to the GA control parameters. The process continues until the maximum number of generations is reached. Due to the stochastic nature of the model parameters, three simulations were conducted for each chromosome and the average cost function for the three runs was used. The optimum solution was reached in the 17th generation, with the parameter configuration summarized in Table 6-2. It should be noted that data considered for the calibration did not include pedestrian interacting with fixed objects. Hence, the task of calibrating model parameters related to this interaction was left to the case studies presented in the next two chapters. The average location error associated with the optimum solution was 0.35 meters while the maximum error was 0.78 meters. Figure 6-14 shows an example of an interaction between pedestrians and the actual and simulated trajectories for the seven pedestrians involved in the interaction. As shown in the figure, the model is capable of reproducing the simulated trajectories with high accuracy. In addition, the model is capable of reproducing the conflict resolution strategy in terms of when to start a swerving maneuver and the side of swerving.   125   Table 6-2. Parameter configuration for the optimum solution Parameter Calibration Method Value Swerving distance (Dswerve) dspeed, dGroup, dOppsoing_Group were Calibrated with GA  minimum Dswerve was set to a value dspeed = 1.0 dGroup = -2.1 dOppsoing_Group = 1.0 minimum Dswerve =1.68 Opposing pedestrians range (η) Calibration with GA 5.0 m Strict Group Threshold (Gth) Gth was Calibrated with GA 0.60 m tg was set to a value 1.0 second Prediction time (tp) Calibration with GA 1.5 seconds Bypass tendency 𝑏𝑝𝑏|𝑃𝐷𝑏  v1 through v4 were Calibrated with GA  v5 was set to a  conservative percentile from the speed distribution 𝑏𝑝|𝑃𝐷 = {      𝐴𝑙𝑙 𝑠𝑝𝑒𝑒𝑑𝑠                (𝑃𝐷 < 0.67)𝑣1 = 0.75𝑚 𝑠⁄  (0.67 ≤ 𝑃𝐷 < 0.93)𝑣2 = 1.35𝑚 𝑠⁄  (0.93 ≤ 𝑃𝐷 < 1.33)𝑣3 = 1.70𝑚 𝑠⁄  (1.33 ≤ 𝑃𝐷 < 1.67)𝑣4 = 2.00𝑚 𝑠⁄  (1.67 ≤ 𝑃𝐷 < 2.00)𝑣5 = 2.25𝑚 𝑠⁄                (𝑃𝐷 ≥ 2.00)   126   Snapshots of a group of two pedestrians (blue square) interacting with two groups of pedestrians (red square) in the other direction   Simulated and actual trajectories for the pedestrians involved in the interaction above Figure 6-14. An example of an interaction during the Calibration process 969810010210410610896979899100101102103104Y (meter)X (meter)Actual trajectory Simulated trajectoryPedestrian 735 127  6.5.3 Validation The selected parameter combination was validated using the remaining one third of the data. The simulation was run using the parameter combination summarized in Table 6-2. The simulated trajectories were produced and compared to actual trajectories in order to assess the model performance. The average error during the validation process data set was 0.35 m, which is the same as the average error obtained during the calibration process. The maximum error was slightly higher compared to the maximum error achieved during the calibration process (0.99 m as opposed to 0.78 m during the calibration). The average error in walking speed was found to be 13.3%. Overall, the validation shows that the calibrated model parameters lead to accurate trajectories when generalized to other data points. Figure 6-15 shows examples of actual and simulated trajectories during the validation process.     Snapshots of a pedestrian (red square) interacting with a group of two pedestrians (blue square) in the other direction at the start, middle and end of the interaction 128   Simulated and actual trajectories for the three pedestrians involved in the interaction above Figure 6-15. Example of an interaction during the validation process In addition to the overall location error, it is also important to examine the model’s ability to reproduce the collision avoidance strategy taken by pedestrians in the actual video. The magnitude of the lateral distance between each two pair of pedestrians passing each other and the side of passing were considered as indicators of the accuracy of reproducing the actual collision avoidance maneuver, as illustrated in Figure 6-16-a and Figure 6-16-b. During the validation process, 42 swerving maneuvers between pairs of pedestrian/pedestrian groups were identified. Figure 6-16-c shows the lateral distance values for both actual video and simulation. A positive sign indicates that the passing maneuver is conducted from the right side while a negative sign shows that the passing maneuver is conducted from the left side. The results show a very good match between 909294969810010210410610896979899100101102103104Y (meter)X (meter)Actual trajectory Simulated trajectoryPedestrian # 677129  simulated and actual lateral distance, as the regression line of the data points is almost identical to an ideal 45ᵒ line. Only two cases were incorrectly simulated by the model, which represent an accuracy of 95%. This show the complicated nature of pedestrian movement and the complexity of pedestrian modeling. Despite the facts that many behavior rules were defined to describe pedestrian movements in various interactions and that the model is capable of producing trajectories with high accuracy, pedestrians will still execute some unexpected maneuvers. It is important to minimize the errors in modeling these untypical maneuvers; however, they cannot be eliminated altogether.    a) An example of a correct simulation of conflict resolving strategy b) An example of an incorrect simulation of conflict resolving strategy 130   c) Simulated and actual lateral distance difference between pedestrians at passing locations Figure 6-16. Validation of the ability of the model to estimate the collision avoidance strategy 6.6 Conclusion This chapter presented the details of the second phase of the agent-based microscopic pedestrian simulation model. In this phase, a set of rules that controls pedestrian movement during interaction with other pedestrians in a bi-directional flow was introduced. Detailed behavior rules were proposed to model interactions between pedestrians in different cases (individual pedestrians’ interactions, interactions between pedestrians walking in groups; either flexible or strict groups, interaction with multiple individual pedestrians). Rules that control pedestrian interactions with fixed objects were also defined. The details of the calibration of model parameters and the validation of model results were discussed in details. The key parameters were divided into two main groups. The first group includes parameters that could be directly measured from data, y = 0.9786xR² = 0.9037-2.5-2-1.5-1-0.500.511.522.5-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5X simulated (meter)X actual (meter)Data Ideal131  mainly the desired speed and preferred lateral distance. The other group includes parameters that could not be measured directly from data. This group of parameters was calibrated by using a genetic algorithm, which aims at selecting the best combination of parameters that minimize the location error between actual pedestrian trajectories and the corresponding simulated trajectories.  The accuracy of the simulated trajectories and the ability of the model to reproduce the actual behavior taken by pedestrians in the actual video were investigated in the validation process. The results show that the accuracy of resulted trajectories was very good. The average location error between simulated and actual trajectories was 35 cm, with an average error in walking speed of 13.3%. The lateral distance between each pair of pedestrians passing each other and the side of the passing were used to evaluate the model ability to reproduce the actual collision avoidance maneuver applied by pedestrians in the actual video. Results showed that the model was capable of predicting the actual collision avoidance strategy in 95% of the cases. The validation results indicated the high accuracy of the model in producing accurate individual trajectories. Results also showed that the defined interaction rules were adequate to describe the actual collision avoidance maneuvers taken by pedestrians in most of the cases.     132  7. Case Study I: Validation of the Agent-Based Model in a Crowded Pedestrian Walking Environment  As presented in the previous chapters, the developed simulation model was validated using video data collected at a signalized intersection in the city of Vancouver. The validation process assured the success of the model in simulating pedestrian interactions. However, it is still important to investigate the model performance using other data sets that address different walking environments and different pedestrian flow conditions. As such, the model was applied to study pedestrian interactions using two different data sets. This chapter presents the details of the first case study while the following chapter addresses the second case study in details. The first case study considers pedestrian movement at the same signalized intersection of Robson and Broughton Streets in Vancouver. However, the data were acquired during different operational conditions that completely change the pedestrian flow conditions as will be presented in details in this chapter. Pedestrians considered in this case study move in crowded walking environment, in which they continuously interact with other pedestrians and other elements of the intersection. The model was used to simulate pedestrian movements and reproduce the pedestrian trajectories. The simulated trajectories were compared to actual trajectories obtained by means of computer vision in order to assess the model accuracy. Furthermore, the ability of the model to reproduce the exact behavior of pedestrians in actual data during different interactions was investigated in details. The details of data collection, the simulation process, and the assessment of the simulation are presented in the following. 133  7.1 Data Collection Video data were collected at the intersection of Robson and Broughton Streets in the downtown Vancouver area during the Vancouver fireworks festival. The festival is a popular event that is held annually in the city of Vancouver, attracting thousands of visitors every year. During the event, parts of the downtown Vancouver area were closed for traffic and only pedestrians were allowed to use the streets so that the event attendants can leave the area safely after the shows were concluded. In the study area, Robson Street was closed for traffic while Broughton Street was open for local traffic only. As the density of pedestrians in the area was very high, many interactions between pedestrians themselves and between pedestrians and other objects were observed. The study location and the view of the camera are presented in Figure 7-1.   Study Location (image source: google maps) Camera view Figure 7-1.Data collection location for Vancouver case study Overall, 286 pedestrians who passed over 4 minutes, were considered for the analysis. Eighty pedestrians passed in the first minute were considered for the calibration of model parameters while the remaining 206 pedestrians were considered for the simulation assessment. As the site was very crowded, pedestrians selected for the analysis were involved in frequent interactions with 134  pedestrians moving in different directions, stopping pedestrians, many fixed objects within the walking environment as well as a vehicle that slowly crosses Robson Street. The trajectories of pedestrians involved in the study were extracted from video footage by means of the automated computer vision platform using the methodology described in chapter 3. 7.2 Parameter Calibration Following the calibration approach described in chapter 6, model parameters were classified into two categories. The first category included measurable parameters that were calibrated directly from the data. The other category included parameters that cannot be directly measured so that they were indirectly calibrated using a Genetic Algorithm.  7.2.1 Direct Calibration Two parameters were considered for direct calibration; the desired speed (Vd) and the lateral distance (L). Desired speed (Vd) is usually represented as the average speed of pedestrian during segments where the pedestrian is walking freely without interacting with other road users. In the current case study, the walking environment was crowded and pedestrians were involved in continuous interactions, which made it difficult to isolate the parts of free walking conditions. Therefore, the average speed for each pedestrian was used to represent his/her desired speed at the intersection. This representation is an accepted approximation in a high density environment like the one considered in the current application. The other parameter that was directly calibrated was the preferred lateral distance (L). This parameter varies among pedestrians depending on site characteristics and cultural factors. Since data was collected at the same location where data was collected to validate the model, it was not expected that this parameter will change significantly compared to values reported in chapter 6. As such, the same distribution used in the initial 135  validation of the model (log normal distribution with mean = 0.731 m and standard deviation = 0.181 m) was considered in the current case study. The model randomly assigns a value of (L) for each pedestrian according to the previous distribution. 7.2.2 Indirect Calibration The indirect calibration of the parameters that could not be directly measured from data was conducted using (GA), according to parameter configuration presented in Table 6-1. The objective of the calibration was to minimize both average location error and the maximum location errors for the 80 pedestrians considered for the calibration process. The calibration followed the same indirect calibration procedure presented in chapter 6. The values of the model key parameters resulted from the indirect calibration process are presented in Table 7-1.  Table 7-1. Model parameters indirectly calibrated using GA for Vancouver case study Parameter Value Tendency to bypass (𝑏𝑝|𝑃𝐷): 𝑏𝑝|𝑃𝐷 = {𝐴𝑙𝑙 𝑠𝑝𝑒𝑒𝑑𝑠                (𝑃𝐷 < 0.67)0.75𝑚 𝑠⁄     (0.67 ≤ 𝑃𝐷 < 0.93)1.00𝑚 𝑠⁄                   (𝑃𝐷 ≥ 0.93) Perception area Parameters (θ) was set to 170° R = 9.0 m Swerving distance (D) parameters Dspeed = 1.0 Dgroup = -2.1 Dopposing_group = 1.0 Strict Group Threshold (Gth): 0.85 m Prediction time (tp): 1.5 seconds Opposing pedestrians range (η): 5.0 m 136  7.3 Pedestrian Simulation The simulation model was applied to reproduce the trajectories of the 206 pedestrians considered for the analysis. For each pedestrian, an origin and a destination that correspond to the actual trajectory were assigned as well as the desired speed and specific time to enter the simulation. These data were input to the simulation model along with site characteristics. Pedestrians were allowed to move according to the behavior rules of the model and simulated trajectories were produced using the parameter configuration presented in Table 7-1. Simulated trajectories were compared to actual trajectories in order to assess the model performance.  Figure 7-2 shows the simulated and the corresponding actual trajectories for the 206 pedestrians. The average error between the actual and simulated trajectories was found to be 0.28 meters, while the average of the maximum error observed for the trajectories was found to be 0.61 meters. The average walking speed error was assessed to be 0.06 m/s. The average results show that the model is capable of reproducing trajectories with high accuracy in such a crowded walking environment. Examples of both actual and simulated trajectories and the corresponding speed profile for selected pedestrians are presented in Figure 7-3. As shown in the figure, the model is capable of producing accurate trajectories and in the meantime, reproduce the actual behavior as reflected in the speed profiles. The average location errors for the three trajectories shown in Figure 7-3 were 0.18 m, 0.28 m, and 0.18 m, respectively while the speed error ranges from 0.08 m/s to 0.12 m/s. 137    Actual trajectories Simulated trajectories a. Pedestrian trajectories for the first 1.5 minutes   Actual trajectories Simulated trajectories b. Pedestrian trajectories for the first 1.5 minutes. A group of six pedestrians stops to take photos and chat with each other which affects other pedestrian trajectories  Figure 7-2.Simulated and actual trajectories for Vancouver case study   909510010511011588 90 92 94 96 98 100Y (m)X (m)Pedestrian 36 TrajectoryActual Simulation00.40.81.21.60 4 8 12 16Speed (m/s)Time (s)Pedestrian 36 Speed ProfileActual SimulationAverage error = 0.08 m/s (6.4%)138      Figure 7-3. Examples of pedestrian trajectories and the corresponding speed profiles from Vancouver case study 7.4 Evaluation of the Accuracy of Simulating Pedestrian Interactions In addition to evaluating the accuracy of simulated trajectories, it is also important to assess the model ability to reproduce the behavior executed by each pedestrian during different interactions. In order to satisfy this objective, six interactions that were observed frequently during the simulation were assessed in terms of how similar they are to the actual interactions. The six interactions included: interactions with fixed objects, interactions with stopping pedestrians, overtaking slower pedestrians, following slower pedestrians, swerving to avoid opposing 909510010511011594 96 98 100 102 104Y (m)X (m)Pedestrian 189 TrajectoryActual Simulation00.40.81.21.60 4 8 12 16Speed (m/s)Time (s)Pedestrian 189 Speed profileActual Simulation909510010511011592 94 96 98 100 102Y (m)X (m)pedestrian 204 TrajectoryActual Simulation00.511.520 4 8 12 16Speed (m/s)Time (s)pedestrian 204 Speed profileActual SimulationAverage error = 0.09 m/s (7.5%) Average error = 0.12 m/s (8.7%)  139  pedestrians and the behavior of pedestrians walking in groups. Table 7-2 summarizes the accuracy of the simulation model in handling each of the previous interactions. As shown in the table, the model was capable of reproducing pedestrian behavior with high accuracy (more than 94% for most of the interactions). The behavior was considered to be correct if the pedestrian in simulation took a specific action during the interactions (e.g. swerving to a specific direction) that is similar to the action taken by pedestrian in the actual video. It is worth mentioning that pedestrian movements are sophisticated and their behavior can be unpredicted in some cases. The few cases in which the model failed to predict the actual behavior seem to have included untypical action taken by the pedestrian in the actual video. It can be argued that it is almost impossible for a simulation model to predict pedestrian behavior with 100% accuracy. However, the accuracy of the model in predicting pedestrian behavior in this study shows that the model has very good potential in addressing pedestrian applications that require accurate trajectories and accurate simulation of individual behavior. The following section provides detailed discussion about the considered interactions and how exactly the accuracy of the model was evaluated. Table 7-2. Summary of accuracy of predicting pedestrian behavior during different interactions Interaction Observed Correctly simulated Accuracy Interaction with fixed object 261 259 99.2 % Interaction with stopping pedestrians 95 94 99.0% Passing maneuver 70 66 94.3 % Following maneuver 131 131 100.0 % Bi-directional interaction 31 27 87.1 % Group behavior 83 80 96.4 %  140  7.4.1 Interactions with Fixed Objects As the intersection was very crowded by pedestrians leaving the festival location, pedestrians continuously interact with fixed objects situated at the intersection such as light posts, newspaper boxes, and signs. Pedestrians have to change the movement direction and swerve to avoid hitting these objects. The side of the maneuver and the distance between a pedestrian and the fixed object at the moment of crossing are important indicators of the accuracy of the model, particularly for groups who might choose to split and move around the fixed element or to move together to the same side. The magnitude and sign of the lateral distance between a pedestrian and a fixed element were used as a measure of accuracy for this particular behavior. A negative distance indicates the pedestrian is swerving to the left to avoid the obstacle and the positive distance indicates a swerving to the right. Overall, 261 interactions with fixed objects were observed during the simulation. The model correctly predicted the direction of maneuver in 259 cases, which corresponds to accuracy of 99.23%. The average lateral distance during simulation was found to be 1.61 m, very close to the actual distance which was (1.65 m). There is no statistical difference between the mean of the actual and simulated values at the 95 % confidence level (P value = 0.35). Figure 7-4 shows the actual lateral distance versus the simulated lateral distance for the 261 cases analyzed. The regression line was almost identical with an ideal 45° line as shown in Figure 7-4.  141   Figure 7-4. Actual and simulated lateral distance between pedestrians and fixed objects in the walking environment 7.4.2 Interactions with Stopping Pedestrians As shown in Figure 7-5, eight pedestrians stopped for about 90 seconds within the analyzed data. Stopping pedestrians include a group of 6 pedestrians who stopped to chat and take some photos and 2 individuals, one was talking on the phone while the other was waiting for someone. Moving pedestrians have to swerve around stopping pedestrians in order to avoid collision. In order to assess the model capability in modeling this behavior, the lateral distance between the stopping pedestrians and each of the moving pedestrians at the passing moment were calculated for both the actual and simulated trajectories. The goal is to ensure that both the direction of swerving and the lateral distance value produced during simulation reflect the actual behavior. Within the simulation, 95 interactions were observed between pedestrians and stopping pedestrians. Ninety four incidents were executed from the correct side while the model failed to predict the correct side of interaction in only 1 situation. The accuracy of the model in predicting y = 0.9621xR² = 0.9664-4-3-2-101234-4 -3 -2 -1 0 1 2 3 4Simulated distance (m)Actual distance (m)Lateral distance with fixed objectsdata best fit 45 degree line142  the correct maneuver side was 98.9%. The average lateral distance between stopping and moving pedestrians was found to be 1.651 m in the simulation, just 4 millimeters more than the actual distance (1.647 m). Results presented in Figure 7-5 shows a very good match between the simulated and actual distance. The regression line was almost identical to an ideal 45° line indicating high accuracy of the simulated results.     Figure 7-5. Results of assessing pedestrian behavior while interacting with stopping pedestrians 7.4.3 Overtaking Maneuvers As discussed earlier, an overtaking maneuver is a unidirectional conflict resolving strategy in which a faster pedestrian chooses to swerve and bypass a slower pedestrian (or group of pedestrians) ahead. During the analyzed data, this maneuver was observed in 70 incidents. Sixty six incidents were correctly executed during the simulation which represent an accuracy of 94.3%. The model failed to execute the overtaking maneuver in only 4 incidents, in which pedestrians in the simulation chose to follow the slower pedestrians instead of overtaking them.  However, for all 66 overtaking maneuvers executed, the model was able to predict the correct passing side with a very accurate estimation of the passing distance as shown in Figure 7-6. The average lateral y = 0.9449xR² = 0.962-4-2024-4 -2 0 2 4Simulated distance (m)Actual distance (m)Lateral distance with stopping pedestriansdata best fit 45 degree line143  distance between a fast overtaking pedestrian and a slower passed pedestrian was found to be 1.79 m in both actual data and the simulated.   Figure 7-6. Results of evaluating pedestrian passing behavior 7.4.4 Following Behavior A following maneuver is another unidirectional conflict resolving strategy in which faster pedestrians slow down and follow slower pedestrians ahead. This maneuver was observed in 131 cases during the 3 minutes analyzed, more than double the overtaking maneuvers executed. This was expected due to the high pedestrian density in the walking environment, which makes it difficult for a pedestrian to overtake slower pedestrians. It was observed that all following maneuvers were correctly reproduced in the simulation. The average following distance resulted from the simulation was found to be 1.25 m, only 4.70 % higher than the actual distance (1.19 m). Furthermore, the average time which a pedestrian spent following a leading pedestrian was also assessed. The average following time during simulation was found to be 7.5 seconds, slightly higher than the average following time observed in the actual data (6.3 seconds). Figure 7-7 shows y = 0.9753xR² = 0.8787-4-3-2-1012345-4 -3 -2 -1 0 1 2 3 4 5Simulated distance (m)Actual distance (m)Lateral Distance during passing interactionsdata best fit 45 degree line144  the actual and simulated following distances for the 131 maneuvers observed. As shown in the figure, the model was able to predict the following distance with acceptable accuracy as the regression line slope was only 1.2° off the ideal 45 degree line.  Figure 7-7. Actual versus simulated following distance for pedestrians who follow slower pedestrians 7.4.5 Group Behavior Validation During the 3 minutes considered for validation, 160 pedestrians were moving in groups of size varying from 2 to 4 members, forming a total of 69 groups.  As a significant portion of pedestrians considered in the analysis were moving in groups, it was important to investigate the ability of the model to describe their behavior. In order to achieve this goal, both the average and maximum internal distances between each pair of pedestrians walking in groups were extracted. The average distance between group members provides an indication of the overall accuracy of the simulated trajectories while the maximum distance provides an overview of the accuracy of simulating group behavior. As described earlier in Chapter 6, pedestrian groups can be classified into two categories; y = 1.0441xR² = 0.699600.511.522.533.544.50 0.5 1 1.5 2 2.5 3 3.5Simulated distance (m)Actual ditsance (m)Following Distancedata best fit 45 degree line145  strict groups and flexible groups. If a specific group acts as a strict group, it is expected that the maximum distance between group members will be relatively small as group members move together and keep the same relative positions during interactions. Similarly, it is expected that the maximum distance between flexible group members will be relatively larger as these members can split up during interactions.  The average and maximum distance between 83 pairs of pedestrians walking in groups were calculated for both actual and simulated trajectories as shown in Figure 7-8. On average, the average internal distance between simulated group members was found to be 0.81 meters, slightly higher than the actual distance which was 0.78 meters. The regression line almost coincides with an ideal 45° line indicating high accuracy of the simulated trajectories. The mean of the maximum distance was found to be 1.03 meters in the trajectories produced by the simulation model, slightly lower than the 1.07 meters observed in the actual data. Out of the 83 pairs analyzed, the correct behavior was successfully reproduced in 80 cases, which represents about 96.4% accuracy. The model was not successful in modeling the actual behavior in three cases only. Two cases included two groups acted in one interaction as flexible groups while in reality they act as a strict group. The third case included one group acted as strict group in one particular interaction while in reality group members split up as a flexible group in the same interaction. The three groups are shown in Figure 7-8, where the two groups highlighted with the red circle are those who were incorrectly modeled as flexible groups and the one group highlighted by the blue circle is the one that was incorrectly modeled as a strict group. 146    Figure 7-8. Group behavior assessment 7.4.6 Bi-directional Interactions Bi-directional interactions involve one or more pedestrians who change direction and swerve to avoid collision with opposing pedestrians. Thirty one bi-direction interactions were observed during the simulation. The sign and magnitude of the lateral distance between the two opposing pedestrians at the moment of passing were calculated for both the actual and simulated trajectories and were used as measures of the accuracy of simulating this interaction. Generally, the model correctly predicted the side of swerving in 27 cases (accuracy = 87.1%). Figure 7-9 shows the actual and simulated lateral distances for the 31 interactions studied. As shown in the figure, the simulated results show a satisfactory fit with actual data, as the regression line is close to an ideal 45° line. y = 1.0145xR² = 0.575800.40.81.21.620 0.5 1 1.5 2Simulated distance (m)Actual distance (m)Av. internal group distancedata best fit 45 degree liney = 0.9315xR² = 0.486400.511.522.50 1 2Simulated distance (m)Actual distance (m)Max. internal group distancedata best fit 45 degree line147   Figure 7-9. Evaluation of pedestrian behavior during Bi-direction interactions 7.4.7 Interaction with a Moving Vehicle In addition to the six frequently observed interactions discussed earlier, another interesting interaction was observed during the analysis. A vehicle crossed Robson Street very slowly and directly interacted with seven pedestrians as shown in Figure 7-10. As Robson Street was closed for traffic and was full of pedestrians leaving the social event, the vehicle was moving very slowly trying to find suitable gap through the crowd to cross Robson Street.  It took the vehicle more than 90 seconds just to cross a 20 meters wide intersection. The vehicle stops every time the driver observes a flux of pedestrians approaching so that there were no action needed from pedestrians to avoid the vehicle except for the last part of the crossing. There was a moderate gap available for the driver so the driver accelerated to complete the crossing before the road is blocked again. This forced the seven pedestrians shown in Figure 7-10 to stop, or to reduce speed significantly, and wait for the car to cross. Although it was a one-time interaction, it was investigated in the model as the behavior of pedestrians involved in this interaction is worth studying.  y = 1.1573xR² = 0.5613-3-2-1012345-1.5 -1 -0.5 0 0.5 1 1.5 2 2.5Simulated distance (m)Actual distance (m)Lateral distance for two-directional interactionsdata best fit 45 degree line148   Figure 7-10. Interaction with a crossing vehicle As the simulation model mainly focuses on pedestrian behavior, the vehicle in the simulation was not allowed to modify any actions taken by the driver in the actual video. The trajectory of the vehicle along with its speed every frame were extracted from the video and input to the simulation model. The vehicle was then modeled as a moving object with speed and movement direction that change every model update according to the movement of the actual vehicle. The pedestrians were allowed to respond to the moving object (the vehicle) by changing movement direction and/or walking speed to avoid collision. Same rules used to avoid fixed objects were applied, but the future predicted location of the object is used by pedestrian to decide the appropriate action instead of fixed location of the object. It was observed that the behavior of the seven pedestrians involved in this interaction was very similar to the actual behavior. Figure 7-11 shows the speed profiles for the seven pedestrians. As shown in the figure, the model was capable of reproducing the speed profile with a very good accuracy in terms of the overall trend of the speed profile, the minimum speed observed, the time pedestrians start to slow down and time they start to speed up again. The average speed error for the seven pedestrians ranges between 0.1 m/s to 0.16 m/s. the results show 149  that the model could be useful in studying pedestrian vehicle interactions and consequently pedestrian safety at intersections.       00.511.50 2 4 6 8 10 12 14 16 18Speed (m/s)Time (s)speed profile of pedestrian 21Actual SimulatedAverage error = 0.15 m/s00.511.50 2 4 6 8 10 12 14 16 18Speed (m/s)Time (s)speed profile of pedestrian 22Actual Simulated00.511.50 2 4 6 8 10 12 14 16 18Speed (m/s)Time (s)speed profile of pedestrian 23Actual SimulatedAverage error = 0.15 m/s00.511.50 2 4 6 8 10 12 14 16 18Speed (m/s)Time (s)speed profile of pedestrian 24Actual SimulatedAverage error = 0.11 m/s00.511.50 2 4 6 8 10 12 14 16 18Speed (m/s)Time (s)speed profile of pedestrian 25Actual SimulatedAverage error = 0.10 m/s00.511.50 2 4 6 8 10 12 14 16 18Speed (m/s)Time (s)speed profile of pedestrian 26Actual SimulatedAverage error = 0.12 m/sAverage error = 0.16 m/s  150   Figure 7-11. Speed profiles of pedestrians involved in interaction with vehicle 7.5 Conclusion This chapter provided the details of a case study conducted in the city of Vancouver, in which the model was utilized to address pedestrian interactions in a very crowded walking environment. Video data was collected during a popular event that attracts thousands of pedestrians from Vancouver each year. Major streets in downtown area were closed to traffic to allow crowd leaving the event to exit the downtown area safely. Data used in this study includes crowds moving in different directions and who continuously interact with each other. A total of 286 pedestrian trajectories were extracted by means of computer vision. Eighty six trajectories were used for the calibration of model parameters while the rest were used to the analysis. The calibration process was divided into two main categories: direct calibration and indirect calibration. The direct calibration includes parameters that can be directly extracted from the data while the indirect calibration includes the parameters that cannot be directly measured. The second category was conducted using (GA) which aims at minimizing the location difference between actual and simulated trajectories. The results showed high accuracy of the model in terms of the accuracy of the produced trajectories and the ability to reproduce pedestrian behavior during different interactions. The average location 00.511.50 2 4 6 8 10 12 14 16 18Speed (m/s)Time (s)speed profile of pedestrian 27Actual SimulatedAverage error = 0.10 m/s  151  error for the 206 pedestrians considered in the analysis was found to be 0.28 m while the average speed error was 0.06 m/s.  Detailed analysis of the accuracy of the model in simulating different interactions was provided in the paper. The results showed that the model is capable of reproducing interactions such as passing and following maneuvers, interaction with stopping pedestrians and fixed objects within the walking environment, interaction with opposing pedestrians with accuracy that varies from 87% to 100 %. Group behavior was also examined and the model showed excellent capability in predicting the correct behavior of groups during different interactions with accuracy 96.4%. Furthermore, a one-time interaction that was observed during the analysis and included interaction between a vehicle and 7 pedestrians was also studied. Speed profiles of the seven pedestrians showed excellent match between the simulation and actual behavior in terms of the reduction of speed performed by the pedestrians to avoid the vehicle, and the time this reduction started and ended. This interaction demonstrates the potential use of the model to study pedestrian-vehicle conflicts and to conduct pedestrian safety studies using simulation. However, as only one location was studied, more data is required to confirm the capability of the model to consider such application.  152  8. Case Study II: Validation of the Agent-Based Model at a Scrambled Phase Signalized Intersection The case study presented in this chapter considered pedestrian interactions at a signalized intersection in the city of Oakland, California. The intersection has 4 conventional crosswalks in addition to two diagonal crosswalks, implemented in 2002, in order to introduce a scramble pedestrian phase. In intersections with a scramble pedestrian phase, the signal plan includes a pedestrian only phase where pedestrians can move at any direction without conflicting with vehicles. It is argued that this kind of treatment improves pedestrian safety as it eliminates conflicts with vehicles but it may cause more delays to vehicular traffic. From pedestrian interactions point of view, the interactions between pedestrians in this kind of intersections are more complicated, particularly on the two diagonal crosswalks, as pedestrians interact with opposing pedestrians in multiple directions. The simulation model was applied to simulate pedestrian movements at the intersection and reproduce their trajectories. The accuracy of the simulated trajectories was assessed through a comparison with the actual trajectories. As well, the behavior of pedestrians during different interactions was compared to the actual behavior observed in the video in order to evaluate the performance of the simulation model. The following sections provide more details about the data collection, the simulation process, and the assessment of the simulation. 8.1 Data Collection Video data were collected at the signalized intersection of Eighth and Webster Streets in Oakland, California. The intersection is a busy intersection located in the heart of Oakland’s Chinatown, a major commercial and business destination that attracts many pedestrians. Eighth Street is a one-way westbound street with four travel lanes: two through lanes, one left/through lane and one 153  reserved left turn lane, in addition to parallel parking lane on each side of the street. Webster is one-way southbound with parallel parking on both sides and four travel lanes; dual reserved left turn lanes and two through lanes. The intersection experiences relatively high traffic volume and very high pedestrian volume (over 3000 pedestrian crossings per hour at peak times) [99]. The turning movement volumes observed in the intersection are quite heavy, as they constitute about 36% of total vehicular volume [99]. In 2002, a pedestrian scramble signal phasing was implemented at the intersection in order to improve pedestrian safety at the location. In addition to the 4 existing crosswalks at the four approaches of the intersection, two additional diagonal crosswalks were introduced for pedestrians to make diagonal crossing in addition to the conventional crossings on the four existing crosswalks. Vehicle movement is not allowed in any direction during the pedestrian phase in the scramble and similarly, pedestrians are not allowed to cross the intersection during the vehicle phase. The cycle length is 90 seconds, of which 31 seconds are dedicated for pedestrian phase. The study location and the camera view are shown in Figure 8-1.  Overall, 340 pedestrians who passed over 11 consecutive cycles, were considered for the analysis. Sixty nine pedestrians who pass in the first two cycles were considered for the calibration of model parameters while the remaining 271 pedestrians were considered for the analysis. Pedestrians moving on the four crosswalks shown in Figure 8-1 were considered for the analysis. Pedestrians using crosswalks 1 and 2 were referred to as conventional crossings in this study while those who use crosswalks 3 and 4 were referred to as diagonal crossings. Pedestrians involved in the study were detected and tracked throughout the video sequence in order to extract the actual pedestrian trajectories by means of computer vision according to the methodology presented in chapter 3. 154    Study Location (image source: google maps) Camera view Figure 8-1. Data collection location for Oakland case study 8.2 Parameter Calibration 8.2.1 Direct Calibration Desired speed (Vd) and preferred lateral distance at crossing (L) were calibrated directly by extracting their values from data. Extracting the desired speed from actual pedestrian trajectories involves separating the trajectory segments in which pedestrians move freely and are not involved in conflict with other pedestrians or objects. The desired speed can then by expressed as the average speed during these segments. In the current application, it was assumed that pedestrians move freely in the first part (first third) of the crosswalk then, their speed is affected by conflicts with opposing pedestrians in the middle of the crosswalk. Hence, the average speed of each pedestrian in the first part of the crosswalk was considered as the desired speed for that pedestrian.  The distribution of the preferred lateral distance at crossing (L) was extracted from 132 crossing cases observed in the calibration data set. The mean value of L was found to be 0.77 m with standard deviation of 0.3 m. The average value of (L) obtained in this study was very close to the 155  average value obtained in Vancouver study (0.73 m). The data showed good fit to a normal distribution, which was confirmed by the Chi-squared test, as presented in Figure 8-2.   Figure 8-2. Lateral distance distribution 8.2.2 Indirect Calibration The calibration of the rest of model parameters that could not be directly extracted from data was done using Genetic Algorithm, according to the algorithm control parameters presented in Table 6-1. However, a little modification was applied to the objective of the optimization. Instead of minimizing the average error and the maximum error in the previous case study, the calibration of model parameter applied in this case study aimed at minimizing the location and speed error between the actual and simulated trajectories. This change was made as speed prediction is very important in the current case study, particularly in the middle of the two diagonal crosswalks where pedestrian speeds change frequently due to multi-directional interactions with other pedestrians. The objective function was modified in order to reflect the current objective of the simulation according to the following equation: 051015202530< 0.20.2 - 0.30.3 - 0.40.4 - 0.50.5 - 0.60.6 - 0.70.7 - 0.80.8 - 0.90.9 - 1.01.0 - 1.11.1 - 1.21.2 - 1.31.3 - 1.41.4 - 1.5> 1.5FrequencyLateral distance (m)Preferref lateral distance distributiondata Normal distributionChi-squared = 12.08 Threshold (95% confidence) = 21.03 156  𝑚𝑖𝑛((0.5 ×∑ 𝐿𝐸𝑖𝑛𝑖=1𝑛) + (0.5 ×∑ 𝑆𝐸𝑖𝑛𝑖=1𝑛)) (64) In which, (LE)i and (SE)i are the average location and average speed error between the actual and simulated trajectory for the ith  trajectory, and n is the number of trajectories considered in the calibration process. The values of the model key parameters resulted from the indirect calibration process are presented in Table 8-1. Table 8-1. Model parameters indirectly calibrated using GA in Oakland case study Parameter Value Tendency to bypass (𝑏𝑝|𝑃𝐷): 𝑏𝑝|𝑃𝐷 = {    𝐴𝑙𝑙 𝑠𝑝𝑒𝑒𝑑𝑠                (𝑃𝐷 < 0.67)0.75𝑚 𝑠⁄     (0.67 ≤ 𝑃𝐷 < 0.93)1.35𝑚 𝑠⁄     (0.93 ≤ 𝑃𝐷 < 1.33)1.70𝑚 𝑠⁄     (1.33 ≤ 𝑃𝐷 < 1.67)2.00𝑚 𝑠⁄     (1.67 ≤ 𝑃𝐷 < 2.00)2.25𝑚 𝑠⁄                   (𝑃𝐷 ≥ 2.00) Perception area (A) (θ) was set to 170° R = 9.0 m Swerving distance (D) Dspeed = 0.5 Dgroup = -1.0 Dopposing_group = 0.5 Dmin = 1.0 m Strict Group Threshold (Gth): (tg) was set to 1.0 seconds Gth = 1.30 m Prediction time (tp): tp = 1.5 seconds Opposing pedestrians range (η): η = 10.0 m Minimum  gap r0 0.75 157  The resulted parameter configuration was compared to the parameter configuration obtained in the original calibration of the model using Vancouver crosswalk data, presented in Table 6-2. It was observed that the model parameters yielded similar values after the calibration process except for three key parameters; strict group threshold (Gth), opposing pedestrians range (η), and swerving distance (D). The three parameters are related to bi-directional conflicts. “Gth” yields significantly higher value compared to value obtained using the Vancouver data set (1.3 m in Oakland compared to 0.6 in Vancouver). “η” was found to be almost double the value obtained from the Vancouver data set, while (D) was found to be much smaller. All three parameters that define the swerving distance (Dspeed, Dgroup, Dopposing,_group) yielded smaller values compared to the Vancouver data set. These values show that pedestrians in the current application prefer to consider more pedestrians when planning a path towards destination. However, they do not apply the swerving maneuver until they are very close to opposing pedestrians. This difference may be explained by the difference between the two walking environments. In the Vancouver data set used for the original calibration, pedestrians were moving on a conventional crosswalk which was relatively short. The number of conflicts was few and they usually occur at the middle of the cross walk. Pedestrians may assess conflicts early at the beginning of the crossing and change direction early to avoid conflicts without expecting future conflicts with other pedestrians. On the other hand, the walking environment considered in the current application is more complicated. The two diagonal crosswalks are relatively long (24 m each) and they exhibit many conflicts in different directions. Pedestrian need to consider opposing pedestrians in a wider range (larger η) in order to be able to assess the conflict and come up with the most efficient conflict resolving strategy. As well, pedestrians might wait until they are close to opposing pedestrians (smaller D) before they execute swerving maneuvers to avoid conflicts that occur due to unexpected movements taken by other pedestrians coming from different directions. 158  8.3 Pedestrian Simulation Two hundreds and seventy one pedestrians who crossed the four studied crosswalks in 9 consecutive cycles were considered for the analysis. Of these pedestrians, 156 used crosswalks 1 and 2 (conventional crossing) while the other 115 cross diagonally using crosswalks 3 and 4. Basic inputs needed for simulating pedestrian movements including the origin and a destination of each pedestrian, the desired speed, and the time at which a pedestrian enters the simulation were extracted from the actual trajectories and assigned to pedestrians in the simulation. Pedestrians were allowed to move according to the behavior rules of the simulation, and using the set of parameters obtained from the calibration process. Figure 8-3 shows the simulated and actual trajectories for the 271 pedestrians considered in the validation process. Figure 8-4 presents snapshots of the simulation and the corresponding video image at different time instances during the simulation. The figure shows the details of the simulation for each crosswalk separately, in order to focus on important time instance corresponding to each movement. The figure shows that the overall accuracy of the model in simulating pedestrian interaction is good. However, more detailed evaluation will be provided in the following sections in order to assess the accuracy of the model in simulating different interactions.   Actual trajectories Simulated trajectories Figure 8-3. Simulated versus actual trajectories for Oakland case study 159           T = 5 seconds T = 7 seconds T = 10 seconds T = 11.5 seconds a- Pedestrian simulation on crosswalk 1 (cycle number 6)         T = 7.5 seconds T = 9 seconds T = 13.5 seconds T = 15.5 seconds b- Pedestrian simulation on Crosswalk 2 (cycle number 6)         T = 7.0 seconds T = 10.5 seconds T = 14.0 seconds T = 19.5 seconds C- Pedestrian simulation on crosswalks 3 and 4 (cycle number 6) Figure 8-4. Snapshots of simulation at different time instances 160  8.4 Evaluation of Simulated Trajectories The average error between the actual and simulated trajectories was assessed to be 0.49 meters. Examples of individual actual and simulated trajectories and the corresponding speed profiles are shown in Figure 8-5. As shown in the figure, the model is capable of producing accurate trajectories that are very close to the actual trajectories and in the meantime, reproduce the actual speed profiles of the pedestrian. The average location errors for the three trajectories shown in Figure 8-5 were 0.11 m, 0.29 m, and 0.63 m, respectively. The errors in speed profile were calculated each 0.5 seconds for the three trajectories and were found to be 9.6%, 6% and 16%, respectively. The results indicates that the simulation model is capable of reproducing the trajectories with high accuracy in such complex walking environment.     859095100105110108 110 112 114Y (m)X (m)pedestrian 44 - trajectory00.511.520 2 4 6 8 10 12 14speed (m/s)time (S)pedestrian 44 - speed profile909510010598 100 102 104Y (m)X (m)Pedestrian 100 - trajectory00.511.520 2 4 6 8 10 12speed (m/s)time (s)pedestrian 100 - speed profile161    Figure 8-5. Examples of pedestrian actual and simulated trajectories and the corresponding speed profiles The average crossing speed for the 271 pedestrians was 1.45 m/s with a standard deviation of 0.39 m/s. the corresponding average speed resulting from the simulation was 1.42 m/s with a standard deviation of 0.37 m/s. The average error in speed prediction was only 0.04 m/s. The difference between the actual and simulated speed data points was not significant as confirmed by the T test (p value = 0.91). Figure 8-6 shows the actual and predicted average speed for the 271 pedestrians considered in the validation. As shown in the figure, the average speed prediction was very accurate and the regression line of the data points is almost identical to an ideal 45 degrees line. The figure also shows the distribution of both actual and simulated speed, which have a significant fit at 95% confidence level, as confirmed by the Chi-squared test. Furthermore, the difference between the conventional and the diagonal crossing speeds was investigated. The crossing speed for the diagonal movements (crosswalks 3 and 4) was higher than the conventional crossing speed (crosswalks 1 and 2) for both actual and simulation data points. This agrees with the results reported by Hediyeh et al. [34] at the same intersection. Actual crossing speeds were (1.41 ± 0.4 m/s) and (1.49 ± 0.36 m/s) for conventional and diagonal movements, respectively. The difference was significant at 95% confidence level (P value = 0.040). The same 05010015090 95 100 105Y (m)X (m)pedestrian 252 - trajectoryActual Simulated00.511.520 5 10 15 20speed (m/s)time (s)pedestrian 252 - speed profileSimulated Actual162  trend was observed in the simulation as the simulated crossing speeds were found to be (1.38 ± 0.39 m/s) and (1.46 ± 0.33 m/s) for conventional and diagonal movements, respectively. The difference between the two speeds was significant at 95% confidence level as well (p value = 0.039). Figure 8-7 shows the distribution of the conventional and diagonal crossing speeds for the actual data and the simulation. As shown in the figure, the simulated and actual speeds showed significant fit at the 95% confidence level for both conventional and diagonal crossings, as confirmed by the chi-squared test.  y = 0.9748xR² = 0.902700.511.522.533.544.50 0.5 1 1.5 2 2.5 3 3.5 4 4.5Simulated speed (m/s)Actual speed (m/s)Actual and simulated crossing speeddata best fit 45 degree line163   Figure 8-6. Average speed assessment   Figure 8-7. Distribution of conventional and diagonal crossing speeds 8.5 Evaluation of the Accuracy of Simulating Pedestrian Interactions As the model’s main objective was to model pedestrian behavior during interactions, it is very important to assess the model accuracy in simulating particular behavior executed by pedestrians during different interactions. As such, five interactions that were observed frequently during the 010203040506070< 0.80.8-0.90.9-1.01.0-1.11.1-1.21.2-1.31.3-1.41.4-1.51.5-1.61.6-1.71.7-1.81.8-1.91.9-2.0> 2.0Speed (m/s)Actual & simulated crossing speed distributionActual speed Simulated speed01020304050< 0.80.9 11.11.21.31.41.51.61.71.81.9 2> 2.0Speed (m/s)Speed distribution for conventional crossingActual speed Simulated speed0510152025< 0.80.9 11.11.21.31.41.51.61.71.81.9 2> 2.0Speed (m/s)Speed distribution for diagonal crossingActual speed Simulated speedX2 = 8.26 Critical X2 = 22.3 X2 = 9.26 Critical X2 = 22.3  X2 = 11.12 Critical X2 = 22.3 164  simulation were assessed in terms of how similar they were executed in the model compared to the actual interactions. The five interactions include interactions with fixed objects (stopping vehicles), passing slower pedestrians, following slower pedestrians, swerving to avoid opposing pedestrians and the behavior of pedestrians walking in groups. Table 8-2 summarizes the results of the evaluation of the five interactions. As shown in the table, the model was capable of simulating actual pedestrian behavior during interactions with high accuracy that varies between 80% and 100%. More details about each of the five interactions and how was the accuracy assessed are provided in the following section.  Table 8-2. Summary of accuracy of predicting pedestrian behavior during different interactions Interaction Observed Correctly simulated Accuracy Interaction with fixed object 42 42 100 % Following maneuver 34 34 100 % Passing maneuver 34 27 80 % Two directional interaction 378 337 89 % Group behavior 80 74 92.5 % 8.5.1 Interactions with Fixed Objects During the analyzed data, it was observed that in some cycles, one or more vehicles blocked part of the crosswalk. These blockages were either because vehicles failed to stop before the stop line or because the queueing of vehicles after the intersection in the peak periods prevented some vehicles from clearing the intersection. These vehicles represented fixed obstacles to pedestrians crossing the intersection during those cycles. Throughout analysis, five vehicles blocked a crosswalk in either part of the cycle or for the whole cycle length. Specifically, one vehicle blocked crosswalk number 2 in the seventh cycle, three vehicles blocked the first crosswalk in the eighth 165  cycle and one vehicle blocked the same crosswalk in the ninth cycle. A total of 36 pedestrians were involved in direct interactions with at least one of these vehicles, resulting in 42 pedestrian - stopping vehicle interactions. The model successfully repeated the actual swerving maneuver taken by the 36 pedestrians involved in this interaction. The lateral distance between pedestrian and stopping vehicle was considered a measure of accuracy of simulating such behavior. The average lateral distance between the pedestrians and stopping vehicles in the simulation was found to be 0.95 m, 0.27 m below the actual average value (1.22 m). Figure 8-8 shows examples of three interaction with the vehicle blocked the second crosswalk in the seventh cycle. As shown in the figure, the model is capable of producing trajectories that match the general trajectories involved in the interactions. The errors associated with the three pedestrians presented in the figure are 0.10 m, 0.02 m and 0.18 m, respectively.        Actual Simulated Actual Simulated Actual Simulated pedestrian # 123 pedestrian # 124 pedestrian # 127 Figure 8-8. Examples of Interaction with stopped vehicles 8.5.2 Uni-directional Interactions Throughout the analysis, interactions with slower pedestrians moving in the same direction occurred 68 times. Pedestrians chose to follow the slower pedestrians in exactly half of the interactions while in the other half, they selected to overtake the leading pedestrians instead. The 166  model correctly simulated the actual behavior in 61 situations which represent an accuracy of almost 90%. Details of the two collision avoidance strategies applied by pedestrians involved in uni-directional interactions are presented below.  8.5.2.1 Following behavior Following interaction was observed in 34 cases during the analysis. In all cases, pedestrians in simulation chose to execute the same collision avoidance strategy taken by pedestrians in the actual data. The average following distance in the simulation was assessed to be 1.25, only 4.70 % higher than the actual distance (1.19 m). The average time which a pedestrian spent following a slower pedestrian ahead was found to be 6.4 seconds, a bit higher than the average following time observed in the actual data, which was 4.6 seconds. Figure 8-9 shows the following distances for the 34 pedestrians involved in this interaction in both actual and simulated data. As shown in the figure, the model was very accurate in simulating the following distance in the 34 interactions, as the regression line slope was only 0.4° off the ideal 45 degree line.   Figure 8-9. Actual versus simulated following distance for pedestrians who follow slower pedestrians ahead y = 0.9862xR² = 0.6900.511.522.530 0.5 1 1.5 2 2.5 3Simulated distance (m)Actual distance (m)Following distance45 degree line Linear (data best fit)167  8.5.2.2 Passing maneuvers Throughout the analysis, passing maneuvers were observed 34 times. Twenty seven maneuvers were correctly simulated by the model while it fails to reproduce the same behavior taken by the pedestrian in 7 interactions, which corresponds to an accuracy of 80 %. However, for all passing maneuvers completed, the model was able to predict the correct passing side with an accurate estimation to the passing distance as shown in Figure 8-10. The average lateral distance when passing a slower pedestrian was found to be 1.28 m, 0.21 m lower than the actual average passing distance (1.49 m).   Figure 8-10. Results of evaluating pedestrian passing behavior 8.5.3 Bi-directional Interactions During the time analyzed, 378 bi-directional interactions were observed. In these, 227 interactions occur on either crosswalk 1 or 2 (conventional crossing) and 151 interactions occurs on crosswalk 3 or 4 (diagonal crossing). The interaction was considered to be correctly simulated if the pedestrians in conflict pass each other from the correct side as observed in the actual video. The lateral distance between each pair of pedestrians at the moment of crossing was calculated and compared to the actual distance as a measure of accuracy of simulating this interaction. The sign y = 0.8039xR² = 0.8254-4-3-2-101234-4 -3 -2 -1 0 1 2 3 4Simulated distance (m)Actual distance (m)Lateral distance during passing interactions168  of the lateral distance represents the crossing side. Overall, the model correctly predicted the side of swerving in 337 cases (accuracy = 89.2%). This accuracy varies from 91% for the conventional crosswalks to 87% on the diagonal crosswalks. The average lateral distance during the simulation was found to be 1.13 m, 0.16 m lower than the actual value (1.29 m), which represents an accuracy of 88%. The average error in the lateral distance varies from 0.10 m for the conventional crossings to 0.23 m for the diagonal crossings. The accuracy of simulating the bi-directional interactions for the conventional and diagonal crossings was 92% and 83%, respectively. The accuracy of the simulation for the diagonal movement was expected to be lower as the interactions are more complicated, however results obtained in this study showed that the accuracy of the simulation is very good for both crossing types.  Figure 8-11 shows the actual and simulated lateral distances during the bi-directional interactions for conventional crossing, diagonal crossings the two movements combined). As shown in the figure, the simulated results show a satisfactory fit with actual data for the two movements investigated.  y = 0.8267xR² = 0.8392-3-2-101234-3 -2 -1 0 1 2 3 4Simulated distance (m)Actual distance (m)Lateral distance for bi / multi-directional interactionsdata best fit 45 degrees line169    Figure 8-11. Evaluation of pedestrian behavior during interactions with pedestrians in other directions 8.5.4 Group Behavior Validation During the 15 minutes analyzed, 43 pedestrians groups were observed of sizes that vary from 2 to 4 members.  The 43 groups were involved in 80 interactions throughout the analysis. As the number of pedestrians walking in groups was significant (about 29 % of all pedestrians considered), it was important to assess the ability of the model to describe their behavior during different interactions. As described earlier, pedestrian groups during interaction can move together and do not split up (strict group), or group members split up and avoid conflicting pedestrians individually (flexible groups). Of the 80 interactions observed, the model correctly predicted the actual behavior of the group in 74 cases, which represents an accuracy of 92.5%. The model fails to predict the actual behavior in 6 cases; 2 cases acted as flexible groups while in the actual data they move together as a strict group, and 4 cases were simulated as strict groups while in reality, these groups acted as flexible group during the interactions. The average distance between the 43 group members was calculated as an additional measure of the accuracy of the model in handling pedestrian groups. The average internal distance between y = 0.8655xR² = 0.8829-3-2-101234-3 -2 -1 0 1 2 3 4Simulated distance (m)Actual distance (m)on conventional crosswalks45 degrees line data best fity = 0.7741xR² = 0.7736-3-2-101234-3 -2 -1 0 1 2 3 4Simulated distance (m)Actual distance (m)on diagonal crosswalksdata best fit 45 degrees line170  simulated group members was found to be 0.95 meters, 3% lower than the actual distance, which was 0.98 meters. Figure 8-12 shows the average distance between group members for both, actual and simulated trajectories. As shown in the figure, the regression line of the data points is very close to an ideal 45° line (the difference is only 1.9ᵒ), which indicates a high accuracy of the simulated groups.   Figure 8-12. Average distance between group members 8.6 Conclusion In this chapter, the simulation model was applied to simulate pedestrian interactions at non-conventional signalized intersection located in the city of Oakland, California. Video data were collected at a busy signalized intersection located in the heart of Oakland’s Chinatown, a major commercial and business destination that creates a lot of pedestrian activities. The intersection has a pedestrian scramble signal phasing in order to reduce the pedestrian-vehicle conflicts at the site. Four crosswalks were considered in this study: two conventional crosswalks in addition two diagonal crosswalks. Three hundreds and forty pedestrians were considered for the analysis. Sixty nine pedestrians were considered for the calibration of model parameters while the remaining 271 y = 0.937xR² = 0.618600.511.522.50 0.5 1 1.5 2 2.5Simulated distance (m)Actual distance (m)Av. internal group distancedata best fit 45 degree line171  pedestrians were considered for the analysis. Model parameters that can be measured from data were directly calibrated from actual trajectories. The non-measurable parameters were calibrated using (GA) that aims at minimizing the location and speed difference between actual and simulated trajectories. The simulated trajectories of the 271 pedestrians considered for the analysis were compared to the actual trajectories acquired by means of computer vision. The comparison results showed that the model was capable of reproducing the actual trajectories with high accuracy in terms of the average location and speed error and the capability of the model to simulate specific behavior taken by pedestrians during interactions. The average location error for the 271 pedestrians was found to be 0.49 m while the average speed error was 0.04 m/s. The average crossing speed for both conventional and diagonal crossings (1.38 and 1.46 m/s, respectively) were very close to the actual speeds (1.41 and 1.49 m/s, respectively). Detailed analysis of the accuracy of the model in simulating specific interactions was investigated in the study. The model was capable of reproducing the actual behavior taken by pedestrians in passing and following maneuvers, interaction with fixed objects in the walking environment, and interaction with opposing pedestrians with accuracy that varies from 80% to 100 %. Behavior of pedestrians walking in groups during interactions was also examined. Results showed that groups in the model acted exactly similar to the actual pedestrians in 92.5% in the interactions considered. The results obtained in this study confirmed that model is capable of producing accurate individual trajectories and accurate pedestrian behavior during interactions, which ensures the potential use of the model in many pedestrian applications that required detailed simulation of pedestrian behavior such as safety studies.   172  9 Conclusions and Future Research  9.1 Summary and Conclusions Non-motorized modes of transportation, particularly walking, are receiving more emphasis in transportation planning and engineering as vital contributors for a healthy and livable environment. In addition to the numerous health benefits of active transportation, encouraging the adoption of sustainable modes of transportation would have a significant effect in reducing the external causalities of motorized traffic including congestion, pollution emissions, and collisions. As such, developing solid understanding of pedestrian behavior is of great importance. However, detailed analysis of pedestrian behavior usually experiences two main challenges: the lack of reliable data and the lack of tools required to analyze pedestrian behavior. Although computer simulation of pedestrian dynamics has gained recent interest as an important tool that could be used to analyze pedestrian behavior, existing models suffer from many shortcomings due to the complexity of the pedestrian systems. The pedestrian system encompasses a large degree of heterogeneity and the movements of pedestrians involve frequent changes in walking speed and movement direction due to interactions with other road users. Modeling pedestrian behavior requires defining large number of parameters that are usually difficult to be measured from data. The complex nature of the parameters needed to model pedestrian interactions leads to difficult tasks associated with the modeling process, particularly calibrating model parameters and validating its results. In this thesis, the details of a microscopic pedestrian simulation model for modeling detailed pedestrian interactions were presented. The development of the model was preceded by a detailed pedestrian behavior study that helps identifying the key rules of pedestrian interactions with other road users. In the behavior study, pedestrian video data was collected at a signalized intersection 173  in the city of Vancouver. Pedestrian trajectories were extracted from video by means of computer vision. Extracted trajectories were further analyzed in order to extract pedestrian speed profile and the profile of gait parameters (step frequency and step length). Speed and gait parameters were used analyze pedestrian behavior during several interactions including interaction with pedestrians moving in the same directions, opposing pedestrians, stopping pedestrians, static objects, and turning vehicles. The results of the study were used to identify a set of interaction rules that controls pedestrian behavior during these interactions. These rules were used to model pedestrian movements in the microscopic simulation model Following the identification of key interaction rules, the details of different components of an agent-based pedestrian microsimulation model was presented. The model was developed in two phases; the uni-directional model and the bi-directional model. The uni-directional model addressed pedestrian interactions with pedestrians moving in the same direction. In this phase, pedestrians interacted with slower pedestrians moving in the same direction either reduced speed to follow the leading pedestrians or change movement direction to overtake them, depending on the desired speed of the pedestrian and the density of the walking environment. In the second phase, rules that control pedestrian interactions with opposing pedestrians were addressed. Different cases were considered including individual pedestrian interactions, interactions between pedestrians walking in groups, and interactions with multiple individual pedestrians in crowded walking environments. Detailed description of the behavior of pedestrian groups was provided, in which pedestrian groups were classified into flexible and strict groups. Strict group members tend to walk together as one unit while members of flexible groups prioritize keeping the walking pace over maintaining the unity of the group. Additionally, rules that define pedestrian interactions with fixed objects were added to the simulation model in this phase. 174  The model utilized the agent-based modeling approach to model pedestrian behavior and produce accurate pedestrian trajectories. The agent-based modeling approach is considered suitable for simulating a complex system like the pedestrian system as it effectively considers the variability of parameters and attributes among the individuals of the system. In this approach, agents interact with other agents and other elements of the environment independently using their judgement to assess the surrounding environment and changes of the state of other agents, based on predefined interaction rules. This represents a realistic approach that accounts for pedestrian intelligence and their rational decision making process. The model can be easily extended to include additional rules and parameters required to address new pedestrian behavior and interactions with other road users. The model was modeled using an open source agent-based simulation platform (REPAST), and all behavior rules and agent characteristics were coded using the object oriented programming language (Java). Furthermore, a detailed methodology for calibrating the model key parameters was provided in the thesis. Model key parameters were divided into two groups, measurable parameters and non-measurable parameters. The first category included parameters that could be measured from the data so they were directly calibrated from actual trajectories. The second category included parameters that could not be extracted directly from the data. These parameters were indirectly calibrated using a Genetic Algorithm. The indirect calibration process aimed at minimizing the error between actual pedestrian trajectories, extracted from video data by means of computer vision, and the corresponding simulated trajectories produced by the simulation model. The optimum parameters obtained in the calibration process were validated by comparing the speed error and location error of the simulated trajectories to the actual trajectories of pedestrians considered for validation. The model showed very good accuracy of the simulated trajectories with 175  average location error of 0.35 meters and average speed error of 13%. Additionally, the model’s ability to reproduce the collision avoidance strategy taken by pedestrians was examined by calculating the lateral distance between each pair of pedestrians passing each other in both the actual and simulation data. The value and sign of this distance (side of passing) were used to check the model accuracy of reproducing the collision avoidance strategy. Results showed a very good match between simulated and actual distance. The accuracy of simulating the correct behavior was assessed to be 95%. The proposed calibration and validation methodology confirmed the accuracy of the individual trajectories produced by the model, which is a very important criterion any microsimulation model should target. The simulation model was then applied to analyze pedestrian interactions in two different case studies in two different environments. The first case study was conducted during a popular social event in the city of Vancouver. Streets were closed for traffic to allow pedestrians to leave the area safely. The area was very crowded as the event attracted thousands of people, which provided a good source to examine the model performance in such high density. Data used in this study includes 286 pedestrians moving in different directions and continuously interacting with each other. The results showed high accuracy of the model in terms of the accuracy of the produced trajectories and the ability to reproduce pedestrian behavior during different interactions. The average location error between actual and simulated trajectories was found to be 0.28 m while the average speed error was 0.06 m/s.  The accuracy of reproducing the actual behavior of pedestrians involved in interaction with stopping pedestrians and fixed objects, interaction with opposing pedestrians, following slower pedestrian, and overtaking leading pedestrians was found to be between 87% and 100 %. The accuracy of simulating group behavior during different interactions was found to be 96.4%. Furthermore, the model correctly simulates a one-time interaction that 176  involved a conflict between a moving vehicle and 7 pedestrians. The model produced speed profiles and trajectories of the seven pedestrians that were very accurate compared to actual data. Although the data of pedestrian vehicle interactions is not enough to draw conclusions, the results demonstrated the potential use of the model in studying pedestrian-vehicle conflicts and to conduct pedestrian safety studies using simulation. The second case study was conducted at an untypical intersection in the city of Oakland, California. The intersection has a scramble phase in which only pedestrians were allowed to cross the intersection, which creates many conflicts between pedestrians in different directions. Three hundreds and forty pedestrians were considered for the analysis. The simulated trajectories were compared to the actual trajectories acquired by means of computer vision. The comparison results ensured the high accuracy of the trajectories produced by the model, as the average location error was found to be 0.49 m while the average speed error was 0.04 m/s. The average crossing speed for both conventional and diagonal crossings (1.38 and 1.46 m/s, respectively) were very close to the actual speeds (1.41 and 1.49 m/s, respectively). Additionally, the model was capable of reproducing the actual behavior taken by pedestrians in different interactions including passing and following maneuvers, interaction with fixed objects in the walking environment, and interaction with opposing pedestrians with accuracy that varies from 80% to 100 %. Behavior of pedestrians walking in groups during interactions was precisely simulated with accuracy of 92.5%.  9.2 Future Research Several future directions arise from the results obtained in this thesis. First, it is important to continue investigating the applicability of the model using larger data sets from different walking environments and different pedestrian flow conditions. Data sets considered for future studies 177  should address the variability in different pedestrian attributes, particularly age. Mostly, pedestrians considered in different studies of this thesis were relatively young, which did not provide the opportunity to study the effect of age on the behavior of pedestrians. Further research is required to enhance interaction rules that define pedestrian behavior during interactions, particularly, the behavior of pedestrian moving in groups. Developing better understanding of group behavior, including the effect of group size on walking behavior and the different group formation schemes and their effect on conflict avoidance strategies would improve the accuracy of simulating pedestrian groups significantly. As well, it is required to develop more advanced expressions for the desired speed of pedestrians. Desired speed was assumed to be the average speed for parts of the trajectories where pedestrian is not involved in interactions. While this is an accepted approximation, it is still not very accurate. Developing a more precise representation of desired speed is required. This can include, for example, developing an expression that relates the desired speed to pedestrian characteristics and attributes. Moreover, the adoption of other parameters along with pedestrian speed to describe the walking behavior and pedestrian interactions in the model might be very beneficial in terms of simulation accuracy. The detailed pedestrian behavioral study presented in chapter 4 identified gait parameters (particularly, step frequency and step length) as important indicators that provide in-depth understanding of pedestrian walking behavior. The study concluded that step frequency and step length are useful in distinguishing between the behaviors of different pedestrian categories during interactions. Thus, incorporating gait parameters in the simulation model is expected to lead to better consideration of the heterogeneity of pedestrians. However, the most important future direction of the model presented in this thesis is to explore different pedestrian applications that could be analyzed using the current model. The developed model was capable of producing 178  accurate trajectories for pedestrians and was successful in reproducing the correct collision avoidance strategy observed by pedestrians in actual data. As such, the model has good potential in addressing pedestrian applications that requires accurate individual trajectories. Two target applications can be explored using the developed model: pedestrian safety and pedestrian interactions in shared space facilities.  Regarding the pedestrian safety application, the simulation model could be used to study pedestrian interactions with other road users. Severe interactions and near misses between pedestrians and other road users could be easily identified. Different conflict indicators could be developed including the Time-to- Collision (TTC), the Post-Encroachment Time (PET), the Gap time (GT) and Deceleration to Safety Time (DST), using the simulated trajectories. Precise calibration of model parameters is required in order for the simulated conflict to be accurate and represent the actual conflicts observed in reality. The calibration of model parameters can be conducted using actual conflicts produced by the automated safety analysis platform developed at UBC. Such application would be very useful in exploring the safety consequences of different designs before the actual construction of the facilities. It would also be important in exploring the safety consequences of different scenarios that might be difficult to explore in reality including high percentage of violations and distracted road users. The second application that is expected to benefit from the simulation model is the behavior of pedestrians in shared space facilities. Shared space facilities (e.g. complete streets) are gaining considerable recent interest as safe environments that provide access to different road users to share the road including pedestrian, bikes, and vehicles. The behavior of road users in these facilities is expected to be different from their behavior in normal facilities, as interactions with other road users are more frequent and are not limited to specific areas in the walking environment. The simulation model will be ideal to study 179  pedestrian interactions with other road users in these facilities and test the effect of different designs on pedestrian safety and pedestrian level of service.  Obviously, these two applications require expanding the model by adding other agent classes (other road users) and defining new interaction rules. Fortunately, the agent-based modeling approach enables such expansion, as was presented in the Vancouver case study when the model was successfully expanded to address interactions that occurred between a vehicle and few pedestrians at the study location. 9.3 Study Limitations The limitations of the microscopic simulation model presented in this thesis are summarized in this section. Firstly, limitations related to the behavior rules that control pedestrian behavior during interactions are discussed. The behavior rules utilized in the model were extracted from a comprehensive pedestrian behavioral analysis. This study was conducted using a data set from one location in the city of Vancouver, which raises an important issue regarding the transferability of the behavior rules when the model is applied to study pedestrian behavior at other locations. This issue was addressed by considering another case study from a different walking environment and by applying a calibration approach that accounts for the changes in pedestrian behavior resulting from changing the walking environment. However, conducting detailed pedestrian behavioral analysis that considers different data sets from different walking environments should enhance the accuracy of the extracted behavior rules. Furthermore, the behavioral study presented in chapter 4 utilized manual methods to identify different interactions and determine the time at which each interaction is initiated and terminated. While the results were statistically significant, they still suffer from the human subjectivity and long analysis time. Exploring the potential use of formal algorithms that cluster different pedestrian trajectories into different interaction categories and automatically define the beginning and ending of different interactions would speed up the analysis 180  time, provide more solid understanding of pedestrian behavior, and consequently enhance the accuracy of the behavior rules of the simulation model. Secondly, some detailed pedestrian characteristics have not been considered in the current model. Specifically, the acceleration and deceleration rates of pedestrians were not investigated. According to the current model, pedestrians can change their walking speed at any time with no constraints on the acceleration and deceleration rates. The reason behind this assumption is that pedestrians usually accelerate and decelerate in a very short time as they are moving with relatively low speeds. The literature lacks detailed studies that address pedestrian acceleration and deceleration characteristics. The investigation of pedestrian’s acceleration and deceleration characteristics and whether they affect pedestrian behavior during interactions was out of the scope of the current work.  Thirdly, limitations related to several model parameters should also be acknowledged. The choice of the appropriate uni-directional conflict resolving strategy was controlled by the bypass tendency parameters. These parameters incorporated the desired speed of pedestrians and the perceived density of the walking environment in order to control when a pedestrian can overtake slower pedestrians and or when to follow them. While the model was successful in addressing this behavior as confirmed by the validation results, other indicators could be used to develop a parameter that better represents such a behavior (such as the speed difference between the lead and the following pedestrians). Moreover, some model parameters were modeled as hard constraints that pedestrians have to satisfy, including for example the pedestrian personal distance. Other representations of the personal distance were not investigated in the current model. This may include for example introducing an objective function that selects an optimum value of the personal distance depending on the current walking environment conditions.  181  Finally, the model currently focuses on pedestrian interactions in limited areas. Pedestrian agents react to other pedestrians and road users within the perception area. While some strategic level decisions were considered in the current model (such as finding a route that minimizes the interactions with opposing multiple pedestrians for example), a detailed strategic level route planning was not considered in the current model. The rationale behind this is that the target applications of the current model do not include applications where route finding is essential. However, it will be useful to consider a strategic-level route choice algorithm before the simulation model can be expanded to address pedestrian interactions in larger facilities (such as train stations or shopping malls).     182  Bibliography [1]  Mathers, Colin, Doris Ma Fat, and Jan Ties Boerma, The global burden of disease: 2004 update, World Health Organization, 2008.  [2]  E. Greenberg, "Toward a New Urbanist Transportation Agenda," in Congress for the New Urbanism, 2005.  [3]  Urban Systems, "Pedestrian Safety Study, Final report," City of Vancouver, British Columbia, 2012. [4]  Mathers, Colin, Stevens, Gretchen and Mascarenhas, Maya, "Global health risks: mortality and burden of disease attributable to selected major risks," World Health Organization, 2009. [5]  T. Litman, "Quantifying the benefits of nonmotorized transportation for achieving mobility management objectives," Victoria Transport Policy Institute, Victoria, BC, 2004. [6]  Li, S., Sayed, T., Zaki, M. H., Mori, G., Stefanus, F., Khanloo, B., and Saunier, N., "Automated Collection of Pedestrian Data Through Computer Vision Techniques," Transportation Research Record: Journal of the Transportation Research Board, vol. 2299, no. 1, pp. 121-127, 2012.  [7]  D. Helbing, Social self-organization: Agent-based simulations and experiments to study emergent social behavior, Springer, 2012.  [8]  Helbing, D., & Molnar, P., "Social force model for pedestrian dynamics," Physical review E, vol. 51, no. 5, pp. 4282-4286, 1995.  [9]  Gaud, Nicolas, Stéphane Galland, Franck Gechter, Vincent Hilaire, and Abderrafiaa Koukam, "Holonic multilevel simulation of complex systems: Application to real-time pedestrians simulation in virtual urban environment," Simulation Modelling Practice and Theory, vol. 16, no. 10, pp. 1659-1676, 2008.  [10]  K. Teknomo, "Application of microscopic pedestrian simulation model," Transportation Research Part F: Traffic Psychology and Behaviour, vol. 9, no. 1, pp. 15-27, 2006.  [11]  X. Pan, "Computational modeling of human and social behaviors for emergency egress analysis," Doctoral dissertation, Stanford University, 2006. [12]  Nagel, Kai, and Michael Schreckenberg, "A cellular automaton model for freeway traffic," Journal de physique I, vol. 2, no. 12, pp. 2221-2229, 1992.  [13]  Blue, Victor, and Jeffrey Adler, "Emergent fundamental pedestrian flows from cellular automata microsimulation," Transportation Research Record: Journal of the Transportation Research Board, vol. 1644, pp. 29-36, 1998.  183  [14]  Blue, Victor, and Jeffrey Adler, "Cellular automata microsimulation of bidirectional pedestrian flows," Transportation Research Record: Journal of the Transportation Research Board, vol. 1678, no. 1, pp. 135-141., 1999.  [15]  "Special report 209: Highway Capacity Manual," Transportation Research Board, Washington, DC, 1985. [16]  Hoogendoorn, Serge P. and Piet HL Bovy, "Pedestrian route-choice and activity scheduling theory and models," Transportation Research Part B: Methodological, vol. 38, no. 2, pp. 169-190, 2004.  [17]  Robin Th, Gianluca Antonini, Michel Bierlaire, and Javier Cruz, "Specification, estimation and validation of a pedestrian walking behavior model," Transportation Research Part B: Methodological, vol. 43, no. 1, pp. 36-56, 2009.  [18]  N. R. Jennings, "On agent-based software engineering," Artificial intelligence, vol. 117, no. 2, pp. 277-296, 2000.  [19]  P. Wegner, "Why interaction is more powerful than algorithms," Communications of the ACM, vol. 40, no. 5, pp. 80-91, 1997.  [20]  M. Wooldridge, "Agent-based software engineering," Software Engineering. IEE Proceedings, vol. 144, no. 1, pp. 26-37, 1997.  [21]  Helbing, D., Schweitzer, F., Keltsch, J., and Molnar, P., "Active walker model for the formation of human and animal trail systems," Physical review E, vol. 56, no. 3, 1997.  [22]  Xi, Hui, Seungho Lee, and Young-Jun Son, "An integrated pedestrian behavior model based on extended decision field theory and social force model," in Human-in-the-Loop Simulations, London, Springer, 2011, pp. 69-95. [23]  A. Schadschneider, "Cellular automaton approach to pedestrian dynamics-theory," arXiv preprint cond-mat/0112117, 2002.  [24]  Burstedde, C., Klauck, K., Schadschneider, A., and Zittartz, J., "Simulation of pedestrian dynamics using a two-dimensional cellular automaton," Physica A: Statistical Mechanics and its Applications, vol. 295, no. 3, pp. 507-525, 2001.  [25]  Sarmady,Siamak, Fazilah Haron, and Abdullah Zawawi Talib, "Simulating crowd movements using fine grid cellular automata," in Computer Modelling and Simulation (UKSim). 12th International Conference On. IEEE, 2010.  [26]  Teknomo, Kardi, and Gloria P. Gerilla, "Sensitivity analysis and validation of a multi-agents pedestrian model," Journal of the Eastern Asia Society for Transportation Studies, vol. 6, pp. 198-213, 2005.  [27]  Ronald, Nicole, Leon Sterling, and Michael Kirley, "An agent-based approach to modelling pedestrian behaviour," International Journal of Simulation, vol. 8, no. 1, pp. 25-38, 2007.  184  [28]  Wong, S. C., Leung, W. L., Chan, S. H., Lam, W. H., Yung, N. H., Liu, C. Y., and Zhang, P., "Bidirectional pedestrian stream model with oblique intersecting angle," Journal of transportation Engineering, vol. 136, no. 3, 2010.  [29]  Pretto, Carlos Oliva, Helena Beatriz Bettella Cybis, and Andre Jacobsen, "A Multi-layer Simulation Model For Vehicle And Pedestrian Interaction," in Transportation Research Board 90th Annual Meeting. no. 11-3833, 2011.  [30]  Waizman, G., Shoval, S., & Benenson, I., "Micro-Simulation Model for Assessing the Risk of Vehicle–Pedestrian Road Accidents," Journal of Intelligent Transportation Systems, vol. 19, no. 1, pp. 63-77, 2015.  [31]  Helbing, Dirk, Illes J. Farkas, Peter Molnar, and Tamás Vicsek, "Simulation of pedestrian crowds in normal and evacuation situations," Pedestrian and evacuation dynamics, vol. 21, no. 2, pp. 21-58, 2002.  [32]  Kirchner, A., and Schadschneider, A., "Simulation of evacuation processes using a bionics-inspired cellular automaton model for pedestrian dynamics," Physica A: Statistical Mechanics and its Applications, vol. 312, no. 1, pp. 260-276, 2002.  [33]  Huang, H. J., and Guo, R. Y., "Static floor field and exit choice for pedestrian evacuation in rooms with internal obstacles and multiple exits," Physical Review E, vol. 78, no. 2, 2008.  [34]  Batty, Michael, Jake Desyllas, and Elspeth Duxbury, "Safety in numbers? Modelling crowds and designing control for the Notting Hill Carnival," Urban Studies, vol. 40, no. 8, pp. 1573-1590, 2003.  [35]  Berrou, Jean Louis, Jonathan Beecham, Philippe Quaglia, Marios A. Kagarlis, and Alex Gerodimos, "Calibration and validation of the Legion simulation model using empirical data," in Pedestrian and evacuation dynamics, 2005, pp. 167-181. [36]  Yue, Z. H. O. U., W. A. N. G. Jiangyan, Di Huang, and S. U. N. Shengyang, "Pedestrian simulation modeling for world expo 2010 Shanghai," Journal of Transportation Systems Engineering and Information Technology, vol. 9, no. 2, pp. 141-146, 2009.  [37]  Monteleone, Michael, Niek Veraart, Suany Chough, and Wendy Aviles, "Pedestrian Simulation Modeling Study for World Trade Center Memorial," Transportation Research Record: Journal of the Transportation Research Board, pp. 49-57, 2008.  [38]  H. Klüpfel, "The simulation of crowds at very large events," in Traffic and Granular Flow’05, Springer Berlin Heidelberg, 2007, pp. 341-346. [39]  Moldovan, H., M. Gilman, P. Knoblauch, and S. Woloj, "Football Stadium Simulation—A microscopic simulation of the pedestrian access," in Pedestrian and Evacuation Dynamics, Springer Berlin Heidelberg, 2007, pp. 315-320. [40]  Schultz, M., S. Lehmann, and H. Fricke, "A discrete microscopic model for pedestrian dynamics to manage emergency situations in airport terminals," in Pedestrian and Evacuation Dynamics, Springer Berlin Heidelberg, 2007, pp. 369-375. 185  [41]  Kim, I., Galiza, R., & Ferreira, L., "Modeling pedestrian queuing using micro-simulation," Transportation Research Part A: Policy and Practice, vol. 49, pp. 232-240, (2013).  [42]  Shiwakoti,Nirajan, Majid Sarvi, and Geoff Rose, "Modelling pedestrian behaviour under emergency conditions–State-of-the-art and future directions," in 31st Australasian Transport Research Forum, 2008.  [43]  Zhou, Suiping, Dan Chen, Wentong Cai, Linbo Luo, Malcolm Yoke Hean Low, Feng Tian, Victor Su-Han Tay, Darren Wee Sze Ong, and Benjamin D. Hamilton, "Crowd modeling and simulation technologies," ACM Transactions on Modeling and Computer Simulation (TOMACS), vol. 20, no. 4, 2010.  [44]  Duives, Dorine C., Winnie Daamen, and Serge P. Hoogendoorn, "State-of-the-art crowd motion simulation models," Transportation research part C: emerging technologies, vol. 37, pp. 193-209, 2013.  [45]  Daamen, W., & Hoogendoorn, S., "Calibration of pedestrian simulation model for emergency doors by pedestrian type. Transportation Research Record: Journal of the Transportation Research Board," vol. 2316, no. 1, pp. 69-75, 2012.  [46]  Bauer, D., & Kitazawa, K., "Using laser scanner data to calibrate certain aspects of microscopic pedestrian motion models.," in Pedestrian and Evacuation Dynamics, Springer Berlin Heidelberg, 2010, pp. 83-94. [47]  Cao, J. X., Zhu, K. Y., & Li, X. X., "Calibration and Application of Passenger Parameters in Commuter Based on Social Force Model," in Proceedings of the 12th International Conference of Transportation Professionals (CICTP 2012), 2012.  [48]  Zeng, W., Chen, P., Nakamura, H., & Iryo-Asano, M., "Application of social force model to pedestrian behavior analysis at signalized crosswalk," Transportation Research Part C: Emerging Technologies , vol. 40, pp. 143-159, 2014.  [49]  Knoblauch, R. L., Pietrucha, M. T., & Nitzburg, M., "Field studies of pedestrian walking speed and start-up time," Transportation Research Record: Journal of the Transportation Research Board, vol. 1538, no. 1, pp. 27-38, 1996.  [50]  Gates, Tim, David Noyce, Andrea Bill, and Nathanael Van Ee, "Recommended walking speeds for timing of pedestrian clearance intervals based on characteristics of the pedestrian population," ransportation Research Record: Journal of the Transportation Research Board, vol. 1982, pp. 38-47, 2006.  [51]  R. Akçelik, "An investigation on pedestrian movement characteristics at mid-block signalised crossings," Akcelik & Associaties Pty Ltd, Australia, 2001. [52]  Hediyeh, H., Sayed, T., Zaki, M. H., & Ismail, K., "Automated analysis of pedestrian crossing speed behavior at scramble-phase signalized intersections using computer vision techniques," International journal of sustainable transportation, vol. 8, no. 5, pp. 382-397, 2014.  186  [53]  Lam, William HK, and Chung-yu Cheung, "Pedestrian speed/flow relationships for walking facilities in Hong Kong," Journal of transportation engineering, vol. 126, no. 4, pp. 343-349, 200.  [54]  Lee, Jodie, and William Lam, "Variation of walking speeds on a unidirectional walkway and on a bidirectional stairway," Transportation Research Record: Journal of the Transportation Research Board, vol. 1982, pp. 122-131, 2006.  [55]  Montufar, Jeannette, Jorge Arango, Michelle Porter, and Satoru Nakagawa, "Pedestrians' normal walking speed and speed when crossing a street," Transportation Research Record: Journal of the Transportation Research Board, 2007.  [56]  Nixon MS, Carter JN, Nash JM, Huang PS, Cunado D, Stevenage SV, "Automatic Gait Recognition. Motion Analysis and Tracking (Ref. No. 1999/103).," in IEE Colloquium on (p. 3), 1999.  [57]  M. Ekinci, "Automatic gait recognition by multi-projection analysis," in International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems, 2006.  [58]  Makihara, Yasushi, Hidetoshi Mannami, and Yasushi Yagi, "Gait analysis of gender and age using a large-scale multi-view gait database," in Asian Conference on Computer Vision, 2010.  [59]  Yamasaki, Masahiro; Sasaki, Takashi; Torii, Masafumi, "Sex difference in the pattern of lower limb movement during treadmill walking," Eur J Appl Physiol Occup Physiol, vol. 62, no. 2, pp. 99-103, 1991.  [60]  Crowe, Alan; Samson, Monique M.; Hoitsma, Marja J.; van, Alexandra A., "The influence of walking speed on parameters of gait symmetry determined from ground reaction forces," Human Movement Science, vol. 15, no. 3, pp. 347-367, 1996.  [61]  Elble, R.J.; Thomas, S. Sienko; Higgins, C.; Colliver, J., "Stride-dependent changes in gait of older people," J Neurol, vol. 238, no. 1, pp. 1-5, 1991.  [62]  Judge, James Oat; Davis, Roy B.; Ounpuu, Sylvia, "Step Length Reductions in Advanced Age: The Role of Ankle and Hip Kinetics," The Journals of Gerontology Series A: Biological Sciences and Medical Sciences, vol. 51A, no. 6, pp. M303-M312, 1996.  [63]  Hediyeh, H., Sayed, T., Zaki, M. H., & Mori, G., "Pedestrian gait analysis using automated computer vision techniques," Transportmetrica A: Transport Science, vol. 10, no. 3, pp. 214-232, 2014.  [64]  Crosbie, J., & Ko, V., "Changes in the temporal and distance parameters of gait evoked by negotiation of curbs," Australian Journal of Physiotherapy, vol. 46, no. 2, pp. 103-112, 2000.  [65]  Lowrey, C. R., Watson, A., & Vallis, L. A., "Age-related changes in avoidance strategies when negotiating single and multiple obstacles," Experimental brain research, vol. 182, no. 3, pp. 289-299, 2007.  187  [66]  Shkuratova, N., & Taylor, N., "The influence of age on gait parameters during the transition from a wide to a narrow pathway," Physiotherapy Research International, vol. 13, no. 2, pp. 75-83, 2008.  [67]  M. H. &. S. T. Zaki, "A framework for automated road-users classification using movement trajectories," Transportation Research Part C: Emerging Technologies , vol. 33, pp. 50-73, 2013.  [68]  Hediyeh, H., Sayed, T., & Zaki, M. H., "Use of Spatiotemporal Parameters of Gait for Automated Classification of Pedestrian Gender and Age," Transportation Research Record: Journal of the Transportation Research Board, vol. 2393, no. 1, pp. 31-40, 2013.  [69]  Sayed, Tarek, Karim Ismail, Mohamed Zaki, and Jarvis Autey, "Feasibility of computer vision-based safety evaluations: Case study of a signalized right-turn safety treatment," Transportation Research Record: Journal of the Transportation Research Board, vol. 2280, pp. 18-27, 2012.  [70]  Sayed, Tarek, Mohamed H. Zaki, and Jarvis Autey, "Automated safety diagnosis of vehicle–bicycle interactions using computer vision analysis," Safety science, vol. 59, pp. 163-172, 2013.  [71]  J. Autey, T. Sayed and M. Zaki, "Safety Evaluation Of Right-turn Smart Channels Using Automated Traffic Conflict Analysis," Accident Analysis and Prevention, vol. 45, pp. 120-130, 2012.  [72]  N. Saunier and T. Sayed, "A feature-based tracking algorithm for vehicles in intersections," IEEE, Third Canadian Conference on Computer and Robot Vision, 2006.  [73]  Malinovskiy, Yegor, Jianyang Zheng, and Yinhai Wang, "A simple and model-free algorithm for real-time pedestrian detection and tracking," in 86th Annual Meeting of the Transportation Research Board, Washington, DC, 2007.  [74]  N. Saunier and T. Sayed, "Probabilistic Framework for the Automated Analysis of the Exposure to Road Collision," Transportation Research Record: Journal of the Transportation Research Board, vol. 2083, pp. 96-104, 2008.  [75]  Padgham, Lin, and Michael Winikoff, "Prometheus: A methodology for developing intelligent agents," in Agent-oriented software engineering III, Springer Berlin Heidelberg, 2002, pp. 174-185. [76]  A. Getchell, "Agent-based modeling," Physics, vol. 22, no. 6, pp. 757-767, 2008.  [77]  Barnes, David J., and Dominique Chu, Introduction to modeling for biosciences, Springer Science & Business Media, 2010.  [78]  C. E. Castle, "Using Repast to develop a prototype agent-based pedestrian evacuation model," in the Agent 2006 Conference on Social Agents: Results and Prospects, 2006.  188  [79]  A. T. Crooks, "The repast simulation/modelling system for geospatial simulation," Centre for Advanced Spatial Analysis (University College London), London. UK. Working Paper 123, 2007. [80]  "Swarm," [Online]. Available: http://www.swarm.org/wiki/Main_Page. [Accessed June 1st, 2016]. [81]  "Repast," [Online]. Available: http://repast.sourceforge.net. [Accessed June 1st, 2016]. [82]  "NetLogo," [Online]. Available: http://ccl.northwestern.edu/netlogo/. [Accessed June 1st, 2016]. [83]  N. Collier, "Repast: An extensible framework for agent simulation," vol. 36, 2003.  [84]  Brown, Daniel G., Rick Riolo, Derek T. Robinson, Michael North, and William Rand, "Spatial process and data models: Toward integration of agent-based models and GIS," Journal of Geographical Systems, vol. 7, no. 1, pp. 25-47, 2005.  [85]  Saunier, N.; Sayed, T.; Ismail, K., "Large Scale Automated Analysis of Vehicle Interactions and Collisions," Transportation Research Record: Journal of the Transportation Research Board, vol. 2147, pp. 42-50, 2010.  [86]  Saunier, Nicolas; Sayed, Tarek, "Automated Analysis of Road Safety with Video Data," Transportation Research Record: Journal of the Transportation Research Board, vol. 2019, pp. 57-64, 2007.  [87]  Ismail, K., Sayed, T., & Saunier, N., "A methodology for precise camera calibration for data collection applications in urban traffic scenes," Canadian Journal of Civil Engineering, vol. 40, no. 1, pp. 57-67, 2013.  [88]  Saunier, N., El Husseini, A., Ismail, K., Morency, C., Auberlet, J. M., & Sayed, T., "Estimation of frequency and length of pedestrian stride in urban environments with video sensors," Transportation Research Record: Journal of the Transportation Research Board, vol. 2264, no. 1, pp. 138-147, 2011.  [89]  Oppenhein, A. V., & Schafer, R. W., Discrete-time signal processing, New York: Prentice Hall, 1999.  [90]  M. S. Tarawneh, "Evaluation of pedestrian speed in Jordan with investigation of some contributing factors," Journal of Safety Research, vol. 32, no. 2, pp. 229-236, 2001.  [91]  Hediyeh, Houman, Tarek Sayed, Mohamed H. Zaki, and Karim Ismail, "Automated analysis of pedestrian crossing speed behavior at scramble-phase signalized intersections using computer vision techniques," International journal of sustainable transportation, vol. 8, no. 5, pp. 382-397, 2014.  [92]  Hussein, Mohamed, Tarek Sayed, Passant Reyad, and Lee Kim, "Automated Pedestrian Safety Analysis at a Signalized Intersection in New York City: Automated Data Extraction for Safety Diagnosis and Behavioral Study," ransportation Research Record: Journal of the Transportation Research Board, vol. 2519, pp. 17-27, 2015.  189  [93]  Daamen, W., and S. P. Hoogendoorn, "Free speed distributions—based on empirical data in different traffic conditions," in Pedestrian and evacuation dynamics, Springer Berlin Heidelberg, 2007, pp. 13-25. [94]  U. Weidmann, "Transporttechnik der Fugnger," ETH-Zurich, Schriftenreihe IVT-Berichte 90, 1993.  [95]  D. E. Golberg, Genetic algorithms in search, optimization, and machine learning, Addison wesley, 1989.  [96]  D. E. Golberg, Genetic algorithms in search, optimization, and machine learning, Reading, MA, USA: Addison-Wesley, 1989.  [97]  McKay, Michael D., Richard J. Beckman, and William J. Conover, "Comparison of three methods for selecting values of input variables in the analysis of output from a computer code," Technometrics, vol. 21, no. 2, pp. 239-245, 1979.  [98]  Iman, Ronald L., and W. J. Conover., "Small sample sensitivity analysis techniques for computer models. with an application to risk assessment," Communications in statistics-theory and methods, vol. 9, no. 17, pp. 1749-1842, 1980.  [99]  Bechtel A, MacLeod K, Ragland D., "Oakland Chinatown Pedestrian Scramble: An Evaluation. Final report," University of California, Berkeley, Traffic Safety, Berkeley, CA, 2003. [100]  Hussein, Mohamed and Tarek Sayed, "Microscopic Pedestrian Interaction Behavior Analysis Using Gait Parameters," Transportation Research Record: Journal of the Transportation Research Board, vol. 2519, pp. 28-38, 2015.  [101]  Hussein M. and Sayed T., "A Uni-directional agent based pedestrian microscopic model," Canadian journal of civil engineering, vol. 42, no. 12, pp. 1114-1124, 2015.  [102]  Khanloo, B. Y. S., Stefanus, F., Ranjbar, M., Li, Z. N., Saunier, N., Sayed, T., & Mori, G., "A large margin framework for single camera offline tracking with hybrid cues," Computer Vision and Image Understanding, vol. 116, no. 6, pp. 676-689, 2012.  [103]  Hussein M. and Sayed T., "A Uni-directional agent based pedestrian microscopic model," Canadian journal of civil engineering, vol. 42, no. 12, pp. 1114-1124, 2015.  [104]  Hussein, Mohamed and Tarek Sayed, "Microscopic Pedestrian Interaction Behavior Analysis Using Gait Parameters," Transportation Research Record: Journal of the Transportation Research Board, vol. 2519, pp. 28-38, 2015.  [105]  Khanloo, B. Y. S., Stefanus, F., Ranjbar, M., Li, Z. N., Saunier, N., Sayed, T., & Mori, G., "A large margin framework for single camera offline tracking with hybrid cues," Computer Vision and Image Understanding , vol. 116, no. 6, pp. 676-689, 2012.  [106]  Ismail, K., Sayed, T., & Saunier, N., "A methodology for precise camera calibration for data collection applications in urban traffic scenes," Canadian Journal of Civil Engineering, vol. 40, no. 1, pp. 57-67, 2013.  190  [107]  Zaki, Mohamed H.; Sayed, Tarek, "Automated Classification of Road-User Movement Trajectories," in CSCE International Transportation Specialty Conference, Edmonton, AB, 2012.  [108]  E. Greenberg, "Toward a New Urbanist Transportation Agenda," in Congress for the New Urbanism, 2005.  [109]  Ismail, K., Sayed, T., & Saunier, N., "Automated collection of pedestrian data using computer vision techniques," in In Transportation Research Board Annual Meeting Compendium of Papers, Washington, DC., 2009.  [110]  Hussein, Mohamed and Tarek Sayed, "Microscopic Pedestrian Interaction Behavior Analysis Using Gait Parameters," Transportation Research Record: Journal of the Transportation Research Board, In print.  [111]  Saunier, N., El Husseini, A., Ismail, K., Morency, C., Auberlet, J. M., & Sayed, T., "Estimation of frequency and length of pedestrian stride in urban environments with video sensors," Transportation Research Record: Journal of the Transportation Research Board, vol. 2264, no. 1, pp. 138-147, 2011.  [112]  Guo, R. Y., and Huang, H. J., "A modified floor field cellular automata model for pedestrian evacuation simulation," Journal of Physics A: Mathematical and Theoretical, vol. 41, no. 38, 2008.  [113]  Hoogendoorn, S.P. and Winnie Daamen, "Self-organization in walker experiments," in Traffic and Granular Flow, vol. 3, 2004, pp. 121-132. [114]  Helbing, Dirk , Lubos Buzna, Anders Johansson, and Torsten Werner, "Self-organized pedestrian crowd dynamics: Experiments, simulations, and design solutions," Transportation science, vol. 39, no. 1, pp. 1-24, 2005.  [115]  Pulugurtha, S. S., & Repaka, S. R., "Assessment of models to measure pedestrian activity at signalized intersections," Transportation Research Record: Journal of the Transportation Research Board, vol. 2073(1), no. 1, pp. 39-48, 2008.  [116]  Blue, V. J., & Adler, J. L., "Cellular automata microsimulation of bidirectional pedestrian flows. Transportation Research Record: Journal of the Transportation Research Board," vol. 1678, no. 1, pp. 135-141., 1999.  [117]  Li, S., Sayed, T., Zaki, M. H., Mori, G., Stefanus, F., Khanloo, B., & Saunier, N., "Automated Collection of Pedestrian Data Through Computer Vision Techniques," Transportation Research Record: Journal of the Transportation Research Board, vol. 2299, no. 1, pp. 121-127, 2012.     

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.24.1-0340534/manifest

Comment

Related Items