Skip to content
Friday, June 17, 2022 11:32

Accelerated Kinetic Monte Carlo methods for general nonlocal traffic flow models

Yi Sun and Changhui Tan

Physica D, Volume 446, 133657 (2023)

Abstract

This paper presents a class of one-dimensional cellular automata (CA) models on traffic flows, featuring nonlocal look-ahead interactions. We develop kinetic Monte Carlo (KMC) algorithms to simulate the dynamics. The standard KMC method can be inefficient for models with global interactions. We design an accelerated KMC method to reduce the computational complexity in the evaluation of the nonlocal transition rates. We investigate several numerical experiments to demonstrate the efficiency of the accelerated algorithm, and obtain the fundamental diagrams of the dynamics under various parameter settings.

Contents

1. Introduction

The mathematical theory on traffic flows has been fast developing in the past century. Many successful models have been proposed, analyzed and simulated  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] to understand the emergent phenomena in the traffic networks. These models can be categorized by different scales.

A famous macroscopic model is the Lighthill-Whitham-Richards (LWR) model  [12, 13], \begin {equation} \label{eq:LWR}\tag{1} \partial _t\rho +\partial _x(\rho u)=0,\quad u=u_{\max }(1-\rho ). \end {equation} Here, \(\rho \) denotes the normalized density of the traffic, taking values in \([0,1]\). The velocity is denoted by \(u\), taking maximum value \(u_{\max }\) if \(\rho =0\), and becomes 0 if the maximum density \(\rho =1\) is reached. The LWR model can be equivalently expressed as a scalar conservation law: \begin {equation} \label{eq:LWRflux}\tag{2} \partial _t\rho +\partial _x\big (f(\rho )\big )=0, \quad f(\rho )=\rho u(\rho )=u_{\max }\rho (1-\rho ), \end {equation} where \(f\) is the nonlinear flux. This elegant model captures the wave breakdown phenomenon, where solution becomes discontinuous in finite time. The wave breakdown is arguably responsible for the creation of traffic jams.

The LWR model \(\eqref {eq:LWR}\) has many extensions. One direction is to consider the nonlocal slowdown effect: drivers intend to slow down if heavy traffic is ahead. This would involve a nonlocal look-ahead interaction \begin {equation} \label{eq:SK}\tag{3} \partial _t\rho +\partial _x(\rho u)=0,\quad u=u_{\max }(1-\rho )\exp \left [-\int _0^\infty K(y)\rho (x+y)dy\right ], \end {equation} where \(K\) is the look-ahead kernel. The model was first introduced by Sopasakis and Katsoulakis (SK) in  [14], with \begin {equation} \label{eq:K-SK}\tag{4} K(x)=\begin {cases}1, &x\in [0,a], \\ 0, &\text {otherwise.}\end {cases} \end {equation} The kernel features a look-ahead distance \(a\) and a constant weight. Another class of kernels was discussed in  [15] for pedestrian flows, where \begin {equation} \label{eq:K-CKP}\tag{5} K(x)=\begin {cases}2\big (1-\frac {x}{a}\big ), &x\in [0,a], \\ 0, &\text {otherwise,}\end {cases} \end {equation} followed by an extensive numerical study. The wave breakdown phenomenon for the SK model \(\eqref {eq:SK}\) and related nonlocal models has been studied in  [16, 17, 18]. Recently, it is shown in  [19] that the nonlocal slowdown effect can help avoid the wave breakdown for a family of initial configurations.

Another extension to the LWR model \(\eqref {eq:LWR}\) is on the flux in \(\eqref {eq:LWRflux}\). Observe that \(f\) is a concave function of \(\rho \) with an even symmetry at \(\rho =1/2\). This does not agree with the fundamental diagrams for the density-velocity relation from statistical data from real traffic networks, see e.g.  [10, 8]. A family of fluxes were introduced in  [20] with \begin {equation} \label{eq:fluxcc}\tag{6} f(\rho )=u_{\max }\rho (1-\rho )^\Jump ,\quad \Jump >1. \end {equation} The fluxes are right-skewed and non-concave, fitting better with the experimental data. The non-concavity can lead to a different type of wave breakdown, as discussed in  [21, 22].

A general class of traffic flow models with fluxes in \(\eqref {eq:fluxcc}\) and nonlocal look-ahead interactions takes the form \begin {equation} \label{eq:main}\tag{7} \partial _t\rho +\partial _x(\rho u)=0,\quad u=u_{\max }(1-\rho )^\Jump g\left (\int _0^\infty K(y)\rho (x+y)dy\right ). \end {equation} Here \(g: [0,+\infty ) \to [0,1]\) is the function characterizing the slowdown factor. Naturally, \(g\) is a nonincreasing function, representing that heavier traffic ahead leads to more slowdown. Also, \(g(0)=1\), namely no slowdown if there is no traffic ahead. A typical choice of \(g\) is the Arrhenius relation \(g(x)=e^{-x}\). This leads to a generalization of the SK model \(\eqref {eq:SK}\). Other choices of the function \(g\) are \(g(x)=(1-x)\) or \((1-x)^2\). See for instance the model studied by Bressan and Shen  [23].

In this work, we are interested in the microscopic models that are closely related to \(\eqref {eq:main}\).

One class of microscopic dynamics is the agent-based models, featuring interacting ODE systems on the locations \((x_i)_{i=1}^N\) and/or velocities \((v_i)_{i=1}^N\) of cars. Many models are proposed and studied  [24, 25, 26, 27, 28], including the consideration of the look-ahead interactions  [29].

Another class of microscopic dynamics, which is our main concern, is the lattice models. The road is configured as a fixed lattice. Each cell has values \(1\) (car is present) or \(0\) (car is absent). Explicit rules for car movement on the lattice cells are described to represent the traffic flow. The lattice models, also known as cellular automata (CA) models  [30, 31, 32], have been widely used to represent traffic flows. A vast literature exists addressing various analytical and numerical techniques for models of this type  [33, 34, 35, 36, 37, 38, 39, 40, 41]. Compared with the agent-based models, CA models are simpler to implement and are more amenable to numerical investigation.

In  [14], a CA model with Arrhenius type look-ahead interactions was proposed. Through a semi-discrete mesoscopic stochastic process, the SK model \(\eqref {eq:SK}\) can be formally derived as a coarse-grained hydrodynamic limit of the CA model. See also  [42] for an improved mesoscopic model that connects the microscopic and macroscopic dynamics. Further extensions include multilane  [43], multiclass  [44] and multi-dimensions  [45].

A new class of CA models with Arrhenius relation \(g(x)=e^{-x}\) was introduced by the authors in  [46], recovering the fluxes in \(\eqref {eq:fluxcc}\). A remarkable discovery is that the parameter \(\Jump \) represents the number of cells that a car advances in one movement. Following this idea, we describe a large class of CA models in Section 2, with general choices of the function \(g\). A formal derivation is provided that connects the CA models to the macroscopic dynamics \(\eqref {eq:main}\).

A major focus of this paper is on the numerical implementation of the CA models. One widely used method for vehicular flows and pedestrian flows is the Metropolis Monte Carlo (MMC) method  [47]. It is easy to implement, but can be inefficient. Indeed, selected events are sometimes rejected because the acceptance probability is small, in particular when a system approaches the equilibrium, or the car density is high.

To improve computational efficiency, we use the kinetic Monte Carlo (KMC) algorithm  [48] due to its main feature: rejection-free. Compared to the MMC method, the KMC method requires fewer events to be executed in order to reach a target time, especially when the system is closed to the equilibrium. The KMC method has been successfully applied to traffic flow models  [45, 46] with special types of nonlocal interactions.

One disadvantage of the KMC method is that the transition rates of all possible events have to be calculated prior to the selection of an event, while the MMC method only requires the transition rate for the selected event. For models with global look-ahead interactions, it is computationally costly to obtain all transition rates due to its nonlocal nature. To overcome such inefficiency, we introduce a new way to evaluate the transition rates, updating from the previous steps. Taking advantage of the fact that only one car advances in one event, the updates are much cheaper compared with direct evaluations, reducing the cost from \(\mathcal {O}(\NL ^2)\) to \(\mathcal {O}(\NL )\), where \(\NL \) denotes the number of cells in the lattice. We call the new procedure the accelerated KMC method.

We apply our accelerated KMC method to the nonlocal traffic flow models with a variety of parameter setups. The computational efficiency is verified through numerical experiments. We also obtain the fundamental diagrams of these dynamics, and discuss the relation to the PDE models as coarse-grained limits of the CA models.

The rest of the paper is organized as follows. In Section 2, we introduce the CA models with general nonlocal interaction rules, and the connections to macroscopic models like \(\eqref {eq:main}\). In Section 3, we describe the standard KMC algorithm and introduce the new accelerated KMC method. The computational efficiency is also analyzed and compared. In Section 4, we provide a series of numerical simulations to demonstrate the efficiency of our accelerated KMC method. We also generate fundamental diagrams for the CA models and compare them with the macroscopic models. Finally, we state our conclusions in Section 5.

2. Cellular Automata Models with Nonlocal Interaction Rules

In this section, we describe the construction of cellular automata (CA) models for 1D traffic flow, and the connection to the macroscopic models.

The CA models are defined on a periodic lattice \(\mathcal {L}\) with \(\NL \) evenly spaced cells, \(\mathcal {L}=\{1,2,\ldots ,\NL \}\). For simplicity, we assume that all cars move toward one direction on a single-lane loop highway with no entrances or exits. The configuration at each cell \(i\in \mathcal {L}\) is defined by an index \(\sigma _i\):

\[\sigma _i= \begin {cases} 1, \qquad \mbox {if a car occupies cell $i$}, \\ 0, \qquad \mbox {if the cell $i$ is empty}. \end {cases} \]The state of the system is represented by \(\sigma =\{\sigma _i\}_{i=1}^{\NL }\), which lies in the configuration space \[\color {red} \Sigma =\{0,1\}^\NL .\] We denote \(\Nc \) the number of cars. Clearly we have \[\Nc =\sum _{i=1}^{\NL }\sigma _i.\]

2.1. Nonlocal interaction rules. Car movements can be represented by the transitions in the state of the system, which follow the spin-exchange dynamics  [49]: two nearest-neighbor lattice cells exchange values in each transition. Since all cars move to the right, the only possible configuration changes are of the form \begin {equation} \label{eq:jump1}\tag{8} \{\sigma _i=1, \sigma _{i+1}=0\} \rightarrow \{\sigma _i=0, \sigma _{i+1}=1\}, \end {equation} meaning that the car located at the \(i\)-th cell moves to the \((i+1)\)-th cell when it was not occupied. A generalized spin-exchange dynamics introduced in  [46] allows the following types of configuration changes \begin {equation} \label{eq:jump}\tag{9} \{\sigma _i=1, \sigma _{i+1}=\cdots =\sigma _{i+\Jump }=0\} \rightarrow \{\sigma _i=\cdots =\sigma _{i+\Jump -1}=0, \sigma _{i+\Jump }=1\}. \end {equation} This represents that the car located at the \(i\)-th cell moves \(\Jump \) cells to the right provided that none of \(\Jump \) cells in front was occupied. A novel discovery in  [46] is that the parameter \(\Jump \) determines the macroscopic fluxes \(\eqref {eq:fluxcc}\). The transition rate for \(\eqref {eq:jump1}\) depends on spatial one-sided interactions and a look-ahead feature to represent drivers’ behavior. It takes the form \begin {equation} r_i=\frac {\omega _0}{\Jump }g(\w _i). \label{eq:rate}\tag{10} \end {equation} Here, the prefactor \(\omega _0=1/\tau _0\) corresponds to the car moving frequency or speed and \(\tau _0\) is the characteristic time. The normalization factor \(1/\Jump \) makes sure that the estimated velocity is comparable among different choices of \(\Jump \). The function \(g\) is the same as in the macroscopic dynamics \(\eqref {eq:main}\) that describes the slowdown factor. The quantity \(\w _i\) encodes the weighted nonlocal information ahead \begin {equation} \label{eq:weight}\tag{11} \w _i=\frac {1}{\NL }\sum _{j=1}^\NL \k _{j-i}\sigma _j. \end {equation} A larger value of \(\w _i\) means heavier traffic ahead. The kernel \(\{\k _i\}\) is a microscopic analogue of the look-ahead kernel \(K\). For instance, for the SK model \(\eqref {eq:K-SK}\), \begin {equation} \label{eq:kiSK}\tag{12} \k _i=\begin {cases}1, &i=1,\cdots ,\L , \\ 0, &\text {otherwise,}\end {cases} \end {equation} where \(\L =a\NL \) is the microscopic look-ahead distance. In general we shall assume that the kernel is bounded, namely there exists a constant \(\overline {K}\) such that \[0\leq \k _i\leq \overline {K}.\] Under the assumption of a looped highway, the kernel \(\{\k _i\}\) is \(\NL \)-periodic. By convention we set \(\k _0=0\).

2.2. Connection to macroscopic models. In this section, we formally derive the nonlocal traffic models \(\eqref {eq:main}\) from the CA models. The derivation is a generalization of  [46]. Let us first obtain a semi-discrete mesoscopic model. In a time step \(\Delta \tt \), the probability of the configuration change \begin {equation} \label{eq:prob}\tag{13} \mathbb {P}\big (\{\sigma _i=1, \sigma _{i+1}=\cdots =\sigma _{i+\Jump }=0\} \rightarrow \{\sigma _i=\cdots =\sigma _{i+\Jump -1}=0, \sigma _{i+\Jump }=1\}\big ) =(\Delta \tt )~ r_i, \end {equation} where the rate \(r_i\) is given in \(\eqref {eq:rate}\).

Define \(\sigma (\tt )=\{\sigma _i(\tt )\}_{i=1}^{\NL }\) be a continuous-in-time stochastic process with a generator \begin {equation} \label{eq:generator}\tag{14} (A\psi )(\tt )=\lim _{\Delta \tt \to 0}\frac {\E \big [\psi \big (\sigma (\tt +\Delta \tt )\big )\big ] -\psi \big (\sigma (\tt )\big )}{\Delta \tt }, \end {equation} for any test function \(\psi :{\color {red}\Sigma }\to \mathbb {R}\), where \(\tt \) is the time variable. All possible configuration changes from \(\sigma (\tt )\) to \(\sigma (\tt +\Delta \tt )\) obey the transition rule \(\eqref {eq:prob}\). We have \begin {equation} \label{eq:Egen}\tag{15} \frac {d}{d\tt }\E \psi =\E [A\psi ]. \end {equation} In particular, taking \(\psi (\sigma )=\sigma _i\), we can calculate \(\eqref {eq:generator}\) explicitly as follows \begin {equation} \label{eq:Asigma}\tag{16} A\sigma _i(\tt )=-r_i(\tt )\sigma _i(\tt )\prod _{j=1}^\Jump \big (1-\sigma _{i+j}(\tt )\big ) +r_{i-\Jump }(\tt )\sigma _{i-J}(\tt )\prod _{j=1}^\Jump \big (1-\sigma _{i-\Jump +j}(\tt )\big ) =: F_{i-\Jump }(\tt )-F_i(\tt ), \end {equation} where \(F_i\) is defined as \[F_i(\tt )=r_i(\tt )\sigma _i(\tt )\prod _{j=1}^\Jump \big (1-\sigma _{i+j}(\tt )\big ).\]

Let \(\rho _i(\tt )=\E [\sigma _i(\tt )]=\mathbb {P}\big (\sigma _i(\tt )=1\big )\). Then, from \(\eqref {eq:Egen}\) and \(\eqref {eq:Asigma}\), the dynamics of \(\{\rho _i\}_{i=1}^{\NL }\) reads \begin {equation} \label{eq:semirho}\tag{17} \frac {d}{d\tt }\rho _i(\tt )=\E [A\sigma _i(\tt )]=\E [F_{i-J}(\tt )]-\E [F_i(\tt )]. \end {equation} Note that the right hand side of the equation is not yet a closed form of \(\{\rho _i(\tt )\}_{i=1}^{\NL }\). We shall approximate the term \(\E [F_i(\tt )]\) and make a closure to the system.

We impose the following propagation of chaos hypothesis, \begin {equation} \label{eq:chaos}\tag{18} \E [\sigma _i(\tt )\sigma _j(\tt )]=\E [\sigma _i(\tt )]~\E [\sigma _j(\tt )],\quad \forall ~i\neq j,~~t\geq 0. \end {equation} The hypothesis is widely used in kinetic theory. It assumes that \(\{\sigma _i(\tt )\}_{i=1}^{\NL }\) are independent to each other. Due to nonlocal interactions, \(\{\sigma _i(\tt )\}_{i=1}^{\NL }\) are all correlated. So the hypothesis \(\eqref {eq:chaos}\) is not true for a system with fixed \(\NL \) cells. However, as the number of cells \(\NL \) tends to infinity, the system can become chaotic, and condition \(\eqref {eq:chaos}\) can be valid as \(\NL \to \infty \).

By formally assuming the chaotic condition \(\eqref {eq:chaos}\), we get \[\E [F_i(\tt )]= \rho _i(\tt )\prod _{j=1}^J\big (1-\rho _{i+j}(\tt )\big )~ \E \big [~r_i(\tt )~|~\sigma _i(\tt )=1,\sigma _{i+1}(\tt )=\cdots =\sigma _{i+\Jump }(\tt )=0~\big ]. \] For the rest of the section, we drop the \(\tt \)-dependence for simplicity.

To estimate the rate \(r_i\) in \(\eqref {eq:rate}\), we perform a formal Taylor expansion of \(g\) on \(\w _i\) around its expectation and get \begin {equation} \label{eq:Eri}\tag{19} \E [r_i]=\frac {\omega _0}{\Jump }g\big (\E (\w _i)\big )+\frac {\omega _0}{\Jump }\sum _{n=1}^\infty \frac {g^{(n)}\big (\E (\w _i)\big )}{n!}\,\E \left [\big (\w _i-\E [\w _i]\big )^n\right ]. \end {equation} Note that from \(\eqref {eq:weight}\), \(\E [\w _i]\) can be expressed in terms of \(\{\rho _i\}_{i=1}^{\NL }\). \[\E [\w _i]=\frac {1}{\NL }\sum _{j=1}^\NL \k _{j-i}\rho _j. \]We claim that all terms in the series on the right hand side of \(\eqref {eq:Eri}\) vanish as \(\NL \to \infty \). For \(n=1\), it is clear that \(\E \big [\w _i-\E [\w _i]\big ]=0\). For \(n=2\), we compute \begin {align*} &\E \left [\big (\w _i-\E [\w _i]\big )^2\right ]=\frac {1}{\NL ^2}\E \left [\left (\sum _{j=1}^{\NL }\k _{j-i}(\sigma _j-\rho _j)\right )^2\right ]\\& =\frac {1}{\NL ^2}\E \left [\sum _{j=1}^{\NL }\k _{j-i}^2(\sigma _j-\rho _j)^2\right ]+ \frac {2}{\NL ^2}\E \left [\sum _{j=1}^{\NL }\sum _{\ell =1}^{\NL }\k _{j-i}\k _{\ell -i}(\sigma _j-\rho _j)(\sigma _\ell -\rho _\ell )\right ]. \end {align*}

By condition \(\eqref {eq:chaos}\), the cross terms \[\E [(\sigma _j-\rho _j)(\sigma _l-\rho _l)]=\E [\sigma _j-\rho _j]\E [\sigma _l-\rho _l]=0.\] For the remaining term, since \(|\sigma _j-\rho _j|\leq 1\), we have \(\E \big [(\sigma _j-\rho _j)^2\big ]\leq 1\). As \(\k _i\) are bounded, we obtain \[\E \left [\big (\w _i-\E [\w _i]\big )^2\right ]=\frac {1}{\NL ^2}\sum _{j=1}^{\NL }\k _{j-i}^2\E \left [(\sigma _j-\rho _j)^2\right ]\leq \frac {\overline {K}^2}{\NL }\xrightarrow {~\NL \to \infty ~}0.\] Similarly, higher moments vanishes when \(\NL \to \infty \).

Plugging back into \(\eqref {eq:Eri}\), we conclude with \[\E [r_i]=\frac {\omega _0}{\Jump }~g\left (\frac {1}{\NL }\sum _{j=1}^{\NL }\k _{j-i}\rho _j\right )+o(\NL ).\] The conditional expected rate can be represented similarly as \[\E \big [r_i~|~\sigma _i=1, \sigma _{i+1}=\cdots =\sigma _{i+J}=0\big ]=\frac {\omega _0}{\Jump }~g\left (\frac {1}{\NL }\sum _{j\neq i,\cdots ,i+\Jump }\k _{j-i}\rho _j\right )+o(\NL ).\] Hence, \(\E [F_i]\) can be approximated in terms of \(\{\rho _i(\tt )\}_{i=1}^\NL \) as \[\E [F_i]=\frac {\omega _0}{\Jump }\cdot \rho _i\prod _{j=1}^J\big (1-\rho _{i+j}\big ) g\left (\frac {1}{\NL }\sum _{j\neq i,\cdots ,i+\Jump }\k _{j-i}\rho _j\right )+o(\NL ). \]

Now, we are ready to derive the coarse-grained PDE model. Let us rescale the lattice \(\mathcal {L}\) into a fixed interval \(\mathbb {T}=[0,1]\), where each cell has length \(h=1/\NL \). The \(i\)-th cell is rescaled to the interval \([(i-1)h, ih]\).

Define the macroscopic density \(\rho :~\mathbb {T}\times \mathbb {R}_+\to \mathbb {R}\), where \[\rho (x,\t ) = \rho _i(\tt ),\quad \text {with }~x=ih,~~\t = \tt h.\] Letting \(h\to 0\), we formally obtain the macroscopic flux \[ F(x,\t ):=J\cdot \lim _{h\to 0}\E [F_i(\tt )]= \omega _0\rho (x,\t )\big (1-\rho (x,\t )\big )^\Jump g\left (\int _{\mathbb {T}} K(y-x)\rho (y,\t )\,dy\right ). \] The dynamics of \(\rho \) in \(\eqref {eq:semirho}\) becomes the following scalar conservation law: \begin {align*} \partial _\t \rho (x,\t )&=\frac {1}{h}\frac {d}{d\tt }\rho _i(\tt ) =\frac {\E [F_{i-\Jump }(\tt )]-\E [F_i(\tt )]}{h}\\ &\xrightarrow {~h\to 0~}\lim _{h\to 0}\frac {F(x-\Jump h,\t )-F(x,\t )}{\Jump h} =-\partial _x(F(x,\t )). \end {align*}

We end up with the following coarse-grained PDE model: \begin {equation} \label{eq:PDE}\tag{20} \partial _t\rho +\partial _x\left (\omega _0\rho (1-\rho )^\Jump g\left (\int _{\mathbb {T}}K(y-x)\rho (y,t)dy\right )\right )=0. \end {equation} It is the periodic version of the macroscopic model \(\eqref {eq:main}\) with \(u_{\max }=\omega _0\).

3. The Accelerated Kinetic Monte Carlo Method

In this section, we focus on the numerical implementation of the CA models in Section 2. We use the kinetic Monte Carlo (KMC) method  [48] to simulate the spin exchange dynamics. Compared with the Metropolis Monte Carlo (MMC) method  [47], the KMC method has a major advantage: rejection-free. In each step, the transition rates for all possible changes from the current configuration are calculated and then a new configuration is chosen with a probability proportional to the rate of the corresponding transition. The other feature of the KMC method is its capability of providing a more accurate description of the real-time evolution of a traffic system in terms of these transition rates since the KMC method is more suitable for simulating the non-equilibrium system.

3.1. The KMC algorithm. Let us describe the KMC method that we use for the CA models with nonlocal look-ahead interactions. We start with some notations. Let us denote \((i_j)_{j=1}^{\Nc }\) the ordered locations of the cells that are occupied by cars. Here we recall \(\Nc \) is the number of cars. Note that all events happen at these occupied cells. According to \(\eqref {eq:jump}\), the event \(k\) is that the \(k\)-th car located at the cell \(i_k\) moves \(\Jump \) cells to the right, with the rate \(r_{i_k}\). The KMC algorithm is built on the assumption that the model features \(\Nc \) independent Poisson processes (corresponding to \(\Nc \) moving cars on the lattice) with transition rates \(r_{i_j}\) in \(\eqref {eq:rate}\) that sum up to give the total rate \(R=\sum ^{\Nc }_{j=1}r_{i_j}\). In each round of the KMC algorithm, we need to do the following.

The KMC algorithm:

Step 1: Generate a random number \(\xi _1\) from the uniform distribution in \([0, 1]\). Decide which event will take place by using a binary search to choose the event \(k\) such that \begin {equation} \label{eq.bk1}\tag{21} \sum ^{k-1}_{j=1} \frac {r_{i_j}}{R} < \xi _1 \leq \sum ^k_{j=1} \frac {r_{i_j}}{R},\quad R=\sum _{j=1}^\Nc r_{i_j}. \end {equation}

Step 2: Check if there are enough vacant cells ahead of the \(k\)-th car of the selected event. If “Yes”, perform Step 3. If “No”, skip Step 3 and advance directly to Step 4.

Step 3: Perform the selected event (the \(k\)-th car moves \(\Jump \) cells to the right) leading to a new configuration. Update the location of the \(k\)-th car \(i_k^{\text {new}}=i_k^{\text {old}}+\Jump \).

Step 4: Use \(R\) and another random number \(\xi _2 \in (0, 1)\) to decide the time it takes for that event to occur (the transition time), i.e., the time step \(\Delta t=-\ln (\xi _2)/R\), from the exponential distribution described by the rate \(R\).

Step 5: Update any transition rates \(r_{i_j}\), the total rate \(R\), and any data structure that may have changed caused by the event that may have changed due to this move. \(\Box \)

Remark 3.1. A major advantage of the KMC method is the use of the non-uniform time step \(\Delta t\). When the system evolves from the initial state to the equilibrium state, the total rate \(R\) decreases. From Step 4, we can see that the average of the time step \(\Delta t\) will increase with the decreasing \(R\) so that the KMC simulation will advance faster as the system approaches the equilibrium state. This leads to a computational advantage over the MMC, which usually sets the time step \(\Delta t\) to be a small constant.

3.2. List-based KMC methods. In simulations with a finite number of distinct processes, it is more efficient to consider the groups of events according to their rates  [50, 51, 52]. This is known as the list-based methods. In the context of traffic flow models, the list-based KMC algorithm has been successfully implemented in  [45, 46] for the SK model where the kernel takes a special form \(\eqref {eq:kiSK}\) with a constant value in the look-ahead distance \(\L \). In this case, the rate \(r_i\) in \(\eqref {eq:rate}\) can only take \((\L +1)\) different values, since \(w_i\) in \(\eqref {eq:weight}\) can only be \(0, \frac {1}{\NL },\ldots , \frac {\L }{\NL }\). To speed up the event search process in Step 1 of the KMC algorithm, \((\L +1)\) lists are created. Each list is a collection of all events with the same rate. To find an event, we first perform a binary search in the level of lists, namely searching for list \(l\) such that \begin {equation} \label{eq.bk2}\tag{22} \sum ^{l-1}_{j=1} \frac {n_jr_j}{R} < \xi _1 \leq \sum ^l_{j=1} \frac {n_jr_j}{R},\quad R=\sum _{j=1}^{\L +1} n_jr_j. \end {equation} Here, we denote \((r_j)_{j=1}^{\L +1}\) the different rates, and \(n_j\) the number of events in the list with rate \(r_j\), which is called the multiplicity. Once a list is chosen, we then randomly pick an event in the list to proceed. The binary search in \(\eqref {eq.bk2}\) would cost \(\mathcal {O}(\log _2\L )\) operations, smaller than \(\mathcal {O}(\log _2\Nc )\) that is needed in \(\eqref {eq.bk1}\) when \(\L \) is much smaller than \(\Nc \).

However, the list-based KMC method does not have an advantage when the rates take many different values. For instance, if the kernel is a discrete version of \(\eqref {eq:K-CKP}\), namely \begin {equation} \label{eq:kiCKP}\tag{23} \k _i=\begin {cases}2\big (1-\frac {i-1/2}{\L }\big ), &i=1,\cdots ,\L , \\ 0, &\text {otherwise},\end {cases} \end {equation} the rate can take \(\mathcal {O}(\L ^2)\) different values. For general kernel \((\k _i)\), the rates can take as many as \(\NL ^2\) different values. Since there are a total of \(\Nc \) events, many lists would have only one or no event. This makes the list-based method inefficient. Therefore, in the present work, we do not use the list-based KMC method.

3.3. An accelerated KMC method. Another major issue is the computational cost of updating the rates \(r_{i_j}\) in Step 3 of the KMC algorithm. For the SK model with a constant kernel \(\eqref {eq:kiSK}\) in a look-ahead distance \(\L \), the configuration change \(\eqref {eq:jump}\) at cell \(i_k\) only alter the values of \(\sigma _{i_k}\) and \(\sigma _{i_k+\Jump }\). It is easy to check that the change may only affect the rates of at most \(\Jump \) cars in certain cells from the location \(i_k-\L \) to \(i_k-\L +\Jump -1\) (if there are cars there). Together with the \(k\)-th car, we only need to update at most \(\Jump +1\) rates. Calculating the new rates from \(\eqref {eq:rate}\)-\(\eqref {eq:weight}\) costs \(\mathcal {O}(\L )\) operations. Since \(\Jump =\mathcal {O}(1)\), the total cost for Step 3 is \(\mathcal {O}(\L )\).

However, for a general kernel \((\k _i)\) with a look-ahead distance \(\L \), e.g. \(\eqref {eq:kiCKP}\), the configuration change \(\eqref {eq:jump}\) at cell \(i_k\) can affect the rates of all the cars behind the moving \(k\)-th car in the range of \(\L \), from the location \(i_k-\L \) to \(i_k-1\) (if there are cars there). Together with the \(k\)-th car, we need to update up to \(L+1\) rates. Computing these rates from \(\eqref {eq:rate}\)-\(\eqref {eq:weight}\) would cost up to a total of \(\mathcal {O}(\L ^2)\) operations. For a global kernel \((\k _i)\) when \(\L =\NL \), all rates \((r_{i_j})_{j=1}^{\Nc }\) can be affected, and the total computational cost can be \(\mathcal {O}(\Nc \NL )\).

To accelerate the KMC algorithm, we introduce a new method, aiming to reduce the cost of computing the rates of the \((\Nc -1)\) not-moving cars \((r_{i_j})_{j=1, j\neq k}^{\Nc }\) from \(\mathcal {O}(\Nc \NL )\) down to \(\mathcal {O}(\Nc )\). The main idea is to calculate the new weights \(w_{i_j}\) not from \(\eqref {eq:weight}\), but from the old weights in the previous step prior to the event. More precisely, let us denote \(\{\sigma _i^{\text {old}}\}_{i=1}^{\NL }\) and \(\{\sigma _i^{\text {new}}\}_{i=1}^{\NL }\) the configurations of the system before and after an event \(\eqref {eq:jump}\) located at cell \(i_k\), respectively. Clearly, we have \[\sigma _j^{\text {new}}=\sigma _j^{\text {old}},\quad \forall ~j\neq i_k, i_k+\Jump .\] The only differences are \[\sigma _{i_k}^{\text {old}}=1, \sigma _{i_k}^{\text {new}}=0,\quad \text {and}\quad \sigma _{i_k+\Jump }^{\text {old}}=0, \sigma _{i_k+\Jump }^{\text {new}}=1.\] We apply \(\eqref {eq:weight}\) and obtain the relation \begin {align} \w _{i_j}^{\text {new}}&=\frac {1}{\NL }\sum _{\ell =1}^{\NL }\k _{\ell -i_j}\sigma _\ell ^{\text {new}} =\frac {1}{\NL }\left (\sum _{\ell \neq i_k, i_k+\Jump }^{\NL }\k _{\ell -i_j}\sigma _\ell ^{\text {new}}+\k _{i_k+\Jump -i_j}\right )\label{eq:update}\tag{24}\\ &=\frac {1}{\NL }\left (\sum _{\ell \neq i_k, i_k +\Jump }^{\NL } \k _{\ell -i_j}\sigma _\ell ^{\text {old}}+ \k _{i_k-i_j}\right ) +\frac {\k _{i_k+\Jump -i_j}-\k _{i_k-i_j}}{\NL } =\w _{i_j}^{\text {old}}+\frac {\k _{i_k+\Jump -i_j}-\k _{i_k-i_j}}{\NL },\nonumber \end {align}

for any \(j\)-th car with \(j=1,\ldots ,\Nc \) and \(j\neq k\). The relation \(\eqref {eq:update}\) allows us to obtain \(\w _{i_j}^{\text {new}}\) from \(\w _{i_j}^{\text {old}}\) using \(\mathcal {O}(1)\) operations. Then we can compute the rates \((r_{i_j}^{\text {new}})_{j=1, j\neq k}^{\Nc }\) from \(\eqref {eq:rate}\) in \(\mathcal {O}(\Nc )\) operations. Note that the relation \(\eqref {eq:update}\) is not applicable to the \(k\)-th car, as its location changes during the event. We shall still update \(w_{i_k}\) from \(\eqref {eq:weight}\). Overall, the total updating cost in Step 3 is reduced to \(\mathcal {O}(\Nc +\L )\leq \mathcal {O}(\NL )\). It is a big improvement compared with \(\mathcal {O}(\Nc \NL )\).

We shall comment that at the beginning of a KMC simulation, we need to compute the weights \((\w _{i_j})_{j=1}^{\Nc }\) of all cars from \(\eqref {eq:weight}\) for initialization, and create a data segment to store these weights so that we can update them by using \(\eqref {eq:update}\) on the fly in the subsequent steps.

4. Numerical experiments

In this section, we investigate 1D nonlocal traffic flow models in various parameter regimes with the accelerated KMC method presented in the previous section.

Following  [14, 45, 46], we set the actual physical length of each cell to \(22\) feet (\(\approx 6.7\)m), which allows for the average car length plus safe distance. Therefore, \(1\) mile (\(=5280\) feet \(\approx 1609\)m) is equivalent to \(240\) cells. For a car which has average speed of \(60\) miles per hour (\(\approx 26.8\) m/s), an estimate of time to cross a cell is given by \[ \Delta \tt _{\rm cell}=\frac {22 \ {\rm feet}}{60 \ {\rm miles/h}} = \frac {1 \ {\rm cell} \times 3600 \ {\rm s}}{60 \times 240 \ {\rm cells}} = \frac {1}{4} {\rm s}. \] Therefore, in the KMC simulations we set the characteristic time \(\tau _0=0.25\)s, and then \(\omega _0=4\)s\(^{-1}\). We mention that other values of \(\tau _0\) may be chosen to adjust our model for considering different standards in other regions or countries.

One important group of statistical features that characterize the CA models is the fundamental diagrams. Define the average flow \(\Fbar \) to be the number of cars passing a fixed detector site per unit time  [53]. This quantity can be measured in a real traffic system. In our study, we run KMC simulations for different initial averaged car densities \(\rhob \). Each simulation is run for sufficient long time so the dynamics reaches a stable equilibrium: macroscopically speaking \(\rho (x,t)\equiv \rhob \). \(\Fbar \) is taken as a long-time average for each simulation, and is further averaged among several simulations with the same \(\rhob \). The function \[\Fbar = \Fbar (\rhob )\] is known as the density-flow fundamental diagram of the corresponding CA model. It is closely related to the flux \(f=f(\rho )\) for the coarse-grained PDE models, e.g. \(\eqref {eq:LWRflux}\) and \(\eqref {eq:fluxcc}\), when there is no nonlocal interaction. Another statistical quantity is the ensemble-averaged velocity \(\vbar \), representing the velocity averaged among all cars and in a long time period. One can generate density-velocity and flow-velocity diagrams in a similar way.

4.1. The KMC acceleration. We start with a demonstration of the computational efficiency of the accelerated KMC method, in comparison with the standard KMC method. Two examples are presented. In the first example, we consider a loop highway of \(\approx 2.09\) miles (\(\approx 3352\)m, \(\NL =500\) cells). Take an Arrhenius type interaction relation \(g(x)=e^{-3x}\), and a linearly decay kernel \(\eqref {eq:kiCKP}\) with a large look-ahead distance \(\L =\NL =500\) for a global interaction. The multiple move parameter is set to be \(\Jump =1\). We establish the fundamental diagrams of the density-flow, density-velocity and flow-velocity relationships using the standard KMC and accelerated KMC methods. In particular, we generate random initial distributions with the averaged car density \(\rhob \) increasing incrementally from \(\rhob =0.01\) to \(\rhob =0.99\). Fig. 1 shows the fundamental diagrams generated from the standard KMC method and the accelerated KMC method. The results of two methods in Figs. 1(a)(c)(e) agree with each other very well.

Figure Figure

Figure Figure

Figure Figure

Figure 1: Comparison results between the standard KMC and the accelerated KMC algorithms for two examples. In all KMC simulations, we take the highway distance of \(\approx 2.09\) miles (\(\approx 3352\) m, \(\NL =500\) cells), the look-ahead parameter of \(\L =500\), the multiple move parameter of \(\Jump =1\), and the final time of \(1\) h. (a)(b): Long-time averages of the density-flow relationship; (c)(d): Ensemble-averaged velocity of cars versus the density \(\bar {\rho }\); (e)(f): Long-time averages of the flow-velocity relationship. (left panels): Results of the example with an Arrhenius type interaction relation \(g(x)=e^{-3x}\) and a linearly decay kernel \(\eqref {eq:kiCKP}\). (right panels): Results of the example with the interaction relation \(\eqref {eq:g-1}\) and the kernel \(\eqref {eq:K-BS}\).

To compare the computational efficiencies of the two algorithms, we now vary the size of the lattice, taking \(\NL =100\) to \(800\) cells. Table 1(a) shows the CPU times of computing the simulations described above using both methods. Fig. 2(a) displays a power-law relationship between the CPU time and the highway distance \(\NL \) with a power-law exponent \(\approx 2.94\) for the standard KMC algorithm, and a much smaller exponent \(\approx 1.59\) for the accelerated KMC algorithm. One can clearly observe the acceleration from our new KMC algorithm.

Figure Figure

Figure 2: Comparison of the CPU times between the standard KMC and the accelerated KMC algorithms for two examples. (a) The example with an Arrhenius type interaction relation \(g(x)=e^{-3x}\) and a linearly decay kernel \(\eqref {eq:kiCKP}\). A log-log plot of the CPU times with the two KMC algorithms for different highway distance \(\NL =100\) to \(800\) cells; the power-law lines with exponent \(\approx 2.94\) (red) and exponent \(\approx 1.59\) (blue) provided for comparison. (b) The example with the interaction relation \(\eqref {eq:g-1}\) and the kernel \(\eqref {eq:K-BS}\) for different \(\NL =100\) to \(600\) cells; the power-law lines have the exponents \(\approx 2.93\) (red) and \(\approx 1.60\) (blue), respectively.

(a) \(\NL \) (cells) \(100\) \(200\) \(300\) \(400\) \(500\) \(600\) \(700\) \(800\)
Standard KMC93 s580 s1889 s4270 s8262 s14302 s22728 s34353 s
Accelerated KMC12 s 44 s 83 s 124 s 181 s 249 s 318 s 415 s
(b) \(\NL \) (cells) \(100\) \(200\) \(300\) \(400\) \(500\) \(600\)
Standard KMC475 s3625 s12051 s28063 s55086 s89409 s
Accelerated KMC 47 s 146 s 302 s 479 s 658 s 959 s
Table 1: Comparison of the CPU times between the standard KMC and the accelerated KMC algorithms, which are also displayed by a log-log plot in Fig. 2. (a) The example with an Arrhenius type interaction relation \(g(x)=e^{-3x}\) and a linearly decay kernel \(\eqref {eq:kiCKP}\) for \(\NL =100\) to \(800\) cells. (b) The example with the interaction relation \(\eqref {eq:g-1}\) and the kernel \(\eqref {eq:K-BS}\) for \(\NL =100\) to \(600\) cells.

In the second example, we consider the same loop highway with a different type of global interactions introduced in  [23]. In particular, we take the function \(g\) in \(\eqref {eq:g-1}\), the kernel \(K=K^\lambda \) in \(\eqref {eq:K-BS}\) with \(\lambda =.1\), the multiple move parameter \(\Jump =1\). Figs. 1(b)(d)(f) show that the fundamental diagrams of this example generated from the standard KMC method and the accelerated KMC method agree with each other very well. As shown in Table 1(b) and Fig. 2(b), the comparison of the CPU times by using both methods demonstrates again the computational efficiency of the accelerated KMC method over the standard KMC method.

4.2. A family of models with global interactions. Now we apply the accelerated KMC method to a class of 1D nonlocal traffic flow models with global look-ahead interaction kernels. The coarse-grained PDE dynamics has the form \(\eqref {eq:PDE}\) with \begin {equation} \label{eq:g-1}\tag{25} g(x) = \begin {cases}1-x, & x\in [0,1], \\ 0, &\text {otherwise},\end {cases} \end {equation} and the kernel \begin {equation} \label{eq:K-BS}\tag{26} K^\Eo (x) = \begin {cases}\Eo e^{-\Eo x}, &x\geq 0, \\ 0, &x<0,\end {cases} \end {equation} which is parameterized by \(\Eo \). This family of PDE models was proposed and analytically studied in  [23].

For the CA model, we take the loop highway of \(\approx 4.17\) miles (\(\approx 6704\)m, \(\NL =1000\) cells). The discrete analogue of \(\eqref {eq:K-BS}\) in the periodic domain that we will use takes the form \begin {equation} \label{eq:kiBS}\tag{27} \k _i^\Eo = \frac {\NL (e^{\Eo /\NL }-1)}{1-e^{-\Eo }}\cdot e^{-\Eo (i/\NL )},\quad i=1,\ldots ,\NL . \end {equation}

Let us focus on the model under two extreme choices of \(\Eo \). First, when \(\Eo \) is close to 0, we get from \(\eqref {eq:kiBS}\) that \[\lim _{\Eo \to 0}\k _i^\Eo =1,\quad i=1,\ldots ,\NL .\] The kernel becomes uniform. Formally, the macroscopic flux becomes \[f(\rho )=\omega _0\rho (1-\rho )^\Jump g(\rhob ).\] Therefore, as the dynamics reaches the equilibrium state \(\rho (x)\equiv \rhob \), we should expect that the long-time averaged flux and the ensemble-average velocity satisfy \begin {equation} \label{eq:fluxavg0}\tag{28} \Fbar (\rhob )=\omega _0\rhob (1-\rhob )^{\Jump +1}, \qquad \vbar (\rhob )=\omega _0(1-\rhob )^{\Jump +1}. \end {equation} Second, when \(\Eo \) approaches \(+\infty \), we get from \(\eqref {eq:kiBS}\) that \[\lim _{\Eo \to \infty }\k _i^\Eo =\begin {cases}\NL ,& i=1,\\0,&\text {otherwise},\end {cases}\] Apply this to \(\eqref {eq:weight}\) and we have \[w_i^\Eo =\frac {1}{\NL }\sum _{j=1}^\NL \k _{j-i}\sigma _j=\sigma _{i+1}=0.\] The last equality holds for any event in \(\eqref {eq:jump}\). Therefore, there is no slowdown (\(g(0)=1\)), and hence the averaged flux and the averaged velocity satisfy \begin {equation} \label{eq:fluxavginf}\tag{29} \Fbar (\rhob )=\omega _0\rhob (1-\rhob )^{\Jump }, \qquad \vbar (\rhob )=\omega _0(1-\rhob )^{\Jump }. \end {equation} We would like to point out that for the macroscopic dynamics \(\eqref {eq:PDE}\) with \(\eqref {eq:K-BS}\), \(K^\Eo \) converges to a Dirac delta as \(\Eo \to \infty \), and the limiting PDE reads \[\partial _t\rho +\partial _x(\omega _0\rho (1-\rho )^\Jump g(\rho ))=0.\] The macroscopic flux of the limiting system does not match with \(\eqref {eq:fluxavginf}\). This reveals an interesting effect: the two limits \(\NL \to \infty \) and \(\Eo \to \infty \) do not commute.

We use the accelerated KMC method to simulate the dynamics with different choices of \(\lambda \). In Fig. 3, the fundamental diagrams are plotted for different choices of \(\Eo \): \begin {equation} \label{eq:lambda}\tag{30} \Eo =0.1,\,\,10,\,\,100,\,\,500,\,\,1000,\,\,10000, \end {equation} and for different multiple move parameters \(\Jump =1\) and \(\Jump =2\). All curves exhibit phase transitions between the free-flow phase and the jammed phase.

In Figs. 3(a) and (b), we plot the fundamental diagrams on the averaged fluxes \(\Fbar \) against the averaged density \(\bar \rho \) with different \(\Eo \) in \(\eqref {eq:lambda}\) and \(\Jump =1, 2\), respectively. For each \(\rhob \), we run 10 simulations with different random number seeds for a long time (1 hour) to get \(\Fbar \) and \(\vbar \). All curves share certain characteristics: a nearly linear increase of the flow at low averaged densities (which corresponds to the free-flow regime), a single maximum of the flow reached at a critical density \(\rhoc ^\Eo \), and a right-skewed asymmetry (namely \(\rhoc ^\Eo <1/2\)). We also observe that both the value of the critical density \(\rhoc ^\Eo \) and the maximum value of the flow \(\Fbar \) tend to decrease with decreasing \(\Eo \). In particular, for the cases of \(\Eo =0.1\) and \(10^4\), the fluxes of the KMC simulations agree with the limiting fluxes in \(\eqref {eq:fluxavg0}\) and \(\eqref {eq:fluxavginf}\), (shown as the dotted and dashed black curves, respectively).

In Fig. 3(a) for the case of \(\Jump =1\), the density-flow curves for the cases of \(\Eo =0.1\) and \(10^4\) take their maxima at the critical density around \(\rhoc =\frac 13\) and \(\frac 12\), respectively, which is consistent with the limiting cases \(\eqref {eq:fluxavg0}\) and \(\eqref {eq:fluxavginf}\) \begin {equation} \label{eq:rhocrit}\tag{31} \lim _{\Eo \to 0}\rho _c^\Eo =\frac {1}{\Jump +2},\qquad \lim _{\Eo \to \infty }\rho _c^\Eo =\frac {1}{\Jump +1}. \end {equation} The maximum flux for \(\Eo =0.1\) at \(\rhoc =\frac 13\) is about \(3600 \omega _0 \cdot \frac {4}{27} \approx 2133\) cars per hour (recall that \(\omega _0=4\)s\(^{-1}\)), and the maximum flux for \(\Eo =10^4\) at \(\rhoc =\frac 12\) is about \(3600 \omega _0 \cdot \frac {1}{4} = 3600\) cars per hour. Similarly, in Fig. 3(b) for the case of \(\Jump =2\), the density-flow curves for the cases of \(\Eo =0.1\) and \(10^4\) take their maxima \(3600 \omega _0 \cdot \frac {27}{256} \approx 1519\) and \(3600 \omega _0 \cdot \frac {4}{27} \approx 2133\) at the critical density \(\rhoc =\frac 14\) and \(\frac 13\), respectively.

Figs. 3(c) and (d) show the fundamental diagrams of the density-velocity relationship for \(\Jump =1\) and \(\Jump =2\), respectively. For the special case of \(\Jump =1\) and \(\Eo =10^4\) in Fig. 3(c), the ensemble-averaged velocity \(\vbar \) decreases linearly as the averaged density \(\bar \rho \) increases, which is consistent with the classical Lighthill-Whitham-Richards (LWR) model  [12, 13]. All other cases in both Figs. 3(c) and (d) show that in the free-flow regime the ensemble-averaged velocity \(\vbar \) decreases approximately linearly from the full speed of \(4\) cells per second (\(\approx 26.8\) m/s or \(60\) miles/h) as \(\bar {\rho }\) increases and the chance of interaction between cars gets higher. As \(\Eo \) decreases, when \(\bar {\rho }\) is larger than the critical point \(\rhoc \), the average velocity drops down to zero and the density-velocity curve is convex. This linear relationship follows the Greenshields model  [54] and the convex relationship belongs to the Underwood model  [55]. For the cases of \(\Eo =0.1\) and \(10^4\) in both Figs. 3(c) and (d), the ensemble-averaged velocity of the KMC simulations agrees with limits \(\eqref {eq:fluxavg0}\) and \(\eqref {eq:fluxavginf}\), (shown as the dotted and dashed black curves, respectively).

Figure Figure

Figure Figure

Figure Figure

Figure 3: Comparison results of the traffic flow on the one-lane highway with six different values of the interaction strength \(\Eo \). In all KMC simulations, we take the highway distance of \(\approx 4.17\) miles (\(\approx 6704\)m, \(\NL =1000\) cells), and the final time of \(1\) h. (a)(b): Long-time averages of the density-flow relationship; (c)(d): Ensemble-averaged velocity of cars versus the density \(\bar {\rho }\); (e)(f): Long-time averages of the flow-velocity relationship. Note that for \(\Eo =0.1\) and \(10^4\), the fluxes of the KMC simulations in (a) and (b) agree with the macroscopic averaged fluxes in \(\eqref {eq:fluxavg0}\) and \(\eqref {eq:fluxavginf}\) (shown as the dotted and dashed black curves, respectively). (left panels): Results of \(\Jump =1\). (right panels): Results of \(\Jump =2\). The slowdown interaction function: \(g(x) =1-x\) in \(\eqref {eq:g-1}\).

Figure Figure

Figure Figure

Figure Figure

Figure 4: Comparison results of the traffic flow on the one-lane highway with six different values of the interaction strength \(\Eo \). (a)(b): Long-time averages of the density-flow relationship; (c)(d): Ensemble-averaged velocity of cars versus the density \(\bar {\rho }\); (e)(f): Long-time averages of the flow-velocity relationship. Note that for \(\Eo =0.1\) and \(10^4\), the fluxes of the KMC simulations in (a) and (b) agree with the macroscopic averaged fluxes in \(\eqref {eq:genavg0}\) and \(\eqref {eq:fluxavginf}\) (shown as the dotted and dashed black curves, respectively). (left panels): Results of \(\Jump =1\). (right panels): Results of \(\Jump =2\). All parameters are the same as in Fig. 3 except that the slowdown interaction function: \(g(x) =(1-x)^2\) in \(\eqref {eq:g-2}\).

Figs. 3(e) and (f) show the fundamental diagrams of the flow-velocity relationship for \(\Jump =1\) and \(\Jump =2\), respectively, which plot the ensemble-averaged velocity \(\vbar \) versus the averaged flow \(\Fbar \). In Fig. 3(e) of \(\Jump =1\), for the case of \(\Eo =10^4\) (shown as cyan squares), the flow \(\Fbar \) reaches its maximum \(\approx 3600\) cars per hour when the ensemble-averaged velocity \(\vbar \) is at a critical value \(\vbar _{\rm crit} \approx 2.0\) cells per second (\(\approx 13.4\) m/s or \(30\) miles/h). As \(\Eo \) decreases to \(0.1\), the maximum value of the flow decreases a lot to \(\approx 2133\) cars per hour and the critical value \(\vbar _{\rm crit}\) decreases a bit and becomes slightly lower than \(2\) cells per second. For the case of \(\Jump =2\) in Fig. 3(f), when \(\Eo \) decreases, the maximum flow \(\Fbar \) decreases from \(\approx 2133\) cars per hour for the case of \(\Eo =10^4\) down to \(\approx 1519\) cars per hour for the case of \(\Eo =0.1\). The critical value \(\vbar _{\rm crit}\) where the flow \(\Fbar \) reaches its maximum do not change too much. The results compare favorably with observed data in  [56].

4.3. General slowdown relations. In the following, we perform numerical experiments on a family of CA models with the same kernel \(\eqref {eq:kiBS}\) but a different slowdown relation \begin {equation} \label{eq:g-2}\tag{32} g(x) = \begin {cases}(1-x)^2, & x\in [0,1], \\ 0, &\text {otherwise}.\end {cases} \end {equation} We apply the accelerated KMC method and generate fundamental diagrams of the dynamics with \(\Eo \) in \(\eqref {eq:lambda}\) and \(\Jump =1, 2\). Let us summarize the expected behaviors of the two extreme cases. When \(\Eo \to 0\), we have \begin {equation} \label{eq:genavg0}\tag{33} \Fbar (\rhob )=\omega _0\rhob (1-\rhob )^{\Jump +2}, \qquad \vbar (\rhob )=\omega _0(1-\rhob )^{\Jump +2}, \qquad \lim _{\Eo \to 0}\rhoc ^\Eo =\frac {1}{\Jump +3}. \end {equation} When \(\Eo \to \infty \), \(\Fbar \) and \(\vbar \) should behave the same as in \(\eqref {eq:fluxavginf}\).

In Fig. 4, we observe the essentially same phenomena about the fundamental diagrams as shown in Fig. 3. In particular, the averaged results for the case of \(\Eo =10^4\) (shown as cyan squares) in all panels of Fig. 4 are statistically equal to the ones shown in Fig. 3. But for \(\Eo =0.1\) (shown as green “\(\triangledown \)” signs), the density-flow curves in Fig. 4(a)(b) for the cases of \(\Jump =1\) and \(\Jump =2\) take their maxima at the critical density \(\rhoc =\frac 14\) and \(\frac 15\), respectively, which is consistent with \(\eqref {eq:genavg0}\). Moreover, for all cases of \(\Eo < 10^4\), the density-flow curves shown in Fig. 4(a)(b) and the density-velocity curves in Fig. 4(c)(d) are below the corresponding curves shown in Fig. 3(a)-(d), respectively. Meanwhile, the flow-velocity curves in Fig. 4(e)(f) are left of the corresponding ones shown in Fig. 3(e)(f). This is because the function \(g(x)=(1-x)^2\) introduces a stronger slow-down effect than \(g(x)=1-x\) does such that for the same value of \(\rhob \), both the averaged flux and the ensemble-averaged velocity are reduced.

4.4. Different multiple move parameters. Finally, we show the effects of the multiple move parameter \(\Jump \) on the flows in more detail in Fig. 5. We first take the slowdown relation \(g(x)=1-x\) in \(\eqref {eq:g-1}\) and compare the results of \(\Eo =10^4\) and \(\Eo =0.1\), respectively.

Figure Figure

Figure Figure

Figure Figure

Figure 5: Comparison results of the traffic flow on the one-lane highway with five different values of the multiple move parameter \(\Jump \). (a)(b): Long-time averages of the density-flow relationship; (c)(d): Ensemble-averaged velocity of cars versus the density \(\bar {\rho }\); (e)(f): Long-time averages of the flow-velocity relationship. (left panels): Results of \(\Eo =10^4\). (right panels): Results of \(\Eo =0.1\). Note that for each value of \(\Jump =1,2,\ldots , 5\), the fluxes of the KMC simulations in (a) and (b) agree with the macroscopic averaged fluxes in \(\eqref {eq:fluxavginf}\) and \(\eqref {eq:fluxavg0}\) (shown as the dashed and dotted black curves, respectively). The slowdown interaction function: \(g(x) =1-x\) in \(\eqref {eq:g-1}\).

Figure Figure

Figure Figure

Figure Figure

Figure 6: Comparison results of the traffic flow on the one-lane highway with five different values of the multiple move parameter \(\Jump \). (a)(b): Long-time averages of the density-flow relationship; (c)(d): Ensemble-averaged velocity of cars versus the density \(\bar {\rho }\); (e)(f): Long-time averages of the flow-velocity relationship. (left panels): Results of \(\Eo =10^4\). (right panels): Results of \(\Eo =0.1\). Note that for each value of \(\Jump =1,2,\ldots , 5\), the fluxes of the KMC simulations in (a) and (b) agree with the macroscopic averaged fluxes in \(\eqref {eq:fluxavginf}\) and \(\eqref {eq:genavg0}\) (shown as the dashed and dotted black curves, respectively). The slowdown interaction function: \(g(x) =(1-x)^2\) in \(\eqref {eq:g-2}\).

Fig. 5(a) shows the density-flow relationship for the case of \(\Eo =10^4\) with \(\Jump \) increasing from \(1\) to \(5\). The fluxes match beautifully with the macroscopic averaged fluxes \(\eqref {eq:fluxavginf}\) (shown as the dashed black curves). The case of \(\Jump =1\) corresponds to the LWR type model, where the curve is symmetric and concave. We note that the same KMC results have also been shown for \(\Eo =10^4\) and \(\Jump =1\) in Fig. 3(a). For \(\Jump \geq 2\), the curves become neither convex nor concave, and have a right-skewed asymmetry. Moreover, for a fixed \(\bar {\rho }\), the magnitude of the flow \(\Fbar \) decreases with increasing \(\Jump \). The density-flow curves for \(\Jump =1\) to \(5\) take their maxima at the critical density \(\rhoc =\frac 12\) to \(\frac 16\), respectively, which is consistent with \(\rho _c^\Eo \to \frac {1}{\Jump +1}\) as \(\Eo \to \infty \) in \(\eqref {eq:rhocrit}\). For the case of \(\Eo =0.1\) shown in Fig. 5(b), the microscopic fluxes agree with the macroscopic averaged fluxes \(\eqref {eq:fluxavg0}\) very well (shown as the dotted black curves). The critical density takes \(\rhoc =\frac 13\) to \(\frac 17\) for \(\Jump =1\) to \(5\), respectively, as \(\rho _c^\Eo \to \frac {1}{\Jump +2}\) as \(\Eo \to 0\) in \(\eqref {eq:rhocrit}\). Moreover, the averaged results of \(\Eo =10^4\) for the cases \(\Jump =2\) to \(5\) in the left panels of Fig. 5 are statistically equal to the ones of \(\Eo =0.1\) for the cases \(\Jump =1\) to \(4\) shown in the right panels of Fig. 5.

The fundamental diagrams of the density-velocity relationship in Figs. 5(c) and (d) show that at the same \(\bar {\rho }\), the ensemble-averaged velocity \(\vbar \) decreases as \(\Jump \) increases. For the cases of \(\Eo =10^4\) and \(0.1\), the ensemble-averaged velocity of the KMC simulations agrees with limits \(\eqref {eq:fluxavginf}\) and \(\eqref {eq:fluxavg0}\), (shown as the dashed and dotted black curves, respectively).

Figs. 5(e) and (f) of the flow-velocity relationship show that for a fixed value of \(\vbar \), the magnitude of the flow \(\Fbar \) decreases with increasing \(\Jump \). In Fig. 5(e) of \(\Eo =10^4\), as \(\Jump \) increases, the maximum value of the flow decreases a lot from \(\approx 3600\) cars per hour down to \(\approx 965\) cars per hour, and the critical value \(\vbar _{\rm crit}\) decreases a bit and becomes slightly lower than \(2\) cells per second. For the case of \(\Eo =0.1\) in Fig. 5(f), the value of \(\vbar _{\rm crit}\) does not change too much as \(\Jump \) increases.

In Fig. 6, we show the three fundamental diagrams for the slowdown relation of \(g(x)=(1-x)^2\) in \(\eqref {eq:g-2}\) with \(\Eo =10^4\) and \(\Eo =0.1\), respectively. Here, we observe the essentially same phenomena about the fundamental diagrams as shown in Fig. 5. In particular, the averaged results for the case of \(\Eo =10^4\) in the left panels of Fig. 6 are statistically equal to the ones shown in the left panels of Fig. 5 as the long-time averaged flux and the averaged velocity still satisfy \(\eqref {eq:fluxavginf}\). But for \(\Eo =0.1\), the density-flow curves in Fig. 6(b) for all cases of \(\Jump =1\) to \(5\) take their maxima at the critical density \(\rhoc =\frac 14\) and \(\frac 18\), respectively, which is consistent with \(\eqref {eq:genavg0}\). Moreover, for all cases of \(\Jump =1\) to \(5\), the density-flow curves shown in Fig. 6(b) and the density-velocity curves in Fig. 6(d) are consistent with the macroscopic averaged flux and velocity in \(\eqref {eq:genavg0}\), and these curves are below the corresponding curves shown in Fig. 5(b) and (d), respectively. Meanwhile, the flow-velocity curves in Fig. 6(f) are left of the corresponding ones shown in Fig. 5(f). As we pointed out in the previous section, this is because the function \(g(x)=(1-x)^2\) introduces a stronger slow-down effect than \(g(x)=(1-x)\) does.

5. Conclusion

We have presented a class of one-dimensional cellular automata (CA) models on traffic flows, featuring nonlocal look-ahead interactions. We extended the Arrhenius type look-ahead rule in our previous work  [46] to more general functions for characterizing the nonlocal slowdown effect. The look-ahead rule also features a novel idea of multiple moves, which plays a key role in recovering the right-skewed non-concave flux in the macroscopic dynamics. Through a semi-discrete mesoscopic stochastic process, we derived the coarse-grained macroscopic dynamics of the CA model.

To simulate the proposed CA models with general slowdown functions, we developed an accelerated KMC algorithm to improve computational efficiency. In the KMC method, the dynamics of cars is described in terms of the transition rates corresponding to possible configurational changes of the system, and then the corresponding time evolution of the system can be expressed in terms of these rates. For models with global look-ahead interactions, it is computationally costly to obtain all transition rates in each step due to its nonlocal nature. Therefore, in our accelerated KMC method, we take a new way to evaluate the transition rates by updating from the previous steps, which can reduce the the cost from \(\mathcal {O}(\NL ^2)\) to \(\mathcal {O}(\NL )\), where \(\NL \) denotes the number of cells in the lattice.

The numerical experiments verified the computational efficiency of the accelerated KMC algorithm over the standard KMC method. Our numerical results show that the fluxes of the KMC simulations agree with the coarse-grained macroscopic averaged fluxes under various parameter settings. We obtained fundamental diagrams that display several important observed traffic states.

As one of our main goals is to compare the two look-ahead rules, we propose our CA models in a closed system and take the periodic boundary conditions to keep the number of cars and the density constant in a single simulation. Therefore, we have not applied our models to simulate some more complex non-stationary features, such as traffic breakdowns at bottlenecks  [6]. It is possible to improve the models further in the following directions. We can include entrances and exits in the models by adding dynamical mechanisms such as adsorption/desorption. In reality, there are multi-lanes on highways and fast vehicles may change lanes to bypass slow ones. We also need to consider different types of vehicles, such as cars and trucks with unequal sizes and speeds. More complicated models addressing these aspects will be explored in the future.

The accelerated KMC algorithm proposed in this paper has the potential to be applicable in the simulations of stochastic dynamics with nonlocal interaction rules arising in diverse applications ranging from vehicular/pedestrian traffic flows to surface processes and catalysis  [57, 58, 59, 60] and computational cellular biology  [61, 62, 63].

Acknowledgements

We would like to thank the two anonymous referees for their suggestions for improvement. YS is partially supported by the NSF grants DMS-1913146, DMS-1954532 and DMS-2208467, a SC EPSCoR GEAR-CRP award (20-GC04), and the UofSC ASPIRE grants (2019-2021, 2022-2023). CT is partially supported by the NSF grants DMS-1853001 and DMS-2108264, and a UofSC ASPIRE grant (2020-2022).

References

[1]    K. Nagel, J. Esser and M. Rickert, Large-scale traffic simulations for transportation planning, in Annual Reviews of Computational Physics, edited by D. Stauffer, World Scientific, Singapore, 2000, 151–202.

[2]    D. Chowdhury, L. Santen and A. Schadschneider, Statistical physics of vehicular traffic and some related systems, Phys. Rep. 329 (2000) 199–329.

[3]    D. Helbing, Traffic and related self-driven many-particle systems, Rev. Mod. Phys. 73 (2001) 1067–1141.

[4]    T. Nagatani, The physics of traffic jams, Rep. Prog. Phys. 65 (2002) 1331–1386.

[5]    A. Schadschneider, Traffic flow: a statistical physics point of view, Physica A 313 (2002) 153–187.

[6]    B. S. Kerner, The Physics of Traffic, (Springer, Heidelberg, 2004).

[7]    S. Maerivoet and B. De Moor, Cellular automata models of road traffic, Phys. Rep. 419 (2005) 1–64.

[8]    R. Kühne and N. H. Gartner (Eds.), 75 Years of the Fundamental Diagram for Traffic Flow Theory: Greenshields Symposium, (Transportation Research Board E-Circular, 2011).

[9]    N. Bellomo and C. Dogbe, On the modeling of traffic and crowds: A survey of models, speculations, and perspectives, SIAM Rev. 53 (2011) 409–463.

[10]    A. Schadschneider, D. Chowdhury and K. Nishinari, Stochastic Transport in Complex Systems, (Elsevier, The Netherlands, 2011).

[11]    M. Treiber and A. Kesting, Traffic Flow Dynamics: Data, Models and Simulation, (Springer, Heidelberg, 2013).

[12]    M. Lighthill and G. Whitham, On kinematic waves II. A theory of traffic flow on long crowded roads, Proc. Roy. Soc. London, Ser. A 229 (1955) 317–345.

[13]    G. B. Whitham, Linear and Nonlinear Waves (Wiley-Interscience, New York, 1974).

[14]    A. Sopasakis and M. A. Katsoulakis, Stochastic modeling and simulation of traffic flow: Asymmetric single exclusion process with Arrhenius look-ahead dynamics, SIAM J. Appl. Math. 66 (2006) 921–944.

[15]    A. Chertock, A. Kurganov, A. Polizzi and I. Timofeyev, Pedestrian flow models with slowdown interactions, Math. Models Methods Appl. Sci. 24 (2014) 249–275.

[16]    A. Kurganov and A. Polizzi, Non-oscillatory central schemes for traffic flow models with Arrhenius look-ahead dynamics, Netw. Heterog. Media 4 (2009) 431–451.

[17]    Y. Lee and H. Liu, Thresholds for shock formation in traffic flow models with Arrhenius look-ahead dynamics, Discret. Contin. Dyn. Syst. Ser. A 35 (2015) 323–339.

[18]    Y. Lee, Wave breaking in a class of non-local conservation laws, J. Differ. Equ. 269 (2020) 8838–8854.

[19]    Y. Lee and C. Tan, A sharp critical threshold for a traffic flow model with look-ahead dynamics, Comm. Math. Sci. 20 (2022) 1151–1172.

[20]    L. A. Pipes, Car following models and the fundamental diagram of road traffic, Transportation Research 1 (1967) 21–29.

[21]    Y. Lee, Thresholds for shock formation in traffic flow models with nonlocal-concave-convex flux, J. Differ. Equ. 266 (2019) 580–599.

[22]    T. Hamori and C. Tan, Sharp critical thresholds for a class of nonlocal traffic flow models, Nonlinear Analysis: Real World Applications, 73:103899, 2023.

[23]    A. Bressan and W. Shen, On traffic flow with nonlocal flux: A relaxation representation, Arch. Rational Mech. Anal. 237 (2020) 1213–1236.

[24]    D. C. Gazis, R. Herman and R. W. Rothery, Nonlinear follow-the-leader models of traffic flow, Oper. Res. 9 (1961) 545–567.

[25]    M. Bando, K. Hasebe, A. Nakayama, A. Shibata and Y. Sugiyama, Dynamical model of traffic congestion and numerical simulation, Phys. Rev. E 51 (1995) 1035–1042.

[26]    H. Lenza, C. K. Wagner and R. Sollacher, Multi-anticipative car-following model, Eur. Phys. J. B 7 (1999) 331–335.

[27]    T. Nagatani, Stabilization and enhancement of traffic flow by the next-nearest-neighbor interaction, Phys. Rev. E 60 (1999) 6395–6401.

[28]    A. Nakayama, Y. Sugiyama and K. Hasebe, Effect of looking at the car that follows in an optimal velocity model of traffic flow, Phys. Rev. E 65 (2002) 016112.

[29]    R. E. Wilson, P. Berg, S. Hooper and G. Lunt, Many-neighbour interaction and non-locality in traffic models, Eur. Phys. J. B 39 (2004) 397–408.

[30]    S. Wolfram, Theory and Applications of Cellular Automata, (World Scientific, Singapore, 1986).

[31]    S. Wolfram, Cellular Automata and Complexity, (Addison-Wesley, Reading, MA, 1994).

[32]    S. Wolfram, A New Kind of Science, (Wolfram Media, Champaign, IL, 2002).

[33]    M. Cremer and J. Ludwig, A fast simulation model for traffic flow on the basis of boolean operations, Math. Comput. Simulation 28 (1986) 297–303.

[34]    K. Nagel and M. Schreckenberg, A cellular automaton model for freeway traffic, J. Phys. I France 2 (1992) 2221–2229.

[35]    O. Biham, A. A. Middleton and D. Levine, Self-organization and dynamical transition in traffic-flow models, Phys. Rev. A 46 (1992) R6124–6127.

[36]    K. Nagel and M. Paczuski, Emergent traffic jams, Phys. Rev. E 51 (1995) 2909–2918.

[37]    R. Barlovic, L. Santen, A. Schadschneider and M. Schreckenberg, Metastable states in cellular automata for traffic flow, Eur. J. Phys. B 5 (1998) 793–800.

[38]    W. Knospe, L. Santen, A. Schadschneider and M. Schreckenberg, Towards a realistic microscopic description of highway traffic, J. Phys. A 33 (2000) L477–L485.

[39]    W. Knospe, L. Santen, A. Schadschneider and M. Schreckenberg, Single-vehicle data of highway traffic: Microscopic description of traffic phases, Phys. Rev. E 65 (2002) 056133.

[40]    T. Li, Nonlinear dynamics of traffic jams, Physica D 207 (2005) 41–51.

[41]    P. Nelson, On driver anticipation, two-regime flow, fundamental diagrams, and kinematic-wave theory, Transp. Sci. 40 (2006) 165–178.

[42]    C. Hauck, Y. Sun and I. Timofeyev, On cellular automata models of traffic flow with look ahead potential, Stoch. Dynam. 14 (2014) 1350022.

[43]    N. Dundon and A. Sopasakis, Stochastic modeling and simulation of multi-lane traffic, Transp. Traffic Theory 17 (2007) 661–691.

[44]    T. Alperovich and A. Sopasakis, Stochastic description of traffic flow, J. Stat. Phys. 133 (2008) 1083–1105.

[45]    Y. Sun and I. Timofeyev, Kinetic Monte Carlo simulations of one-dimensional and two-dimensional traffic flows: Comparison of two look-ahead rules, Phys. Rev. E 89 (2014) 052810.

[46]    Y. Sun and C. Tan, On a class of new nonlocal traffic flow models with look-ahead rules, Physica D 413 (2020) 132663.

[47]    N. Metropolis, A. E. Rosenbluth, M. N. Rosenbluth, A. H. Teller and E. Teller, Equation of state calculations by fast computing machines, J. Chem. Phys. 21 (1953) 1087–1092.

[48]    A. B. Bortz, M. H. Kalos and J. L. Lebowitz, A new algorithm for Monte Carlo simulation of Ising spin systems, J. Comput. Phys. 17 (1975) 10–18.

[49]    T. D. Liggett, Interacting Particle Systems, (Springer, Berlin, 1985).

[50]    J. L. Blue, I. Beichl and F. Sullivan, Faster Monte Carlo simulations, Phys. Rev. E 51 (1995) R867.

[51]    T. P. Schulze, Kinetic Monte Carlo simulations with minimal searching, Phys. Rev. E 65 (2002) 036704.

[52]    Y. Sun, R. Caflisch and B. Engquist, A multiscale method for epitaxial growth, SIAM Multiscale Model. Simul. 9 (2011) 335–354.

[53]    A. D. May, Traffic Flow Fundamentals (Prentice-Hall, Englewood Cliffs, NJ, 1990).

[54]    B. D. Greenshields, A study of traffic capacity, Proc. Highw. Res. Board 14 (1935) 448–477.

[55]    R. T. Underwood, Speed, volume, and density relationships: Quality and theory of traffic flow, (Yale Bureau of Highway Traffic, 1961).

[56]    R. Wiedemann, in Beiträge zur Theorie des Straßenverkehrs, edited by H. Keller (Forschungsgesellschaft für Straßen- und Verkehrswesen, Köln, 1995).

[57]    M. A. Katsoulakis, A. J. Majda, and D. G. Vlachos, Coarse-grained stochastic processes and Monte Carlo simulations in lattice systems, J. Comput. Phys. 186 (2003) 250–278.

[58]    M. A. Katsoulakis, A. J. Majda, and A. Sopasakis, Multiscale couplings in prototype hybrid deterministic/stochastic systems: Part I, deterministic closures, Comm. Math. Sci. 2 (2004) 255–294.

[59]    M. A. Katsoulakis, A. J. Majda, and A. Sopasakis, Multiscale couplings in prototype hybrid deterministic/stochastic systems: Part II, stochastic closures, Comm. Math. Sci. 3 (2005) 453–478.

[60]    M. A. Katsoulakis, P. Plechac, and L. Rey-Bellet, Numerical and statistical methods for the coarse-graining of many-particle stochastic systems, J. Sci. Comput. 37 (2008) 43–71.

[61]    D. Holcman (Ed.), Stochastic Processes, Multiscale Modeling, and Numerical Methods for Computational Cellular Biology, (Springer-Verlag, Berlin, 2017).

[62]    A. Deutsch and S. Dormann, Cellular Automaton Modeling of Biological Pattern Formation (2nd Ed), (Birkhauser, Boston, 2018).

[63]    A. Deutsch, J. M. Nava-Sedeno, S. Syga, and H. Hatzikirou, BIO-LGCA: A cellular automaton modelling class for analysing collective cell migration, PLoS Comput. Biol. 17 (2021) e1009066.

Authors

Yi Sun
Department of Mathematics, University of South Carolina, 1523 Greene St., Columbia, SC 29208, USA
yisun@math.sc.edu
Changhui Tan
Department of Mathematics, University of South Carolina, 1523 Greene St., Columbia, SC 29208, USA
tan@math.sc.edu