This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

\AuthorHeaders

Khoshkhah, Pourmoradnasseri, Ben Yahia, and Hadachi

A Random Walk Approach for Simulation-Based Continuous Dynamic Traffic Assignment

Kaveh Khoshkhah
kaveh.khoshkhah@ut.ee
   ORDID: 0000-0003-4777-804X
ITS Lab, Institute of Computer Science
University of Tartu, Tartu, Estonia

Mozhgan Pourmoradnasseri, Corresponding Author
mozhgan@ut.ee
   ORCID: 0000-0002-2092-816X
ITS Lab, Institute of Computer Science
University of Tartu, Tartu, Estonia

Sadok Ben Yahia
sadok.ben@taltech.ee
   ORCID: 0000-0001-8939-8948
Data Science Group, Department of Software Science
Tallinn University of Technology, Tallinn, Estonia

Amnir Hadachi
hadachi@ut.ee
   ORCID: 0000-0001-9257-3858
ITS Lab, Institute of Computer Science
University of Tartu, Tartu, Estonia

1 Abstract

This paper presents a new simulation-based approach to address the stochastic Dynamic Traffic Assignment (DTA) problem, focusing on large congested networks and dynamic settings. The proposed methodology incorporates a random walk model inspired by the theoretical concept of the equivalent impedance method, specifically designed to overcome the limitations of traditional Multinomial Logit (MNL) models in handling overlapping routes and scaling issues. By iteratively contracting non-overlapping subnetworks into virtual links and computing equivalent virtual travel costs, the route choice decision-making process is shifted to intersections, enabling a more accurate representation of travelers’ choices as traffic conditions evolve and allowing more accurate performance under fine-grained temporal segmentation.

The approach leverages Directed Acyclic Graphs (DAGs) structure to efficiently find all routes between two nodes, thus obviating the need for route enumeration, which is intractable in general networks. While with the calculation approach of downstream node choice probabilities, all available routes in the network can be selected with non-zero probability.

To evaluate the effectiveness of the proposed method, experiments are conducted on two synthetic networks under congested demand scenarios using Simulation of Urban MObility (SUMO), an open-source microscopic traffic simulation software. The results demonstrate the method’s robustness, faster convergence, and realistic trip distribution compared to traditional route assignment methods, making it an ideal proposal for real-time or resource-intensive applications such as microscopic demand calibration.

Keywords: Microscopic dynamic traffic assignment, Random walk, Equivalent impedance method, Traffic simulation, SUMO.

2 Introduction

Traffic assignment is an extensively researched area in transportation research, yet various challenges remain unsolved in practice, particularly when dealing with large congested networks and dynamic settings [1, 2].

Dynamic traffic assignment (DTA) is essential for generating time-dependent traffic models by allocating demand to road networks. This step replicates the decision-making process of individual travelers, leading to a more accurate depiction of vehicle interactions within the system [3]. DTA is particularly important to model and predict the movement of vehicles through a transportation network as traffic conditions change over time. It is immensely useful for understanding the evolution of congestion patterns and evaluating the impact of various transportation management strategies.

The main approaches for the DTA problem in the literature include analytical methods [4, 5] and simulation-based methods [6, 7] for the network loading process. Both approaches are founded on Wardrop’s user equilibrium (UE) and system optimal (SO) principles. Under the principle of UE, no vehicle can reduce its travel cost by unilaterally changing to another route. This principle assumes that each vehicle aims to minimize its own travel cost by following a selfish routing strategy. In contrast, the principle of SO considers minimizing the average (or total) travel cost in networks. Under this principle, each vehicle selects a route that minimizes its travel cost and contributes to reducing the overall travel time of the entire network.

Simulation-based methods for traffic assignment aim to approximate UE or SO iteratively [8, 9, 10]. In practice, the number of iterations for converging to equilibrium conditions can be very high for congested networks. Thus, the traffic assignment method’s time complexity and convergence speed directly impact the overall running time of traffic simulations. In calibration methods for demand estimation using real-world measurements, executing multiple traffic assignments is necessary [11, 12]. Hence, minimizing the computational burden of the traffic assignment step and ensuring the method’s robustness significantly impact the results, especially in real-time applications [13].

For a given demand, the DTA problem consists of two main steps: finding the alternative route set between origin-destination (OD) pairs and implementing the route choice model for network loading.

It is important to note that enumerating all routes between a pair of nodes in a general network is known to be an intractable (NP-hard) problem. Consequently, the process of selecting the alternative route set involves computational challenges, and finding an exhaustive set of routes may not be well-defined in large networks. To address this, various methods for the selection of “reasonable” alternative routes have been proposed to obviate route enumeration [14, 15]. Some practical methods involve static selection, where the choice set is predetermined. For instance, external data sources like the Google Maps Directions API can provide a fixed number of plausible routes per OD pair and at different times of the day [16, 17]. Alternatively, a fixed number of time-dependent shortest paths between each OD pair can be chosen based on iterative DTA simulations [12].

Based on existing literature and research in the field, route choice models commonly rely on a predefined set of alternative routes. This route set is typically denoted as a subset 𝒞\mathcal{C} of the universal set of all routes 𝒰\mathcal{U} available in the transportation network. Regardless of the approach for selecting the alternative route set, it is essential to recognize that the probability of choosing a route rr is conditioned on the route set [18]:

P(r)=𝒞𝒰P(r|𝒞)P(𝒞).P(r)=\sum_{\mathcal{C}\subseteq\mathcal{U}}P(r|\mathcal{C})P(\mathcal{C}). (1)

The multinomial logit model (MNL) for route choice is a common method used to distribute trips stochastically among a given set of alternative routes 𝒞\mathcal{C} between the OD pair (o,d)(o,d) [19, 20, 21, 9]. This route choice model incorporates a dispersion parameter γ\gamma and route cost θa\theta_{a} for each route aa.

P(r|𝒞)=exp(γθr)a𝒞exp(γθa).P(r|\mathcal{C})=\frac{\exp(\gamma\theta_{r})}{\sum_{a\in\mathcal{C}}\exp(\gamma\theta_{a})}. (2)

Logit models, while possessing known limitations in addressing overlapping routes, have gained widespread practical appeal due to their straightforward closed-form expression for choice probabilities [22, 23].

This study presents a novel random walk approach for addressing the simulation-based stochastic DTA problem that aims to converge to user equilibrium (UE). The proposed route choice model draws inspiration from the theoretical concept of the equivalent impedance method, previously introduced to tackle the overlapping and scaling deficiencies of the MNL model [24, 25]. The method involves iteratively contracting non-overlapping subnetworks into virtual links and computing equivalent virtual travel costs for these subnetworks, effectively shifting the route choice decision-making process to intersections from the origins. In other words, at each time interval Δ\Delta, when a driver is at node ii and intends to travel to destination dd, the probability of selecting a downstream node jj, denoted as PijΔdP_{ij}^{\Delta d}, is calculated. Importantly, node ii can represent either the origin node or any internal node in the trip trajectory. This approach enables the execution of a truly dynamic and continuous traffic assignment, wherein the downstream choice probabilities are updated accordingly if the driver remains in the middle of the trip and advances to the next time interval Δ+1\Delta+1. In other words, the driver’s knowledge of the path is updated in our method if the trip is unfinished in a time interval.

To overcome the challenge of route enumeration, the study initially computes the probabilities PijΔdP_{ij}^{\Delta d} for an acyclic subnetwork derived from the original transportation network. Subsequently, the removed edges with sufficiently small choice probabilities are reintroduced into the model. Although the route enumeration problem is known to be intractable in general networks, Directed Acyclic Graphs (DAGs) present a different scenario. DAGs, which are directed networks devoid of directed cycles, enable the efficient identification of all paths between two nodes. The absence of cycles ensures the absence of infinite loops or redundant paths to consider. Moreover, a general directed network can be transformed into a DAG by selectively removing certain links to break cycles, a process known as the feedback arc set problem (FAS). While the FAS problem is NP-complete in the general case, it can be solved polynomially for planar networks, such as transportation networks [26, 27].

We would like to clarify that [18] introduced a random walk model as a method for route generation to estimate choice set bias and route sampling correction within the MNL model. In their approach, the model initiates from a fixed origin, and at each step, the next link is sampled based on its distance from the shortest path to the destination. It is essential to note that their use of static random walk probabilities is specifically intended for route generation and not route assignment.

In the context of DTA, the proposed random walk model assumes that individual vehicles make routing decisions at intersections. At each step of the algorithm, the driver probabilistically selects one of the downstream nodes based on the latest estimated travel costs in the induced subnetworks. As a result, the probability of choosing a route rr between origin oo and destination dd can be calculated as Π(i,j)rPijΔtd\Pi_{(i,j)\in r}P_{ij}^{\Delta^{t}d}, where Δt\Delta^{t} represents the corresponding time frame. This dynamic behavior enables a more realistic representation of travelers’ route choices in response to changing traffic conditions and evolving travel costs at different time intervals.

Furthermore, in conjunction with the route enumeration approach based on a DAG, the proposed model can generate all possible routes in the network with a non-zero probability, thereby addressing the limitations of existing dynamic models that often focus on only a small fraction of available routes.

The efficacy of the proposed methodology is evaluated on two synthetic networks under congested conditions. The source codes are made publicly available 111https://github.com/Khoshkhah/DTA and integrated into Simulation of Urban MObility (SUMO) [23], a commonly used open-source simulation tool. The results of experiments demonstrate that our method exhibits a more robust performance, faster convergence, and a more realistic trip distribution. Furthermore, our route assignment method can be executed in parallel, reducing the running time in calibration and real-time applications.

In the subsequent sections, we first describe the equivalent impedance method for calculating virtual travel costs. We then demonstrate how downstream choice probabilities are computed, initially starting from simple network structures and gradually expanding the concept to a general network. Subsequently, we present the results obtained from our implementations on two synthetic networks and conduct a comparative analysis with the performance of SUMO’s built-in methods. Finally, we conclude by outlining potential directions for future research.

3 Equivalent Impedance Method for Virtual travel cost Calculation

In this section, we explain a variation of the logit model for tackling the issue of overlapping routes and scaling in networks. Then, we use the concepts of virtual links and virtual travel cost in the proposed method.

Various modifications of the logit model are proposed in the literature to improve the route choice model more realistically. Inspired by the concept of equivalent impedance, an improved version of the logit model is proposed in [24, 25] to address the overlapping and scaling issues in the traditional approach, to only use the non-overlapping portions of the routes in the travelers’ decision making (check [24] for examples). If the non-overlapping part of paths between oo and dd falls only in the subnetwork between node ii and node jj, with the minimum travel cost πij\pi_{ij}, the probability of choosing route rijr_{ij} connecting ii and jj is equivalent to

Prij=exp(γθrij/πij)aRijexp(γθa/πij).P_{r_{ij}}=\frac{\exp(\gamma\theta_{r_{ij}}/\pi_{ij})}{\sum_{a\in R_{ij}}\exp(\gamma\theta_{a}/\pi_{ij})}. (3)

The primary enhancement of Equation 3 compared to the classical MNL model is its exclusion of the overlapping portions of routes in decision probability when selecting a route between origins oo and destinations dd. This probability calculation can be used differently for calculating the equivalent travel cost of the subnetwork consisting of the nonoverlapping routes connecting nodes ii and jj by introducing virtual link (i,j)\overset{\sim}{(i,j)} as an equivalence of the subnetwork. The virtual link is strategically constructed to ensure that the probability of drivers selecting the original subnetwork equals that of opting for the virtual link (i,j)\overset{\sim}{(i,j)}, assuming a route choice framework.

Additionally, the corresponding virtual travel cost θ(i,j)\theta_{\overset{\sim}{(i,j)}} is defined as the virtual travel cost of the original subnetwork.

Therefore, if nn parallel paths connect ii and jj, by replacing P(i,j)=1P_{\overset{\sim}{(i,j)}}=1, in equation 3, the virtual travel cost θ(i,j)\theta_{\overset{\sim}{(i,j)}} will be calculated according to

θ(i,j)=πijγln[k=1nexp(γθkπij)].\theta_{\overset{\sim}{(i,j)}}=\frac{\pi_{ij}}{\gamma}\ln\left[\sum_{k=1}^{n}\exp\left(\gamma\frac{\theta_{k}}{\pi_{ij}}\right)\right]. (4)

The calculated virtual travel costs exhibit similar properties to normal travel costs. For a single link, the virtual and normal travel costs are identical. The virtual travel cost of a route can be obtained by summing the virtual or normal travel costs of its constituent links.

Figure 1 illustrates the iterative transformation of non-overlapping subnetworks into equivalent links using this methodology.

Refer to caption
(a)
Refer to caption
(b)
Figure 1: Base cases for forming virtual links from real links, for route choice from ii to jj. Blue represents real links, and red represents virtual links.

In Figure 1(a), the probability of moving from node ii to node jj is trivially equal to one, and the travel cost from ii to jj in the virtual link is the same as that in the real link. The virtual travel cost of the subnetwork shown in Figure 1(b) is calculated based on Equation 4.

The process continues iteratively, replacing subnetworks without overlapping links with virtual links until there are only parallel non-overlapping routes remaining between a given pair of nodes. Then, the probability of choosing a subroute rr between nodes ii and jj is given by

P(r|(i,j))=exp(γθrs/πij)aRijexp(γθa/πij).P({r|(i,j)})=\frac{\exp(\gamma\theta_{r_{s}}/\pi_{ij})}{\sum_{a\in R_{ij}}\exp(\gamma\theta_{a}/\pi_{ij})}. (5)

Equation 5 is equivalent to Equation 3, with the only difference being that the travel costs θ\theta can be virtual. Finally, the probability of choosing route rr in the network will be

P(r)=P(r|(i,j))P((i,j)),P(r)=P({r|(i,j)})\cdot P(\overset{\sim}{(i,j)}), (6)

when P((i,j))P(\overset{\sim}{(i,j)}) represents the probability of choosing the virtual link (i,j)\overset{\sim}{(i,j)}.

4 Calculating Downstream Node Choice Probabilities

This section explains the steps involved in the proposed random walk route choice model for calculating downstream node choice probabilities. The main objective is to compute the probability PijΔdP^{\Delta d}_{ij}, which represents the likelihood of selecting node jj during the time interval Δ\Delta, given that the driver is at node ii and intends to travel to destination dd, while there exists a link connecting nodes ii and jj. To begin, we introduce some structures from graph theory. Next, we compute the choice probability for a specific directed network structure. Finally, we present the algorithm for the general case.

An out-tree is a directed rooted tree structure where each node, except the root node, has an in-degree of one. The root node has an in-degree of zero. A modified out-tree is an out-tree with an “extra-node” that can have an in-degree greater than one, allowing for multiple incoming edges.

An in-tree is similar to an out-tree, but the directions of edges are reversed. A modified in-tree is an in-tree with an “extra-node” that can have an out-degree greater than one.

Lowest Common Ancestor (LCA) for a subset of nodes in an in-tree is the node located farthest from the root and is a common ancestor to all the nodes in the given subset. See Figure 2 for illustration and check [28] for more detailed information.

Refer to caption
(a)
Refer to caption
(b)
Refer to caption
(c)
Figure 2: (a) shows an out-tree, and (b) displays an in-tree in black. The modified out-tree (in-tree) is formed by adding an extra node in red. In (c), the common ancestors of nodes xx and yy are in blue, and their LCA is highlighted in dark blue.

4.1 Calculating downstream node choice probability in a modified out-tree

As a special case, we first discuss computing PijΔdP^{\Delta d}_{ij} for a modified out-tree, where dd serves as the extra node and rr is the root of the tree.

The primary advantage of the modified out-tree, in our context, is that for every node ii in the tree when ir or di\neq r\text{ or }d, there exists exactly one path from rr to dd, containing ii. The probability of selecting this path is calculated by multiplying the probabilities of selecting the downstream nodes.

Algorithm 1 outlines the steps for calculating downstream node choice probabilities and virtual travel costs to dd for all internal nodes of an out-tree when dd is the destination.


Algorithm 1 Downstream Node Choice Probability and Virtual Link travel cost
in Modified Out-Tree
0: Modified out-tree with root rr and extra node dd, Link travel costs
0: Downstream node choice probabilities PijΔdP^{\Delta d}_{ij}, Virtual travel cost θ(r,d)\theta_{\overset{\sim}{(r,d)}}
1: Perform a topological sort 𝒮\mathcal{S} from rr to dd
2:for each node ii in the reversed order of 𝒮\mathcal{S} do
3:  Calculate downstream node choice probabilities at ii (Equation 5)
4:  Calculate the virtual link travel cost from ii to ss (Equation 4)
5:  Replace the subnetwork with the virtual link (Figure 1)
6:end for

4.2 Calculating downstream node choice probability in a modified in-tree

A similar approach to Algorithm 1 cannot be directly applied to a modified in-tree with the root rr as a destination. This is because, during the process of reducing subnetworks to virtual links, there is a possibility of overlapping subnetworks. In the case of a modified in-tree, our goal is to calculate the probabilities of selecting a downstream node within the extra node oo. To address this, we reverse the direction of the edges in the modified in-tree, transforming it into a modified out-tree.

By obtaining the modified out-tree, we can determine the downstream node choice probabilities at ss by considering the probability of selecting the path from the root rr to oo, which includes the specific downstream node in the modified out-tree. In the context of the in-tree, the virtual travel cost from oo to rr is equivalent to the virtual travel cost from the root rr to the extra node oo in the modified out-tree. This reversal of edge directions and corresponding virtual travel costs enables us to calculate the desired probabilities for the modified in-tree structure.


4.3 Calculating downstream node choice probabilities in a general network

In this section, we present Algorithm 2 for calculating downstream node choice probabilities in a directed network GG when considering the destination node dd, by utilizing the concepts introduced in previous sections.

The algorithm operates on a directed acyclic subnetwork of GG (DAG) and traverses the nodes based on a specified topological order 𝒮\mathcal{S} [29]. The topological order can be obtained by performing the Dijkstra algorithm from the destination node dd to all other nodes when the directions of links are reversed. At each step, it calculates the virtual travel cost and downstream node choice probabilities from a vertex ii to dd, while maintaining a subnetwork TvirtualT_{\text{virtual}} with an in-tree structure. For each node ii in 𝒮\mathcal{S}, the algorithm identifies the LCA ll of its downstream nodes within TvirtualT_{\text{virtual}}. A sub in-tree TsubT_{\text{sub}} is created from TvirtualT_{\text{virtual}} using ll as the root. The modified in-tree GmodifiedG_{\text{modified}} is then obtained by adding node ii to GsubG_{\text{sub}}.

Next, the algorithm calculates the probability of choosing each downstream node of ii in TmodifiedT_{\text{modified}} for the destination node ll. Additionally, it computes the estimated travel cost for the virtual link from ii to ll. Finally, TvirtualT_{\text{virtual}} is updated by adding the virtual link from ii to ll along with its corresponding travel cost value.

Algorithm 2 Downstream Node Choice Probabilities
0: Directed network GG, destination node dd
0: Downstream node choice probabilities PijΔdP^{\Delta d}_{ij} at each node ii for destination dd
1: Acquire a topological sort 𝒮\mathcal{S} of nodes based on the shortest path to dd in ascending order;
2: Create a DAG AA based on the topological sort 𝒮\mathcal{S}, from GG;
3: Initialize an in-tree TvirtualT_{\text{virtual}} with node dd as root 
4:for each node ii in 𝒮\mathcal{S} do
5:  Di:=D_{i}:= set of downstream nodes of ii in AA
6:  Find LCA ll of DiD_{i} in TvirtualT_{\text{virtual}}
7:  Create a sub in-tree TsubT_{\text{sub}} from TvirtualT_{\text{virtual}} with root ll
8:  Form a modified in-tree TmodifiedT_{\text{modified}} by adding node ii to TsubT_{\text{sub}} and connecting ii to nodes in DiD_{i}
9:  Calculate the probability of choosing each downstream node of ii in TmodifiedT_{\text{modified}}for destination ll
10:  Calculate the virtual travel cost for the virtual link from ii to ll
11:  Update TvirtualT_{\text{virtual}} by adding the virtual link from ii to ll with its virtual travel cost value
12:end for

More precisely, Algorithm 2 computes the downstream node choice probabilities in a DAG, which excludes some links of the original graph. To extend the choice to the whole network links, we assign a small probability of β=0.1\beta=0.1 for selecting these excluded links and then normalize the probability distribution at each node. The parameter β\beta should be selected in such a way that it is less than the minimum downstream node choice probability, while still not being too small to approach zero.

5 Microscopic Random walk algorithm for DTA

The presented methodology for random walk DTA is tested at the microscopic level with the use of SUMO [23] tool, an open-source microscopic traffic simulation software. SUMO is suitable for conducting microscopic traffic simulations in academic and open-source settings. As open-source software, it offers cost-effective and efficient ways to understand traffic behavior at a high level of granularity.

The general flowchart of the algorithm is illustrated in Figure 3. The algorithm takes two inputs: the network and the demand. These inputs are provided as a SUMO network and a trip file. Each trip is defined by the origin node, destination node, and departure time.

Refer to caption

Figure 3: Flowchart of the general methodology for the random walk model.

After computing the probabilities of downstream node choice at each node, for every destination, and in specific time intervals, a route is assigned to each trip using a random walk on the network nodes, following the probability distribution.

In each iteration, the algorithm performs kk route assignments and simulations in parallel and then selects the best route assignment based on the average link travel times. The algorithm terminates when the deviation of average travel times between successive iterations is less than a defined threshold, indicating that the user equilibrium condition is “almost” reached. Otherwise, the link travel times are updated, and the probabilities are recalculated for the next iteration.

The time interval for the probability distribution is determined by considering the trip’s departure time and the estimated travel cost. If the selected route contains loops, the algorithm proceeds to remove these loops to ensure the resulting routes are loop-free. Additionally, to ensure the convergence of the algorithm in the iterative process, we apply the computed probabilities as weights to the previous probabilities in each iteration and normalize the results. This approach helps maintain the stability of the method as the system reaches a user equilibrium condition and travel costs converge. Then, the calculated probabilities remain unchanged, contributing to the robustness of the method.

6 Experiments and Results

The proposed methodology has been tested on two distinct synthetic networks: a small grid and a medium-sized network with a random structure. The evaluation involves a comprehensive analysis of the total travel time and total travel distance of simulated routes across multiple iterations for both networks under congested demand scenarios. These results are then compared with the logit and Gawron route choice models implemented in the duaIterate.py methods.

All experiments were conducted on a machine equipped with an Intel Core i7-9800X sixteen-core processor and 64 GB of RAM, running on Ubuntu. For both experiments, k=16k=16 (equal to the number of cores), enabling route assignment sampling and simulations to be generated in parallel in each iteration, thereby optimizing computational efficiency.

In the following sections, we briefly explain the route assignment steps implemented in the SUMO tool in order to have a better comparison with the proposed method. Subsequently, a method for converting SUMO network to a normal network is presented. Finally, we present the detailed results obtained from applying the proposed method to the two sample networks.

6.1 Route-Choice Algorithm in SUMO

In SUMO, the computation of DTA is performed using the duaIterate.py procedure, which follows an iterative approach by alternating between calculating travel times from simulations and performing route assignments based on these calculated travel times [30]. The following steps outline the main process involved in generating a microscopic simulation scenario based on the given Origin-Destination (OD) demand:

  1. 1.

    Network generation: The first step involves creating the network structure for the simulation.

  2. 2.

    Conversion of OD demand to trips: The OD demand data is converted to individual trips using the OD2trip function. Each trip consists of the origin and destination links and the trip start time.

  3. 3.

    DUA computation: The duaIterate.py procedure is executed to compute the DUA. It iterates for a defined number of steps, performing the following sub-steps:

    1. (a)

      duarouter shortest route generation: The duarouter module is used to generate the shortest routes between OD pairs for each vehicle. This is done based on edge weights, which represent travel times. The process starts with an empty-network assignment.

    2. (b)

      Alternative route addition: The shortest route obtained for each OD pair is added to the set of alternative routes. A predefined maximum number of routes to maintain is specified, with the default being five.

    3. (c)

      Route choice selection: Each driver selects a route from the list of alternative routes, following a probability distribution computed in the route choice model. This model can be based on either Gawron or logit algorithms.

    4. (d)

      Simulation and travel time update: A simulation is run for the selected routes to determine the current travel times for each route. The mean travel times for edges are then updated based on the simulation results.

    5. (e)

      Convergence check: The current mean route costs are compared with the previous values. If the mean travel time decreases below a certain threshold, it is considered that the algorithm has converged to user equilibrium, and the process exits.

  4. 4.

    If the mean travel time is still above the threshold, new routes are computed using each vehicle’s last known route costs. These new routes are added to the corresponding vehicle’s set. The routes of all vehicles are then collected, and a route distribution mechanism (either Gawron or logit algorithms) is used to select the route for each vehicle in the next iteration.

By following these steps, the duaIterate.py procedure facilitates the computation of DTA by iteratively adjusting routes based on travel times until convergence to user equilibrium is achieved.

6.2 Converting SUMO network to a normal network

The SUMO network [31] consists of “normal links” representing road segments and connections between two nodes, as well as “internal links” within intersections. These internal links connect an incoming normal edge with an outgoing normal edge and define the right-of-way. In Figure 4(a), internal links are denoted as xx, yy, and zz, while the remaining links are considered normal links.

Refer to caption
(a) Sample SUMO node in red with internal links.
Refer to caption
(b) Converting internal links to normal directed network links.
Figure 4: Transforming SUMO network to a directed graph.

For each node in the SUMO network, we replace the node and its internal edges with a subgraph. This replacement ensures a one-to-one correspondence between routes in SUMO and the directed network representation. Figure 4(b) illustrates the transformed version of the network shown in Figure 4(a), where all links are normal. To maintain the one-to-one correspondence, additional links and vertices are introduced.

By performing this conversion, we can utilize graph theory algorithms and reach packages such as NetworkX [32] in the subsequent steps. Routes are defined as a sequence of consecutive vertices within the transformed network.

6.3 Small Network Experiment

The structure of the small network is depicted in Figure 5. This network comprises 48 links and 16 junctions. Each link has a length of 400 meters and consists of a single lane. In this analysis, all nodes within the network are regarded as both origins and destinations. A random traffic demand of 8,0138,013 vehicles was generated for a one-hour simulation period, divided into four 15-minute time intervals to simulate traffic flow.

Refer to caption


Figure 5: The structure of the small network.

Figure 6 presents the performance metrics of the proposed route choice model compared to the logit and Gawron models in duaIterate.py. The results of the random walk model show a considerable improvement in the total travel distance and time of simulated trips. Moreover, the method reaches the equilibrium condition much faster and remains robust during iterations.

Refer to caption
(a) Total travel distance.
Refer to caption
(b) Total travel time.
Figure 6: Comparison of total travel time and distance for traffic assignment of the proposed method and duaIterate.py in the grid network.

6.4 Random Network Experiment

A Random network was generated in SUMO using netgenerate. This network consists of 348 links and 100 junctions. Each link has a minimum length of 90 and a maximum of 230 meters, with one lane. The structure of the random network is illustrated in Figure 7 with the locations of origins and destinations highlighted in red. A random traffic demand of 8,0128,012 vehicles was generated for a one-hour simulation period, divided into four 15-minute time intervals.

Refer to caption

Figure 7: The structure of a random network with OD locations.
Refer to caption
(a) Total travel distance.
Refer to caption
(b) Total travel time.
Figure 8: Comparison of total travel time and distance for traffic assignment of the proposed method and duaIterate.py in the random network.

Figure 8 presents the performance metrics of the proposed route choice model compared to the logit and Gawron models in duaIterate.py, for the random network. The results of the random walk model show a considerable improvement in the total travel distance compared to both the logit and Gawron models. The comparison of the total travel time of simulated trips in different iterations demonstrates that the random walk method converges to the user equilibrium condition much faster and remains robust during iterations. However, the total running time of the Gawron model decreases in later iterations.

Refer to caption
(a) Logit.
Refer to caption
(b) Gawron.
Refer to caption
(c) Random walk.
Refer to caption
(d) Link count difference
between logit and Gawron
models.
Refer to caption
(e) Link count difference
between random walk and Logit models.
Refer to caption
(f) Link count difference
between random walk and Gawron models.
Figure 9: Top row shows the heat maps of traffic distribution using different models. The bottom row shows the difference in link traffic count between each pair of models.

Figure 9 shows the traffic volume in the random network using different methods. Comparing Figuses 9(a), 9(b), and 9(c), it is evident that in the random walk method, the number of medium-volume links is slightly higher compared to the logit and Gawron methods. This indicates that the network’s traffic volume is more evenly distributed with the random walk method. Figures 9(d), 9(e), and 9(f) highlight the differences in link counts between each pair of models over the entire simulation period. It can be observed that the logit and Gawron models exhibit similar performance, while the random walk model utilizes the central links more frequently. However, the link traffic counts do not significantly differ from the logit and Gawron models.

7 Conclusion and Future Works

DTA is a crucial step in providing a realistic representation of traffic conditions in traffic simulation tools. This study introduces a novel dynamic stochastic traffic assignment method that outperforms existing approaches, such as duaIterate.py. By calculating route choice probabilities at the intersection level, the model allows for the enumeration of all alternative routes and enables a fully dynamic route assignment process.

The method has been successfully integrated into the SUMO traffic simulation framework and thoroughly evaluated on synthetic networks. All source codes and data are made publicly available, facilitating future research and development within the community.

The results demonstrate its superiority over duaIterate.py, showcasing faster convergence, enhanced robustness, realistic trip distribution, and reduced total travel distance. Additionally, the method’s ability to execute in parallel significantly reduces running times, making it well-suited for calibration and real-time applications. The incorporation of randomness and robustness in stochastic approaches is a major concern for DTA solutions. As evident from the results, the proposed method exhibits considerably better robustness compared to duaIterate.py.

Furthermore, the average running time of the proposed random walk model in the random network of Figure 7 is approximately 30 seconds per iteration, while duaIterate.py models take 27 seconds. Although the primary contributor to the running time is related to running simulations, the convergence rate and robustness of the proposed model make it a promising choice for large real-world networks.

The proposed dynamic stochastic traffic assignment method provides a valuable contribution to the field of traffic simulation and modeling. Its effectiveness in capturing realistic traffic behavior and optimizing route assignments enhances the understanding and management of transportation systems. Future research can focus on applying the method to real-world networks and exploring further improvements to enhance its scalability and applicability in complex urban environments.

8 Acknowledgements

This work is supported by the European Social Fund via IT Academy programme and the Estonian Centre of Excellence in IT (EXCITE).

We would like to extend our heartfelt thanks to Jakob Erdmann for his fast and insightful response to our SUMO-related technical questions. His assistance has been invaluable in furthering our research objectives.

Language Model GhatGPT-3.5 is used for proofreading this document.

9 AUTHOR CONTRIBUTIONS

The authors confirm contribution to the paper as follows: study conception and design: K. Khoshkhah, M. Pourmoradnasseri; data and implementation: K. Khoshkhah; analysis and interpretation of results: K. Khoshkhah, M. Pourmoradnasseri; draft manuscript preparation: K. Khoshkhah, M. Pourmoradnasseri, S. Ben Yahia, A.Hadachi. All authors reviewed the results and approved the final version of the manuscript.

References

  • Peeta and Ziliaskopoulos [2001] Peeta, S. and A. K. Ziliaskopoulos, Foundations of dynamic traffic assignment: The past, the present and the future. Networks and spatial economics, Vol. 1, 2001, pp. 233–265.
  • Chiu et al. [2011] Chiu, Y.-C., J. Bottom, M. Mahut, A. Paz, R. Balakrishna, S. Waller, and J. Hicks, Dynamic traffic assignment: A primer (transportation research circular e-c153), 2011.
  • Zhang [2011] Zhang, L., Behavioral foundation of route choice and traffic assignment: Comparison of principles of user equilibrium traffic assignment under different behavioral assumptions. Transportation Research Record, Vol. 2254, No. 1, 2011, pp. 1–10.
  • Lu and Osorio [2022] Lu, J. and C. Osorio, On the analytical probabilistic modeling of flow transmission across nodes in transportation networks. Transportation research record, Vol. 2676, No. 12, 2022, pp. 209–225.
  • Lu and Osorio [2018] Lu, J. and C. Osorio, A probabilistic traffic-theoretic network loading model suitable for large-scale network analysis. Transportation Science, Vol. 52, No. 6, 2018, pp. 1509–1530.
  • Shafiei et al. [2018] Shafiei, S., Z. Gu, and M. Saberi, Calibration and validation of a simulation-based dynamic traffic assignment model for a large-scale congested network. Simulation Modelling Practice and Theory, Vol. 86, 2018, pp. 169–186.
  • Duell et al. [2016] Duell, M., N. Saxena, S. Chand, N. Amini, H. Grzybowska, and S. T. Waller, Deployment and calibration considerations for large-scale regional dynamic traffic assignment: case study for Sydney, Australia. Transportation Research Record, Vol. 2567, No. 1, 2016, pp. 78–86.
  • Sbayti et al. [2007] Sbayti, H., C.-C. Lu, and H. S. Mahmassani, Efficient implementation of method of successive averages in simulation-based dynamic traffic assignment models for large-scale network applications. Transportation Research Record, Vol. 2029, No. 1, 2007, pp. 22–30.
  • Mehrabani et al. [2022] Mehrabani, B. B., J. Erdmann, L. Sgambi, and M. Snelder, Proposing a Simulation-Based Dynamic System Optimal Traffic Assignment Algorithm for SUMO: An Approximation of Marginal Travel Time. In SUMO Conference Proceedings, 2022, Vol. 3, pp. 121–143.
  • Mehrabani et al. [2023] Mehrabani, B. B., J. Erdmann, L. Sgambi, S. Seyedabrishami, and M. Snelder, A Multiclass Simulation-Based Dynamic Traffic Assignment Model for Mixed Traffic Flow of Connected and Autonomous Vehicles and Human-Driven Vehicles. arXiv preprint arXiv:2301.11083, 2023.
  • Khoshkhah et al. [2022a] Khoshkhah, K., M. Pourmoradnasseri, and A. Hadachi, A Real-Time Model for Pedestrian Flow Estimation in Urban Areas based on IoT Sensors. In 2022 25th International IEEE Conference on Intelligent Transportation Systems (ITSC), IEEE, 2022a.
  • Pourmoradnasseri et al. [2022] Pourmoradnasseri, M., K. Khoshkhah, and A. Hadachi, Real-Time Calibration of Disaggregated Traffic Demand. arXiv preprint arXiv: 2210.17315, 2022.
  • Khoshkhah et al. [2022b] Khoshkhah, K., M. Pourmoradnasseri, A. Hadachi, H. Tera, J. Mass, E. Keshi, and S. Wu, Real-Time System for Daily Modal Split Estimation and OD Matrices Generation Using IoT Data: A Case Study of Tartu City. Sensors, Vol. 22, No. 8, 2022b.
  • Dial [1971] Dial, R. B., A probabilistic multipath traffic assignment model which obviates path enumeration. Transportation research, Vol. 5, No. 2, 1971, pp. 83–111.
  • Li et al. [2005] Li, J., S. Xin, and C. Liu, An algorithm for logit network loading problem by topological sorting, 2005.
  • Cabannes et al. [2023] Cabannes, T., A. Bagabaldo, J. Lee, Q. Gan, A. Jain, A. Blondel, and A. Bayen, Creating, Calibrating, and Validating Large-Scale Microscopic Traffic Simulation, 2023.
  • Tomkins et al. [2021] Tomkins, A., C. Osorio, I. Tsogsuren, N. Arora, S. G. Subramaniam, Y. Li, Y. fan Chen, and Z. Lin, An Efficient Simulation-Based Travel Demand Calibration Algorithm for Large-Scale Metropolitan Traffic Models, 2021.
  • Frejinger et al. [2009] Frejinger, E., M. Bierlaire, and M. Ben-Akiva, Sampling of alternatives for route choice modeling. Transportation Research Part B: Methodological, Vol. 43, No. 10, 2009, pp. 984–994.
  • Han [2003] Han, S., Dynamic traffic modelling and dynamic stochastic user equilibrium assignment for general road networks. Transportation Research Part B: Methodological, Vol. 37, No. 3, 2003, pp. 225–249.
  • Osorio [2019] Osorio, C., Dynamic origin-destination matrix calibration for large-scale network simulators. Transportation Research Part C: Emerging Technologies, Vol. 98, 2019, pp. 186–206.
  • Arora et al. [2021] Arora, N., Y.-f. Chen, S. Ganapathy, Y. Li, Z. Lin, C. Osorio, A. Tomkins, and I. Tsogsuren, An Efficient Simulation-Based Travel Demand Calibration Algorithm for Large-Scale Metropolitan Traffic Models. arXiv preprint arXiv:2109.11392, 2021.
  • Gao et al. [2008] Gao, S., E. Frejinger, and M. Ben-Akiva, Adaptive route choice models in stochastic time-dependent networks. Transportation Research Record, Vol. 2085, No. 1, 2008, pp. 136–143.
  • Lopez et al. [2018] Lopez, P. A., M. Behrisch, L. Bieker-Walz, J. Erdmann, Y.-P. Flötteröd, R. Hilbrich, L. Lücken, J. Rummel, P. Wagner, and E. Wießner, Microscopic Traffic Simulation using SUMO. In The 21st IEEE International Conference on Intelligent Transportation Systems, IEEE, 2018.
  • Li et al. [2015] Li, J., Y. Huang, and X. Lai, Modeling stochastic route choice behaviors with equivalent impedance. Mathematical Problems in Engineering, Vol. 2015, 2015.
  • Li and Lai [2019] Li, J. and X. Lai, Modelling travellers’ route choice behaviours with the concept of equivalent impedance. Transportation, Vol. 46, No. 1, 2019, pp. 233–262.
  • Bang-Jensen and Gutin [2008] Bang-Jensen, J. and G. Z. Gutin, Digraphs: theory, algorithms and applications. Springer Science & Business Media, 2008.
  • Baharev et al. [2021] Baharev, A., H. Schichl, A. Neumaier, and T. Achterberg, An exact method for the minimum feedback arc set problem. Journal of Experimental Algorithmics (JEA), Vol. 26, 2021, pp. 1–28.
  • Mehlhorn et al. [2008] Mehlhorn, K., P. Sanders, and P. Sanders, Algorithms and data structures: The basic toolbox, Vol. 55. Springer, 2008.
  • Pang et al. [2015] Pang, C., J. Wang, Y. Cheng, H. Zhang, and T. Li, Topological sorts on DAGs. Information Processing Letters, Vol. 115, No. 2, 2015, pp. 298–301.
  • sum [2023a] SUMO Documentation: Dynamic User Assignment, Accessed on May 23, 2023a, https://sumo.dlr.de/docs/Demand/Dynamic_User_Assignment.html.
  • sum [2023b] SUMO Documentation: SUMO Road Networks, Accessed on May 23, 2023b, https://sumo.dlr.de/docs/Networks/SUMO_Road_Networks.html.
  • net [2023] NetworkX Network Analysis in Python, Accessed on May 23, 2023, https://networkx.org/.