I Introduction
Traffic congestion is an important problem for planning of any urban city, owing to increasing traffic every day. Congestion games are an important framework for studying reallife traffic patterns, both from the roadnetwork perspective and communication network perspective. Owing to a large number of possible routes to reach their destination, it may be difficult for the users to choose the optimal path. Moreover, current traffic systems are complex and heterogeneous. One interesting source of heterogeneity is realtime traffic information. For example, consider a simple network in which some users follow route recommendations from an invehicle navigation system while others follow their own understanding. Such a scenario results in a socalled HetGame, a congestion game among heterogeneous users with different path selection objective. The dynamics and equilibria of HetGames can provide insights in network planning and centralized user routing.
Related Work: Optimality of a path itself depends on the user’s perspective. Most literature on optimal traffic assignment is divided into two main directions owing to the following two objectives: (1) The individual perspective to decide a route by choosing the least costly available path or (2) the socialist behavior to chose paths which minimizes the average cost of everyone. The first strategy may lead to an equilibrium which is the Nash equilibrium (NE) of corresponding congestion game and can be formed as an optimization problem using Wardrop’s equilibrium conditions [1]. However, this strategy is not optimal from the perspective of the city government or the city planner (e.g. department of transportation, or city government) [2]. The city planner would want the second strategy so that the total travel cost in the city to be minimized, which is popularly also known as the social optimal situation. Along with analytical studies, past literature has proposed many algorithms and numerical methods to solve the problem in an iterative manner. The problem of traffic assignment can be written as a general convex optimization which can be solved with standard optimization techniques. One promising technique is to use the FrankWolfe Algorithm to determine the optimal flows [2]. Along with networks with homogeneous users, there has been some work in studying network with some heterogeneity of users. For example, in [3], a traffic network with users with varying tradeoff preference between minimizing the latency it experiences and minimizing the money it is required to pay was studied. Scenarios where a user fraction can cooperate (known as Stackelberg equilibrium) was studied in [4]. In [5], a traffic network where random users are coexistent along with the regular traffic was analyzed to derive the optimal flow. In [6], it was shown that tolls can be used to derive incentives to make nash equilibrium and social optimum the same. Prior literature studies congestion games in which users have different utility function parameters[7, 8]. These parameters can model varying sensitivity to money, risk, fuel consumption. [9] proposed deterministic strategies for central planner in order to provide desired flows, including by randomly routing players after giving them specific guarantees about their costs. Along with networks with social and selfish objectives, there can be networks where both such users coexist. Some of the users are ready to obey central directives and some of them are purely selfish. All the mentioned work have not studied networks having users of such heterogeneous nature which is the main focus of the work.
Contributions: In this paper, we consider a heterogeneous traffic network with multiple users classes which differ considerably in their path selection objective. In particular, we consider two classes of users: ones who seek to minimize social cost (socialists) and the ones with typical greedy objective (anarchists). This work examines nonatomic congestion games with these two user classes. We develop a framework to derive optimal/equilibrium flow in such a heterogeneous game and propose an algorithm for the same. We also propose two metrics: price of anarchy and price of good behavior to evaluate the impact of anarchists and implications of central directives. We consider multiple networks to derive the optimal traffic assignment. With the help of analysis, we derive insights about these systems to help formulate central directives which can make the social optimal solution to be equal to the equilibrium. We also evaluate the proposed algorithm for a real traffic network.
Ii System Model
In this paper, we consider a traffic network with heterogeneous users (commuters/packets) termed as heterogeneous traffic network (HetTN). The traffic network is modelled as a graph with nodes and edges . There are source destination pairs with the required flow between the source and destination of pair. A path between a source destination pair consists of a set of connected edges i.e.
Let denote the set of all path between the pair. Let . Let the flow in each path be denoted by . For any edge (link) , the total traffc flow in the link is equal to the total flow in that link as contributed from all paths of all the pairs . Each link has a general latency function such that the cost incurred in that link is equal to
This latency function depends on the ink characteristics, for example, type of the link, its capacity, construction materials. We assume the traffic network is heterogeneous so that the required flow can consists of different proportion of different types of users, as defined in the following subsection.
Iia User Classes and General HetGame
We assume that there are types of users where different types differ in their proportion of the total population and traffic path selection strategy. Let denote all types of users. We assume that a type has proportion of the total demand flow for each pair . The complete traffic assignment problem can be seen as a player game termed as HetGames where the set of type users can be seen as a single player . Let the combined strategy of this player is . Given the strategy, the flow of type users in a path is given as . The utility function of the player is denoted as , where is the combined strategy and . Thus, the total flow in any link for the heterogeneous traffic network is
To clarify the type of users, we describe some of the interesting users types in the following list:

Socialist: Socialist users aim to minimize the total cost of the network which is given as
In a traffic assignment problem with socialists users only, the optimal flow is given as the argmax of [10]. Therefore, we can say that the utility function of the socialist player is average cost of the network which is given as [10].

Anarchist: Anarchist users aim to minimize their own cost, and therefore chose the path with the least link cost. For anarchist flow, the optimal flow is given as the nash equilibrium of the traffic assignment problem. In the absence of any other class of users, the optimal flow for anarchist is given as the solution of the following problem [1]
(1) Therefore anarchist player utility can be given as

ProportionallyFair Socialist: The proportionallyfair strategy tries to minimize the total cost function while maintaining fairness—conceptually, fairness requires that not even a small fraction of users experience a particularly high cost. These users minimize the cost .
IiB Anarchy HetGame
In the current paper, we will consider a particular HetGame with two classes of users: socialists with proportion and anarchists with proportion. We term this game as anarchy HetGame. For each source and destination pair , the required anarchist flow is and socialist flow is .
Let be the socialist strategy and be the anarchist strategy. For any pair , the sum of the socialist flows in all the paths is , which is required to be equal to the total demand . This results in the following flow constraint:
for socialists. This constraint is equivalent to
Similarly, for the anarchist, the flow constraint is given as
Now, in any edge , the total flow is equal to
(2) 
In the game where both classes coexist, each class will try to optimize their own flow in presence of the flow of other class according to their own path selection strategy as described above. In the next section, we will develop a framework to derive the joint optimal flow for the users of the two classes.
Iii Joint Optimal Flow
The anarchy HetGame consists of simultaneous play between two types of users trying to minimize a different cost function. From a high level, the anarchists will try to achieve nash equilibrium (NE) given the socialist flow and the socialists must find a socialist flow so that the responding NE strategy from the anarchists achieves the minimum social cost. In this section, we focus on developing a framework to derive the optimal flow. The following Theorem is particularly helpful in solving this two stage problem.
Theorem 1.
Given socialist strategy in any general anarchy HetGame, the NE of anarchist users is given as the solution of:
Proof.
See Appendix A. ∎
Now, the socialist users (or the player) must choose a strategy such that the total cost of the network is minimized. Therefore the optimal strategy is given as the solution of the optimization problem which is simultaneous solution of the two following subproblems :
such that  
such that 
where is the modified link cost function for anarchist and given as
(3) 
The link cost function is generally taken as convex (e.g., of the form , ). The above optimization is a convex problem for convex link cost functions and can be solved using the following alternative minimization 1 given and given :
Iv Analysis for Networks with Linear Latencies
In this section, we will analyze some special cases and derive optimal flow for these special cases. To compare the equilibrium/optimum performances, we define the following two terms which help in characterizing impact of a strategy.
Price of anarchy: Price of anarchy is defined as relative increase in the average cost due to presence of proportion of anarchists i.e.
Price of good behavior : Second important metric to understand the social implications of social strategy is price of good behavior which indicates the penalty a person may pay being a follower of the central directive. It is defined as the relative cost of following central directive compared to that when being selfish i.e.
Iva Network with Linear Latencies
Let us consider a traffic network with linear link cost functions i.e. . Here is the free flow time and is congestion dependency parameter and both depend on link type. For example, freeways have high and low while city streets have higher and small . For this case, the modified link cost function are given as
So, the optimization problem can be written as the following convex optimization problem:
such that 
where is given by
such that 
IvB General Twolink Linear Network
As a special case of previous subsection, we will consider a general two node two link network (See Fig 1) with linear latency. There are two possible paths in the network and unit demand flow between the two nodes. The link has latency where is the flow in that link. Without loss of generality, let us assume that . It can be observed easily that, in the absence of socialists (i.e. ), the equilibrium flow is given by NE [1] as where . We will assume that . Also, in the absence of the anarchist traffic (i.e. ), the social optimal solution is given as where .
Now for general anarchy HetGame, let the anarchist strategy be and the socialist strategy be . Using Theorem 1, we can compute the NE of the anarchist users as solution of given as
(4) 
where . The above solution indicates that socialist can in fact indirectly force anarchist to chose an arbitrary strategy via a well designed socialist flow.
For better understanding, we will take a particular instance of the above mentioned network with the following parameters: . In this case, the anarchist equilibrium is and optimal social flow is (). Fig 2 shows the optimal NE for three regions. For , shifts from the value 1 in to the value 0 in . This indicates that by diverting 20% socialist traffic to the second path, all anarchists can be forced to take the second path, while by diverting 70% socialists to the second path, all anarchists can be forced to take the first path. It is possible that not all of the above regions exist for particular values of which can restrict the fraction of anarchists which can be forced or affected by the central planner. For example, for , only anarchists at max can be forced to take the second path. It can be shown that doesn’t exist for and doesn’t exist for . Also note that as increases, the impact of on decreases as evident from the slope in region .
Now, given the NE strategy , the socialists (or a central planner such as city government) will design the flow for socialist such that total cost is minimized over all the three regions.
1. Region : the optimal solution in this region is . Since , i.e. contained in .
2. Region : the total flow in second path is always equal to and total cost is the same for all values of . Hence no minima exists in this region.
3. Region : the optimal solution in this region is . Since , i.e. it falls outside the region . Hence no minima exists in this region.
Now, based on the above discussion, we can now state the following result.
Theorem 2.
For the abovementioned two link network with anarchy, the following statements hold

When , the optimal strategy for socialist and anarchist is
In this case, the total flow in two paths is the social optimum flow as the socialist are able to compensate for the anarchist flow and bring the system to the social optimum.

When , the optimal strategy for socialist and anarchist is
In this case, the socialist cannot compensate for the anarchist traffic. All anarchists take the second link and all socialists take the first link. The total flow in the network is .

When , all strategies are optimum. The total flow is constant at and the two links offer the same cost of travel.
Fig. 3 shows the cost versus for different values of . It can be observed that as increase, the optimum value of decreases from until it reaches 0 at .
Fig. 4 shows the equilibrium flow in the network for different values of . Fig. 5 shows the variation of price of anarchy and good behavior with . It shows that increasing anarchy will hurt anarchists also as evident from the increase in the price of anarchy. It can be seen that with increasing fraction of anarchist, price of being a good citizen increases, but after a threshold, it starts decreasing and eventually becomes equal to 1 where all users start seeing the NE cost in both paths.
Corollary 1.
Consider a simple two link network with and . In this case, link cost functions are and . For this case, price of anarchy and good behavior are given as
V Numerical Results
To explore behavior of the HetGames laid out in previous sections, we studied a model of a realworld transportation network. One publiclyavailable dataset is a 24node model of the road network in Sioux Falls, SD. The model characterizes the latency on 76 links connecting 24 nodes and provides trip data in the form of 528 origindestination pairs. Each latency is a polynomial of form . As a network grows, it is infeasible to enumerate the set of all paths connecting a given sourcedestination pair. Therefore, we have selected to be the four shortest zerouser paths using Dijkstra’s algorithm.
The proposed Algorithm1 is used to compute the HetGame equilibrium flows. In each iteration, the anarchist flow is computed holding the socialist flow constant; similarly, the socialist flow is computed holding the anarchist flow constant. If the updated flows do not differ significantly from those in the previous iteration, the algorithm may terminate. Fig. 6 shows the price of anarchy and price of good behavior of the HetGame equilibrium for various values.
Traditional definition of price of anarchy (with ) is also shown in the figure. It can be seen that price of good behavior decreases with increasing fraction of anarchist. It also shows that increasing anarchy will hurt anarchists also. Both of the above observation can lead to motivating more people to be follower of central directives.
Vi Conclusions and Future Work
In this work, we derived a framework for general traffic network with heterogeneous users, including an anarchy HetGame and studied it both analytically and via numerical simulation on road network models. We discussed how social flow can be used to affect the flow of anarchists in desired direction. The work has many possible extensions. For example, HetGame with more number of user classes (e.g., proportionally fair, random, and fixed pathfollowers) can be studied. It is also interesting to analyze these systems in the presence of random noise. We can also consider the case where the socialists in the HetGame could modify their objective to be minimize of average socialist cost, neglecting the anarchist portion of the full social cost. Such strategy has potential to reduce the price of good behavior providing incentive to people who wish to adhere to central directives.
Appendix A Proof for Theorem 1
Proof.
Given the socialist strategy , the anarchist will decide their flow by computing the NE for their flow . Given , the latency they face in any edge is given by where for any strategy . Let us assume . With these new latency function, the NE of the flow following anarchist strategy will be equal to Wardrop equilibrium [1] which is given as the solution of the following problem
which is equivalent to
which will give the desired result with substitution and . ∎
References
 [1] J. Wardrop, “Some theoretic aspects of road traffic research,” ICE Proceedings: Engineering Divisions, 1952.
 [2] L. J. LeBlanc, E. K. Morlok, and W. P. Pierskalla, “An efficient approach to solving the road network equilibrium traffic assignment problem,” Transportation Research, vol. 9, no. 5, pp. 309 – 318, 1975.

[3]
R. Cole, Y. Dodis, and T. Roughgarden, “Pricing network edges for
heterogeneous selfish user,” in
Proc. ACM symposium on Theory of computing
, pp. 521–530, 2003.  [4] C. Swamy, “The effectiveness of stackelberg strategies and tolls for network congestion games,” ACM Transactions on Algorithms (TALG), 2012.
 [5] A. Chopra, D. Singh, A. S. Bedi, A. K. Gupta, and K. Rajawat, “’on socially optimal traffic flow in the presence of random users,” in Proc. IEEE ANTS, 2018.
 [6] M. Beckmann, C. B. McGuire, and C. B. Winsten, “Studies in the economics of transportation,” tech. rep., 1956.
 [7] H. Lo, X. Luo, and B. Siu, “Degradable transport network: Travel time budget of travelers with heterogeneous risk aversion,” Transportation Research Part B: Methodological, pp. 792–806, 2005.
 [8] L. Jiang, H. Mahmassani, and K. Zhang, “Congestion pricing, heterogeneous users, and travel time reliability,” Transportation Research Record: Journal of the Transportation Research Board, pp. 58–67, 2011.
 [9] S. Basu, G. Yang, T. Lianeas, E. Nikolova, and Y. Chen, “Reconciling selfish routing with social good,” arXiv preprint:1707.00208, 2017.
 [10] E. Nikolova, “Nonatomic congestion games,” Lecture notes, The University of Texas at Austin, 2014.
Comments
There are no comments yet.