Next Article in Journal
A Method for Calculating Whole-Genome Sequencing Outcomes from Trio Data
Previous Article in Journal
Explaining Corporate Ratings Transitions and Defaults Through Machine Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Two Modifications of MinSum Algorithm for Efficient System-Optimal Traffic Assignment

1
Department of Applied Computing, Faculty of Electrical Engineering and Computing, University of Zagreb, 10000 Zagreb, Croatia
2
Department of Control and Computer Engineering, Faculty of Electrical Engineering and Computing, University of Zagreb, 10000 Zagreb, Croatia
3
Department of Intelligent Transportation Systems, Faculty of Transport and Traffic Sciences, University of Zagreb, 10000 Zagreb, Croatia
*
Author to whom correspondence should be addressed.
Algorithms 2025, 18(10), 609; https://doi.org/10.3390/a18100609
Submission received: 22 August 2025 / Revised: 18 September 2025 / Accepted: 24 September 2025 / Published: 29 September 2025
(This article belongs to the Section Algorithms for Multidisciplinary Applications)

Abstract

Traffic assignment in large urban areas is an old but increasingly important problem because of the rapid growth of the world population and traffic demands. Many algorithms have been developed but their convergence rates and complexities are still prohibitive for real-time applications. The recently developed MinSum algorithm introduces a new approach. It is a highly efficient discrete-domain optimization algorithm for system-optimized route assignment between two city zones. Its complexity (the number of critical operations) is O(R3), where R is the number of routes. Nonetheless, there is still room for improvements, and this paper presents two modified MinSum variants, heuristic and approximate, that are significantly faster and of lower complexity, while retaining MinSum’s prominent features. Heuristic variant MinSumH is up to five times faster than MinSum and its complexity theoretically remains O(R3), though experiments indicate that it is closer to O(R2). Approximate variant MinSumA is faster by up to over 100 times and reduces the complexity to O(R). Both proposed variants are progressively faster as R grows. Due to their high convergence rate and exceptionally low complexity, along with other prominent features, the proposed algorithms are ready for real-time system-optimal traffic assignment in a real urban environment.

1. Introduction

Traffic (or route) assignment is a problem dating back to the 1950s with Wardrop’s two principles [1], which define the notion of optimality of traffic distribution. These two principles generate the two most important objectives (i.e., the desired network states) in the traffic flow assignment optimization problem. The objective corresponding to the first principle is called user equilibrium (UE), and the one corresponding to the second principle is called system optimality (SO). Since its mathematical formulation around 1956 [2], the route assignment problem has been a long-term scientific challenge [3]. Though in the past UE assignment received more interest, significant economic, social, and ecological effects of traffic jams in large cities nowadays emphasize the importance of SO assignment [4,5].
Except by the optimization objectives, traffic assignment is also classified as static (STA for Static Traffic Assignment) and dynamic (DTA for Dynamic Traffic Assignment). STA is intended for long-term traffic (i.e., network) planning; it uses expected traffic demands and predictions as the core input data, and there is no time limit for optimization. The purpose of DTA is to distribute the traffic flows in real time to make the travel as fast as possible. It must take into account the actual traffic conditions and it often deals with micromanagement factors, such as traffic signal control.
Because of the extent and density of road networks in large urban areas, the convergence rate and complexity (scalability) of algorithms for DTA are crucial, and the difficulty of the problem has given rise to many approaches. One is to divide the road network into subnetworks and perform partial optimizations using distributed [6] or iterative methods [7], or to solve only the aimed-at subproblem [8]. There is also the rerouting approach [4,9], which can respond to sudden changes in the network. Routing is generally an important related problem whose algorithms or underlying techniques can, in principle, be used in DTA, but the difficulty is that fast routing algorithms mostly require extensive preprocessing, and afterwards they usually use Dijkstra- or A*-based algorithms to find the shortest paths [10], which is time-consuming. DTA demands frequent rerouting, so routing algorithms developed for applications in which time is not as critical as in DTA cannot be applied directly. Finally, as in any other optimization, in DTA we can try various heuristic methods and/or multiagent systems [11], though these are, similarly to routing, more appropriate to STA. An example of a genetic algorithm combined with streaming agents used for traffic assignment can be found in [12]. The MA-HCAGA algorithm combines agents and genetic algorithms for the synthesis of reconfigurable multilayer road networks [13]. Similarly, the GA-TS algorithm, which is used to solve the open vehicle routing problem, combines genetic algorithms and Tabu search [14]. In the related problem of capacitated vehicle routing, a hybrid genetic search is used [15].
From the algorithmic point of view, approaches to SO assignment differ by whether the algorithms work on the link or path level, and by the optimization strategy when applied to large (city-level) traffic networks. Generally, till the 1990s and the rapid growth of computer processing power and memory accessibility (increased capacity and reduced cost), link-level solutions were in the focus of research because of lower memory requirements [3]. Nowadays, path-based algorithms have regained attention because they provide additional information like, for instance, active paths (i.e., the actually used routes), which is of considerable interest to transportation planners. In large-scale applications, the path-level algorithms usually take one of the three common strategies [16]. The All-At-Once strategy is to update traffic flows on all paths in the network at once (after solving all origin–destination (OD) pairs). In the One-Origin-At-A-Time strategy all OD pairs from a single origin to many destinations are solved and updated, while in the One-OD-At-A-Time strategy each OD pair is solved and updated separately. Some analyses proclaim the last strategy as the most effective one [17,18].
In [19], a different approach is proposed for solving the basic SO optimization between a single OD pair. It differs significantly from all other solutions in that the traffic flow is viewed as a naturally discrete quantity, and recognition of this fact leads to very simple and robust optimization algorithms. Accordingly, the core algorithm, called MinSum, is a discrete-domain algorithm and it exhibits several desirable properties, like simplicity, speed, and numerical stability. It is experimentally shown in [19] that MinSum significantly outperforms the Frank–Wolfe algorithm in SO assignment between two city zones. Nonetheless, there is still room for improvement. Single MinSum iteration is quadratically dependent on the number of routes R, which is caused by two nested for-loops used for identification of the best pair of routes for transferring vehicles (explained in the next section). On the other hand, experiments show (see sections with experimental results) that the number of MinSum iterations grows at most linearly with R for R up to 25, depending on the specific network (more than R = 25 routes between two zones cannot be expected in real cities). Therefore, the overall complexity of MinSum can reach O(R3) (for complexity analysis of algorithms and O-notation see [20]). Hence, the best way to speed up MinSum is to do something with the R2 complexity of identification of the best pair of routes, that is, to reduce the complexity of tests preceding the transfer of vehicles.
To this aim, in this paper two advanced variants of MinSum are proposed. The first one is a simple heuristic modification that better exploits calculations performed by the original MinSum and in this manner considerably increases its efficiency, without losing any desirable features. The second variant applies weak approximations to significantly speed up critical MinSum calculations and strongly reduce the algorithm’s complexity, at the price of minor and irrelevant degradation of MinSum’s perfect accuracy.

2. Formulation of the Problem and Review of the MinSum Algorithm

Because the problem formulation is the same as in [19], here we restate it only briefly. Let us consider R routes (paths) between two city zones, and let nr be the number of vehicles on the rth route, where r = 1, 2, …, R. Thus, the total number of vehicles to be optimally distributed is n = n1 + n2 + … + nR. The most important quantity is the expected (average) travel time tr on the rth route, where the model of tr takes into account correlations among the routes, rendering each tr into a function of all nr. Mathematically, we have
tr = fr(n1, n2, …, nR)
and denoting n = [n1, n2, …, nR]T, we write tr = fr(n), i.e., we deal with tr(n). The exact fr used in this work is
tr(n) = β0 + β1n1 + … + βr−1nr−1 + βrnr3 + βr+1nr+1 + … + βRnR,
and this is, in fact, a regression model where β are regression coefficients [19]. The core of the model (2) is the incomplete cubic polynomial (β0 and βrnr3 terms), which reflects the commonly accepted description of traffic dynamics [21]. The rest of the coefficients βi, ir, reflect interferences (correlations) among the rth route and the other routes as explained and justified in [19]. The reader should note that if nr is not much smaller than other ni, ir, and there are no too strong correlations (i.e., too large βi, ir), the interferences are weak and the dominant contribution to tr is produced by the polynomial part (β0 and βrnr3 terms) of (2). This is important for the approximate MinSum variant explained in the later sections of this article.
The optimization goal is minimization of the total travel time (sum of tr on all routes)
φ(n) = n1t1 + n2t2 + … + nRtR = ∑r nrtr
in the network. Using t = [t1(n), t2(n), …, tR(n)]T, we write φ(n) = nTt, and the complete optimization problem is
min               n T t subject   to               n 1 + n 2 + n R = n               0 n r u r ;       r = 1 , 2 , , R ,
where ur are upper bounds of nr (ur are counterparts of maximum flows in continuous algorithms). For convenience, we provide the complete pseudocode and a brief review of the MinSum algorithm (Algorithm 1) (for detailed explanations the reader should consult [19]). Below the pseudocode, a variable explanation Table 1 is provided to facilitate understanding of the algorithm.
The body of the do-while loop in lines 2–24 constitutes a single MinSum iteration. This loop repeats as long as the objective function φ can be reduced (precisely, as long as the objective function has been reduced in the current iteration). The two nested for-loops in lines 5–19 identify the best pair of routes (donor and acceptor) and, if reduction of φ is possible (the if-statement in line 20), at least one vehicle between the chosen routes is transferred. The exact number Eta of vehicles to be transferred is a separate problem, analogous to the determination of the step in continuous methods and is not regarded in this paper (it is discussed in [19]). If reduction of φ is not possible, the algorithm stops, and the current set {n1, n2, …, nR} is the optimal route assignment (i.e., optimal distribution of vehicles (traffic flows) over the available routes).
Algorithm 1: MinSum Algorithm: minimization of the total (i.e., average) travel time
1:    set initial route loads {n1, n2, …, nR}
2:    do
3:     minDeltaPhi = ∞
4:     startPhi = φ(n1, n2, …, nR)
5:     for (all routes a = 1 to R)
6:        if (there are no more vehicles on route a)
7:         continue outer for loop (with iterator a)
8:        end if
9:        for (all routes b = 1 to R)
10:         if (a == b)
11:           continue internal for loop (with iterator b)
12:        end if
13:         Phi = φ(n1, …, na − 1, …, nb + 1, …, nR)
14:         if (Phi − startPhi < minDeltaPhi)
15:           minDeltaPhi = Phi − startPhi
16:           donor = a; acceptor = b;
17:         end if
18:        end for
19:     end for
20:     if (minDeltaPhi < 0)
21:       eta = the number of vehicles to be transferred
22:       transfer eta vehicles from donor to acceptor
23:     end if
24:    while (minDeltaPhi < 0)
25:    return the current set {n1, n2, …, nR}
The “natural” complexity of MinSum, expressed as the number of objective function (i.e., travel time) evaluations, is O(nR2). This is because in the worst case all n vehicles have to be transferred one by one to some other route, requiring n identifications of the best pair of routes (i.e., n iterations), and each identification (performed by the nested for-loops) requires R2 calculations of the objective function [19].
It would be more precise to say that the number of objective function evaluations is ωR2, where ω is the number of iterations, because the actual number of iterations is much lower than n, due to transferring many vehicles at once. Nonetheless, we lack a more precise estimation of the number of iterations and the only thing we know for sure is that in practice it cannot exceed n, so we must declare the “natural” complexity as O(nR2). This imprecision is not very important, though, because dependence on traffic load n is overwhelmingly dominated by dependence on the scale R of the network. We show it here using inferences from the section with experimental results, where it is shown that the number of iterations ω grows proportionally to R. Hence, ω is proportional to both n and R, and we may write ω = O(nR). Because the exact number of objective function evaluations is ωR2, we get
ωR2 = O(nR)R2 = O(nR3)
and we see that the performance of MinSum is two orders of magnitude more sensitive to R than to n. Therefore, in this paper we consider complexity only with respect to R.

3. Heuristic Modification of MinSum

As mentioned in the Introduction, the proposed heuristic modification is aimed at better usage of the original MinSum calculations. The most computationally demanding step in MinSum is the identification of the best pair of routes, which is performed by the two nested for-loops (lines 5–19), and these for-loops cause R2 time complexity of a single MinSum iteration. However, the only operation that reduces the objective function is the transfer of vehicles (line 21) after the best pair of routes has been identified. Hence, intuitively, we may expect that increasing the number of vehicle transfers per MinSum iteration should speed up the algorithm, that is, increase its convergence rate.
Therefore, in the modified algorithm we do not seek the best-of-all pair of routes and then make only one transfer between the chosen pair in a single iteration, like in the original MinSum. Instead, we traverse all routes, and every route becomes a potential donor when visited during the traversal. Then, for each potential donor the best acceptor is determined (among all other routes) and vehicle transfer is performed between the current donor and its best pair (if reduction of the objective function is possible at all). Thereby we perform up to R transfers in each iteration, increasing the number of objective-reducing operations per MinSum iteration. We denote this heuristic variant of MinSum as MinSumH (Algorithm 2).
The main difference between MinSum and MinSumH is the positions of two steps that are originally (in MinSum) inside the inner (with iterator b) of the nested for-loops. The first step is resetting of variables minDeltaPhi and startPhi (lines 3–4 in MinSum and 7–8 in MinSumH), which are now outside the inner for-loop, having the effect that the inner for-loop now determines the best acceptor route b only for the current donor route a (iterator of the outer for-loop). The second step is vehicle transfer (lines 20–22 in MinSum), and in MinSumH it is performed (if possible) immediately after the inner for-loop has finished (lines 19–22), before the next donor route has been considered. Hence, if all routes can be donors (there are vehicles on them), MinSumH will perform up to R transfers (objective-reduction operations) in a single iteration because it will perform a transfer from all routes having a pair such that reduction of the objective function is possible.
Of course, transfers in MinSumH cannot be expected to be as effective as those of the original MinSum because MinSum performs the best of all possible transfers. Furthermore, it regularly happens that for some routes (donors) there is no acceptor pair such that the objective function φ can be reduced. Nevertheless, we may hope that (at most) R transfers in a single MinSumH iteration will cumulatively surpass the reduction of φ achieved by one MinSum transfer. The experiments presented in the next section support this anticipation and justify the proposed heuristic modification of MinSum.
Algorithm 2: MinSumH Algorithm: minimization of the total (i.e., average) travel time
1:   set initial route loads {n1, n2, …, nR}
2:   do
3:     for (all routes a = 1 to R)
4:       if (there are no more vehicles on route a)
5:         continue outer for loop (with iterator a)
6:       end if
7:       minDeltaPhi = ∞
8:       startPhi = φ(n1, n2, …, nR)
9:       for (all routes b = 1 to R)
10:        if (a == b)
11:          continue internal for loop (with iterator b)
12:        end if
13:        Phi = φ(n1, …, na − 1, …, nb + 1, …, nR)
14:        if (Phi − startPhi < minDeltaPhi)
15:          minDeltaPhi = Phi − startPhi
16:          donor = a; acceptor = b;
17:        end if
18:       end for
19:       if (minDeltaPhi < 0)
20:        eta = the number of vehicles to be transferred
21:        transfer at least one vehicle from donor to acceptor
22:       end if
23:     end for
24:   while (minDeltaPhi < 0)
25:   return the current set {n1, n2, …, nR}

4. Experimental Comparison of Performance and Complexity of MinSum and MinSumH

Both algorithms (MinSum and MinSumH) have the task to distribute vehicles traveling between two zones over the available routes so that the total travel time (the sum of travel times of all vehicles) in the network is minimal (SO assignment). Due to their discrete nature, a valid comparison of these algorithms implies analysis of their convergence rates (measured by the number of operations needed to find a solution) and their complexities with regard to the number of routes R (i.e., the growth of the number of operations due to the growth of the scale of the problem).
The most relevant quantity for the estimation of complexities is the count of “critical” operations. By critical operations we mean the most time-consuming and repetitive operations required by the algorithms, whose number of repetitions depends on R. The only critical operation in both MinSum and MinSumH is the evaluation of the objective function φ (i.e., evaluation of the total travel time), so the number of objective function evaluations nφ is the main quantity of interest. Of course, we measure execution time as well because time complexity is the most important measure of suitability for real-time applications. However, a single optimization applying either of the algorithms on contemporary computers takes just a few microseconds, and to improve the reliability of measurements of such short time intervals we, in fact, measure the total execution time of many (thousand) consecutive repetitions of optimization with the same experimental setup and divide the total time by the number of repetitions.
While comparison of convergence rates is straightforward, comparison of complexities requires a proper design of the experiment. The basic principle is to generate random sets of synthetic routes between virtual zones (synthetic city) and to vary the number of routes R from 5 to 25 (with a step 5 in the presented experiments). For each R it is necessary to repeat optimization for several different randomly generated sets of synthetic routes because the performance (i.e., the number of operations) of both MinSum and MinSumH depends on characteristics of the routes, and only the averages are comparable meaningfully. In the presented experiments we generated 10 sets of routes for each R. Varying R also requires caution regarding the load of the network. If we start with a certain total number n of vehicles in the city (that is, between the two considered zones), increasing the number of routes would cause network depletion and the algorithms’ behavior would also change due to reduction in traffic demand (network load), not only due to the change in R. Therefore, while changing R, we hold the percentage of the total traffic demand constant. Specifically, when we set 75% load, this means that the program generates as many vehicles in the model as given by the sum of 75% of the jam loads of all the routes in the model.
For better insight into the details of the algorithms’ performance, we first present counts of critical operations. They are summarized in Table 2 and Table 3, which provide averages obtained from measurements on 10 sets of routes (different cities) for each R. The column entitled nφ contains the numbers of evaluations of objective function φ (the only critical operation) in the algorithms themselves, while nφVT is the number of evaluations of φ in vehicle transfer (VT) routines (calculation of Eta and performing transfer). Vehicle transfer is just an auxiliary operation, but necessary for the algorithms’ functionality and important for the algorithms’ overall performance. Thus, the most relevant data are the totals in the last column nφTOT, which is simply the sum of nφ and nφVT. The column “iterations” contains the number of iterations till finding a solution, that is, the number of repetitions of the do-while loop in both algorithms, and the column “transfers” lists counts of vehicle transfers, i.e., the numbers of the objective-reduction operations during optimization (it is equal to the numbers of calls to the auxiliary vehicle transfer routine). The rightmost column “MS/MSH” in Table 3 shows the ratios of the total numbers of critical operations (nφTOT for MinSum divided by nφTOT for MinSumH). The larger this ratio, the faster MinSumH compared to MinSum.
We first notice that MinSumH always performs fewer critical operations than MinSum. For small networks (R = 5) the difference is not large, but it becomes substantial as R grows. Specifically, the ratios (in Table 3) of the total numbers of critical operations range from 1.2 for R = 5 to 4.4 for R = 25. Thus, MinSumH always exhibits a higher convergence rate, the higher the larger the problem, and this is exactly what we wanted to achieve by the proposed modification. It is interesting to notice how MinSumH achieves this acceleration. In MinSum, the number of transfers is equal to the number of iterations (precisely, one less because the last iteration is needed, in both algorithms, to find out that no more transfers are possible and to stop) and both grow proportionally to R, with a factor of proportionality ≈ 1. In contrast, the number of MinSumH iterations grows much more slowly than R but the number of vehicle transfers is more than doubled compared with MinSum. These results justify our intuitive expectation that increasing the number of vehicle transfers (i.e., objective function reducing operations) per iteration should speed up the algorithm, despite the fact that it also increases the number of critical operations in auxiliary routines, as can be seen in the nφVT columns in the tables.
In regard to complexities, the experiment clearly confirms the theoretical results. It turns out (see columns R and “iterations” in Table 2) that the number of MinSum iterations ω grows proportionally with R, that is, if R changes k times, so does ω. This confirms the ω~R relationship and we have ω = O(R). Because the complexity of two nested for-loops in MinSum is O(R2), the overall MinSum complexity with respect to R reaches O(R)O(R2) = O(R3), as established by (5). A cubic relationship is apparent from columns nφ or nφTOT in Table 2, where it is evident that values in these columns faithfully follow the R3 course.
MinSumH, on the other hand, needs notably fewer iterations already for R = 5 routes, and the number of iterations grows much more slowly with R than is the case for MinSum. For both algorithms the growth in the number of iterations seems linear, but the slope (coefficient) is far smaller for MinSumH than for MinSum (specifically, for data in the tables, the slope for MinSum is 2.01 and for MinSumH 0.18, or roughly 10 times smaller). A detailed analysis reveals that the growth in the number of iterations of MinSumH even slightly slows down (slope decreases) as R grows, but this is not helpful since R does not exceed 25, and this effect becomes more noticeable only for R > 25. Thus, the experiment shows that the big O of MinSumH is also O(R3), but the constants covered by the big O are very different and MinSumH becomes progressively faster compared to MinSum as the number of routes grows.
The results in Table 2 and Table 3 are typical ones. Experiments with different network loads ranging from 25% to 95% of the jam load or with different series of synthetic cities yielded the same mutual relationships between MinSum and MinSumH. Therefore, these are not reported here, and we instead turn our attention to the execution time as the most relevant measure of performance that reflects all theoretical and implementational details in both algorithms.
As already mentioned, reliable estimation of the duration of a single optimization with either MinSum or MinSumH requires accumulating measurements for repeated optimizations with the same sets of routes (same cities) and, in the end, dividing the sum by the number of repetitions. Figure 1 shows the result of such an experiment, in which the number of repetitions was 1000.
Because the measured time values (ordinate axis) in Figure 1—left range from 3 μs to 8 ms, exact ordinate values in Figure 1—left are not readable and the curves seemingly follow the R3 pattern in compliance with the algorithms’ O(R3) complexity. Nonetheless, analysis of the exact measured values and regression polynomial fits through the curves in Figure 1—left reveals that the actual degree of the MinSum curve (polynomial) is 5, and for MinSumH the best fit is a 4th-degree polynomial (though the differences in statistical properties [22] of 4th- and 5th-order fits are negligible). This seems confusing in view of the previous complexity analysis that clearly established the O(R3) complexity of both algorithms, but such results are, in fact, perfectly correct and expected. Namely, the previous complexity analysis was based on the counts of critical operations only, and it did not take into account lower-level operations. In contrast, the measurement of execution time comprises every single calculation in the entire program. This includes calculations required by critical operations themselves, which were not counted in Table 2 and Table 3. In MinSum and MinSumH the only critical operation is the evaluation of the objective function φ, and its complexity (in regard to the basic arithmetic operations) is O(R2) for any traffic flow model that includes correlations among the routes. This is because the total travel time is obtained as the sum of travel times on all R routes and travel time on each route depends on traffic flows on all other R (correlated) routes. Therefore, the time complexity of any program that would use either MinSum or MinSumH would be the number of critical operations O(R3) multiplied by the time complexity O(R2) of the critical operation itself, that is, O(R3)O(R2) = O(R5). This perfectly agrees with the course of the experimentally obtained execution times (curves) in Figure 1.
The fact that the measured execution time of MinSumH is closer to a 4th-degree polynomial than to the theoretical 5th degree is just the consequence of its slow growth in the range of interest (R ≤ 25). Statistical differences between 4th- and 5th-degree regression polynomials through MinSumH curves, Figure 1—left, are negligible but Figure 1—right discloses true relationships; it shows the ratios of execution times in Figure 1—left. If we denote the execution time of MinSum by tMS and the execution time of MinSumH by tMSH, then Figure 1—right shows the ratios of tMS/tMSH, and it is obvious that these ratios grow practically linearly with R; that is, we have tMS/tMSH~R. Because MinSum’s time complexity is O(R5), the fact that tMS/tMSH~R would mean that the time complexity of MinSumH is O(R4). While this cannot be theoretically justified due to heuristics incorporated into MinSumH, all presented experiments (Table 2 and Table 3, and Figure 1) show that in practice we may expect the execution time of MinSumH to exhibit almost an order of magnitude weaker dependence on R than the execution time of MinSum.
In summary, it is demonstrated that MinSumH is always a few times faster than MinSum and the time complexity of MinSumH with regard to the scale of the network R is practically O(R4), instead of O(R5) for MinSum.

5. Approximate MinSum Algorithm

MinSum and MinSumH are both globally convergent algorithms and they are guaranteed to find a stationary point of the objective function, just like the gradient optimization method which they resemble. Because most traffic models are smooth and mildly curved (i.e., polynomial), and presumably convex, this means that MinSum and MinSumH mostly find a global solution. In other words, they are perfectly accurate.
Yet, in view of their purpose, this may not always be advantageous and desirable. Namely, in real traffic it is completely irrelevant whether there are several vehicles more or less on a route carrying (likely) a few hundred of them. On the other hand, for a real-time (dynamic) route assignment, the duration of optimization (that is, execution time of optimization algorithms) is essential and we would readily accept a slightly less accurate solution in exchange for a faster optimization. This is the idea behind the approximate MinSum variant, which identifies the pair of routes appropriate for the transfer of vehicles without calculating the objective function itself. Avoiding the only critical operation in the two nested for-loops, this approximate algorithm reduces the complexity with regard to the number of critical operations to a mere O(R) and time complexity theoretically to O(R3), though in the range of interest it can also be regarded as O(R) (which will be apparent shortly from the experimental results).
To understand the mathematical foundation of the approximate MinSum, we must recall how MinSum identifies the best pair of routes (the pair selected for the transfer of vehicles). For each pair of routes, MinSum performs a trial transfer of only one vehicle and calculates the resulting change in the objective function φ. The pair which produces the strongest reduction of φ is selected as the best pair. Thus, MinSum performs a coarse numerical derivation of the objective function with respect to the number of vehicles transferred between only the two selected routes (and, at the same time, it checks whether transfer of at least one vehicle is possible). However, as mentioned in the comment below (2), if interferences among the routes are not significant, the dominant contribution to travel time tr on the rth route is produced by the incomplete cubic polynomial term. This means that, as long as the assumption about weak interferences among the routes is justified, we can satisfactorily approximate the true derivative (i.e., gradient) ∇φ = (n)/dn as follows (note that dn means differentiation with respect to all nr, r = 1, 2, …, R).
From (3) we have
φ = d[n1t1(n) + n2t2(n) + … + nRtR(n)]/dn.
Neglecting correlations means that each tr depends on nr only, i.e., tr(n) ≈ tr(nr), and
φd[n1t1(n1)]/dn1 + d[n2t2(n2)]/dn2 + … + d[nRtR(nR)]/dnR.
Since only the loads na and nb of the potential donor–acceptor pair (a, b) change, and the donor loses vehicles so that its contribution is negative, gradient (7) becomes
φ ≈ −d[nata(na)]/dna + d[nbtb(nb)]/dnb.
In the absence of correlations, the travel time is tr(nr) = β0 + βrnr3 and we find
d[nrtr(nr)]/dnr = β0 + 4βrnr3,
that is,
d[nata(na)]/dna = β0,a + 4βana3  and  d[nbtb(nb)]/dnb = β0,b + 4βbnb3
or finally
φ ≈ −(β0,a + 4βana3) + β0,b + 4βbnb3.
Relation (10) depends only on several available numbers and its calculation does not require any program loops. Thus, its calculation is an O(1) operation. Still, it approximates the true derivative (6) satisfactorily all the way to the close vicinity of the optimum (solution) because a high-accuracy derivative is needed only for fine-tuning around the optimum. Replacing the expensive trial transfers (i.e., calculation of the numerical derivative of φ) in MinSum’s for-loops with the estimate (10) of the derivative is the crucial modification introduced by the approximate MinSum, which makes it two orders of magnitude faster (with regard to execution time) than the basic MinSum. We denote the approximate MinSum as MinSumA (Algorithm 3) and prove its complexity by the experiments presented in the next section. First, we comment on its pseudocode and analyze its complexity theoretically. Below the pseudocode, a variable explanation Table 4 is provided to facilitate understanding of the algorithm.
MinSum and MinSumA have the same logic and structure; thus, here we comment on important differences only. The most important difference is certainly inside the nested for-loops (lines 8–24), where MinSumA in lines 16–18 applies (9) and (10) to estimate the derivative of φ, as opposed to MinSum’s trial transfer of a vehicle (in line 13). The most negative derivative found (variable minDerPhi), as well as the corresponding donor–acceptor pair, is stored for later usage. Thus, inside MinSumA’s for-loops there is only O(1) job to perform.
Unfortunately, relying on the derivative (whether exact or approximate), instead of on trial transfers like in MinSum, necessarily makes MinSumA susceptible to mistakes. This is an inherent drawback of MinSumA which limits its accuracy and causes complications with stopping criteria. The problem lies in the fact that the slope of the gradient (derivative) is not necessarily the steepest between the pair of routes that allows further transfers of an integer number of vehicles. It is normally possible that the steepest derivative is produced by a pair that can exchange less than a (whole) vehicle before the pair’s mutual optimum is achieved. If, in addition, just an approximation of the derivative is used, we have many reasons to doubt the information we receive. This imperfection of the derivative, and even more of its approximation, when used as an attribute (indicator) of the best pair of routes can cause two kinds of oversights. First, the algorithm can wrongly ascertain that further reduction of φ is not possible, and second, the algorithm can select a wrong pair, that is, the one that might even deteriorate the current solution.
Algorithm 3: MinSumA Algorithm: approximate minimization of the total (i.e., average) travel time
1:   set initial route loads {n1, n2, …, nR}
2:   epsilon = the largest (least negative) acceptable relative change of φ (e.g., –0.01)
3:   Phi = φ(n1, n2, …, nR)
4:   do
5:    previousSet = {n1, n2, …, nR}
6:    previousPhi = Phi
7:    minDerPhi = ∞
8:    for (all routes a = 1 to R)
9:       if (there are no more vehicles on route a)
10:         continue outer for loop (with iterator a)
11:       end if
12:       for (all routes b = 1 to R)
13:         if (a == b)
14:           continue internal for loop (with iterator b)
15:         end if
16:         dtdnD = approximate derivative d(nata)/dna //(9)—left
17:         dtdnA = approximate derivative d(nbtb)/dnb //(9)—right
18:         derPhi = −dtdnD + dtdnA
19:         if (derPhi < minDerPhi)
20:           minDerPhi = derPhi
21:           donor = a; acceptor = b;
22:         end if
23:       end for
24:    end for
25:    if (minDerPhi >= 0)
26:       return the current set {n1, n2, …, nR}
27:    end if
28:    eta = the number of vehicles to be transferred
29:    if (eta > 0)
30:       transfer eta vehicles from donor to acceptor
31:    else
32:       return the current set {n1, n2, …, nR}
33:    end if
34:    Phi = φ(n1, …, na − eta, …, nb + eta, …, nR)
35:    if (Phi > previousPhi)
36:       return previousSet
37:    end if
38:   while ((Phi/previousPhi − 1) <= epsilon and eta >= 5)
39:   return the current set {n1, n2, …, nR}
In the beginning of optimization, transfers are possible between almost all pairs of routes. As we approach the solution (optimum), fewer and fewer pairs allow further transfers, and the inability of the algorithm to recognize the right pair forces us to monitor several quantities. Therefore, the main stopping criterion (the while-condition in line 38) is based on the relative change in φ in two consecutive iterations, as well as on the number of vehicles transferred in the last iteration. Specifically, the algorithm normally stops when the relative change in φ becomes “insufficiently negative or even positive” (the first part of the while-condition) or the number of transferred vehicles drops below a certain threshold (the second part of the while-condition). To this purpose, we set the tolerance epsilon and store the value of φ in the previous iteration (variables epsilon and previousPhi). The tolerance epsilon is supposed to be a negative number because the algorithm is allowed to perform the next iteration only if the current reduction (relative change) in φ is sufficiently negative (meaning that φ decreases satisfactorily).
Monitoring several quantities enforces the second distinguishing difference in MinSumA compared to MinSum, i.e., the need for several exits (compared to only one in MinSum). The first exit is in line 26, and it corresponds to MinSum’s exit, that is, to a situation where there is no pair of routes that can further reduce the objective function. The if-statement in line 25 of MinSumA is equivalent to line 20 in MinSum, but unlike MinSum whose decision is always indubitable, MinSumA can mistakenly finish too early, as explained previously. There is nothing we can do about this kind of mistake, but fortunately, it is not very disruptive and the algorithm easily finds almost perfect solutions (see the section with the experimental results).
The next exit (line 32) deals with possible useless selection of route pairs. It solves the situation in which a pair is selected, but not even a single vehicle can be transferred for some reason (the auxiliary routine yields eta = 0 in line 28). Since the solution cannot be changed, the algorithm stops and returns the current set {nr} = {n1, n2, …, nR}.
The exit in line 36 solves a more subtle situation where a route pair is selected and a few vehicles can be transferred, so the algorithm, in line 34, updates the solution set {nr} and calculates the new value of the objective function φ. Due to imperfection of MinSumA’s selection of route pairs, it can happen that this new solution is worse than the previous one, and in that case, the algorithm returns the previous (the best found) set {nr}. Without this control by the if-statement in lines 35–37 and possible exit, the algorithm would arrive at the while-statement in line 38 and because of the insufficient number of transferred vehicles, the second while-condition would break the do-while loop and the algorithm would return (in line 39) the current set {nr}, which would be worse than the previous one.
If everything is “normal”, that is, selection of pairs is possible and more than five vehicles are transferred, line 39 serves as a regular exit used when the reduction of φ is simply not satisfactory, though nothing suspicious happened.
Because of the approximations used, MinSumA can never reach a stationary point (except by chance). Hence, MinSumA is more complicated than MinSum or MinSumH and not as perfectly accurate as them, but in return, it is much faster. Additionally, MinSumA’s complexity, expressed by the number of critical operations, is theoretically only O(R), that is, two orders of magnitude lower than that of MinSum or MinSumH. This is because the only critical operation is the calculation of φ in line 34 (outside for-loops), and we have already seen (in analysis of MinSum and MinSumH) that the number of iterations grows proportionally to R.

6. Experimental Analysis of Performance and Complexity of MinSumA

To analyze MinSumA, we repeat the same experiments as before with MinSum and MinSumH. Therefore, here we do not explain the setup details but provide just the results. As before, we are interested in the convergence rate (measured by the number of operations needed for the algorithm to find a solution) and complexity with regard to the number of routes R (scale of the problem).
Table 5 shows the same data for MinSumA as Table 3 contains for MinSumH. If we compare the nφ, nφVT, and nφTOT columns in Table 5 with those in Table 2 and Table 3, or just the respective ratios in the rightmost columns of Table 3 and Table 5, an immediate observation is that MinSumA outperforms MinSumH with respect to nφ and nφTOT by even more than MinSumH outperforms MinSum. The only commensurable quantity is nφVT, although MinSumA is the best with regard to it as well (except for R = 5 compared with MinSumH, which is a consequence of random synthetic routes). In other words, as to the convergence rate, MinSumA is markedly superior to both MinSum and MinSumH.
To understand the nφVT results, we recall that nφVT is the number of critical operations in auxiliary routines, and the number of calls to auxiliary routines is strongly correlated with the number of transfers of vehicles. MinSum and MinSumA initiate transfers of vehicles following the same logic and this leads to the similarity of their nφVT results. MinSumH intentionally performs more transfers and this is why its nφVT is somewhat larger.
Besides the speed, i.e., convergence rate, another crucial property of algorithms in view of optimization of real traffic is scalability, that is, complexity with regard to the scale of the network R. The previous theoretical analysis showed that MinSumA’s complexity expressed as the number of critical operations was only O(R), and experimental data in Table 5 (columns nφ and nφTOT) clearly confirm the theoretical result. Moreover, we see that the growth of nφ and nφTOT is even slower than the growth of R, but this cannot be established theoretically.
As always, the most relevant measure of performance is execution time. Figure 2 shows the data presented in Figure 1 together with the results of the same experiment with MinSumA. Unlike Figure 1, the ordinate axis in Figure 2—left is logarithmic because the range of values is too large for readability on a linear scale (with a linear axis the curves of MinSumA are nearly horizontal and barely visible). To facilitate insight into the exact relationships, we also provide Table 6, which contains an extract (for a network load of 75%) from the data presented in Figure 2.
The increasing distance of curves, with the increase in R, for different algorithms in Figure 2—left is an obvious indication of the growing advantage of MinSumA as the scale of the problem increases. For instance, the execution time of MinSumA for R = 5 is about 2.5 times shorter than that of MinSum, and for R = 25 this rises to almost 130 times, which is easily noticeable as the larger distance between the MinSum and MinSumA curves in Figure 2. In addition, a larger distance between the MinSumH and MinSumA curves than between MinSum and MinSumH visually proves the previous assertion (in the comment on Table 5) that MinSumA outperforms MinSumH more than MinSumH outperforms MinSum.
Figure 2—right graphs the ratios of data in Table 6 and enables more precise insight into the relationships among the execution times. The brown curve is the ratio of execution times of MinSum and MinSumH, i.e., the ratio tMS/tMSH, and the blue curve is the graph of tMSH/tMSA values. The ratio tMS/tMSH exhibits an almost perfect linear trend, which we have already seen in Figure 1—right, and this linear trend shows that the measured MinSumH complexity is a whole order of magnitude lower than the complexity of MinSum. The same holds for the complexities of MinSumA and MinSumH because the blue curve (ratio tMSH/tMSA) is also linear (a mild curvature is just due to randomly generated synthetic cities), and this means that the complexity of MinSumA is an order of magnitude lower than the complexity of MinSumH. Hence, we have tMS/tMSH~R and tMSH/tMSA~R and it follows that tMS/tMSA~R2. As we already know that the time complexity of MinSum is O(R5), it follows that the time complexity of MinSumA is O(R5)/O(R2) = O(R3) or two orders of magnitude lower. Furthermore, because the time complexity of the nested for-loops is O(R2), the remaining O(R3)/O(R2) = O(R) perfectly agrees with the theoretically derived O(R) complexity of MinSumA with regard to critical operations only.
In summary, the experimental results confirm the remarkable speed (convergence rate) and the extraordinarily low complexity of MinSumA. This promotes MinSumA as a very promising candidate algorithm for real-time SO optimization of real traffic, but it remains to be proven that it is also sufficiently accurate, meaning that the route assignment it returns is the same as or at least sufficiently close to the perfect one.
In doing so, we compare the objective function values and distributions of vehicles returned by MinSum and MinSumA. Because MinSum is perfectly accurate and its solution is the theoretical minimum of the objective function (more precisely, its discrete stationary point), MinSum’s results are the reference against which the route assignment yielded by MinSumA is evaluated. This means that the measure of MinSumA’s accuracy is the relative difference (error) of its result (the final value of the objective function φ) with respect to the result of MinSum, i.e., (φMSAφMS)/φMS. The relative differences (errors) obtained in the experiments presented so far are graphed in Figure 3.
Obviously, all the errors in the presented experiments are well below 1% (not only the averages, but all individual values). For network loads of 75% and 95% (of the jam load) the average errors are even below 0.2%, and the largest recorded maximum does not exceed 0.3%. Of course, the errors are always positive because MinSumA can never reduce the objective function down to the theoretical minimum (as MinSum does). We also observe that errors, as well as their scattering (dispersion), decrease with increase in the network load. Oppositely, the errors increase (practically linearly) with the increase in R. The observed trends are quite logical and expected, as we will now explain.
The inverse relationship between the network load and MinSumA’s errors is due to the sensitivity of the objective function to the changes in control variables nr. In a heavily loaded network, a vehicle more or less on a route means just a negligible difference in the objective function value. For this reason, transfers of only a few vehicles during optimization occur only during the fine-tuning of the solution, i.e., in the very vicinity of the optimum. This enables MinSumA to operate long enough to closely approach the exact optimum, so its accuracy improves as the network load increases. In contrast, in a weakly loaded network the transfer of even only one vehicle can noticeably influence the objective function, and even in the early stages of optimization the algorithm mostly transfers only a few vehicles. Therefore, the number of transferred vehicles quickly drops below the threshold and the algorithm stops before it fine-tunes the solution. If needed, the accuracy at different loads can easily be controlled by an adaptive threshold, but there is not much sense in doing so because there is no need for optimization of traffic in an empty city.
The increase in errors with the increase in R is a matter of dimensionality. More routes mean more control variables (dimensions) in the optimization, and in high-dimensional optimization it frequently happens that the algorithm cannot advance in other dimensions until it is released by a minor adjustment (fine-tuning) in just one dimension. This minor adjustment usually requires the transfer of only a few vehicles, and then MinSumA can stop too early because of its vehicle number threshold. This problem could also be mitigated by an adaptive threshold, but we see that MinSumA’s accuracy is more than satisfactory even without such interventions.
Finally, we compare distributions of vehicles (flows) yielded by MinSumA and MinSum, and the reader should recall that MinSum’s solution is the best distribution theoretically. For the sake of brevity, we report just one typical result. Table 7 contains distributions obtained for synthetic zones with R = 10 routes between them and for traffic demand of 75% of the jam load (exactly 27,703 vehicles). In this experiment, the starting travel time, for a uniform starting distribution of vehicles over the available routes, was about 365 min on average for all vehicles, and the lowest possible (yielded by MinSum) was 219.27 min. MinSumA returned 219.38 min or relatively 0.05% worse travel time. The associated route assignment (distribution of vehicles) is listed in Table 7. The values in the first two columns are the number of vehicles assigned to each route.
The largest relative difference for all 10 routes is less than 2%, and this happened for only two routes. In real traffic, unpredictable disturbances (accidents, pedestrians, delivery vehicles, etc.) influence travel time far more than the 2% discrepancy in route assignment, so there is no doubt that MinSumA’s accuracy is more than sufficient.
In short, we may conclude that MinSumA satisfies even the strictest optimization requirements, and it is by far the fastest of all the compared algorithms.

7. A Real-World Example—The City of Zagreb

To demonstrate the performance of the proposed algorithms in a real traffic network, we briefly compare them on the model of the city of Zagreb. This model was used in [19] for comparison of the MinSum and Frank–Wolfe algorithms, whereby the traceability to all other methods was established. There is nothing special in the Zagreb example and it is used just for convenience, since the authors have deep insight into Zagreb traffic specifics (for instance, in correlations among the routes). Yet, the model itself is not the subject of this article, and the interested reader should seek the details in [19] (a geographical map with the routes inscribed and an explanation of the mathematical formulation).
For this case study, the topological graph of the routes used, shown in Figure 4, is sufficient. There are five routes between two city zones, Jankomir and Sesvete. Some of the routes partly overlap, i.e., have common segments (denoted by two numbers in the labels), which causes strong mutual dependences of traffic flows.
For a better sense of the actual driving conditions on these routes, we also provide their main characteristics in Table 8 (data from Table 2 in [19]).
First, we repeat the counting of the relevant quantities, like in the previous analyses, with the difference that now we cannot change the number of routes R; only the network load is varied. The results are in Table 9, whose columns have the same meanings as in the previous tables, except the rightmost column which is now entitled “MS/*”. This column contains the ratios of nφTOT for MinSum and for both other algorithms. Thus, the asterisk in the title replaces both MSH and MSA, and which one is meant is determined by the name of the algorithm in the first column of the table.
The most interesting columns are nφTOT and MS/* because they indicate the convergence rates and the ratios of convergence rates, respectively. We have already seen for synthetic cities that the differences among the algorithms generally increase with the network complexity and scale. In this experiment, as there are only five routes in the Zagreb model, the differences among the algorithms are not very large, but the important point here is that even in the worst setup (small network) the modified variants are always faster than the basic MinSum. In Table 3 we see that on five synthetic routes (and load of 75%) MinSumH was 1.2 times faster than MinSum, and in Table 5 we see that in the same experiment MinSumA was three times faster than MinSum. With the Zagreb model the corresponding ratios (Table 9) are 1.3 (for MinSumH) and 2.1 (for MinSumA). The somewhat worse performance of MinSumA on the Zagreb model than on the synthetic models is nothing concerning and is just a matter of chance due to the random topology of synthetic cities. Actually, commensurable ratios with the synthetic and Zagreb models are clear evidence of the validity of synthetic models used in the previous experiments. Putting this fact together with the trends observed for larger synthetic networks, we may hope that in real-world applications the proposed algorithms will be at least as successful as suggested by the tests on virtual cities.
This is further supported by Figure 5. It shows execution times of a single optimization applying all the compared algorithms for three network loads. The consistent shapes of the bar groups confirm that mutual relationships among the execution times are stable and almost independent of the network load (in Figure 2 we can observe this for synthetic models as closely grouped lines). The bar heights in Figure 5, similarly to the levels of the curves in Figure 2, confirm that the convergence rates of the proposed algorithms consistently reflect their background ideas and motivations; i.e., MinSumA is always the fastest, MinSumH has a medium rate, and MinSum is the slowest.

8. Conclusions

The traffic or route assignment problem is old but increasingly important because of the rapid growth of the world population and traffic demands. Despite the technological advancements and impressive processing power of contemporary computers, real-time traffic assignment is still a challenge and an active field of research. The MinSum algorithm is one of the simplest, (computationally) the fastest, and the most robust solutions, but for real-time applications in large urban areas further acceleration is desirable.
This paper presents two programmatically minor, yet influential, modifications of MinSum that significantly accelerate it and reduce its complexity. Both proposed variants are progressively faster as the network grows. On large networks (many routes), heuristic variant MinSumH can be several times faster than the basic MinSum, and the acceleration is due to a significant reduction in the number of iterations needed to find a solution. The time complexity is reduced by almost an order of magnitude, practically to O(R4). At the same time, MinSumH retains MinSum’s perfect accuracy and all other prominent features. The approximate variant MinSumA sacrifices perfect accuracy in exchange for a strong acceleration and reduction in time complexity by two orders of magnitude, to O(R3). The acceleration is achieved by avoiding trial vehicle transfers and substituting them with calculation of the approximate derivative of the objective function. Still, MinSumA retains all other desirable features, just like MinSumH. Table 10 summarizes the most important and distinguishing characteristics of all three algorithms.
The improvements achieved by the proposed algorithms are significant and open new possibilities in the field of dynamic SO traffic assignment. This especially refers to MinSumA whose remarkable speed and extraordinarily low complexity are unmatched by any other algorithm and can be decisive in real-time applications. As far as the authors know, at present there is no other algorithm close to MinSumA’s speed and O(R3) time complexity, which makes MinSumA the first algorithm for SO traffic assignment that is sufficiently fast and scalable for real-time usage.

Author Contributions

Conceptualization, N.H.; methodology, N.H., D.B. and E.I.; software, N.H. and D.B.; validation, N.H., D.B., E.I. and M.G.; formal analysis, N.H., D.B., E.I. and M.G.; investigation, N.H. and D.B.; resources, N.H., D.B. and E.I.; data curation, N.H. and D.B.; writing—original draft preparation, N.H.; writing—review and editing, N.H., D.B., E.I. and M.G.; visualization, N.H. and D.B.; supervision, N.H., D.B. and E.I.; project administration, N.H. and D.B.; funding acquisition, N.H., D.B. and E.I. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by The Croatian Agency for SMEs, Innovation and Investments (HAMAG-BICRO), grant number NPOO.C3.2.R3-I1.06.0235 and The APC was funded by Ministry of Science, Education and Youth. The research was conducted as an activity of the Laboratory for Statistical Modelling and Optimization of Faculty of Electrical Engineering and Computing, and partly among the activities of the Center of Research Excellence for Data Science and Cooperative Systems supported by the Ministry of Science, Education and Youth of the Republic of Croatia.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sheffi, Y. Urban Transportation Networks; Prentice-Hall: Englewood Cliffs, NJ, USA, 1985. [Google Scholar]
  2. Beckmann, M.; McGuire, C.B.; Winsten, C.B. Studies in the Economics of Transportation; Yale University Press: New Haven, CT, USA, 1956. [Google Scholar]
  3. Elimadi, M.; Abbas-Turki, A.; Koukam, A.; Dridi, M.; Mualla, Y. Review of Traffic Assignment and Future Challenges. Appl. Sci. 2024, 14, 683. [Google Scholar] [CrossRef]
  4. Fitzgerald, R.J.; Banaei-Kashani, F. City-Scale System-Optimal Route Planning with Route Replanning. In Proceedings of the IEEE International Conference on Big Data, Orlando, FL, USA, 15–18 December 2021; pp. 322–327. [Google Scholar] [CrossRef]
  5. Gao, Y.; Swaminathan, K.; Chui, Z.; Su, L. Predictive Traffic Assignment: A New Method and System for Optimal Balancing of Road Traffic. In Proceedings of the IEEE 18th International Conference on Intelligent Transportation Systems, Gran Canaria, Spain, 15–18 September 2015; pp. 400–407. [Google Scholar] [CrossRef]
  6. Mehrabipour, M.; Hajbabaie, A. A Distributed Gradient Approach for System Optimal Dynamic Traffic Assignment. IEEE Trans. Intell. Transp. Syst. 2022, 23, 17410–17424. [Google Scholar] [CrossRef]
  7. Hu, X.-M.; Duan, Y.-H.; Li, M.; Zeng, Y. Hyper-Heuristic Algorithm for Urban Traffic Flow Optimization. In Proceedings of the 2023 15th International Conference on Advanced Computational Intelligence (ICACI), Seoul, Republic of Korea, 6–9 May 2023; pp. 1–7. [Google Scholar] [CrossRef]
  8. Shen, W.; Zhang, H.M. System optimal dynamic traffic assignment: Properties and solution procedures in the case of a many-to-one network. Transp. Res. Part B Methodol. 2014, 65, 1–17. [Google Scholar] [CrossRef]
  9. Wang, C.; Atkison, T.; Park, H. Dynamic adaptive vehicle re-routing strategy for traffic congestion mitigation of grid network. Int. J. Transp. Sci. Technol. 2024, 14, 120–136. [Google Scholar] [CrossRef]
  10. Strasser, B.; Wagner, D.; Zeitz, T. Space-Efficient, Fast and Exact Routing in Time-Dependent Road Networks. Algorithms 2021, 14, 90. [Google Scholar] [CrossRef]
  11. Elimadi, M.; Abbas-Turki, A.; Koukam, A. Distributed Artificial Intelligence for Traffic Assignment in Smart Cities. In Proceedings of the 2023 9th International Conference on Control, Decision and Information Technologies (CoDIT), Rome, Italy, 3–6 July 2023; pp. 579–585. [Google Scholar] [CrossRef]
  12. Liao, X.-C.; Chen, W.-N.; Jia, Y.-H.; Qiu, W.-J. Towards Scalable Dynamic Traffic Assignment with Streaming Agents: A Decentralized Control Approach Using Genetic Programming. IEEE Trans. Emerg. Top. Comput. Intell. 2024, 8, 942–955. [Google Scholar] [CrossRef]
  13. Akopov, A.S.; Beklaryan, L.A. Evolutionary Synthesis of High-Capacity Reconfigurable Multilayer Road Networks Using a Multiagent Hybrid Clustering-Assisted Genetic Algorithm. IEEE Access 2025, 13, 53448–53474. [Google Scholar] [CrossRef]
  14. Yu, S.; Ding, C.; Zhu, K. A hybrid GA–TS algorithm for open vehicle routing optimization of coal mines material. Expert Syst. Appl. 2011, 38, 10568–10573. [Google Scholar] [CrossRef]
  15. Hvattum, L.M. Where to Split in Hybrid Genetic Search for the Capacitated Vehicle Routing Problem. Algorithms 2025, 18, 165. [Google Scholar] [CrossRef]
  16. Babazadeh, A.; Javani, B.; Gentile, G.; Florian, M. Reduced gradient algorithm for user equilibrium traffic assignment problem. Transp. A Transp. Sci. 2020, 16, 1111–1135. [Google Scholar] [CrossRef]
  17. Chen, A. Effects of Flow Update Strategies on Implementation of the Frank-Wolfe Algorithm for the Traffic Assignment Problem. Transp. Res. Rec. J. Transp. Res. Board 2001, 1771, 132–139. [Google Scholar] [CrossRef]
  18. Chen, A.; Lee, D.H. Path-Based Algorithms for Large Scale Traffic Equilibrium Problems: A Comparison Between DSD and GP. In Proceedings of the 78th Annual Meeting of the Transportation Research Board, Washington, DC, USA, 10–14 January 1999. [Google Scholar]
  19. Hlupić, N.; Basch, D.; Ivanjko, E.; Prister, J. An Optimized Route Assignment for Preventing Traffic Jams. IEEE Access 2025, 13, 61207–61224. [Google Scholar] [CrossRef]
  20. Cormen, T.H.; Leiserson, C.E.; Rivest, R.L.; Stein, C. Introduction to Algorithms; The MIT Press: Cambridge, MA, USA, 2009. [Google Scholar]
  21. Kachroo, P.; Sastry, S. Travel Time Dynamics for Intelligent Transportation Systems: Theory and Applications. IEEE Trans. Intell. Transp. Syst. 2016, 17, 385–394. [Google Scholar] [CrossRef]
  22. Johnson, R.; Wichern, D. Applied Multivariate Statistical Analysis, 6th ed.; Pearson Education Limited: London, UK, 2014. [Google Scholar]
Figure 1. Left—execution times of a single optimization with MinSum and MinSumH for several numbers of routes. The values in the left figure are averages in 1000 repetitions of the same optimization. Right—ratios of execution times from the left figure (MinSum/MinSumH).
Figure 1. Left—execution times of a single optimization with MinSum and MinSumH for several numbers of routes. The values in the left figure are averages in 1000 repetitions of the same optimization. Right—ratios of execution times from the left figure (MinSum/MinSumH).
Algorithms 18 00609 g001
Figure 2. Left—average execution times, obtained for 10 sets of synthetic routes for each R, of a single optimization with all three algorithms. For each algorithm there are three curves (for route loads 50%, 75%, and 95% of the jam load). Right—the ratios of average execution times tMS/tMSH and tMSH/tMSA in Table 6 (i.e., for 75% load).
Figure 2. Left—average execution times, obtained for 10 sets of synthetic routes for each R, of a single optimization with all three algorithms. For each algorithm there are three curves (for route loads 50%, 75%, and 95% of the jam load). Right—the ratios of average execution times tMS/tMSH and tMSH/tMSA in Table 6 (i.e., for 75% load).
Algorithms 18 00609 g002
Figure 3. Relative differences (errors) (φMSAφMS)/φMS of MinSumA and their bounds. The solid lines are the average relative errors, and other types of lines are the error bounds, i.e., minimum and maximum errors recorded in all repetitions. The curves of the same color refer to the same route load (50%, 75%, or 95% of the jam load). The error bounds for each load are denoted by the same, distinct line type.
Figure 3. Relative differences (errors) (φMSAφMS)/φMS of MinSumA and their bounds. The solid lines are the average relative errors, and other types of lines are the error bounds, i.e., minimum and maximum errors recorded in all repetitions. The curves of the same color refer to the same route load (50%, 75%, or 95% of the jam load). The error bounds for each load are denoted by the same, distinct line type.
Algorithms 18 00609 g003
Figure 4. Topological graph of the Zagreb network used in this experiment. The graph edges represent the route segments (constituted of many streets and roads), and the routes are numbered from 1 to 5. The edge labels denote the routes passing through a particular segment, and two numbers in a label denote the two routes that share a particular segment.
Figure 4. Topological graph of the Zagreb network used in this experiment. The graph edges represent the route segments (constituted of many streets and roads), and the routes are numbered from 1 to 5. The edge labels denote the routes passing through a particular segment, and two numbers in a label denote the two routes that share a particular segment.
Algorithms 18 00609 g004
Figure 5. Execution times on the Zagreb model for network loads 50%, 75%, and 95% of the jam load.
Figure 5. Execution times on the Zagreb model for network loads 50%, 75%, and 95% of the jam load.
Algorithms 18 00609 g005
Table 1. Variable explanation table.
Table 1. Variable explanation table.
VariableRole
startPhiStarting value of the objective function Phi, that is, its value for the initial distribution of vehicles (flows).
PhiValue of the objective function in arbitrary moments.
minDeltaPhiStorage for the strongest reduction of the objective function achieved during trial transfers, that is, during identification of the best pair of routes. Precisely, the lowest recorded value of the difference Phi − startPhi.
donorIndex a of the route in the best pair (a, b) which will lose vehicles once the best pair has been identified.
acceptorIndex b of the route in the best pair (a, b) which will receive vehicles once the best pair has been identified.
Table 2. Results for MinSum with network load set to 75% of jam load. Table values are averages obtained for 10 sets of routes for each R.
Table 2. Results for MinSum with network load set to 75% of jam load. Table values are averages obtained for 10 sets of routes for each R.
RIterationsTransfersnφnφVTnφTOT
511.410.4239.426265.4
1022.721.72065.753.72119.4
1532.431.46836.478.26914.6
2041.340.315,735.399.515,834.8
2552.451.431,492.4127.431,619.8
Table 3. Results for MinSumH with network load set to 75% of jam load. Table values are averages obtained for 10 sets of routes for each R.
Table 3. Results for MinSumH with network load set to 75% of jam load. Table values are averages obtained for 10 sets of routes for each R.
RIterationsTransfersnφnφVTnφTOTMS/MSH
57.422.1171.156.3227.41.2
108.752836128.8964.82.2
159.785.52123.5210.92334.43.0
2010.4122.24075.2300.24375.43.6
2511.1155.16816.1380.57196.64.4
Table 4. Variable explanation table. Only newly introduced variables are listed; the others have the same roles as explained in Table 1.
Table 4. Variable explanation table. Only newly introduced variables are listed; the others have the same roles as explained in Table 1.
VariableRole
previousSetStorage for the set {n1, n2, …, nR} from the previous iteration. This previous set can be the best solution in some cases.
previousPhiValue of the objective function in the previous iteration. Used for regular stopping of the algorithm.
minDerPhiStorage for the minimum value of the (approximate) derivative of the objective function.
Used for identification of the best pair of routes.
Table 5. Results for MinSumA with network load set to 75% of jam load. Table values are averages obtained for 10 sets of routes for each R.
Table 5. Results for MinSumA with network load set to 75% of jam load. Table values are averages obtained for 10 sets of routes for each R.
RIterationsTransfersnφnφVTnφTOTMS/MSA
57.46.41475893.0
1013122512014514.6
1516153110013152.8
2021204015019083.3
25242346140186170.0
Table 6. Execution times in milliseconds of a single optimization with all three algorithms analyzed for several numbers of routes and network load set to 75% of the jam load. Table values are averages obtained for 10 sets of synthetic routes for each R.
Table 6. Execution times in milliseconds of a single optimization with all three algorithms analyzed for several numbers of routes and network load set to 75% of the jam load. Table values are averages obtained for 10 sets of synthetic routes for each R.
RMinSum [ms]MinSumH [ms]MinSumA [ms]
50.0040.0030.0016
100.1060.0480.0084
150.7020.2350.0169
202.6530.7280.04
257.3231.7050.0609
Table 7. Assignment to 10 routes yielded by MinSumA and MinSum.
Table 7. Assignment to 10 routes yielded by MinSumA and MinSum.
MinSumMinSumAMSA–MSRelative %
22012243421.9
16011587−14−0.9
30513080291
36493618−31−0.8
1533153960.4
3185318830.1
28292807−22−0.8
37773723−54−1.4
3729372900
21482189411.9
Table 8. The main characteristics of the routes in Figure 4.
Table 8. The main characteristics of the routes in Figure 4.
Route 1Route 2Route 3Route 4Route 5
length [km]28.32119.221.231.5
free travel time [min]4945352722
nominal load [veh]20031710140712052221
jam load [veh]504337423421377811,228
Table 9. Counts of the relevant quantities on the Zagreb model for all three compared algorithms and for three network loads (50%, 75%, and 95% of the jam load). The ratios are given row-wise; that is, they are ratios of values in the matching rows (regarding the load) for different algorithms.
Table 9. Counts of the relevant quantities on the Zagreb model for all three compared algorithms and for three network loads (50%, 75%, and 95% of the jam load). The ratios are given row-wise; that is, they are ratios of values in the matching rows (regarding the load) for different algorithms.
Load %IterationsTransfersnφnφVTnφTOTMS/*
501413294353291
MinSum751312273323051
951514315383531
50718159442031.6
MinSumH75822183582411.3
95823184592431.5
50109191131322.5
MinSumA751110211221432.1
951413271311582.2
Table 10. Summary of characteristics of the presented algorithms. MinSum is the reference and convergence rates (speeds) of other algorithms are given as the ratios of their rates and the convergence rate of MinSum.
Table 10. Summary of characteristics of the presented algorithms. MinSum is the reference and convergence rates (speeds) of other algorithms are given as the ratios of their rates and the convergence rate of MinSum.
Convergence Rate (Speed)Complexity (Critical Operations)Complexity (Time)Accuracy
MinSum1O(R3)O(R5)perfect
MinSumHup to 5O(R3),
closer to R2
O(R5),
closer to R4
perfect
MinSumA2 to 130O(R)O(R3)approximate; errors below 1%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Hlupić, N.; Basch, D.; Ivanjko, E.; Gregurić, M. Two Modifications of MinSum Algorithm for Efficient System-Optimal Traffic Assignment. Algorithms 2025, 18, 609. https://doi.org/10.3390/a18100609

AMA Style

Hlupić N, Basch D, Ivanjko E, Gregurić M. Two Modifications of MinSum Algorithm for Efficient System-Optimal Traffic Assignment. Algorithms. 2025; 18(10):609. https://doi.org/10.3390/a18100609

Chicago/Turabian Style

Hlupić, Nikica, Danko Basch, Edouard Ivanjko, and Martin Gregurić. 2025. "Two Modifications of MinSum Algorithm for Efficient System-Optimal Traffic Assignment" Algorithms 18, no. 10: 609. https://doi.org/10.3390/a18100609

APA Style

Hlupić, N., Basch, D., Ivanjko, E., & Gregurić, M. (2025). Two Modifications of MinSum Algorithm for Efficient System-Optimal Traffic Assignment. Algorithms, 18(10), 609. https://doi.org/10.3390/a18100609

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop