Modelling and Simulation of Urban Mobile Agents for Analyzing Mixed Flows in Urban Pedestrian Space

Since the 1990s, complex systems research has been developing agent simulations to explain the phenomena observed in urban spaces. In recent years, agent-based modelling has often been employed to successfully simulate pedestrian behaviour. In such studies, explanations using pedestrian counter flow phases have appeared sporadically. Most state-of-the-art models, however, do not generally consider mobile agents other than pedestrians or counter flows in at least two directions. In this paper, we consider agents such as pedestrians, vehicles, wheelchairs, bicycles and so on in urban pedestrian space (UPS), which we call urban mobile agents (UMAs). The aim of this research is to develop a simulation platform to support urban simulation research. The models of rule-based UMAs that we have been developing are used to analyze the micro-meso behaviours of the mixed flows in UPS. The content of this class of agent includes the pedestrian agent as per the simplified agent simulation of pedestrian flow (sASPF) rules as well as the vehicle agent and bicycle agent in the UPS, including a wheelchair agent in the coming research. Using these models, we explore the following approaches: (a) theoretical analyses of phase transitions such as laminar flow formation or blockade of pedestrian counter flows, with clarification of the relationship between the degree of pedestrian global density and the bias of the diagonal stepping probability, which is the right or left selection probability of avoidance behaviour; (b) the implementation of obstacle avoidance rules in the sASPF pedestrian agent model, and their comparison with published evacuation experiment results, so as to evaluate the performance of the obstacle avoidance function; (c) the development of a vehicle agent model to simulate pedestrian-vehicle mixed flow at a crossroads assuming a disaster scenario; (d) the development of a bicycle agent model by extending sASPF rules; and (e) consideration of a conceptual framework for interaction fields representing heterogeneous agent mixed flows, including vehicle, bicycle, pedestrian and wheelchair agents.


Introduction
We aimed to represent and simulate spatial behaviours resulting from the micro-actions of urban mobile agents (UMA) such as humans, wheelchairs, bicycles, and vehicles in an urban pedestrian space (UPS) such as pedestrian pavement, open space, and so forth, and develop an integrated simulation platform that will form the basis for urban simulation research. As its basic model, simplified agent simulation of pedestrian flow (sASPF) [6] includes a pedestrian agent, which was developed by applying a simplified set of behaviour rules.
In this paper, we address the pedestrian agent in our sASPF project by showing the results of the performance tests, explain the simulation performance at a crossroads of vehicle-pedestrian mixed flow, refer to modelling of a bicycle agent that performs by prediction, and consider the types of interaction systems that characterize the situations specified in the simulations.
The features of our sASPF project include the following: -UMA is rule-based, so the behaviour of an agent is described by rules. These are expected to have advantages over difference equation systems such as the social force model [1] and cellular automata models [2,3] in terms of readability of actions, calculation of time and interactions between various models. These are useful for urban simulation research. -Although the spatial representation of UPS uses a two-dimensional continuous space with a 0.4 m unit scale, the time representation uses a discrete step of 1/3 second due to the abstraction of practical expressions and computational simplifications. -Regarding the behaviour rule of the agent, the antecedent "others assessment" is applied in the "discrete" sight field grid, and the subsequent result is given as a stochastic "micro-action". -Our simulation model runs on agent-based modelling and simulation software, artisoc [8] that adopts random sequential updating (RSU) as a conflict-resolution method that takes into account interactions between agents.

sASPF project, a simplified rule-based urban mobile agent simulation
Here, we describe the pedestrian agent model that plays the role of the "primal actor" on UPS and its basic performance. Note that this section contains some of the findings of our previous research.

Pedestrian agent, the first and basic component of the sASPF project
The sASPF project uses a new pedestrian agent that we developed by simplifying our previous ASPF model, including six basic behaviour rules, eight slow-down rules, four avoidance rules, to simulate pedestrian behaviours [4,5]. A pedestrian agent in the sASPF project uses 8 behavior rules, including diagonal stepping, whereas 18 behaviour rules were applied to represent pedestrian behaviours in the ASPF model. Each agent has a position (x,y) and walking direction θ on the base space (two-dimensional Euclid plain). The agent also has a sight field grid (with unit scale e of 0.4 m, which is proximate to the shoulder width of an adult man) as the x-axis is set as the walking direction (see Fig. 1). In each step, one behavioural rule is applied from the rule set corresponding to the locations of other agents or obstacles within its own sight field grid. During each step, the agent transforms the position by the given motion vector according to the applied rule, which specifies a stepping distance L and diagonal stepping angle φ in its relative polar coordinate representation, or (Lcos (θ+φ), Lsin (θ+φ)) in the xy-coordinate on the base space (see Fig. 2).
The direction of the relative grid θ takes a real value of [0, 2π) [5], but in this paper we deal with one-way flows and counter flows and so treat the two directions as θ = 0 or π.

Basic performance tests of pedestrian flows
Figures 3 and 4 summarize our basic performance tests [6]. In the test results of one-way flows, our results appear to be a nice fit to the measured value up to a density of 3 people/m 2 , and this model is suitable for dealing with pedestrian flow simulations in the noncontact situation. We also analyzed phase transitions of counter flows theoretically. Our results confirmed that phase transitions occurred for a range of biases of the diagonal stepping probability, from 50:50% to 60:40%, and the global density from 0.4 to 1.4 agents/m 2 . It is worth noting that, in this model, different phase transition patterns appeared in the counter flow due to the slight probabilistic differences in the pedestrian micro-motive, i.e., avoidance directions.

Performance test of pedestrian flows with fixed obstacles laid out
In this subsection, we discuss the validity of our pedestrian agent model, assuming a practical situation such as an evacuation from a city after an earthquake. Here, the subject of the data-fitting consists of the results of a classic evacuation experiment conducted by the Fire and Disaster Prevention Science Centre of Japan in 1983 [7]. In this experiment, the performance of pedestrian flows in situations where cars were left on a crossroad was recorded. We added a large obstacle avoidance rule whereby an agent looks ahead up to 10e (=4.0 m) and changes direction to the short side when coming upon a row of obstacles, and then returns to the original direction just after avoiding the obstacle. Fixed obstacles representing stationary vehicles were laid out on a map that reproduced the crossroads of the evacuation experiment (hereafter, reproduction map: Fig. 5), and a total of 127 pedestrian agents were divided into two similar-sized groups walking through the area.  The fixed obstacles were laid out in three ways: the two obstacle patterns as shown in Figure 5 and one with no layout of fixed obstacles. Two pedestrian flows were prepared: a one-way flow and counter flows. In the one-way flow, one group of agents moved from the north to the south end, and after all of them had left the map, the other group started moving from the south to the north end; in the counter flows, the two groups appeared from the north and south ends concurrently and moved to the opposite ends.
For the five cases created by combining the three fixed obstacle layout patterns and the two pedestrian flow patterns (as the combination of no layout of fixed obstacles and one-way flow are self-explanatory, this case was excluded), the simulation was repeated 10 times for each case, and the average speed of the pedestrian agents was measured. Table 1shows the results of the evacuation experiment and simulations run on the reproduction map. The counter flows of the simulations showed a similar tendency to those in the experiment for all patterns (layout 1, layout 2, and no obstacle). In the one-way flow, compared to the experiment, layout 1 and layout 2 had lower values, but the maximum/minimum values were similar . Therefore, we can conclude that the changes to the average speed resulting from the modified pattern combinations were fitted approximated.

Pedestrian-vehicle mixed flow simulations
Here, we introduce a simple vehicle agent model, and then explain the simulation of mixed-vehicle flow as an example of the interactions between heterogeneous agents on the UPS.

Situation setting: Design of an interaction system between heterogeneous agents
Here, let us consider another evacuation situation in which we simulate the mixed flow of light vehichles and pedestrians immediately after an earthquake under the following two assumptions: many pedestrians and few vehicles, and with an application order of micro-motion of Pedestrian (Pd) > Vehicle (Vl). Then, we make every agent model judge other agents' motions based on their current position, assuming that the relative speed is sufficiently slow for both.

Vehicle agent model in the sASPF project
We developed a vehicle model to simulate pedestrian-vehicle mixed flows. The model included 20 agents, each of which measured 5e wide and 7e long (hereinafter, 2.0 m × 2.8 m vehicle agent). A vehicle agent recognizes other agents, including pedestrians and vehicles, within a forward range of 7e wide and 20e (=8.0 m) long on the sight field grid, and moves by accelerating or decelerating.The vehicle moves straight and the steering wheel is not used. At this time, the upper speed limit is set to 2.4 m /s, indicating a situation where progress is slow, and it is difficult to confirm the road conditions. If there is at least one obstacle, such as a moving vehicle in this sight field grid, the vehicle will decelerate by 0.98 m/s 2 (=1G); otherwise it will accelerate by 0.98 m/s 2 (= 1G).

Pedestrian-vehicle mixed flow simulations at a crossroads
In this section, we describe simulations on a crossroads map (Fig. 6), which we created by referring to a standard double-lane trunk road. To run simulations under disaster conditions, fixed obstacles representing rubble were laid out on the footpaths. The pedestrian agents appear from the north or south end to maintain a set global density and move towards the south or north end. The vehicle agents keep appearing on the map until we reach a maximum of 10 agents. The vehicle agents move in three patterns (Fig. 6): agents appear from the east and west ends and cut across the pedestrian agents; they appear from the north and south ends and move north or south along with the pedestrian agents; or no vehicle agents appear.
The pedestrian agents appearing from the north and south ends were set in three ratios at 25% intervals: 100:0%, 75:25%, and 50:50%. Five patterns of pedestrian agent global density were set from 0.1 to 0.5 agent/m 2 at 0.1 intervals. Combining these eight patterns with three patterns of the direction of vehicle agent movement resulted in 45 cases, each of which was simulated five times to measure the average speeds of the pedestrian agents and vehicle agents, and the number of vehicle agents that passed the intersection.
Attention was paid to the average speed of pedestrian agents (Fig. 7). When the direction of vehicle agent movement was analyzed, the average speed values were high, in the order of no vehicle, cutting across from east and west, and moving between north and south. In particular, in the case of north/south movement, as the global density of pedestrian agents increases, the range of the average decrease in speed widens. When analyzing the appearance ratio of pedestrian agents, the average speed values tended to be high, in the order of 100:0%, 75:25%, and 50:50%.
Next, we focused on the average speeds of the vehicle agents (Fig. 7). When we compared the vehicles moving north and south, the south-moving vehicles had high average speed values, in the order of 100:0%, 75:25%, and 50:50%. However, the order was reversed in the case of the north-moving vehicles. This was affected by a few factor. For example, in 100:0%, the south-moving vehicles could advance by following the south-moving pedestrian agents, while the north-moving vehicles advancing in the opposite direction to the south-moving pedestrian agents were likely to experience a decrease in their average speed. In conclusion, our project can show another type of density-speed fundamental diagram in the case of a mixed flow of pedestrian and vehicles.

Modelling bicycle agent as the third UMA component
Here, we take the case of a bicycle as an example of another type of agent in UMA and discuss our model. When modeling our bicycle agent by applying sASPF, we set its centre on the front wheel, over the handle. Under the given advancing direction, the frontward limit of the sight field grid has a length of 2e for the pedestrian agent. However, the limit for the bicycle agent is the sum of the agent's own speed and the speed of the other agent, which is the relative speed and is variable for both speeds (Fig. 8). In the case of agents proceeding in the same direction, we only consider their own speeds.
Here, the applied behaviour rule determines the handle angle and the speed. Bicycle agents have speed as an internal state, and we assume a constant acceleration in Rule 8, deceleration in Rules 2, 3 and 4, and stop in Rule 1. Regarding the handle angle, although the direction at the beginning of the step goes straight ahead, it advances by changing the angle according to the action rule and returns to going straight again at the end. The rear wheel follows the front wheel (right in Fig. 8).

Situation characterized by implicit interaction assumptions
Here, we discuss the importance of introducing the notion of "situation" when considering the practical uses of simulations dealing with heterogeneous UMAs on UPS.
Although interactions between agents initially include implicit interaction assumptions, these are rarely treated consciously in the case of homogeneous agent flows. However, under heterogeneous agent flows, many interaction assumptions are considered. As these are assumed to characterize various situations, it is necessary to discuss the classification in advance.
In the system consisting of four types of agents of vehicle (Vl), bicycle (By), pedestrian (Pd) and wheelchair (Wc), when focusing on many/few vehicles and many/few pedestrians, the four situations (Many, #, Many, #), (Few, #, Many, #), (Many, #, Few, #) and (Few, #, Few, #) can be considered on the 4-tuple of the VI, By, Pd and Wc agents (# means the wildcard). Among these, a typical example of the first is the evacuation situation immediately after an earthquake, the second is a fireworks festival fair venue, the third is a road in a developing country, and the fourth is a road for both cars and pedestrians in a residential area.
Furthermore, the speeds of these models of transport are in the order vehicles (Vl), bicycles (By), pedestrians (Pd) and wheelchairs (Wc, which assumes elderly people as riders), but in urban pedestrian space in developed countries, the priority of these micro-actions is in the reverse order. This is due to traffic restrictions in daily life, and the manners of individuals. We can describe these situations as (1,2,3,4) and (4, 3, 2, 1) of the prority rank on the 4-tuple, respectively, with the former as Anarchy and the latter as Organized. There are also various intermediate types between these two polar opposite cases, called Designed. If we consider one, two or three agents instead of four types of agents, 64 types of situations (=24 + 24 + 12 + 4) can be considered.
Here, it is the priority of micro-action that specifies the characteristics of the interaction system, thus the simulation algorithm is expressed as the priority of classification rank of RSU and the presence / absence of positional prediction of the opposite agent. Position prediction means that, when two opposing relative speeds are greater than a threshold value, the higher priority side determines its own action from the current position of the opponent, while the other side uses the future position, which they predict. If the priority is the same, we predict the position of both. For example, consider a situation in which a car is traveling on a roadway at a high speed and a pedestrian crosses the roadway in front of it. In the case of car priority, the pedestrian side predicts the future position of the car and decides its own movement, whereas the car decides the motion based on the current position of the pedestrian. However, in the case of pedestrian priority, the vehicle side predicts the future position of the pedestrian and decides its own motion, and the pedestrian side decides the motion based on the current position of the car. We used a variable length of sight field grid based on the speed of the bicycle agent in the previous section, but we believe that this is the only possible model representation.

Conclusion
We explained the principle and characteristics of the sASPF project, which we are developing as an integrated simulation platform for modelling various urban mobile agents in urban pedestrian space. This project is being developed with urban simulation research in mind.
(1) In the sASPF project, the micro-motions of all UMAs, including pedestrian agents, is calculated by a rule-based system in two-dimensional continuous space. Therefore, it is possible to construct a model that is both practical and computationally efficient. Moreover, according to the performance test, there is no reason why fitting with the measured value within the density of the non-physical contact situations is also inadequate. We carried out theoretical analyses of phase transitions of pedestrian counter flows. The results confiremed that phase transitions occurred for a range of biases in the diagonal stepping probability, from 50:50% to 60:40%, and the global density from 0.4 to 1.4 agent/m 2 .
(2) We also presented an overview of pedestrian-vehicle mixed flow simulations at a crossroads in a disaster slowing situation, as a case of heterogeneous agents. A vehicle agent model was implemented to simulate pedestrian-vehicle mixed flows assuming a disaster situation. The results showed the same tendency for both pedestrian and vehicle agents: the speed of motion decreased as the number of the other agents in the counter flow increased. It is also noticeable that the average speed values are higher when vehicle agents cut across pedestrian agents than when moving from north and south. A vehicle agent moving against pedestrian agents is likely to experience a decrease in its average speed instead of moving past them.
(3) Furthermore, a trial model of a bicycle agent was illustrated as a natural extension of the pedestrian agent in our sASPF project. This bicycle agent is an example of a model for determining the micro-motion based on the relative speed, that is, the predicted position of another agent.
(4) We pointed out that there is an implicit interaction assumption that cannot be avoided when simulating heterogeneous agent flows. On the other hand, the solution principle that we referred to is to determine the order of priority of the micro-actions of various agents according to the situation of the simulation target. When the relative speed threshold is exceeded, the subordinate agent uses the predicted position of the dominant agent to determine their micro-motion. In other words, we discussed the need for introducing an appropriate interaction system according to each of the situations considered, and the priority of the micro-motion characterizes the "situation" of the simulation target.
The authors do not have space to mention the wheelchair agent in this paper but are planning to publish it to another paper.