{'fraction_non_alphanumeric': 0.043377512127512126, 'fraction_numerical': 0.01045997920997921, 'mean_word_length': 4.433866792186397, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Proposal of a risk model for vehicular traffic: A Boltzmann-type kinetic approach

This paper deals with a Boltzmann-type kinetic model describing the interplay between vehicle dynamics and safety aspects in vehicular traffic. Sticking to the idea that the macroscopic characteristics of traffic flow, including the distribution of the driving risk along a road, are ultimately generated by one-to-one interactions among drivers, the model links the personal (i.e., individual) risk to the changes of speeds of single vehicles and implements a probabilistic description of such microscopic interactions in a Boltzmann-type collisional operator. By means of suitable statistical moments of the kinetic distribution function, it is finally possible to recover macroscopic relationships between the average risk and the road congestion, which show an interesting and reasonable correlation with the well-known free and congested phases of the flow of vehicles.


Introduction
Road safety is a major issue in modern societies, especially in view of the constantly increasing motorisation levels across several EU and non-EU countries. Although recent studies suggest that this fact is actually correlated with a general decreasing trend of fatality rates, see e.g., [1,32], the problem of assessing quantitatively the risk in vehicular traffic, and of envisaging suitable countermeasures, remains of paramount importance.
So far, road safety has been studied mainly by means of statistical models aimed at fitting the probability distribution of the fatality rates over time [24] or at forecasting road accidents using time series [3,21]. Efforts have also been made towards the construction of safety indicators, which should allow one to classify the safety performances of different roads and to compare, on such a basis, different countries [15,16]. However, there is in general no agreement on which procedure, among several possible ones, is the most suited to construct a reliable indicator and, as a matter of fact, the position of a given country in the ranking turns out to be very sensitive to the indicator used. Despite this, a synthetic analysis is ultimately necessary: a mere comparison of the crash data of different countries may be misleading, therefore a more abstract and comprehensive concept of risk has to be formulated [28].
A recent report on road safety in New Zealand [2] introduces the following definitions of two types of risk: Collective risk: is a measure of the total number of fatal and serious injury crashes per kilometre over a section of road, cf. [2, p. 13]; Personal risk: is a measure of the danger to each individual using the state highway being assessed, cf. [2, p. 14]. While substantially qualitative and empirical, these definitions raise nevertheless an important conceptual point, namely the fact that the risk is intrinsically multiscale.
Each driver (microscopic scale) bears a certain personal level of danger, namely of potential risk, which, combined with the levels of danger of all other drivers, forms an emergent risk for the indistinct ensemble of road users (macroscopic scale). Hence the large-scale tangible manifestations of the road risk originate from smallscale, often unobservable, causes. Such an argument is further supported by some psychological theories of risk perception, among which probably the most popular one in the context of vehicular traffic is the so-called risk homeostasis theory. According to this theory, each driver possesses a certain target level of personal risk, which s/he feels comfortable with; then, at every time s/he compares their perceived risk with such a target level, adjusting their behaviour so as to reduce the gap between the two [31]. Actually, the risk homeostasis theory is not widely accepted, some studies rejecting it on the basis of experimental evidences, see e.g., [11]. The main criticism is, in essence, that the aforesaid risk regulatory mechanism of the drivers (acting similarly to the thermal homeostatic system in warm-blooded animals, whence the name of the theory) is too elementary compared to the much richer variety of possible responses, to such an extent that some paradoxical consequences are produced. For instance, the number of traffic accidents per unit time would tend to be constant independently of possible safety countermeasures, because so tends to be the personal risk per unit time. Whether one accepts or not this theory, there is a common agreement on the fact that the background of all observable manifestations of the road risk is the individual behaviour of the drivers. In this respect, conceiving a mathematical model able to explore the link between small and large scale effects acquires both a theoretical and a practical interest. In fact, if on the one hand data collection is a useful practice in order to grasp the essential trends of the considered phenomenon, on the other hand the interpretation of the data themselves, with possibly the goal of making simulations and predictions, cannot rely simply on empirical observation.
The mathematical literature offers nowadays a large variety of traffic models at all observation and representation scales, from the microscopic and kinetic to the macroscopic one, see e.g., [25] and references therein for a critical survey. Nevertheless, there is a substantial lack of models dedicated to the joint simulation of traffic flow and safety issues. In [23] the authors propose a model, which is investigated analytically in [18] and then further improved in [22], for the simulation of car accidents. The model is a macroscopic one based on the coupling of two second order traffic models, which are instantaneously defined on two disjoint adjacent portions of the road and which feature different traffic pressure laws accounting for more and less careful drivers. Car collisions are understood as the intersection of the trajectories of two vehicles driven by either type of driver. In particular, analytical conditions are provided, under which a collision occurs depending on the initial space and speed distributions of the vehicles.
In this paper, instead of modelling physical collisions among cars, we are more interested in recovering the point of view based on the concept of risk discussed at the beginning. Sticking to the idea that observable traffic trends are ultimately determined by the individual behaviour of drivers, we adopt a Boltzmann-type kinetic approach focusing on binary interactions among drivers, which are responsible for both speed changes (through instantaneous acceleration, braking, overtaking) and, consequently, also for changes in the individual levels of risk. In practice, as usual in the kinetic theory approach, we consider the time-evolution of the statistical distribution of the microscopic states of the vehicles, taking into account that such states include also the personal risk of the drivers. Then, by extracting suitable mean quantities at equilibrium from the kinetic distribution function, we obtain some information about the macroscopic traffic trends, including the average risk and the probability of accident as functions of the road congestion. To some extent, these can be regarded as measures of a potential collective risk useful to both road users and traffic governance authorities.
In more detail, the paper is organised as follows. In Section 2 we present the Boltzmann-type kinetic model and specialise it to the case of a quantised space of microscopic states, given that the vehicle speed and the personal risk can be conveniently understood as discrete variables organised in levels. In Section 3 we detail the modelling of the microscopic interactions among the vehicles, regarding them as stochastic jump processes on the discrete state space. Indeed, the aforementioned variety of human responses suggests that a probabilistic approach is more appropriate at this stage. In Section 4 we perform a computational analysis of the model, which leads us to define the risk diagram of traffic parallelly to the more celebrated fundamental and speed diagrams. By means of such a diagram we display the average risk as a function of the vehicle density and we take inspiration for proposing the definition of a safety criterion which discriminates between safety and risk regimes depending on the local traffic congestion. Interestingly enough, such regimes turn out to be correlated with the well-known phase transition between free and congested flow regimes also reproduced by our model. In Section 5 we draw some conclusions and briefly sketch research perspectives regarding the application of ideas similar to those developed in this paper to other systems of interacting particles prone to safety issues, for instance crowds. Finally, in Appendix A we develop a basic well-posedness and asymptotic theory of our kinetic model in measure spaces (Wasserstein spaces), so as to ground the contents of the paper on solid mathematical bases.

Boltzmann-type kinetic model with stochastic interactions
In this section we introduce a model based on Boltzmann-type kinetic equations, in which short-range interactions among drivers are modelled as stochastic transitions of microscopic state. This allows us to introduce the randomness of the human behaviour in the microscopic dynamics ruling the individual response to local traffic and safety conditions.
In particular, we consider the following (dimensionless) microscopic states of the drivers: the speed v ∈ [0, 1] ⊂ R and the personal risk u ∈ [0, 1] ⊂ R, with u = 0, u = 1 standing for the lowest and highest risk, respectively. The kinetic (statistical) representation of the system is given by the (one particle) distribution function over the microscopic states, say f = f (t, v, u), t ≥ 0 being the time variable, such that f (t, v, u) dv du is the fraction of vehicles which at time t travel at a speed comprised between v and v + dv with a personal risk between u and u + du. Alternatively, if the distribution function f is thought of as normalised with respect to the total number of vehicles, f (t, v, u) dv du can be understood as the probability that a representative vehicle of the system possesses a microscopic Remark 2.1. The numerical values of u introduced above are purely conventional: they are used to mathematise the concept of personal risk but neither refer nor imply actual physical ranges. Hence they serve mostly interpretative than strictly quantitative purposes: for instance, the definition and identification of the macroscopic risk and safety regimes of traffic, cf. Section 4.2. The quantitative information on these regimes will be linked to a more standard and well-defined physical quantity, such as the vehicle density.
Remark 2.2. The above statistical representation does not include the space coordinate among the variables which define the microscopic state of the vehicles. This is because we are considering a simplified setting, in which the distribution of the vehicles along the road is supposed to be homogeneous. While being a rough physical approximation, this assumption nonetheless allows us to focus on the interaction dynamics among vehicles, which feature mainly speed variations, here further linked to variations of the personal risk. Hence the two microscopic variables introduced above are actually the most relevant ones for constructing a minimal mathematical model which describes traffic dynamics as a result of concurrent mechanical and behavioural effects.
2.1. Use of the distribution function for computing observable quantities.
If the distribution function f is known, several statistics over the microscopic states of the vehicles can be computed. Such statistics provide macroscopic observable quantities related to both the traffic conditions and the risk along the road.
We recall in particular some of them, which will be useful in the sequel: • The density of vehicles at time t, denoted ρ = ρ(t), which is defined as the zeroth order moment of f with respect to both v and u: Throughout the paper we will assume 0 ≤ ρ ≤ 1, where ρ = 1 represents the maximum (dimensionless) density of vehicles that can be locally accommodated on the road. • The average flux of vehicles at time t, denoted q = q(t), which is defined as the first order moment of the speed distribution, the latter being the marginal of f with respect to u. Hence: • The mean speed of vehicles at time t, denoted V = V (t), which is defined from the usual relationship between ρ and q, i.e., q = ρV , whence • The statistical distribution of the risk, say ϕ = ϕ(t, u), namely the marginal of f with respect to v: which is such that ϕ(t, u) du is the number of vehicles which, at time t, bear a personal risk comprised between u and u + du (regardless of their speed). Using ϕ we obtain the average risk, denoted U (t), along the road at time t as: Notice that 1 0 ϕ(t, u) du = ρ(t), which explains the coefficient 1 ρ(t) in (4). 2.2. Evolution equation for the distribution function. A mathematical model consists in an evolution equation for the distribution function f , derived consistently with the principles of the kinetic theory of vehicular traffic.
In our spatially homogeneous setting, the time variation of the number of vehicles with speed v and personal risk u is only due to short-range interactions, which cause acceleration and braking. Since the latter depend ultimately on people's driving style, they cannot be modelled by appealing straightforwardly to standard mechanical principles. Hence, in the following, speed and risk transitions will be regarded as correlated stochastic processes. This way both the subjectivity of the human behaviour and the interplay between mechanical and behavioural effects will be taken into account.
In formulas we write where: Then the expression of the gain operator is as follows (see e.g., [29]): where w * , w * are the pre-interaction states of the two vehicles which interact and: • η(w * , w * ) > 0 is the interaction rate, i.e., the frequency of interaction between a vehicle with microscopic state w * and one with microscopic state w * ; • P(w * → w | w * , ρ) ≥ 0 is the transition probability distribution. More precisely, P(w * → w | w * , ρ) dw is the probability that the vehicle with microscopic state w * switches to a microscopic state contained in the elementary volume dw of I 2 centred in w because of an interaction with the vehicle with microscopic state w * . Conditioning by the density ρ indicates that, as we will see later (cf. Section 3), binary interactions are influenced by the local macroscopic state of the traffic. For fixed pre-interaction states the following property holds: Likewise, the expression of the loss operator is as follows (see again [29]): On the whole, the loss term f Q − (f ) can be derived from the gain term (5) by assuming that the first vehicle already holds the state w and counting on average all interactions which, in the unit time, can make it switch to whatever else state.
One has: then property (6) gives the above expression for Q − (f ).
Putting together the terms introduced so far, and assuming, for the sake of simplicity, that η(w * , w * ) = 1 for all w * , w * ∈ I 2 , we finally obtain the following integro-differential equation for f : Notice that, with constant interaction rates, the loss term is directly proportional to the vehicle density. Moreover, owing to property (6), it results therefore integrating (7) with respect to w gives that such a density is actually constant in time (conservation of mass). For the study of basic qualitative properties of (7) the reader may refer to Appendix A, where we tackle the well-posedness of the Cauchy problem associated with (7) in the frame of measure-valued differential equations in Wasserstein spaces. Such a theoretical setting, which is more abstract than the one usually considered in the literature for similar equations, see e.g., [6, Appendix A] and [26], is here motivated by the specialisation of the model that we are going to discuss in the next section.

Discrete microscopic states.
For practical reasons, it may be convenient to think of the microscopic states v, u as quantised (i.e., distributed over a set of discrete, rather than continuous, values). This is particularly meaningful for the personal risk u, which is a non-mechanical quantity naturally meant in levels, but may be reasonable also for the speed v, see e.g., [10,12], considering that the cruise speed of a vehicle tends to be mostly piecewise constant in time, with rapid transitions from one speed level to another.
In the state space Proceeding at first in a formal fashion, over such a lattice we postulate the following form of the kinetic distribution function: is the fraction of vehicles which, at time t, travel at speed v i with personal risk u j (or, depending on the interpretation given to f , it is the probability that a representative vehicle of the system possesses the microscopic state w ij = (v i , u j ) at time t). In order to specialise (7) to the kinetic distribution function (8), we rewrite it in weak form by multiplying by a test function φ ∈ C(I 2 ) and integrating over next we read f (t, w) dw as an integration measure, not necessarily regular with respect to Lebesgue, and from (8) we get: In view of the quantisation of the state space, the transition probability distribution must have a structure comparable to (8), i.e., it must be a discrete probability distribution over the post-interaction state w. Hence we postulate: 1] is the probability that the vehicle with microscopic state w i * j * jumps to the microscopic state w ij because of an interaction with the vehicle with microscopic state w i * j * , given the local traffic congestion ρ. Plugging this into the equation above yields whence finally, owing to the arbitrariness of φ, we obtain 3. This discrete-state kinetic-type equation has been studied in the literature, see e.g., [8,10]. In particular, it has been proved to admit smooth solutions t → f ij (t), which are unique and nonnegative for prescribed nonnegative initial data f ij (0) and, in addition, preserve the total mass The arguments above can be made rigorous by appealing to the theory for (7) developed in Appendix A. In particular, we can state the following result: Theorem 2.4. Let the transition probability distribution have the form be a prescribed kinetic distribution function at time t = 0 over the lattice of microscopic states {w ij } ⊂ I 2 , such that Then the corresponding unique solution to (7) is (8) with coefficients f ij (t) given by (9) along with the initial conditions f ij (0) = f 0 ij . In addition, it depends continuously on the initial datum as stated by Theorem A.5.
Proof. The given transition probability distribution satisfies Assumption A.3, in fact . Then, owing to Theorem A.4, we can assert that the Cauchy problem associated with (7) admits a unique mild solution 1 .
The calculations preceding this theorem show that if the f ij (t)'s satisfy (9) then (8) is indeed such a solution, considering also that it is nonnegative (cf. Remark 2.3) and matches the initial condition f 0 . Theorem 2.4 requires the mapping (w * , w * , ρ) → P ij (w * , w * , ρ) to be Lipschitz continuous in I 2 ×I 2 ×[0, 1] but the solution (8) depends ultimately only on the values P ij (w i * j * , w i * j * , ρ), cf. (9). Therefore, when constructing specific models, we can confine ourselves to specifying the values P ij i * j * ,i * j * (ρ), taking for granted that they can be variously extended to points (w * , w * ) = (w i * j * , w i * j * ) in a Lipschitz continuous way.

Modelling microscopic interactions
From now on, we will systematically refer to the discrete-state setting ruled by (9). In order to describe the interactions among the vehicles, it is necessary to model the transition probabilities P ij i * j * ,i * j * (ρ) associated with the jump processes over the lattice of discrete microscopic states.
As a first step, we propose the following factorisation: , which implies that changes in the personal risk (first term at the right-hand side) depend on the current speeds of the interacting pairs while the driving style (i.e., the way in which the speed changes, second term at the right-hand side) is not directly influenced by the current personal risk. In a sense, we are interpreting the change of personal risk as a function of the driving conditions, however linked to the subjectivity of the drivers and hence described in probability. By subjectivity we mean the fact that different drivers may not respond in the same way to the same conditions. More advanced models may account for a joint influence of speed and risk levels on binary interactions, but for the purposes of the present paper the approximation above appears to be satisfactory.
As a second step, we detail the transition probabilities (P ) j i * j * ,i * (ρ), (P ) i i * i * (ρ) just introduced. It is worth stressing that they will be mainly inspired by a prototypical analysis of the driving styles. In particular, they will be parameterised by the vehicle density ρ ∈ [0, 1] so as to feed back the global traffic conditions to the local interaction rules. Other external objective factors which may affect the flow of vehicles and the personal risk, such as e.g., weather or road conditions (number of lanes, number of directions of travel, type of wearing course), will be summarised by a parameter α ∈ [0, 1], whose low, resp. high, values stand for poor, resp. good, conditions.
Remark 3.1. The interpretation of α is conceptually analogous to that of u discussed in Remark 2.1: its numerical values do not refer to actual physical (measured) ranges but serve to convey, in mathematical terms, the influence of external conditions on binary interactions.

Risk transitions.
In modelling the risk transition probability we consider two cases, depending on whether the vehicle with state (v i * , u j * ) interacts with a faster or a slower leading vehicle with speed v i * .
, j * −1} + (1 − αρ)δ j,j * , the symbol δ denoting here the Kronecher's delta. In practice, we assume that the interaction with a faster leading vehicle can reduce the personal risk with probability αρ, which raises in high traffic congestion and good environmental conditions. The rationale is that the headway from a faster leading vehicle increases, which reduces the risk of collision especially when vehicles are packed (high ρ) or when speeds are presumably high (good environmental conditions, i.e., high α). Alternatively, after the interaction the personal risk remains the same with the complementary probability.
• If v i * > v i * we set (P ) j i * j * ,i * (ρ) = δ j,min{j * +1, m} , i.e., we assume that the interaction with a slower leading vehicle can only increase the personal risk because the headway is reduced or overtaking is induced (see below).

Speed transitions.
In modelling the speed transition probability [27], where the following three cases are considered: , the vehicle with speed v i * emulates the leading one with speed v i * by accelerating to the next speed with probability α (1 − ρ). This probability increases if environmental conditions are good and traffic is not too much congested. Otherwise, the speed remains unchanged with complementary probability.
, the vehicle with speed v i * maintains its speed with probability α (1−ρ). The rationale is that if environmental conditions are good enough or traffic is sufficiently uncongested then it can overtake the slower leading vehicle with speed v i * . Otherwise, it is forced to slow down to the speed v i * and to queue up, which happens with the complementary probability.
In this case there are three possible outcomes of the interaction: if environmental conditions are poor and traffic is congested the vehicle with speed v i * slows down with probability (1 − α)ρ; if, instead, environmental conditions are good and traffic is light then it accelerates to the next speed (because e.g., it overtakes the leading vehicle) with probability α(1 − ρ); finally, it can also remain with its current speed with a probability which complements the sum of the previous two.

Case studies
4.1. Fundamental diagrams of traffic. Model (9) can be used to investigate the long-term macroscopic dynamics resulting from the small-scale interactions among vehicles discussed in the previous section. Such dynamics are summarised by the well-known fundamental and speed diagrams of traffic, see e.g., [20], which express the average flux and mean speed of the vehicles at equilibrium, respectively, as functions of the vehicle density along the road. This information, typically obtained from experimental measurements [7,19], is here studied at a theoretical level in order to discuss qualitatively the impact of the driving style on the macroscopically observable traffic trends.
In Appendix A we give sufficient conditions for the existence, uniqueness, and global attractiveness of equilibria f ∞ ∈ M ρ + (I 2 ) of (7), cf. Theorems A.7, A.8. Here we claim, in particular, that if the transition probability distribution P has the special form discussed in Theorem 2.4 then f ∞ is actually a discrete-state distribution function.
Theorem 4.1. Fix ρ ∈ [0, 1] and let P(w * → w | w * , ρ) be like in Theorem 2.4. Assume moreover that Lip(P) < 1 2 (cf. Assumption A.3). Then the unique equilibrium distribution function f ∞ ∈ M ρ + (I 2 ), which is also globally attractive, has the Proof. We consider directly the case ρ > 0, for ρ = 0 implies uniquely f ∞ ≡ 0. Since Lip(P) < 1 2 , we know from Theorems A.7, A.8 that (7) admits a unique and globally attractive equilibrium distribution f ∞ ∈ M ρ + (I 2 ), which is found as the fixed point of the mapping f → 1 ρ Q + (f, f ). In particular, defining the subset it is easy to see that if P has the form indicated in Theorem 2.4 then the operator 1 ρ Q + maps D into itself. In fact, for f ∈ D we get From here we also deduce formally (10). Therefore, in order to get the thesis, it is sufficient to prove that D is closed in M ρ + (I 2 ). In fact this will imply that (D, W 1 ) is a complete metric space, and Banach contraction principle will then locate the fixed point of 1 ρ Q + in D. Let (f k ) ⊆ D be a convergent sequence in M ρ + (I 2 ) with respect to the W 1 metric. It is then Cauchy, hence given > 0 we find N ∈ N such that if h, k > N then W 1 f h , f k < . This condition means . In particular, taking a function ϕ which vanishes at every w ij but one, say wī, we discover |ϕ(wī)| f h ı − f k ı < for all h, k > N . Thus we deduce that (f k ij ) k is a Cauchy sequence in R, hence for all i, j there exists We now claim that f k → f in the W 1 metric: This implies that D is closed and the proof is completed.
Under the assumptions of Theorem 4.1, (10) defines a mapping [0, 1] ρ → {f ∞ ij (ρ)}, i.e., for every ρ ∈ [0, 1] there exist unique coefficients f ∞ ij solving (10) such that {f ∞ ij } is the equilibrium of system (9) with moreover n i=1 m j=1 f ∞ ij = ρ. Owing to the argument above, for each ρ it is possible to compute the corresponding average flux and mean speed at equilibrium by means of formulas (1), (2) with the kinetic distribution f ∞ . This generates the two mappings which are the theoretical definitions of the fundamental and speed diagrams, respectively, of traffic. Furthermore, it is possible to estimate the dispersion of the microscopic speeds at equilibrium by computing the standard deviation of the speed: that of the flux being ρσ V (ρ), which gives a measure of the homogeneity of the driving styles of the drivers. Figure 1 shows the diagrams (11), with the corresponding standard deviations, for different values of the constant α parameterising the transition probabilities, cf. Sections 3.1, 3.2. Each pair (ρ, q(ρ)), (ρ, V (ρ)) has been computed by integrating numerically (9) up to a sufficiently large final time, such that the equilibrium was reached.
For α = 1 (best environmental conditions) the diagrams are the same as those studied analytically in [13]. In particular, they show a clear separation between the so-called free and congested phases of traffic: the former, taking place at low density (ρ < 0.5), is characterised by the fact that vehicles travel at the maximum speed with zero standard deviation; the latter, taking place instead at high density (ρ > 0.5), is characterised by a certain dispersion of the microscopic speeds with respect to their mean value. In [13] the critical value ρ = 0.5 has been associated with a supercritical bifurcation of the equilibria, thereby providing a precise mathematical characterisation of the phase transition.
For α < 1, analogously detailed analytical results are not yet available and, to our knowledge, Theorems A.7, A.8 in Appendix A are the first results giving at least sufficient conditions for the qualitative characterisation of equilibrium solutions to (7) in the general case. According to the graphs in Figure 1, the model predicts lower and lower critical values for the density threshold triggering the phase transition. In addition to that, coherently with the experimental observations, cf. e.g., [19], some scattering of the diagrams appears also for low density, along with a capacity drop visible in the average flux (i.e., the fact that the maximum flux in the congested phase is lower than the maximum one in the free phase), which separates the free and congested phases as described in [33].
Compared to typical experimental data, the most realistic diagrams seem to be those obtained for α = 0.8, which denotes suboptimal though not excessively poor environmental conditions. It is worth stressing that such a realism of the theoretical diagrams is not only relevant for supporting the derivation of macroscopic kinematic features of the flow of vehicles at equilibrium out of microscopic interaction rules far from equilibrium. It constitutes also a reliable basis for interpreting, in a similar multiscale perspective, the link with risk and safety issues, for which synthetic and informative empirical data similar to the fundamental and speed diagrams are, to the authors knowledge, not currently available for direct comparison.

4.2.
Risk diagrams of traffic. Starting from the statistical distribution of the risk given in (3), we propose the following definition for the probability of accident along the road: Definition 4.2 (Probability of accident). Letū ∈ (0, 1) be a risk threshold above which the personal risk for a representative vehicle is considered too high. We define the instantaneous probability of accident P = P (t) (associated withū) as the normalised number of vehicles whose personal risk is, at time t, greater than or equal toū: Asymptotically, using the discrete-state equilibrium distribution function f ∞ = f ∞ (ρ) found in Theorem 4.1, we obtain the mapping (12) ρ → P (ρ) := 1 ρ which shows that the probability of accident is, in the long run, a function of the traffic density. We call (12) the accident probability diagram. Definition 4.2 and, in particular, (12) depend on the thresholdū, which needs to be estimated in order for the model to serve quantitative purposes. If, for a given road, the empirical probability of accident is known (for instance, from time series on the frequency of accidents, see e.g., [3,21,24]) then it is possible to findū by solving an inverse problem which leads the theoretical probability (12) to match the experimental one. This way, the road under consideration can be assigned the risk thresholdū.
The question then arises how to use the information provided by the risk threshold u for the assessment of safety standards. In fact, the personal risk u, albeit a primitive variable of the model, is not a quantity which can be really measured for each vehicle: a macroscopic synthesis is necessary. Quoting from [2]: Personal risk is most of interest to the public, as it shows the risk to road users, as individuals. To this purpose, we need to further post-process the statistical information brought by the kinetic model. Taking inspiration from the fundamental and speed diagrams of traffic discussed in Section 4.1, a conceivable approach is to link the personal risk, conveniently understood in an average sense, to the macroscopic traffic density along the road. For this we define: f ∞ = f ∞ (ρ) being the equilibrium kinetic distribution function of Theorem 4.1.
The related standard deviation is Using the tools provided by Definition 4.3, we can finally fix a safety criterion which discriminates between safety and risk regimes of traffic depending on the traffic loads: The complementary regime, i.e., the one for which U (ρ) + σ U (ρ) ≥ū, is the risk regime.
Remark 4.5. An alternative, less precautionary, criterion might identify the safety regime with the traffic loads such that U (ρ) <ū and the risk regime with those such that U (ρ) ≥ū. Figure 2 shows the risk diagram (13) and the probability of accident (12) at equilibrium obtained numerically for various environmental conditions as described in Section 4.1, using the heuristic risk thresholdū = 0.7.
For α = 1 the average risk and the probability of accident are deterministically zero for all values of the traffic density in the free phase (ρ < 0.5). This is a consequence of the fact that, as shown by the corresponding diagrams in Figure 1, at low density in optimal environmental conditions vehicles virtually do not interact, all of them travelling undisturbed at the maximum speed. In practice, vehicles behave as if the road were empty and consequently the model predicts maximal safety with no possibility of collisions. In the congested phase (ρ > 0.5), instead, the average risk and the probability of accident rise suddenly to a positive value, following the emergence of the scattering of the microscopic speeds, see again the corresponding panels in Figure 1. Then they decrease monotonically to zero when  For α < 1, the main features of the diagrams ρ → U (ρ) and ρ → P (ρ) described in the ideal prototypical case above remain unchanged. In particular, a comparison with Figure 1 shows that the maximum of both diagrams is still reached in correspondence of the density value triggering the transition from free to congested traffic, see also Figure 3a. This is clearly in good agreement with the intuition, indeed it identifies the phase transition as the most risky situation for drivers. It is worth remarking that such a macroscopically observable fact has not been postulated in the construction of the model but has emerged as a result of more elementary microscopic interaction rules. For α = 0.6, 0.8, the average risk and the probability of accident take, in the free phase of traffic, a realistic nonzero value, which first increases before the phase transition and then decreases to zero in the congested phase. Notice that the standard deviation of the risk is higher in the free than in the congested phase, which again meets the intuition considering that at low density the movement of single vehicles is less constrained by the global flow. For α = 0.5, environmental conditions are so poor that U (ρ), P (ρ) → 1 when ρ → 0 + , namely in correspondence of the maximum mean speed (cf. the corresponding panels of Figure 1).
According to [2]: Personal risk is typically higher in more difficult terrains, where traffic volumes and road standards are often lower. By looking at the graphs in the first column of Figure 2, we see that the results of the model match qualitatively well this experimental observation: for low ρ and decreasing α the average personal risk tends indeed to increase.
Again, the most realistic (namely suboptimal, though not excessively poor) scenario appears to be the one described by α = 0.8. In this case, cf. Figure 3b, the safety criterion of Definition 4.4, i.e., individuates two safety regimes for traffic loads ρ ∈ [0, ρ 1 ) and ρ ∈ (ρ 2 , 1], with ρ 1 ≈ 0.275 and ρ 2 ≈ 0.51, respectively. The first one corresponds to a probability of accident P (ρ) 27%, the second one to P (ρ) 38%. Not surprisingly, the maximum admissible probability of accident in free flow (ρ < ρ 1 ) is lower than the one in congested flow (ρ > ρ 2 ), meaning that the safety criterion of Definition 4.4 turns out to be more restrictive in the first than in the second case. This can be understood thinking of the fact that in free flow speeds are higher and the movement of vehicles is less constrained by the global flow, which imposes tighter safety standards.

Conclusions and perspectives
In this paper we have proposed a Boltzmann-type kinetic model which describes the influence of the driving style on the personal driving risk in terms of microscopic binary interactions among the vehicles. In particular, speed transitions due to encounters with other vehicles, and the related changes of personal risk, are described in probability, thereby accounting for the interpersonal variability of the human behaviour, hence ultimately for the subjective component of the risk. Moreover, they are parameterised by the local density of vehicles along the road and by the environmental conditions (for instance, type of road, weather conditions), so as to include in the mathematical description also the objective component of the risk.
By studying the equilibrium solutions of the model, we have defined two macroscopic quantities of interest for the global assessment of the risk conditions, namely the risk diagram and the accident probability diagram. The former gives the average risk along the road and the latter the probability of accident both as functions of the density of vehicles, namely of the level of traffic congestion. These diagrams compare well with the celebrated fundamental and speed diagrams of traffic, also obtainable from the equilibrium solutions of our kinetic model, in that they predict the maximum risk across the phase transition from free to congested flow, when several perturbative phenomena are known to occur in the macroscopic hydrodynamic behaviour of traffic (such as e.g., capacity drop [33], scattering of speed and flux and appearance of a third phase of "synchronised flow" [19]). Moreover, within the free and congested regimes they are in good agreement with the experimental findings of accident data collection campaigns: for instance, they predict that the personal risk rises in light traffic and poor environmental conditions, coherently with what is stated e.g., in [2].
By using the aforesaid diagrams we have proposed the definition of a safety criterion, which, upon assigning to a given road a risk threshold based on the knowledge of real data on accidents, individuates safety and risk regimes depending on the volume of traffic. Once again, it turns out that the risk regime consists of a range of vehicle densities encompassing the critical one at which phase transition occurs. This type of information is perhaps more directly useful to the public than to traffic controlling authorities, because it shows the average risk that a representative road user is subject to. Nevertheless, by identifying traffic loads which may pose safety threats, it also indicates which densities should be preferably avoided along the road and when risk reducing measures should be activated.
This work should be considered as a very first attempt to formalise, by a mathematical model, the risk dynamics in vehicular traffic from the point of view of simulation and prediction rather than simply of statistical description. Several improvements and developments are of course possible, which can take advantage of some existing literature about kinetic models of vehicular traffic: for instance, one may address the spatially inhomogeneous problem [10,12] to track "risk waves" along the road; or the problem on networks [14] to study the propagation of the risk on a set of interconnected roads; or even the impact of different types of vehicles, which form a "traffic mixture" [27], on the risk distribution. On the other hand, the ideas presented in this paper may constitute the basis for modelling risk and safety aspects also of other systems of interacting agents particularly interested by such issues. It is the case of e.g., human crowds, for which a quite wide, though relatively recent, literature already exists (see [9,Chapter 4] for a survey), that in some cases [4] uses a kinetic formalism close to the one which inspired the present work.
Appendix A. Basic theory of the kinetic model in Wasserstein spaces Equation (7), complemented with a suitable initial condition, produces the following Cauchy problem: with the compatibility condition I 2 f 0 (w) dw = ρ. Recall that I 2 = [0, 1] 2 ⊂ R 2 is the space of the microscopic states. The problem can be rewritten in mild form by multiplying both sides of the equation by e ρt and integrating in time: where we have used that, in view of (6), ρ = I 2 f (t, w) dw is constant in t.
In order to allow for measure-valued kinetic distribution functions, as it happens in the model discussed from Section 2.3 onwards, an appropriate space in which to study (15) is X := C([0, T ]; M ρ + (I 2 )), where T > 0 is a final time and M ρ + (I 2 ) is the space of positive measures on I 2 having mass ρ ≥ 0. An element f ∈ X is then a continuous mapping t → f (t), where, for all t ∈ [0, T ], f (t) is a positive measure with I 2 f (t, w) dw = ρ.
Remark A.1. The definition (16) of W 1 follows from the Kantorovich-Rubinstein duality formula, see e.g., [5,Chapter 7]. However, since in M ρ + (I 2 ) all measures carry the same mass and, furthermore, the domain I 2 is bounded with diam(I 2 ) ≤ 2, the supremum at the right-hand side is actually the same as that computed over the smaller set C b,1 (I 2 ) ∩ Lip 1 (I 2 ), where see [30,Chapter 1]. Hence we also have: (17) W 1 (f (t), g(t)) = sup In the following we will use both (16) and (17) interchangeably.
Remark A.2. Let λ > 0 and let ϕ ∈ C(I 2 ) with Lip(ϕ) ≤ λ. Then considering that ϕ λ ∈ Lip 1 (I 2 ). We will occasionally use this property in the proofs of the forthcoming theorems. Notice that, if λ < 1, this estimate is stricter than that obtained by using directly the fact that ϕ ∈ Lip 1 (I 2 ) (i.e., the one without λ at the right-hand side).
To establish the next results, we will always assume that the transition probability distribution P satisfies the following Lipschitz continuity property: Assumption A.3. Let P(w * → · | w * , ρ) ∈ P(I 2 ) for all w * , w * ∈ I 2 , ρ ∈ [0, 1], where P(I 2 ) is the space of probability measures on I 2 . We assume that there exists Lip(P) > 0, which may depend on ρ (although we do not write such a dependence explicitly), such that 1 , w * 2 ∈ I 2 and all ρ ∈ [0, 1]. A.1. Existence and uniqueness of the solution. Taking advantage of the mild formulation (15) of the problem, we apply Banach fixed-point theorem in X to prove: There exists a unique f ∈ C([0, +∞); M ρ + (I 2 )) which solves (15). Proof. We assume ρ > 0 for, if ρ = 0, the unique solution to (15) is clearly f ≡ 0 and we are done. We fix T > 0 and we introduce the operator S defined on X as Then we restate (15) as f = S (f ), meaning that solutions to (15) are fixed points of S on X. Now we claim that: • S (X) ⊆ X.
Let f ∈ X. The non-negativity of f 0 (by assumption) and that of P (by construction) give immediately that S (f )(t) is a positive measure for all t ∈ [0, T ]. Moreover, a simple calculation using property (6) shows that the mass of S (f )(t) is Therefore we conclude that S (f )(t) ∈ M ρ + (I 2 ) for all t ∈ [0, T ]. To check the continuity of the mapping t → S (f )(t) we define for ϕ ∈ C b,1 (I 2 ) ∩ Lip 1 (I 2 ), then we take t 1 , t 2 ∈ [0, T ] with, say, t 1 ≤ t 2 and we compute: where we have used the Lipschitz continuity of the exponential function and the fact that |I (ϕ)(s)| ≤ ρ 2 . Finally, this says that S (f ) ∈ X. • If T > 0 is sufficiently small then S is a contraction on X.

From this inequality we see that:
− if Lip (P) > 1 2 then it suffices to take T < 1 ρ log 2 Lip (P) 2 Lip (P)−1 to obtain that S is a contraction on X; − if Lip (P) ≤ 1 2 then S is a contraction on X for every T > 0. Owing to the properties above, Banach fixed-point theorem implies the existence of a unique fixed point f ∈ X of S which solves (15). If Lip (P) ≤ 1 2 this solution is global in time, whereas if Lip (P) > 1 2 it is only local. However, a simple continuation argument, based on taking f (T ) ∈ M ρ + (I 2 ) as new initial condition for t = T and repeating the procedure above, shows that we can extend it uniquely on the interval [T, 2T ]. Proceeding in this way, we do the same on all subsequent intervals of the form [kT, (k + 1)T ], k = 2, 3, . . . , and we obtain also in this case a global-in-time solution.
That is, all solutions to (15) approach asymptotically one another. This fact preludes to the result about the equilibria of (15) proved in Theorem A.8 below.
A.3. Asymptotic analysis. In this section we study the asymptotic trends of (7), in particular we give sufficient conditions for the existence, uniqueness, and attractiveness of equilibria. It is worth stressing that equilibria of the kinetic model are at the basis of the computation of fundamental and risk diagrams of traffic discussed in Section 4.
Besides the methods presented here, we refer the reader to [17] and references therein for other ways to study the trend towards equilibrium of space homogeneous kinetic traffic models and for the identification of exact or approximated steady states.
If ρ = 0 then it is clear that the unique equilibrium is the trivial distribution function f ∞ ≡ 0. Assuming instead ρ > 0, from the previous equation we see that equilibria satisfy (19) f i.e., they are fixed points of the mapping f → 1 ρ Q + (f, f ). The next theorem gives a sufficient condition for their existence and uniqueness, relying on the Banach contraction principle in M ρ + (I 2 ). Theorem A.7. Let Lip(P) < 1 2 . For all ρ ∈ [0, 1], (7) admits a unique equilibrium distribution function f ∞ ∈ M ρ + (I 2 ).