Application of Mathematical Modeling Methods for Operational Optimization of Urban Traffic in an Accident on a Section of the Road Network

Simulating traffic flows is an urgent task when choosing the optimal movement scheme of vehicles along the road network. One of the problems affecting the convenience of moving on the road network is road accidents. The article considers the problem of simulating the movement of vehicles when bypassing the scene of a traffic accident. A mathematical model reflecting the movement of motor vehicles in a dense traffic flow has been developed in the case when traffic along one of the lanes is blocked as a result of a traffic accident or repair work. The time intervals between cars in each lane are assumed to be subordinate to Erlang's law. The scene of the incident is presented as a queuing system. Using the method of pseudo-states and Markov chains, the author calculated the movement characteristics of the vehicles near the scene of a traffic accident. Simulating the movement of traffic flows near the accident sites allows predicting the delays caused by vehicles, and adjusting the optimal traffic management schemes.


Introduction
Since the middle of the last century, the increase in the density of automobile traffic has become a serious problem for large cities. Since then, simulating traffic flows has become an urgent task to choose the optimal movement scheme for the vehicles along the street and road network. In different models, optimization criteria are, for example, the time needed to pass an individual section of the road network, reducing conflict points and the probability of road accidents, as well as the number and duration of congestion. The mathematical models of transport flow are currently divided into macroscopic, mesoscopic, and microscopic.
Macroscopic simulation establishes functional dependencies between individual flow indicators, for example, speed and distance between vehicles moving in the flow. Dynamic macroscopic models describe the process of changing the transport flow in time and space using differential equations. The solution to the equations can be obtained either analytically or by simulation. For a large road network, simulation modeling is used. As a rule, macroscopic models have low computer requirements.
With microscopic simulation, the movement of vehicles is simulated in detail to establish indicators reflecting the operational efficiency of the local section of the road network. Usually, the simulation model is based on the statistical distribution of intervals between vehicles. With microscopic simulation, a large number of requirements are imposed on the computer; there may be restrictions on the size of the network, and the number of runs of simulations.
Mesoscopic modeling serves as a bridge between microand macro models. Mesoscopic models consider individual vehicles but describe their movement and interaction based on statistical dependencies.
When solving individual problems, preference may be given to one or another simulation method, or a combination of methods [1].
One of the problems affecting the convenience of movement on the road network is road traffic accidents (RTA). As a rule, in the case of RTA, one of the traffic lanes is blocked forming a bottleneck, which causes traffic congestion. Therefore, the problem of simulating the movement of vehicles when bypassing the RTA scene becomes quite urgent [1][2][3][4].
For example, in [1], macroscopic variables, such as average density and average speed of vehicles, were used to simulate RTA. This approach is quite simplified, but allows predicting the impact of road accidents on the average characteristics of traffic flows.
In [3], stochastic accident simulation is combined with the Lighthill-Whitham-Richards (LWR) traffic flow model. The authors assumed that accidents occur at random times and affect the traffic handling capacity around the accident scene. Since accidents occur in different spatial locations, two effects leading to accidents were taken into account to simulate the random location of the accident site: a high density of the flow moving at a sufficiently high speed, and speed jumps in the tail of the associated traffic flow. The authors constructed a stochastic model of the traffic flow, reflecting random RTA. Besides, a numerical approximation algorithm was developed as well.
L. Jin and S. Amin [4] presented a model describing the traffic dynamics on the highway at RTA with a stochastic decrease in traffic handling capacity. They also developed methods for managing incidents on the motorway using the proposed model. Using Markov chains [5], the model simulates the reduction of road capacity and determines the characteristics of the queue caused by an incident on the road. The results of [4] can be used to analyze the effect of stochastic fluctuations in traffic handling capacity on the throughput of a particular motorway section.
To describe the model of the vehicles' movement in the places of RTA, one can also use the approach of the authors describing the traffic flows at the intersection of traffic checkpoints [6], or when moving through a bottleneck [7]. In [6], it is assumed that the traffic flow moves along a long road without side turns up to the traffic checkpoint. It is assumed that there is a linear relationship between the density of the traffic flow and its velocity. If the traffic flow is large enough, then a shock wave will form at the entrance to the checkpoint, which will propagate in the opposite direction. The road consists of two lanes in a single direction, and one lane is blocked for a short distance because of a checkpoint. The authors calculated the length of the queue of vehicles at the traffic jam inlet, the time spent in the traffic jam, and the parameters of the traffic flow at the exit from the checkpoint.

Materials and Methods
To simulate the movement of motor vehicles near the RTA scene, we will use a method related to mesoscopic simulation. The basic hypotheses and provisions characterizing transport flows were described, for example, in our article [8]. The transport network is represented as a directed graph. The necessary information about the traffic organization and traffic flow parameters are contained in the matrices and . Information about the number of vehicles passing from the "source" to the "drain" during time t is contained in the origin-destination matrix (OD-matrix) [9].
The distribution of time intervals in each of the traffic flows along each of the traffic lanes is assumed to be subordinated to the Erlang distribution. This distribution allows approximating any statistical distribution with the necessary accuracy grade provided the correct selection of parameters [10]. Besides, employing the pseudostate technique, this hypothesis about the distribution of intervals in a random flow allows using Markov chains and determining the characteristics of the queuing system functioning [10][11][12].

Formalizing the Movement of Motor Vehicles in a Dense Flow in the Case of RTA
Let's consider the movement of motor vehicles in a dense traffic flow in the case when, as a result of an RTA or repair works, traffic along one of the lanes is blocked. We will consider the segment of the road network between two neighboring intersections, where an RTA occurred or repairs are being carried out, as an open queuing system.
In this case, the movement of vehicles in a dense traffic flow arriving in two lanes to point A ( Figure 1) slows down. According to field observations, a general queue is formed in front of point A, even though vehicles are located on two lanes. Queue discipline is based on service according to the vehicle's arrival order (in the order of receipt of applications), i.e. on a first-in-first-out (FIFO) basis. The number of places in the queue is limited by the number of vehicles that can fill both lanes from point A to the preceding node of the network (intersection) -point C.

Mathematical Model of the Motor Vehicles Movement in a Dense Traffic Flow in Case of RTA
According to the TIMeR_Mod model, the time intervals between vehicles in each of the lanes are distributed according to Erlang's law. The conducted field surveys have shown that for a dense flow, it can be considered that this is a special Erlang law of order . Let the flows F 1 and F 2 be distributed according to a special Erlang law with parameters and , respectively, and with the same parameter . Then, the Palm flow F 1+2 arrives "for service", where the distribution of time intervals between events is a special Erlang distribution of the same order with a parameter . We will consider the service time to be distributed according to the exponential law with the parameter . At that, no more than N vehicles can be in the queue at the same time, and in the system in general -vehicle: N in the queue, and one in service.
To compile a mathematical model of this queuing system (QS), we will use the pseudostate method.
Based on the state space graph (Figure 2), we compose a system of Kolmogorov differential equations describing the stay of the QS in pseudostates of the state where . The probability of the system being in the state where we will denote as (1) The ordinary differential equation for the stay of the QS in a pseudostate at has a form: The subset consists of a single pseudostate .
Therefore, the corresponding differential equation will take the form: (3) Thus, the system of Kolmogorov differential equations for the QS model being compiled has the following form: , Besides, the following equality is valid: The initial conditions are as follows: The probability that there are m vehicles in the road network section BC at time t is the probability that the QS is in the state . This probability is calculated as follows: , : The situation that has developed on the road network section is described by the following characteristics of the QS: 1) the probability that at the moment t this road segment is fully loaded, is 2) the average number of vehicles on the road segment at a point in time t equals the expected value of the number of vehicles in the queue at the given moment: here, is the random variable, the number of vehicle s in the queue at a time t; 3) the average travel time (in seconds) on the road network section AC is equal to: here is a random variable, the travel time on the road network section AC needed by a vehicle that is in the i-th position in the queue at the time t.

Methods for Calculating the Vehicles Movement Characteristics in a Dense Flow in the Case of RTA
The operation time of the QS can be divided into two time intervals: -the probabilities of the application being in a specific state depend on the time; -the probabilities of the application being in a specific state do not depend on time (stationary state). Case 1. If an RTA has just occurred, then the operation of the system should be considered within the time interval . In this case, the main difficulty lies in solving the system of differential equations (4). Let's consider different solutions. 1) To solve the system (1), we write it in matrix form. At that, we will consider the probability to be an already known function of time t.
We introduce the following notation: t dp t p t p dt t dp t p t p dt t dp t p t p dt t dp  In these notations, the system (1) will take the form: (11) which represents a linear inhomogeneous system of differential equations in matrix form. The characteristic equation of the system: Eigenvalues: of multiplicities . Solution of an inhomogeneous system of differential equations: is the vector of a specific solution of an inhomogeneous system depending on .
Using formula (13), we write out the expression introducing and substitute it into equations (2) and (3). The obtained system of ordinary differential equations is solved for specific parameters.
2) To find probabilities , it is possible to use operational calculus, that is, using the Laplace transform [10]. To compile a transform image system, we use the fact known from operational calculus: , Considering the initial conditions (6), we obtain an imaging system, corresponding to (1): Its solution has the form: , To solve the system (4), we also construct a transform image system of unknown functions. In this case, we obtain the following system of algebraic equations with respect to unknown functions , : However, an exact analytical solution can be found only for certain specific values of the and parameters.
3) When solving a formulated practical problem, it is much more convenient to find a numerical solution of the system for a given time moment t 1 . For example, this can be done employing the Runge-Kutta method. After determining the numerical values of the probabilities at the moment t 1 , one can calculate the necessary indicators of the system functioning using formulas (8), (9), and (10). Case 2. As the practical studies show, after a fairly short time after an RTA, the system turns into a stationary state. Therefore, in the interval , we can consider the probabilities to be constant values that do not depend on time t. Therefore, their time derivatives are equal to zero.
Then the system (1) takes the form: Given the result (16) and the differential equations (2) and (3), we obtain a system of algebraic equations: for (20) Denoting , the system's solution can be written as: , The value is expressed from condition (5): Thus: (23) Now we express the necessary characteristics: 1) the probability that this section is fully loaded is equal to: 2) the average number of vehicles moving on this road section AC is: 3) the average travel time on a section AC of the road network is equal to: (26)

Applying a Mathematical Model of the Movement of the Vehicles in the Case of the RTA to Optimize the Traffic Organization
The developed vehicle movement model in the event of a narrowing of the roadway due to RTA or road repair works allows quickly adjusting the traffic organization. The advantage of the proposed method over the existing ones consists in the minimum number of initial data required for making a decision and the speed of obtaining the result. The initial data for the developed method of estimation are only the average time (in seconds) of the detour by the first car in the line of the obstacle АВ , as well as the parameters of the statistical law of distribution of random variables -the time intervals between cars in the stream (parameters of the Erlang law). In the models considered in [1][2][3][4], more significant measurements are required. The efficiency of calculations is achieved through an analytical solution.
In the TIMeR_Mod model developed earlier by us, information about the distribution of traffic flows over the network is contained in the matrices and [8]. An algorithm for determining the need to correct these data is proposed below.
The algorithm for correcting traffic flow data in the case of RTA is as follows: 1) if or , then we "exclude" traffic on the considered road network section in the matrices and ; 2) if and 1 ) ( − < N l M , then we adjust the Erlang parameters and the number of traffic lanes at the incident site in the matrices and ; 3) we update the OD-matrix according to the changes made in and [9].
An example of the developed algorithm is shown below in Table 1. We will accept the values