The Price of Anarchy in Routing Games as a Function of the Demand

The price of anarchy has become a standard measure of the efficiency of equilibria in games. Most of the literature in this area has focused on establishing worst-case bounds for specific classes of games, such as routing games or more general congestion games. Recently, the price of anarchy in routing games has been studied as a function of the traffic demand, providing asymptotic results in light and heavy traffic. The aim of this paper is to study the price of anarchy in nonatomic routing games in the intermediate region of the demand. To achieve this goal, we begin by establishing some smoothness properties of Wardrop equilibria and social optima for general smooth costs. In the case of affine costs we show that the equilibrium is piecewise linear, with break points at the demand levels at which the set of active paths changes. We prove that the number of such break points is finite, although it can be exponential in the size of the network. Exploiting a scaling law between the equilibrium and the social optimum, we derive a similar behavior for the optimal flows. We then prove that in any interval between break points the price of anarchy is smooth and it is either monotone (decreasing or increasing) over the full interval, or it decreases up to a certain minimum point in the interior of the interval and increases afterwards. We deduce that for affine costs the maximum of the price of anarchy can only occur at the break points. For general costs we provide counterexamples showing that the set of break points is not always finite.

Nonatomic routing games provide a model for the distribution of traffic over networks with a large number of drivers, each one representing a negligible fraction of the total demand.The model is based on a directed graph with one or more origin-destination pairs, and the costs are identified with the delays incurred to go from origin to destination.The delay on an edge is a nondecreasing function of the load of players on that edge, and the delay of a path is additive over its edges.The standard solution concept for such nonatomic games is the Wardrop equilibrium, according to which the traffic in each origin-destination (OD) pair travels along paths of minimum delay.The aggregate social cost experienced by the whole traffic is therefore the product of these minimal delays multiplied by the corresponding traffic demands, summed over all OD pairs.Equilibria are known to be inefficient, so that a social planner would be able to reduce the social cost by redirecting flows along the network.The most common measure of inefficiency is the price of anarchy (PoA), that is, the ratio of the social cost at equilibrium over the minimum social cost.For nonatomic congestion games with affine costs, the value of the PoA is bounded above by 4/3, and this bound is known to be sharp (Roughgarden and Tardos, 2002).On the other hand, for a large class of cost functions, including all polynomials, the PoA converges to 1 as the traffic demand goes either to 0 or to infinity.In other words, equilibria tend to perfect efficiency both in light and heavy traffic (Colini-Baldeschi et al., 2020, Wu et al., 2021).
Empirical studies have shown that in real networks, and for intermediate levels of the demand, the PoA tends to oscillate and often does not reach the worst case bounds.Figure 1  typical profile of the PoA as a function of the traffic demand.It starts at 1 for low levels of traffic, then it exhibits some oscillations with a number of nonsmooth spikes, and eventually it decreases smoothly back to 1 in the highly congested regime.The shape and number of these oscillations and spikes is the object of this paper.
1.1.Our contribution.We consider nonatomic routing games over a network with a single OD, and we study the behavior of the price of anarchy as a function of the traffic demand.
To achieve our goal, we need some general results on the continuity and monotonicity of the equilibrium costs and flows.We resort to the classical result in Beckmann et al. (1956) according to which a Wardrop equilibrium is a solution of a convex optimization program.We show that the optimal value of this program is convex and continuously differentiable as a function of the demand, and its derivative is precisely the equilibrium cost.A similar result is established for the minimum social cost.
When the costs have a strictly positive derivative, we show that the equilibrium loads and the PoA are in fact C 1 at each demand level that is regular, in the sense that all the optimal paths carry a strictly positive flow.This regularity fails in particular at the so-called E-breakpoints, which are demand levels at which the set of shortest paths at equilibrium changes.
For affine costs we bypass regularity and we show directly that the equilibrium cost is piecewise linear and differentiable except at E-breakpoints.The crucial property is that if the set of shortest paths is the same at two demand levels, then this set remains optimal in between.From here it follows that the number of E-breakpoints is finite, though it can be exponentially large.It also follows that between E-breakpoints the PoA is differentiable and either is monotone, or is first decreasing and then increasing, so it has a unique minimum in the interior of the interval.From this we conclude that the maximum of the PoA is attained at an E-breakpoint.
We finally present several examples showing how these properties might fail for general costs.
1.2.Related Work.The standard solution concept in nonatomic routing games is due to Wardrop (1952).Its mathematical properties were first studied by Beckmann et al. (1956); early algorithms for computing equilibria were proposed by Tomlin (1966) for affine costs, and by Dafermos and Sparrow (1969) for general convex costs.For historical surveys on the topic we refer to Florian and Hearn (1995) as well as Correa and Stier-Moses (2011).
Several papers have considered the sensitivity of the equilibrium flows and costs with respect to variations of the traffic demand.Hall (1978) showed that an increase in the demand of one OD pair always increases the equilibrium cost for that pair, whereas Fisk (1979) observed that the cost on a different OD could be reduced.These questions were further explored by Dafermos and Nagurney (1984).In a different direction, Patriksson (2004) characterized the existence of directional derivatives for the equilibrium.Josefsson and Patriksson (2007) proved that equilibrium costs are always directionally differentiable, whereas equilibrium edge loads not always are.Englert et al. (2010) showed that there exist single OD network games where an ε-increase in the traffic demand produces a global migration of traffic from one set of equilibrium paths to a disjoint set of paths, but, nevertheless, the load on each edge changes at most by ε.Moreover, if the cost functions are polynomials of degree at most d, then the equilibrium costs increase at most of a multiplicative factor (1 + ε) d .Takalloo and Kwon (2020) extended this last result to games with multiple OD pairs.
The recognition that selfish behavior produces social inefficiency goes back at least to Pigou (1920).A measure to quantify this inefficiency was proposed by Koutsoupias and Papadimitriou (1999), by considering the ratio of the social cost of the worst equilibrium over the optimum social cost.It was termed price of anarchy by Papadimitriou (2001).A PoA close to one indicates efficiency of the equilibria of the game, whereas a high PoA implies that, in the worst scenario, strategic behavior can lead to significant social inefficiency.Most of the subsequent literature established sharp bounds for the PoA for specific classes of games, notably for congestion games and in particular for routing games.Roughgarden and Tardos (2002) showed that in every nonatomic congestion game with affine costs the PoA is bounded above by 4/3.Moreover, this bound is sharp and attained in a traffic game with a simple two-edge parallel network.Roughgarden (2003) generalized this result to polynomial functions of maximum degree d showing that the PoA grows as Θ(d/ log d).Dumrauf and Gairing (2006) refined the result when the cost functions are sums of monomials whose degrees are between q and d.Roughgarden and Tardos (2004) extended the analysis to all differentiable cost function c such that xc(x) is convex.Less regular costs and different optimizing criteria for the social cost were studied by Correa et al. (2008Correa et al. ( , 2004Correa et al. ( , 2007)).
Some papers took a more applied view and studied the actual value of the PoA in real networks.Youn et al. (2008Youn et al. ( , 2009) ) dealt with traffic in Boston, London, and New York, and noted that the PoA exhibits a similar pattern in the three cities: it is 1 when traffic is light, it oscillates in the central region and then goes back to 1 when traffic increases.A similar behavior was observed by O'Hare et al. (2016), who-taking an approach that relates to the one in this paper-showed how an expansion and/or retraction of the routes used at equilibrium affects the behavior of the PoA.Experimentally, Monnot et al. (2017) studied the commuting behavior of a large number of Singaporean students and concluded that the PoA is overall low and far from the worst case scenarios.
An analytical justification for the asymptotic efficiency of the PoA in light and heavy traffic was presented in Colini-Baldeschi et al. (2019, 2020), Wu et al. (2021).Colini-Baldeschi et al. (2019) considered the case of single OD parallel networks and proved that, in heavy traffic, the PoA converges to one when the cost functions are regularly varying.Their results were extended in various directions in Colini-Baldeschi et al. (2020), considering general networks and analyzing both the light and heavy traffic asymptotics.A different technique, called scalability, was used by Wu et al. (2021) to study the case of heavy traffic.Wu and Möhring (2020) considered issues that are quite close to the one examined here.They defined a metric on the space of nonatomic congestion games that share the same network, commodities, and strategies, but differ in terms of demands and cost functions.Using this metric they showed that the PoA is a continuous function of both the demand and the costs.Then they performed a sensitivity analysis of the PoA with respect to variations of the game in terms of this metric.
In a very interesting recent paper Klimm and Warode (2021) (see also the conference version Klimm and Warode, 2019) consider nonatomic routing games with piecewise linear costs and present algorithms to track the full path of Wardrop equilibria when the demands vary proportionally along a fixed direction.These algorithms are based on (positive or negative) electrical flows on undirected graphs and are then suitably adapted to positive flows on directed graphs.The connection between their paper and ours will be discussed in Section 4.
The behavior of the PoA as a function of a different parameter was studied by Cominetti et al. (2019).In that case the parameter of interest was the probability that players actually take part in the game.Colini-Baldeschi et al. (2018) studied the possibility of achieving efficiency in routing games via the use of tolls, when the demand can vary, while Gemici et al. (2019) analyzed the income inequality effects of reducing the PoA via tolls.
1.3.Organization of the paper.In Section 2 we recall the model of nonatomic routing games, and we set the notations and the standing assumptions.Section 3 investigates the smoothness of the equilibrium costs and of the PoA as a function of the demand, for general nondecreasing smooth costs.The behavior of the PoA for affine costs is studied in Section 4. Section 5 presents various examples.

The nonatomic congestion model
We consider a nonatomic routing game with a single origin-destination pair.The network is described by a directed multigraph G = (V, E) with vertex set V, edge set E, an origin O ∈ V, and a destination D ∈ V.The traffic demand is given by a positive real number µ > 0, interpreted as vehicles per hour, which has to be routed along a set P of simple paths from O to D. The nonatomic hypothesis means that each vehicle controls a negligible fraction of the total traffic, and consequently the traffic flows are treated as continuous variables.
The traffic flow on path p is denoted by f p and the set of feasible flow profiles is Each flow profile f ∈ F µ induces a load profile x = (x e ) e∈E with x e = p e f p representing the aggregate traffic over the edge e.We call X µ the set of all such load profiles.Note that different flow profiles may induce the same edge loads so this correspondence is not bijective.
Every edge e ∈ E has a continuous nondecreasing cost function c e : [0, +∞) → [0, +∞), where c e (x e ) represents the travel time (or unit cost) of traversing the edge when the load is x e .When the traffic is distributed according to f = (f p ) p∈P with induced load profile x = (x e ) e∈E , the cost experienced by traveling on a path p ∈ P is given by (2.2) With a slight abuse of notation, we use the same symbol c for the cost function over paths and over edges.The meaning should be clear from the context.

Wardrop equilibrium.
A feasible flow profile is called a Wardrop equilibrium if the paths that are actually used have minimum cost.Formally, f * ∈ F µ is an equilibrium iff there exists λ ∈ R such that c p (f * ) = λ for each p ∈ P such that f * p > 0, c p (f * ) ≥ λ for each p ∈ P such that f * p = 0. (2.3) The quantity λ is called the equilibrium cost, and is a function of µ.
As noted by Beckmann et al. (1956), Wardrop equilibria coincide with the optimal solutions of the convex minimization problem where C e ( • ) is the primitive of the edge cost c e ( • ), that is, where C * e ( • ) is the Fenchel conjugate of C e ( • ), which is strictly convex.2.2.Social optimum and efficiency of equilibria.The total cost experienced by all users traveling across the network is called the social cost and is denoted by (2.8) Since in equilibrium all the paths that carry flow have the same cost λ(µ), it follows that all equilibria have the same social cost, that is, (2.9) where C e (x e ) = x e c e (x e ).The price of anarchy (PoA) is then defined as the ratio between the social cost at equilibrium µ λ(µ) and the minimum social cost V (µ): Our main goal is to investigate the smoothness of the function µ → PoA(µ) and to understand the kinks and monotonicity properties observed in the example of Fig. 1(b).To this end, Section 3 presents some preliminary results on the differentiability of equilibria as a function of the demand µ.More precise results will be discussed in Section 4 for the case with affine costs.

Differentiability of equilibria and price of anarchy
In order to study the smoothness of the PoA, we begin by establishing some preliminary facts on the differentiability of the optimal value function µ → V (µ) and the smoothness of the equilibrium loads µ → x * e (µ).These results follow from general convex duality and sensitivity analysis of parametric optimization problems.The following property does not seem to have been stated earlier in the literature, at least in this generality.
Proof.This is a consequence of the convex duality theorem.Indeed, consider the perturbation function Clearly ϕ µ is a proper closed convex function (Rockafellar, 1997, page 24).Calling we have V (µ + z) = v µ (z) and in particular V (µ) = v µ (0) which we consider as the primal problem (P µ ).From general convex duality, we have that z → v µ (z) = V (µ + z) is a convex function, from which we deduce that V ( • ) is convex.Moreover, the perturbation function ϕ µ yields a corresponding dual where ϕ * µ is the Fenchel conjugate function, that is, is finite for z in some interval around 0, and then the convex duality theorem implies that there is no duality gap and the subdifferential ∂v µ (0) at z = 0 coincides with the optimal solution set S(D µ ) of the dual problem, that is, We claim that the dual problem has a unique solution, which is exactly the equilibrium cost λ(µ).Indeed, fix an optimal solution f * for v µ (0) = V (µ) and recall that this is just a Wardrop equilibrium.The dual optimal solutions are precisely the λ's such that This equation can be written explicitly as from which it follows that f = f * is an optimal solution in the latter supremum.The corresponding optimality conditions are which imply that λ is the equilibrium cost for the Wardrop equilibrium, that is, λ = λ(µ).It follows that ∂V (µ) = {λ(µ)} so that µ → V (µ) is not only convex but also differentiable with V (µ) = λ(µ).The conclusion follows by noting that every convex differentiable function is automatically of class C 1 , with V (µ) nondecreasing.
The continuity of the equilibrium edge costs τ e = τ e (µ) is a consequence of Berge's maximum theorem (see, e.g., Aliprantis and Border, 2006, Section 17.5).Indeed, the equilibrium edge costs are optimal solutions for the dual program in Eq. (2.7).Since the objective function is jointly continuous in (τ, µ), Berge's theorem implies that the optimal solution correspondence is upper-semicontinous.However, in this case the optimal solution is unique, so that the optimal correspondence is single-valued, and, as a consequence, the equilibrium edge costs τ e (µ) are continuous.
As an immediate consequence of Proposition 3.1 we obtain the following result: For multiple origin-destination networks with continuous and strictly increasing costs, the continuity of the equilibrium loads x * e as a function of the demands was already proved in Hall (1978, Theorem 1).On the other hand, Hall (1978, Theorem 2) proved the continuity of the equilibrium costs provided that all paths carry a strictly positive flow, while Hall (1978, Theorem 3) showed that the equilibrium cost of each OD increases with the corresponding demand.As shown in Proposition 3.1, for a single origin-destination the continuity and monotonicity of the equilibrium cost requires neither that costs be strictly increasing nor that all paths carry a strictly positive flow.Although this might be considered a minor improvement, allowing for nondecreasing costs and particularly constant costs is a convenient extension.
For the analysis of the PoA, the most relevant part of Proposition 3.1 is the smoothness of V ( • ) and the characterization of its derivative V (µ) = λ(µ).In particular, considering the social optimum problem (2.10) we get the following direct consequence: Proposition 3.3.Let the costs c e ( • ) be C 1 and nondecreasing with x e → x e c e (x e ) convex.Then the optimal social cost µ → V (µ) is convex and C 1 .Moreover, µ → PoA(µ) is continuous in (0, +∞) and differentiable at every µ where the equilibrium cost λ(µ) is differentiable.Wu and Möhring (2020) recently established a very general result on the continuity of the PoA with respect to the demands and also with respect to perturbations of the cost functions.However, differentiability was not addressed in their paper.
3.1.Differentiability of equilibrium costs.In order to use Proposition 3.3 it is convenient to find conditions that ensure the differentiability of the equilibrium cost λ(µ).In this section we present one such result, which also guarantees the differentiability of the resource loads x * e (µ).This follows from the implicit function theorem applied to the system of first order optimality conditions for Eq.(2.4).Given a vertex v ∈ V, call N + (v) and N − (v) the sets of out-edges and in-edges of v, respectively, and P(O, v) the set of all paths from O to v.Moreover, call E(v, w) the set of all edges e ∈ E that go from v to w.Then, an equilibrium load profile (x * e ) e∈E for a total demand µ is characterized as a solution of x e ≥ 0 for all e ∈ E, (3.5) T O = 0 and T w ≤ T v + τ e for all e ∈ E(v, w), (3.7) ) ) for all e ∈ E, (3.9) where τ e is the equilibrium cost of the edge e and is the equilibrium cost of a shortest path from the origin O to vertex v.
For the subsequent analysis we define the active network as the set of all edges that lie on some shortest path.We also consider the demand levels at which this set changes.
Definition 3.4.For each µ > 0 we let P(µ) be the set of all shortest paths from the source O to the sink D with cost at equilibrium equal to λ(µ), and we define the active network E(µ) as the union of the edges on all these paths p ∈ P(µ).
The active network is said to be locally constant at µ 0 if there exists ε > 0 such that E(µ) is the same for all µ ∈ [µ 0 − ε, µ 0 + ε].
Remark 3.1.Since the equilibrium costs τ e = τ e (µ) and λ(µ) are unique for each µ, it follows that both P(µ) and E(µ) are also uniquely determined.Moreover, the continuity of τ e (µ) implies that an edge e ∈ E(µ 0 ) that is inactive at µ 0 remains inactive for µ near µ 0 , that is to say Fig. 2 shows the evolution of the active network at different demand levels for the game in Fig. 1(a), with five E-breakpoints at µ = 1, 2, 3, 4, 7. Notice the correspondence with the break points in the price of anarchy in Fig. 1(b).
Although in general there can be infinitely many E-breakpoints (see Proposition 5.1 and Remark 5.1), their number is finite for series-parallel networks (cf.Proposition 3.10) and also for general networks with affine costs (cf.Proposition 4.2).In both cases, once an active network changes, it may never occur again at higher demand levels.
An edge carrying a strictly positive flow at equilibrium must be on some optimal path, and, as a consequence, belongs to the active network.However, the converse may fail when a path becomes active but carries no flow.In order to prove the smoothness of the equilibrium flows we need to avoid this situation, which leads to the following definition of a regular demand.Definition 3.5.A demand µ > 0 is called regular if there is an equilibrium with x e > 0 for all e ∈ E(µ).
Regularity is just strict complementarity.Indeed, the complementarity condition (3.8) imposes that for each e ∈ E either x e or (T w − T v − τ e ) is zero, whereas strict complementarity requires The active network for the graph on Fig. 1, with E-breakpoints at µ = 1, 2, 3, 4, 7.
exactly one of these expressions to be zero.As shown next, when the costs are strictly increasing this implies that the active network is locally constant, so that a regular demand cannot be an E-breakpoint.We note however that there can be nonregular demands at which the active network is still locally constant (see Example 5.2).
Lemma 3.6.Suppose that the costs c e ( • ) are strictly increasing and continuous.If µ 0 is a regular demand then the active network E(µ) is locally constant at µ 0 .
We are now ready to establish the smoothness of the equilibrium.
Proof.From Proposition 3.1 and Corollary 3.2, the equilibrium costs τ e (µ) and loads x * e (µ) are uniquely defined and continuous in µ.Hence, the equilibrium cost T v (µ) of a shortest path to any vertex v is also continuous.These functions x * e , τ e and T v satisfy in particular Eqs.(3.6), (3.8) and (3.9).Now, since µ 0 is regular, the active network is locally constant.Let E 0 = E(µ 0 ) be this active network and V 0 the corresponding vertices.Moreover, call E 0 (v, w) the set of all edges e ∈ E 0 that go from v to w.For µ near µ 0 we have x * e (µ) = 0 for all e ∈ E 0 ; hence, these functions are trivially differentiable.Also for w ∈ V 0 we can take v ∈ V 0 the last vertex on a shortest path from O to w, so that T w (µ) = T v (µ) + ∆ v,w where ∆ v,w is a constant travel time from v to w. Hence it suffices to establish the smoothness of x * e (µ) for e ∈ E 0 and T v (µ) for v ∈ V 0 .To this end, consider Eqs.(3.6), (3.8) and (3.9) restricted to the edges in E 0 , together with the equation T O = 0, which gives the following system: x e • (T w − T v − τ e ) = 0 for all e ∈ E 0 (v, w), (3.12) τ e = c e (x e ), (3.13) To apply the implicit function theorem to this reduced system, we must check that the associated linearized system has a unique solution.Let u e , δ v and s e be respectively the increments in the variables x e , T v and τ e for each e ∈ E 0 and v ∈ V 0 .The homogeneous linear system obtained from (3.11)-(3.14)is: x e (δ w − δ v − s e ) + u e (T w − T v − τ e ) = 0 for all e ∈ E 0 (v, w), (3.16) )u e , (3.17) Strict complementarity on an active link implies that Eq. (3.16) is equivalent to which, together with Eq. (3.17), gives for all e ∈ E 0 (v, w). (3.20) These equations are the stationarity conditions for the strongly convex (since c e (x e ) > 0) quadratic program under the constraints (3.15).Indeed, associating a Lagrange multiplier to each of those constraints, we get the Lagrangian and the equation ∂L/∂u e = 0 is precisely equivalent to Eq. (3.20).Hence, every solution of (3.15)-(3.18)corresponds to an optimal solution of (P).Since u e = 0 for all e ∈ E 0 is feasible, it is also the unique optimal solution.Then Eq. (3.17) yields s e = 0 for all e ∈ E 0 , and from Eqs. (3.18) and (3.19) we also get δ v = 0 for all v ∈ V 0 .Since the linear system (3.15)-(3.18)has only the trivial solution, the Jacobian of (3.11)-(3.14)with respect to x, τ , T is invertible and the implicit function theorem implies the smoothness of the solution.In particular λ(µ) = T D (µ) is continuously differentiable.
Remark 3.2.The directional differentiability of the equilibrium loads with respect to parameters was investigated by Patriksson (2004) and Josefsson and Patriksson (2007), though it can also be derived from Shapiro (1988, Theorem 5.1).Theorem 10 in Patriksson (2004) shows that differentiability holds provided that the edge loads in the linearized system are unique (this is what is done in the proof above) and assuming in addition that all the route flows corresponding to the solutions of the linearized system satisfy an additional vanishing condition.Our Proposition 3.7 is more straightforward as it follows directly from the implicit function theorem, which gives in addition the continuity of the derivatives.It is also easier to apply and to interpret: it just requires to check that all active links carry a positive flow.In other words, smoothness can only fail at critical values of the demand where a new link becomes active but is not yet carrying flow.This simpler sufficient condition is all that is needed hereafter.
Combining Propositions 3.3 and 3.7 we obtain the following result on the differentiability of the price of anarchy.
Theorem 3.8.Suppose that c e ( • ) are C 1 with strictly positive derivative and x e c e (x e ) convex.Then PoA( • ) is continuously differentiable at each regular demand level µ 0 .
While all E-breakpoints are nonregular, there might exist other nonregular points that are not E-breakpoints (see Example 5.2).We do not know if differentiability of PoA( • ) can fail at such additional nonregular points.In the next section we will show that for affine costs, nonsmoothness can only occur at E-breakpoints and that there are finitely many of them.In contrast, for general networks and nonlinear costs the number of E-breakpoints can be unbounded.In this regard, it is worth noting that for networks with a series-parallel topology (which excludes the Wheatstone network), the active network increases monotonically with the demand, which yields a sharp bound on the number of different active networks and E-breakpoints that can occur as the demand grows from 0 to +∞.Definition 3.9.The class of series-parallel (SP) networks can be constructed as follows: • A network with two vertices O, D and one edge (O, D) connecting them is SP.
• A network obtained by joining in series two SP networks by merging D 1 with O 2 is SP.
• A network obtained by joining in parallel two SP networks by merging O 1 with O 2 and D 1 with D 2 is SP.
Proposition 3.10.Let G be a series-parallel network.Then there exist equilibrium load profiles x(µ) whose components x e (µ) are nondecreasing functions of the demand µ.Moreover, the active network E(µ) is also nondecreasing with respect to inclusion so that the number of E-breakpoints is bounded by the minimum between the number of paths and the number of edges.
Proof.The result clearly holds for the network with only two vertices and a single link.
Let G 1 and G 2 be two series-parallel networks for which the result is true, and fix two nondecreasing equilibrium loads x 1 (µ) and x 2 (µ), with their corresponding equilibrium costs λ 1 (µ) and λ 2 (µ) and active networks E 1 (µ) and E 2 (µ).
The case in which G 1 and G 2 are joined in parallel, is slightly more involved.Here an equilibrium splits as x(µ) = (x 1 (µ 1 ), x 2 (µ 2 )) where with g(µ) = µ when the latter set is empty, then both µ 1 = g(µ) and µ 2 = µ − g(µ) turn out to be nondecreasing and therefore x(µ) = (x 1 (g(µ)), x 2 (µ − g(µ))) is a nondecreasing equilibrium.The monotonicity of the active network E(µ) is similar.We have ) otherwise, and in all three cases the active network is nondecreasing.
Remark 3.3.A related result was obtained by Milchtaich (2006) for undirected networks.His Lemma 2 shows that in a series-parallel network there exists some path whose edge loads are increasing in the total traffic demand.Proposition 3.10 proves that there exists an equilibrium in which this monotonicity holds for all edges and paths.
Concerned about complexity of computing parametric mincost flows, Klimm and Warode (2021, Corollary 4) also proved monotonicity of the output flows on the edges when costs are piecewise linear.with a e , b e ≥ 0 for each e ∈ E. We recall that in this case we have a scaling law that relates the equilibrium and optimum flows.
From this it follows directly that for affine costs the E-breakpoints for the optimum are in one-to-one correspondence with the E-breakpoints for the equilibrium, that is, Hare et al. (2016, Theorem 3.5) established a similar scaling law when all the edge costs are BPR functions of the same degree.
We now describe the behavior of the equilibrium and the price of anarchy.We first show that any given subset of edges E 0 ⊆ E can only be an active network over an interval.In other words, once a given active network changes it will never become active again.This implies that the number of E-breakpoints is finite.Moreover, we show that between E-breakpoints the equilibrium cost is affine with nonnegative slope and intersect.
This shows that the equilibrium cost is affine over the interval [µ 1 , µ 2 ], that is, λ(µ) = α + βµ.From Proposition 3.1 we know that λ(µ) is nondecreasing so that β ≥ 0, and therefore it remains to show that α ≥ 0. We rewrite the interpolated flow as f (µ) = µw + z with Let P 0 be the set of all the O-D shortest paths included in E 0 .We observe that z p = 0 for every p ∈ P 0 , and also that p∈P z e = 0. On the other hand, since f (µ) is an equilibrium we have c p (f (µ)) = λ(µ) for all p ∈ P 0 , so that c(f (µ)), z = 0 and, as a consequence, which yields β = Aw, w and α = Az+d, w .Since A is positive semidefinite, we get again β ≥ 0. Now, since 0 = c(f (µ)), z = µ Aw, z + Az+d, z for all µ, it follows that Aw, z = 0 so that α = d, w , and also Az + d, z = 0 so that d, z = − Az, z ≤ 0. To conclude, we note that all the entries in f (µ) and in d are nonnegative, and therefore from which we deduce that α = w, d ≥ 0 as claimed.
Remark 4.1.The paper by Klimm and Warode (2021) developed a homotopy method for computing the full path of Wardrop equilibria as a function of the traffic demand.The method is designed to work with piecewise linear costs and produces a piecewise linear path of equilibrium loads.The algorithm first determines the equilibrium costs and then recovers the loads by inverting the link costs.This requires the costs to be strictly increasing.In contrast, we work directly in the space of flows so we can handle nondecreasing and constant costs.However, we restrict to affine costs, which is essential for Proposition 4.2.Indeed, beyond the piecewise affine character of the equilibrium, the most relevant part of this result is the identification of the breakpoints as the demand levels at which the active network changes.As shown in Proposition 4.2, each particular subnetwork can be active on a demand interval, and, on each of these intervals, the equilibrium varies linearly.Once an active network is abandoned, it will never occur again at higher demand levels.This property fails to hold for nonlinear or even piecewise linear costs, as shown in Proposition 5.1.
Klimm and Warode (2021, Theorem 10) showed that, even for affine costs, the number of E-breakpoints can be exponential in the number of paths.In Section 5 we will use their example to show an interesting behavior of the price of anarchy.

4.2.
Behavior of the Price of Anarchy.We now prove that the social cost at the equilibrium and at the optimum have a very similar quadratic form, from which we deduce that between Ebreakpoints the function µ → PoA(µ) has a unique minimum and its maximum must be attained at some of the E-breakpoints.
In order to prove (4.12), let f (µ) = µw + z be the affine interpolated equilibria as in the proof of Proposition 4.2.When 2µ ∈ (µ k , µ k+1 ), Lemma 4.1 implies that an optimum flow is Then the social cost at optimum will be a quadratic function in µ with the same linear coefficient (α k ) and quadratic coefficient (β k ) of the social cost at equilibrium, and constant coefficient which is less or equal to Az, z + d, z = 0 since Az, z ≥ 0 and d, z ≤ 0.
From this result it follows that the PoA between E-breakpoints is a quotient of quadratics.Moreover, the specific signs of the coefficients of these quadratics imply that PoA has a unique minimum between breakpoints and that its local maxima can only occur at these breakpoints.
Theorem 4.4.Let µ k and µ k+1 be two consecutive E-breakpoints for the equilibrium.Then on the interval (µ k , µ k+1 ) the function µ → PoA(µ) is smooth and it is either decreasing, or increasing, or first decreasing and then increasing with a local minimum in the interior of the interval.In particular PoA(µ) does not attain a local maximum on (µ k , µ k+1 ).
Proof.From Proposition 3.3 the optimal social cost is a C 1 function of µ, so that Eq. (4.11) implies that PoA(µ) is smooth over the full interval (µ k , µ k+1 ).Consider first the case when there is no E-breakpoint µ for the optimum in this interval.Using Eqs.(4.11) and (4.12) we can express the PoA in the form with α, β, δ, η, ≥ 0 and γ ≤ 0. The derivative is given by and, since αγ ≤ 0 and 2βγ ≤ 0, it can have at most one positive zero, and only if βδ − αη > 0.
Hence, either PoA (µ) has a constant sign over (µ k , µ k+1 ), or it changes from negative to positive if the zero lies on (µ k , µ k+1 ), in which case we have a local minimum at this zero.
If the optimum has E-breakpoints in (µ k , µ k+1 ), we can repeat the argument on each subinterval, noting that PoA(µ) is C 1 so that the sign PoA (µ) does not change at these E-breakpoints.
Theorem 4.4 shows that the typical profile of the Price of Anarchy for networks with affine costs is similar to the one shown in the example Fig. 1(b).In particular, it implies: Corollary 4.5.For networks with affine costs the maximum of the Price of Anarchy is attained at some E-breakpoint.

Examples and counterexamples
In this section we present a set of examples that illustrate the results of the previous sections.The first example shows the difference between the set of E-breakpoints and the demands at which the set of paths used at equilibrium changes.
Example 5.1.Given a selection of equilibrium flows f * (µ), the values µ at which the set of used paths changes may be different from the E-breakpoints.For instance, in the network of Fig. 3, for all µ ≥ 2 and for any choice of η ∈ [0, 1] the following is an equilibrium path By letting η oscillate between 0 and 1 arbitrarily often, the set of used paths might change an arbitrary number of times, whereas the active network is always the set of edges in all four paths, each of them with an equilibrium cost equal to 2.
Our second example shows that in general the set of nonregular demands may be strictly larger than the set of E-breakpoints.
Example 5.2.Consider again Fig. 3 with the cost 2 in the lower link replaced by 2 + x, with E-breakpoints at µ = 1 and µ = 2.Note that all the demands µ < 1 and µ > 2 are regular.However, for µ ∈ (1, 2) the active network E(µ) is constant and comprises all the links, so that there are no E-breakpoints, while the unique equilibrium sends a zero flow on the lower link and hence µ is not regular.It is worth noting that, although the loss of regularity in the interval (1, 2) precludes the use of Proposition 3.7, in this case the costs are affine so that the equilibrium flows are piecewise affine and differentiable except at the E-breakpoints µ = 1 and µ = 2.
The next example deals with the fact that the PoA can attain the value 1 several times.Example 5.3.In the example of Fig. 1, the price of anarchy shows an initial phase in which it is identically equal to 1, after which it oscillates and eventually goes back to 1 but only asymptotically.We will use an example taken from Klimm and Warode (2021, Section 6.1.2) to show that the PoA can oscillate and go back to 1 more than once.The idea is to nest several Wheatstone networks and choose constant costs that increase exponentially as we go from the inner to the outer networks.The PoA is equal to 1 for small demand (µ ≤ 1/2), then increases and reaches a local maximum, then it decreases back to 1 and it remains equal to 1 for the entire interval [2, 3] of demand, then reaches its maximum and, after that, decreases back to 1, where it remains indefinitely.
Below we list the paths in the network in Fig. 4(a): The equilibrium flow for µ ∈ [0, +∞) is given explicitly in the following table: As a consequence, the PoA is The equilibrium and optimum flows can be computed explicitly as: Note that the sole E-breakpoint is at µ = 1.Moreover we have x * 1 (3) = x 1 (3) = 2 and x * 2 (3) = x 2 (3) = 1 so that the equilibrium and optimal flows coincide, and PoA(3) = 1.This implies that in the interval (3, +∞) the PoA has a local maximum (see Fig. 6).
When the cost functions are less regular, the set of paths used at equilibrium can have a recurring behavior, and an active network that is abandoned at some point can be reactivated at larger demands.In particular we cannot ensure that the number of E-breakpoints is finite.
Proposition 5.1.There exist networks and nondecreasing cost functions c e ( • ) such that a given active network E(µ) = E 0 can repeat itself over disjoint demand intervals defined by E-breakpoints.Remark 5.1.Note that in the same way one can construct examples of networks with an infinite number of E-breakpoints for the equilibrium.Furthermore, one can make the increasing sequence of such E-breakpoints to be convergent.Indeed, one could chose infinite sequences (η i ) i∈N , (a i ) i∈N , (ζ i ) i∈N , (b i ) i∈N with 0 < η i < a i < ζ i < ζ i + η i < b i < a i+1 for every i ∈ N. (5.3) Then we set the cost function c(x) to be and in the intervals [ζ i , ζ i + η], [(a i+1 − b i )/2, a i+1 ] we interpolate in any way that makes c(x) continuous and nondecreasing in the whole [0, +∞].With this choice of c(x), the situation is similar to the one of Proposition 5.1, repeated infinitely many times.Furthermore, since the η i can be as small as we want, we can choose the sequences (a i ) i∈N , (ζ i ) i∈N , (b i ) i∈N to be convergent to the same limit.
Remark 5.2.Repetition of an active network can happen for cost functions that are smooth or piecewise affine, as in Klimm and Warode (2021).We know that this cannot happen for affine cost functions, but, so far we have not been able to characterize the class of cost functions for which repetitions of active networks are impossible.
Organization of the paper 2. The nonatomic congestion model 2.1.Wardrop equilibrium 2.2.Social optimum and efficiency of equilibria 3. Differentiability of equilibria and price of anarchy 3.1.Differentiability of equilibrium costs 4. Networks with affine cost functions.4.1.Equilibrium flows 4.2.Behavior of the Price of Anarchy 5. Examples and counterexamples 1. Introduction

Figure 1 .
Figure 1.Oscillations of the price of anarchy noting that (2.3) are the optimality conditions for V (µ), with the equilibrium cost λ playing the role of a Lagrange multiplier for the constraint p f p = µ.It follows that, for each fixed demand µ an equilibrium flow f * always exists.Although Wardrop equilibria are not always unique, all of them induce the same edge costs τ e (µ) := c e (x * e ).In particular they have the same equilibrium cost λ = λ(µ), which is simply the shortest O-D distance: of fact, as proved byFukushima (1984), the equilibrium edge costs τ e = τ e (µ) are the unique optimal solution of the strictly convex dual program min Corollary 3.2.If the costs c e ( • ) are strictly increasing and continuous, the equilibrium loads x * e (µ) = c −1 e (τ e (µ)) are unique and continuous.
Proof.The assumptions on c e ( • ) imply that the marginal costs c e (x e ) := C e (x e ) = c e (x e ) + x e c e (x e )(3.4) are continuous and nondecreasing.It follows that the optimal flows are the Wardrop equilibria for these marginal costs, and the smoothness of V (µ) follows from Proposition 3.1.For the PoA it suffices to observe that λ(µ) is continuous and then use the equality (2.11).

4.
Networks with affine cost functions.4.1.Equilibrium flows.In this section we consider the case of affine cost functions c e (x) = a e • x + b e , (4.1) ΓZ and d = Z b, (4.7) with Z the edge-path incidence matrix, Γ = diag[(a e ) e∈E ], and b = (b e ) e∈E , the vector of path costs can be expressed as

Figure 3 .
Figure 3.The set of paths used in equilibrium may change arbitrarily often.

Figure 4 .
Figure 4.An example where PoA goes back to 1 once at intermediate demands

Figure 5 .
Figure 5.An example where PoA goes back to 1 twice at intermediate demands

Figure 6 .Figure 7 .
Figure 6.Plot of the PoA on the interval [2, 40] for the parallel network with costs as in Eq. (5.2).

6.
List of symbols a e coefficient of the monomial in an affine cost function A Z ΓZ, defined in Eq. (4.7) b e constant in an affine cost function b (b 1 , . . ., b m ) c e cost of edge e c (c 1 , . . ., c m ) c e (x e ) C e (x e ), defined in Eq. (3.4) C e primitive of c e , defined in Eq. (2.5) C e (x e )x e c e (x e ) c p cost of path p, defined in Eq.
active network at demand µ, defined in Definition 3.4 E 0 E(µ 0 ) E(v, w)set of all edges e ∈ E that go from v to w E 0(v, w)set of all edges e ∈ E 0 that go from v to w increment of τ e , defined in the proof of Proposition 3.7 T v equilibrium cost of shortest path to v, defined in Eq. (3.10) u e increment of x e , defined in the proof of Proposition 3.7V set of vertices V 0 set of vertices in the active network v µ (z) inf f ϕ µ (f , z),defined in Eq. (3.2) + , first used in Proposition 4.2 α k element of R + , first used in Proposition 4.3 β element of R + , first used in Proposition 4.2 β k element of R + , first used in Proposition 4.3 γ element of R − , first used in Theorem 4.4 γ k element of R − , first used in Proposition 4.3 Γ diag[(a e ) e∈E ] δ element of R + , first used in Theorem 4.4 δ v increment of T v , defined in the proof of Proposition 3.7 ∆ v,w constant travel time from v to w ζ element of R + , first used in the proof of Proposition 5.1 η element of R + , first used in Theorem 4.4