This project takes SiouxFalls traffic network as an example and solves the user equilibrium model of traffic allocation based on Frank Wolfe algorithm.
The users of the road know exactly the traffic state of the network and try to choose the shortest path. When the network reaches a balanced state, the routes used by each OD pair have the same travel time and the shortest travel time. The travel time of an unused path is greater than or equal to the minimum travel time.
The traffic allocation model that satisfies the first principle of Wardrop is called the user equilibrium model.
In 1956, Beckmann proposed a mathematical programming model that satisfies Wardrop's first principle. The core of the model is that all users in the traffic network try to choose the shortest path, and eventually make the impedance of the chosen path minimum and equal. The mathematical programming model is as follows:
In the user equilibrium model,
-
$FFT_𝑎$ indicates the fastest time to cross section a - 𝛼 is usually 0.15,
- 𝛽 is usually 4.0
-
$𝐶_𝑎$ indicates the capacity of section a -
$x_𝑎$ indicates the traffic flow on section a
In order to facilitate subsequent solution, we substitute the BPR function into
Therefore, our objective function is
Step 1: Initialize. Based on the road resistance of the zero flow diagram, the shortest path corresponding to each OD to r,s is searched successively, and all OD traffic between r,s is allocated to the corresponding shortest path to obtain the initial section flow
Step 2: Update the block. According to the BPR function, the initial flow of each section is substituted to obtain the impedance
Step 3: Descending direction. Based on the impedance
Step 4: Search for the best Uber size and update the traffic. Using dichotomy, search for the optimal step size
Where the optimal step size satisfies
Step 5: End condition. If
the algorithm ends. Otherwise n=n+1, go to Step 2. This 𝜀 represents the error threshold, which is represented in the code section by max_err.