A tractable multi-leader multi-follower peak-load-pricing model with strategic interaction

While single-level Nash equilibrium problems are quite well understood nowadays, less is known about multi-leader multi-follower games. However, these have important applications, e.g., in the analysis of electricity and gas markets, where often a limited number of firms interacts on various subsequent markets. In this paper, we consider a special class of two-level multi-leader multi-follower games that can be applied, e.g., to model strategic booking decisions in the European entry-exit gas market. For this nontrivial class of games, we develop a solution algorithm that is able to compute the complete set of Nash equilibria instead of just individual solutions or a bigger set of stationary points. Additionally, we prove that for this class of games, the solution set is finite and provide examples for instances without any Nash equilibria in pure strategies. We apply the algorithm to a case study in which we compute strategic booking and nomination decisions in a model of the European entry-exit gas market system. Finally, we use our algorithm to provide a publicly available test library for the considered class of multi-leader multi-follower games. This library contains problem instances with different economic and mathematical properties so that other researchers in the field can test and benchmark newly developed methods for this challenging class of problems.


Introduction
In this contribution we consider a class of two-level multi-leader multi-follower games (MLFG). In these games, the same players (in the following, the firms) first compete on an upper level deciding on capacity expansions and afterward on a lower level Extended author information available on the last page of the article in one or more capacity-constrained Cournot games. We allow for N ≥ 2 firms and do not require symmetry. In particular, we allow for possibly different costs across firms at both levels, and also consider endogenous cost of capacity expansion that may depend on the expansion decisions of all firms. For this class of MLFGs, we develop an algorithm that provably computes the exact set of Nash equilibria. The algorithm computes all pure strategy Nash equilibria and, in particular, it does not return any additional non-optimal stationary points. We show that the solution set is finite and also provide examples for instances without pure strategy Nash equilibria. In a case study, we illustrate that the algorithm can be used to compute optimal strategic booking and nomination decisions in a model of the European entry-exit gas market. Moreover, we use our algorithm to provide a publicly available test library for the considered class of multi-leader multi-follower games. This library contains problem instances with different economic and mathematical properties (together with information on their solutions) so that other researchers in the field can test and benchmark newly developed methods for this challenging class of problems. Our work contributes to several strands of literature, most prominently the mathematical analysis of MLFGs, the peak-load-pricing literature, and the analysis of gas markets. We highlight the most closely related papers in the following.
From a mathematical point of view, we consider an MLFG or an equilibrium problem with equilibrium constraints (EPEC). Existing literature in this area can roughly be divided into two parts: For very general MLFGs, suitable optimality conditions have been developed, e.g., in [47,48,53], existence results based on potential functions have been contributed, e.g., in [42,43] and some ideas for solution algorithms can be found in [45,54]. However, the study of general MLFGs without any assumptions on their structure has certain drawbacks. Either very strong assumptions are needed, e.g., the existence of a potential function, which might not be satisfied in relevant applications, or, alternatively, one only aims at the identification of stationary points instead of Nash equilibria. This usually results in algorithms that cannot compute all Nash equilibria of the MLFG and cannot guarantee that the computed solutions are Nash equilibria.
For those reasons, a different thread of MLFG literature focuses on the analysis of special classes of MLFGs, for which the structure is motivated by some application. The most prominent papers in this respect analyze electricity markets, which can be modeled as a multi-leader game with one common follower; see, e.g., [4,14,23,28,32,60,67,70]. To maintain tractability, the focus of the analysis is still often not on Nash equilibria of the MLFG but on weaker solution concepts such as local Nash equilibria or some kind of Nash stationary points based on, e.g., S-or M-stationarity conditions for mathematical programs with equilibrium constraints. There are of course exceptions such as [3], who fully characterize Nash equilibria of a pay-as-bid electricity market. Our paper contributes to this strand of MLFG literature by considering a class of MLFGs motivated by an application. For multi-leader multi-follower models in the electricity context, see, e.g., the series of papers [37,38] in which the authors focus on modeling and do not consider to find all possible equilibria of the resulting EPEC. In [15] the authors investigate a bilevel problem, in which leaders know the distribution of the demand whereas followers have information on the exact realization. Firms are only optimizing production quantities but not capacities in their model. In this setting, which is a difference to our setup, the existence of a stochastic version of the Nash equilibrium is shown.
We consider situations of capacity choice prior to fluctuating demand. The traditional investment literature focused on the case of optimal (instead of strategic) investment decisions. This so-called "peak-load-pricing" literature was initiated by [6,66]; for a review see [13]. Later, [36] applied those results to analyze the case of perfectly competitive markets. More recent contributions have considered the case of strategic capacity choice prior to competition at spot markets. One strand of literature analyzes strategic capacity choices prior to price competition at several spot markets; see, e.g., [19,22,61], and, more recently, [52].
We analyze the case of strategic capacity choices prior to quantity competition (à la Cournot) at several subsequent spot markets, which results in a classical MLFG setup. In this context, [24,27,57,71,72] consider the case of strategic capacity choice prior to uncertain or fluctuating demand. However, all these contributions consider the case of symmetric firms. As shown in these studies, this results in a unique and symmetric equilibrium since a firm's profit function, if others choose the equilibrium candidate, is quasi-concave; see, e.g., [27].
Other contributions consider the asymmetric case as well. An asymmetric duopoly setting is considered in [50], where firms strategically choose capacity prior to Cournot competition (closed loop), as opposed to the case, where firms simultaneously choose capacities and output (open loop). Whereas existence and uniqueness for the latter case already have been shown previously, the authors establish that there can exist at most one pure strategy equilibrium of the duopoly setup of capacity choice prior to Cournot competition at many spot markets. Several subsequent contributions provide characterizations and algorithms allowing to determine pure strategy Nash equilibria in asymmetric setups of strategic capacity choice prior to Cournot competition; see [69] and, even more recently, [49]. By parameterizing the degree of competitiveness of firms (conjectural variation formulation), these contributions provide important insights on the effect of competitive conduct on the market outcome for a range of parameters that includes perfectly competitive firms. However, these characterizations and algorithms focus on specific local equilibrium candidates by identifying stationary points exploiting the local concavity of the firms' profit functions. The analysis presented in this paper significantly extends these contributions. By explicitly considering inevitably arising concave kinks and non-concavities of profit functions in the case of multiple asymmetric firms, our analysis is able to identify all pure strategy Nash equilibria of the MLFG.
Beyond the applications in the context of electricity markets, our approach can be applied to situations, where the capacity of a service has to be determined upfront and cannot be easily adjusted thereafter. Examples include investments in airplanes, hotels, or hospital capacity. An additional important application of our setup is the analysis of entry-exit gas markets, which is the predominant European mechanism for gas trading; see [17,18]. This trading scheme basically decouples trade and transport of gas. In order to be eligible to trade gas at the daily spot markets, traders have to acquire-i.e., book-capacities, which allow them to inject or withdraw gas at a given node. Existing papers that focus on strategic behavior in gas markets do not account for the necessity to acquire network capacity before trade; see, e.g., [5,10,12,34,64].
Other papers assume efficient congestion management as, e.g., [46]. Contributions, that consider potential inefficiencies in the context of entry-exit gas markets, e.g., [11,25,29,65,68], provide vast and interesting political arguments regarding the upand downsides of the entry-exit system. However, they are typically based on small illustrative examples to enhance and illustrate their arguments. In [26], the authors provide a framework to analyze the interaction of gas producers and traders with the network operator in the context of the entry-exit system in a multilevel setup. First computational techniques and numerical results have been presented in [7,30,63]. Our framework is complementary to this approach in the sense that it is capable to analyze the important case of strategic interaction of firms, when making their booking and nomination decisions. To this end, see, e.g., [1,35], which find considerable strategic behavior (market power) in European gas markets. To the best of our knowledge, the present paper is the first contribution to provide a formal framework, which allows to computationally analyze strategic booking and nomination decisions in the context of liberalized gas markets in an entry-exit regime.
The remainder of the paper is organized as follows. In Sect. 2, we introduce the MLFG model analyzed in this paper and briefly describe the solution idea. Section 3 is devoted to the capacity-constrained Cournot games on the lower level and provides detailed properties of their unique Nash equilibria. For better readability of the paper, some of the proofs for this section have been relegated to the appendix. The results are used in Sect. 4 to reformulate the two-level MLFG as a single-level Nash equilibrium problem, for which tailored optimality conditions are developed. The algorithm developed in Sect. 5 then uses these optimality conditions to select Nash equilibria among all possible candidates. In Sect. 6, we present a short numerical study, in which our algorithm is used to compute optimal strategic booking and nomination decisions for the entry-exit model of the European gas market, and describe the test library. We close the paper in Sect. 7 with some final remarks.

Model description and main solution idea
In this section, we present the details of our model. Let us start with some frequently used notation. The vectors e n ∈ R N , n = 1, . . . , N , denote the canonical unit vectors of the vector space R N . For a sufficiently smooth function f : R N → R, the partial derivative w.r.t. the variable x n is denoted by ∂ f ∂ x n and the directional derivative at a point For reference, we summarize all variables, parameters, and additional notation in Table 6 of "Appendix C".
Next we specify the considered game. We analyze the competition between firms in the following two-level MLFG : In the upper level, firms n = 1, . . . , N simultaneously choose capacities x n ≥ 0. These capacities are long-term investment decisions of the firms that are taken at the beginning of a given time horizon. We assume that the cost for capacity expansion, which firm n has to pay, can be described by a function S n : R N → (0, ∞). This cost function may be different for different firms n and can also depend on the others' decisions x m , m = n. We assume for all n = 1, . . . , N that S n is continuously differentiable and monotonically increasing in all variables x m , i.e., Given these capacities x, in the lower level, we consider several subsequent scenarios t = 1, . . . , T , in which the same firms n = 1, . . . , N compete in a capacityconstrained Cournot game G t (x), i.e., they solve max q n,t φ n,t (q n,t ) : Here, x n ≥ 0 is the previously chosen capacity from the upper level, c n > 0 denotes the production cost of firm n, Q t := N m=1 q m,t is an abbreviation for the overall produced quantity in scenario t, and with θ t > 0 and b > 0 denotes the inverse market demand function. In the Cournot setting considered here, this leads to similar results as classic marginal pricing under mild assumptions; see, e.g., [31,40], where similar settings are considered. For different scenarios t, the capacity-constrained Cournot games thus only differ in the price intercept θ t and we assume, without loss of generality, Some possibilities to incorporate more scenario-dependent parameters into the model are discussed in Remark 3.2.
Since for all firms n the feasible set [0, x n ] is nonempty, compact, polyhedral (and thus convex), and since the objective functions are strictly concave in q n,t , by Proposition 2 in [44], the game G t (x) has a unique equilibriumq t (x) ∈ R N for all scenarios t and all capacities x = (x 1 , . . . , x N ) . If we denote the corresponding equilibrium price byP t (x), then the equilibrium payoff for each firm n in scenario t is given bŷ On the upper level, every firm n thus chooses its capacity x n ≥ 0 such that its overall gain is maximized, i.e., firm n solves the problem Here, w t > 0 are weights that can be used to reflect the probability or importance of the individual scenarios t.
The game is defined as the two-level MLFG described by (3) and (1). The structure of this game is illustrated in Fig. 1.
Every scenario t is a subgame of the entire game. This can be seen (even though the game is not in extensive form) by its hierarchical structure. For each capacity choice x in the upper level, which represents the information set for the lower level, the capacity-constrained Cournot games G t (x) for scenarios t = 1, . . . , T take place after the capacities are fixed. Since each scenario t is only connected to the upper level and independent of other scenariost = t, each scenario t is a subgame of the MLFG.
The structure of also implies that all Nash equilibria (x ,q ) ∈ R N × R T N of the game have the property that for all t = 1, . . . , T , the vectorq t =q t (x) is the unique Nash equilibrium of the subgame G t (x).

Theorem 2.1
Let (x,q) ∈ R N × R T N be a Nash equilibrium of the game . Then, this Nash equilibrium is subgame perfect.
Our goal is to construct an algorithm that computes all Nash equilibriax ∈ [0, ∞) N of the two-level game . The main idea of this algorithm is as follows: For every given vector x ≥ 0, the capacity-constrained Cournot games G t (x) have unique Nash equilibriaq t (x) for all t = 1, . . . , T . We can provide explicit formulae for these Nash equilibria and the resulting equilibrium payoffφ n,t (x) and can thus reduce the twolevel game to the single-level game (3). However, the objective functions π n (x) of the resulting single-level game are only piecewise defined and can have both concave and nonconcave kinks, see Fig. 2 for an illustration.
To be able to compute all Nash equilibria of despite these complications, we thus • derive tailored first-order necessary optimality conditions for Nash equilibria consisting of stationarity conditions and local optimality conditions; and then • develop an algorithm, that first computes all candidates for Nash equilibria based on the stationarity conditions, then checks the stationary candidates w.r.t. the local optimality conditions, and finally checks the locally optimal candidates w.r.t. global optimality by verifying that unilateral deviations are not beneficial.

Analysis of the lower level
For a fixed price intercept θ > 0 and capacities x n ≥ 0, we now consider the capacity- with c n > 0, b > 0, and P(Q) = θ − bQ. Note that we allow an arbitrary number N of firms and do not impose any symmetry assumptions. Many aspects of this type of game have already been broadly discussed in the literature; see, e.g., [41,51]. It is shown in Proposition 2 of [44] that the capacity-constrained Cournot game G(x) has a unique Nash equilibriumq(x). For our analysis, we need very specific information about this unique Nash equilibriumq(x) and the corresponding equilibrium payoffsφ n (x). To be precise, we need to know the effect of varying the price intercept θ and the capacities x on the above mentioned quantities. Our first step is thus to provide an explicit formula for the unique Nash equilibriumq(x) and-at the same time-introduce the notation needed later. To this end, note that all firms n can only choose a strategy q n ∈ [0, x n ] and we can thus split them in the sets Z (x) := {n = 1, . . . , N : x n = 0}, of firms with zero capacity and firms that are inactive, constrained, or unconstrained in the equilibrium. Using this notation, one can verify that in the unique Nash equilibriumq(x) the equilibrium price is given bŷ the equilibrium strategies arê and the equilibrium payoff readŝ Using the equilibrium priceP(x), we can also characterize the sets I (x), U (x), C(x) by For a more detailed analysis, it is helpful to split both sets I (x) and C(x) further into those firms that are on the boundary to being unconstrained and those that are strictly inactive/constrained: Recall that in the two-level game , the equilibrium payoffφ n,t (x) for all scenarios t is a part of the objective function π n (x) of firm n. For this reason, we need to understand the effect of component-wise changes x +εe n , ε ∈ R, on the equilibrium payoffφ n (x) of the same firm n. As long as a deviation x + εe n does not change the sets Z (x), I (x), U (x), and C(x), the equilibrium payoffφ n (x) is constant w.r.t. x n , if n ∈ Z (x) ∪ I (x) ∪ U (x), and strictly concave in x n , if n ∈ C(x).
To analyze the situation in which the sets Z (x), I (x), U (x), and C(x) change due to a deviation, we consider a fixed firm n ∈ {1, . . . , N } and a small deviation x + εe n and compute its effect on the equilibrium payoffφ n (x). The precise formulas can be found in Lemma B.1 in the appendix and imply the following local properties of the map x n →φ n (x), see Fig. 2 for a schematic illustration: • In case n ∈ Z (x), only positive deviations are possible and the map is locally concave. • In case n ∈ I (x) ∪ U (x), the map is locally constant.
• In case n ∈ C = (x), the map is locally concave but may have a kink in x n .
• In case n ∈ C > (x), the behavior depends on the sets I = (x) and C = (x). If |I = (x)| = |C = (x)|, the map is locally strictly concave and differentiable. If |I = (x)| > |C = (x)|, the map is locally concave but has a kink at x n . However, if |I = (x)| < |C = (x)|, the map x n →φ n (x) has a nonconcave kink at x n . Fig. 2 Schematic illustration of the x-space for N = 2 firms. Highlighted from firm 1's perspective are the cases 1 ∈ C > (x) (in blue), 1 ∈ U (x) (in gray) and, regarding the map Since the equilibrium payoffsφ n,t (x) are a part of the upper-level objective function π n (x), this implies that we have to handle two difficulties when computing Nash equilibria of : (1) Equilibrium strategies may be points at which x n → π n (x) is not differentiable.
(2) Local optimality is not sufficient to guarantee global optimality.
Both of these difficulties, i.e., kinks and nonconcavity, already arise in the case I (x) = ∅. Moreover, as our analysis later on reveals, only those scenarios have an impact on a firm's equilibrium capacity choice in which their capacity is binding. A scenario excluded by the assumption I (x) = ∅ would thus only be relevant if in this scenario, for some firm, it is optimal to operate at the capacity bound, but at the same time, for other firms, it is not profitable to produce at all. This is highly unlikely to occur in a practical context. In order to keep the notation more compact, we thus assume that the set of inactive firms is empty from now on. A sufficient condition for this to be true in all scenarios t is given at the beginning of the Sect. 4.
Finally, recall that in the game we have not just one lower-level game G(x) but instead one such game G t (x) for each scenario t = 1, . . . , T . These games differ only in the price intercept θ t . The following result states that the outcome of G(x) is, in a certain sense, monotone w.r.t. the price intercept θ . Its proof can be can be found in "Appendix B".

Lemma 3.1 Consider two capacity-constrained Cournot games G
, which differ only in the price intercept θ 1 < θ 2 , and letq 1 (x),q 2 (x) be the corresponding Nash equilibria. Then,P 1 (x) <P 2 (x), i.e., the equilibrium price increases for higher intercepts. Furthermore, I 1 (x) ⊇ I 2 (x) and C 1 (x) ⊆ C 2 (x), i.e., the set of inactive firms shrinks and the set of constrained firms grows with larger intercepts θ t .
Since we assumed that the price intercepts satisfy the previous result ensures that for all fixed capacities x ≥ 0, the sets C t (x) of constrained firms in scenarios t = 1, . . . , T satisfy the inclusions Furthermore, since the equilibrium pricesP t (x) are strictly increasing, every firm n can be in C = t (x) in at most one scenario t and is in C > s (x) for all subsequent scenarios s > t. These two properties form the basis of our subsequent analysis of the upper level and allow us to compute all Nash equilibria effectively.

Remark 3.2
In our model, the different scenarios t = 1, . . . , T on the lower level differ only in the price intercepts θ t of the inverse demand function. It is also be possible to consider scenario-dependent production costs c n,t > 0 and scenario dependent slopes b t > 0 of the inverse demand function, as long as it is still possible to sort the scenarios t = 1, . . . , T such that the inclusions hold for all capacities x ≥ 0 and that n ∈ C = t (x) is the case in at most one scenario for every firm n.
A sufficient condition to ensure this property is to demand that for all fixed capacities x ≥ 0, the value of is strictly increasing in t for all firms n = 1, . . . , N -or at least for all firms n ∈ C t (x). Lemma 3.1 shows that this is the case for strictly increasing intercepts θ 1 < · · · < θ T , if the costs c n and the slope b are constant. Analogous arguments can be used in case of strictly decreasing slopes b 1 > · · · > b T or uniformly decreasing production costs c n,t = c n + t with 1 > · · · > T . Combinations of all three deviations satisfying these individual assumptions are also covered by the same arguments by inserting artificial intermediary scenarios such that two subsequent scenarios always only differ in one parameter, i.e., in the intercept, the slope, or the costs. Additionally, for some combinations of deviations, it is further possible to derive weaker conditions. For example, in case of constant slopes b, time-dependent intercepts θ t , and costs c n,t = c n + t it suffices to demand θ 1 − 1 < · · · < θ T − T .

Analysis of the upper level
Instead of considering only one capacity-constrained Cournot game G(x), we now go back to considering the lower-level games G t (x) for scenarios t = 1, . . . , T , which differ in the price intercepts θ 1 < θ 2 < · · · < θ T . For every scenario t, we then know that the corresponding game G t (x) has a unique equilibriumq t (x) and that in the equilibrium, the firms can be partitioned into the sets Z (x), I t (x), U t (x), and C t (x).
Throughout the whole section, we assume that there are no inactive firms, i.e., I t (x) = ∅ for all t. More precisely, we assume the following.
By Lemma C.1 in the appendix, this is ensured, e.g., if In addition to the capacity-constrained Cournot games G t (x), we now also consider the Nash equilibrium problem on the upper level, in which the capacities x n ≥ 0 are chosen. Recall that here all firms n = 1, . . . , N solve the problem (7) where we use the shorthand x −n ∈ R N −1 to indicate the strategies (x m ) m =n . In case the capacity expansion costs S n are affine linear, (7) is a single-level Nash equilibrium problem with piecewise quadratic objective functions, a structure similar to the problems considered in [55]. However, we also allow for nonlinear capacity expansion costs S n .
Based on the previous analysis of the lower level, we can now derive some useful characteristics of feasible capacity vectors x ≥ 0. Consider an arbitrary x ≥ 0 with the corresponding set Z (x). Then, for all t = 1, . . . , T the games G t (x) have unique Nash equilibriaq t (x) with associated sets U t (x) and C t (x). Due to θ 1 < · · · < θ T and Lemma 3.1, we immediately knoŵ Thus, if a firm n is constrained in a scenario t, i.e., n ∈ C t (x), then it remains constrained for all subsequent scenarios t + 1, . . . , T . Furthermore, n ∈ C = t (x) is only possible in the first scenario, in which firm n is constrained. At the moment, it is theoretically possible that a firm remains unconstrained for all scenarios t = 1, . . . , T . However, one can prove that in a Nash equilibriumx of (7) we always have U T (x) = ∅, see Lemma C.2 in the appendix.
For a Nash equilibriumx of (7) we thus introduce the following notation: Then, τ n (x) is the first scenario, in which firm n is constrained, E(x) is the set of all firms, which are "equality-constrained" in their first constrained scenario, F(x) is the set of all firms, which are strictly unconstrained/constrained in all scenarios, and δ(x) is the last scenario, in which one of the firms is "equality-constrained". An illustration of these objects in case N = 2 and T = 3 can be found in Fig. 3.
These definitions allow us to describe certain sets and quantities more easily, e.g., For the remainder of this section, letx ≥ 0 be an arbitrary Nash equilibrium of (7). To keep the notation more compact, we use the abbreviations Z := Z (x), τ := τ (x), etc. and denote the equilibrium price in scenario t bŷ Using this terminology, we can derive necessary first-order optimality conditions for a Nash equilibriumx; see "Appendix C" for a proof. Theorem 4.2 Let Assumption 4.1 hold andx be an arbitrary Nash equilibrium of (7). Then, the following holds forx = (x Z ,x E ,x F ): (a) For all n ∈ Z we havex n = 0 and the directional derivative satisfies The sets E and F are given by This result makes several important observations possible. For a Nash equilibriumx, we only need to know τ (x), Z (x), δ(x) and can recover all other sets via We thus focus on τ (x), Z (x), and δ(x) and the other sets are then given as above. Every Nash equilibriumx needs to satisfy the stationarity conditionŝ Additionally, every Nash equilibriumx needs to satisfy the local optimality conditions In the next section, we use these conditions to develop a solution algorithm for . But before we do so, we want to close this section by stating that, under suitable assumptions on the functions S n , the nonlinear system of equations (8) has exactly one solution for τ = τ (x), Z = Z (x), and δ = δ(x), which is the Nash equilibriumx; see "Appendix C" for the proof. Since there are only finitely many possibilities for τ, Z , δ, this immediately implies that has at most finitely many Nash equilibria.
Then, the system of equations has exactly one solution x * ≥ 0, which is x * =x. (b) The Nash equilibrium problem has at most (N + 1)(T + 1) N Nash equilibria and thus all Nash equilibria are isolated.

Derivation of the algorithm and proof of correctness
Based on Theorem 4.2, we can now state Algorithm 1 to compute all Nash equilibria of the game . The idea of this algorithm is as follows: 1. For all values of τ , Z , and δ that can occur in a Nash equilibrium, compute candidatesx by solving the stationarity conditions (8). 2. Check the local optimality conditions inx, i.e., whether all feasible directional derivatives are nonpositive for all n ∈ Z ∪ E. 3. Verify ifx n is globally optimal for all firms n.
Note that the stationarity conditions used in the first step ensure ∂π n ∂ x n (x) = 0 for n ∈ F, but do not take the objective function π n into account for n ∈ Z ∪ E. For this reason, in the second step, we check the signs of the feasible directional derivatives for all n ∈ Z ∪ E. Recall that we have to work with directional derivatives here, because for n ∈ Z , the function π n is not defined for x n < 0 and for n ∈ E, the function π n may have a kink atx n .
Since each function x n → π n (x n ,x −n ) is piecewise concave, all candidates satisfying the local optimality conditions in the second step are at least local Nash equilibria in the sense that every firm n is at a local maximum of its payoff function. However, we still have to verify global optimality explicitly, because the objective functions π n can have nonconcave kinks and local optimality is thus not sufficient. To this end, for all concave pieces of the map x n → π n (x n ,x −n ) we compute its maximum on the subset of [0, ∞), where this piece is correct, and compare it with π n (x n ).

5:
ifx is a local Nash equilibrium then 6: Use checkGlobalOptimality(x, τ, Z ,P) to verify global optimality ofx. 7: ifx is a Nash equilibrium of (7) then 8: Addx to the list of Nash equilibria of . 9: end if 10: end if 11: end if 12: end for 13: return the set of all Nash equilibria of Since we check for global optimality in the third step, we could skip the local optimality test in the second step. However, the global optimality test is computationally expensive and we thus prefer to use it as rarely as possible. The detailed algorithms executing these three steps in Algorithm 1 can be found in "Appendix D".
We claim that Algorithm 1 correctly computes the set of all Nash equilibria of the game . To this end, we have to prove that all Nash equilibriax are identified as candidates in the first step and pass the second and third step successfully. We also have to prove that all non-optimal candidates generated in the first step are eliminated at the latest in the third step. That Nash equilibria pass the second step successfully follows immediately from the correctness of the first step and the optimality conditions in Theorem 4.2. The respective results for the first and third step are similarly straightforward, but a bit more technical and thus have been relegated to "Appendix D".
All in all, it follows that Algorithm 1 computes all Nash equilibria of under suitable assumptions on the functions S n . We need the additional assumption on the maps S n to be able to guarantee that the algorithm finds all Nash equilibria of : Letx be a Nash equilibrium with corresponding parameters τ, Z , δ. Then under Assumption (9), Theorem 4.3 guarantees that for these parameters the stationarity conditions (8) have exactly one solution, namely the Nash equilibriumx. Thus, for these parameters the Nash equilibriumx is the candidate computed in the first step of the algorithm.
If, in contrast, for parameters τ, Z , δ corresponding to a Nash equilibriumx the stationarity conditions can have more than one solution, there are two effects to consider: It could happen that there are other Nash equilibria with the same parameters τ, Z , δ. Since the algorithm computes only one solution of the stationarity conditions, it returns at most one of these Nash equilibria. However, it could also happen that-besidesxthe stationarity conditions have other solutions, which are not Nash equilibria. If one of these other solutions is computed in the first step, the algorithm does not notice that there exists a Nash equilibrium corresponding to the parameters τ, Z , δ.
Fortunately, although Assumption (9) is a nontrivial assumption, it is satisfied in certain standard cases, which are also widely used in the literature; see, e.g., [24,27,42,49,50,57,71,72]: • If the costs S n of firm n only depend on x n , i.e., S n (x) = S n (x n ), then by our convexity assumption on x n S n (x) = x n S n (x n ) for all x, y ≥ 0 we have • If the costs S n are jointly given by

Numerical examples
In this section, we numerically test Algorithm 1. A case study based on the entry-exit system of the German gas market is presented in Sect. 6.1. And in Sect. 6.2, we provide a small library of examples, which can be used to highlight different characteristics of the hierarchical Cournot game and to test solution algorithms.

Case study: strategic bookings and nominations in gas markets
The European gas market as of today is organized according to the so-called entry-exit system; see, e.g., [26] and the references therein. Our goal is to analyze the implications of strategic behavior of gas suppliers in this context. Each of these suppliers n = 1, . . . , N can supply gas to the entry-exit system at a designated entry node v n . Several gas suppliers can be located at the same entry node. For this reason let be the set of all firms located at an entry node v. Firms n ∈ N v are able to book capacities x n ≥ 0 at the entry node v n . Bookings are usually long-term decisions and the booked capacity x n grants the right of firm n to supply gas to the system at the node v n . To stay within the physical restrictions of the system, the transmission system operators (TSOs) establish technical capacities X TC v for every node v, which reflect the maximum amount of supplied gas that the system can handle.
For the specific market rules and results see, e.g., [39,59]. In our case, we model inverse supply of capacities as a function S n (x) = S v n (X v n ), where the booking price depends on the cumulative booking choices X v := m∈N v x m of all firms located at the same entry node v. The technical capacity influences the functions S v such that if the cumulative bookings X v at node v surpass the technical capacity X TC v at this node, the price increases rapidly.
Trading of gas takes place daily at virtual trading points at which firms that have booked entry or exit capacities can sell or buy gas. Traded quantities are then nominated for transport on a daily basis and are free of charge. Here, the booked capacities x n of each firm n act as upper bounds on the amount of gas q n,t that can be traded at the dayahead market. This day-ahead market is represented in the lower level of our model, where t = 1, . . . , T are possible scenarios and w t is the probability or frequency of scenario t. For a more detailed overview of the gas market regulation see, e.g., [62].
This two-level model is connected to a four-level model of the European gas market, which is introduced in [26]. There, bookings and nominations are modeled in level two and three under the assumption of perfect competition. As pointed out by the authors, the introduction of strategic behavior introduces several challenges. In particular, these two levels cannot be reformulated anymore as a concave single-level problem due to the possibility of nonconcave kinks in the objective functions; see the discussion at the end of Sect. 3. The first level of the above mentioned four-level model, which regards the TSO, is considered by the choice of technical capacities in our model, whereas the fourth level, regarding the actual transport of gas through the network, is not incorporated here. The game is constructed to give insights into the behavior of firms in the entry-exit model in a non-cooperative setting.
Our standing assumptions on S v , i.e., S v > 0, and that for all firms n ∈ N v , the map x n → x n S v n ( m∈N vn x m ) is convex and increasing (w.r.t. all variables,) are not very restrictive and allow us to consider different types of cost functions.
Depending on an initial price k v > 0, a multiplicative factor s v > 0, and the technical capacities X TC v > 0, several examples for booking costs are given below: • Constant booking costs: • Linearly increasing booking costs: • Piecewise defined bookings costs with constant costs up to the technical capacity and linearly increasing costs beyond this capacity, smoothed by a parabola in a small ε-neighborhood of X TC v : Before we state the data for our case study, let us again briefly comment on the implications of Assumption 4.1 in the context of this gas market example. Mainly for notational reasons we have excluded scenarios t with I t (x) = ∅ from our analysis. As we have shown, only those scenarios have an impact on a firm's equilibrium capacity choice in which their capacity is binding. A scenario excluded by the Assumption I t (x) = ∅ would thus only be relevant if at the same time, for one firm n, it is optimal to nominate as much gas as the booked capacity x n allows, whereas for other firms m it is not profitable to nominate any gas at all. This is highly unlikely to occur in a practical context.
In the following test case, we use our algorithm to compute the optimal strategic booking and nomination decisions for an exemplary instance of the entry-exit system as described above. To interpret the subsequently presented quantities and results, note that all quantities are given in TW h, whereas prices, cost of nomination, and cost of booking are given in e/TWh.
We assume that firms can book (purchase) capacities at two different entry nodes A, B, allowing them to nominate (sell) gas to cover demand on T = 5 different days. Demand in our test case is calibrated to meet the daily demand in Germany at five days in 2018. 1 We calibrated the linear demand functions based on observed spotmarket prices (see [58]) and assumed a price elasticity of −0.1; see, e.g., [9,21,33]. This results in the following parameters for inverse demands P t (Q t ), see (2), Finally, we choose the weights of all days t = 1, . . . , 5 as w t = 1.
In our example, we investigate N = 4 different gas suppliers and consider seven different settings regarding the participation of the firms in the gas market, their location at the two nodes A and B, and the technical capacity X TC A available at node A. Firm 1 is located at node A, firm 4 is located at node B, firm 2 either does not participate in the market or is located at node A and firm 3 either does not participate in the market or is located in one of the two nodes A, B.
The unit cost for procuring (or producing) gas for all firms is given by the parameters The booking costs S v at both entry nodes v = A, B are assumed to be constant up to the technical capacity X TC v and linearly increasing afterward, with a smoothed intermediate part as given in (11). We choose the same parameters for both nodes To obtain a reference value for the technical capacities, we first consider a situation in which the technical capacity is not a limiting factor, i.e., X TC v = ∞ for both entry nodes v = A, B and, thus, both booking cost functions S v (X v ) = k v are the same and constant. In this case, the game has a unique Nash equilibrium, which only depends on the participation of the firms in the market, see Table 1 ("-" indicates that a firm is not participating in the market), but not on their location. We observe that the total amount of booked capacitiesX decreases for a larger number of participating firms, but is always larger than 4.
Based on these preliminary results we now consider the seven settings given in Table 2, which differ in the participation of firms 2 and 3, the location of the firm 3 at node A or B and the technical capacity X TC A available at node A. The total technical capacity X TC A + X TC B is always smaller than the total capacity booked in the case with infinite technical capacities described above. This ensures that the technical capacities have an influence on the Nash equilibrium of the game. We use bold to indicate that a firm is located at node B, the remaining nodes are located at node A.
For each of the seven settings, our algorithm returned a single Nash equilibrium of the game . The resulting Nash equilibria for all settings are given in Table 3. Herê X A ,X B denote the total capacity booked at nodes A, B. Table 4 compares the profits of the firms for the different settings to each other and furthermore compares the welfare and booking costs of the Nash equilibriumdenoted by W NE (x) and S v (x) for v = A, B-to the solution of the welfare maximization problem  Table 4 Comparison of Nash equilibrium and welfare solution in all seven settings Setting We denote the objective value of the welfare problem by W Opt and the respective booking costs at node v by S W v . The welfare value in the Nash equilibrium, i.e., W NE (x), is calculated by evaluating the objective function value of (12) for the given Nash equilibriumx and the resulting nominationsq according to (5)

and τ (x).
We discuss the Settings 1-3 first, in which the only difference is the number of participating firms. As one can see, in all three settings the firms respect the technical capacities, i.e., Table 1 one can say that the technical capacity severely impacts firm 4 at node B in all Settings 1-3, but the firms at node A mostly in Setting 1, where three firms are active at node A. In Setting 2, where only two firms are active at node A, the effect of the technical capacity on those firms is much smaller. In Setting 3, where only firm 1 is active at node A, the effect of the technical capacity X TC B = 1 on firm 4 causes firm 1 to book more than in the reference case with unlimited technical capacities. However, firm 1 still stays below X TC A = 3. In all three settings these discrepancies in bookings are not large enough for any of the firms to be willing to exceed the technical capacity and pay higher booking costs. Firm 4 has the same bookingx 4 = 1 in all Settings 1-3. In Setting 1, firm 4 is only nominating the full capacity in the last scenario t = 5, i.e. τ 4 (x) = 5, whereas in Settings 2 and 3 it is already nominating its full capacity in scenario t = 4, i.e., τ 4 (x) = 4. This indicates that the number of active firms at node A influences the behavior of firm 4 located at node B.
As one can see in Table 4, fewer active firms at node A have a positive impact on the profit of all remaining firms-even the accumulated profit π n (x) is increasing when the number of active firms is decreasing. In contrast, the generated welfare in the Nash equilibriumx is decreasing for a smaller number of active firms. Especially in Setting 3 in which the technical capacity at node A is not fully utilized, there is a considerable decrease in welfare compared to Setting 2.
In all of the Settings 4-6, the technical capacity is the main limiting factor of the model. Consequently, in Settings 4 and 5, the firms located at node A are willing to pay larger booking costs to book beyond the technical capacity X TC A = 1. This results in a much lower profit of firms located at node A, whereas firm 4 located at node B has a significantly higher profit than in Settings 1-3. One can see that the booked amount at node A, which exceeds the technical capacity, decreases with the number of active firms.
Comparing the welfare generated in the Nash equilibria in Settings 4-6, the welfare increases from Setting 4 to 5 and is smallest in Setting 6. The increase between Settings 4 and 5 differs from the previous observation in Setting 1-3 that the welfare decreases for smaller numbers of active firms. The low welfare in Setting 4 might be caused by the extremely high booking costs S A (x) at node A.
If we now compare Settings 4 and 7, which only differ in the location of firm 3, we can see that a more even distribution of firms at the nodes has a positive impact on welfare. Although the firms at both nodes book beyond the technical capacity in Setting 7, the accumulated booking costs S A (x) + S B (x) are much lower in Setting 7 than in Setting 4.
In general one can say that more competition decreases the profit of the firms. Additionally, more competition also increases the welfare, as long as it does not exceed the capacities of the system; see Setting 4.

Instance library
Since Algorithm 1 computes all Nash equilibria under certain assumptions (see Theorem 5.1) we are able to provide a library of MLFG problems together with all corresponding solutions. The purpose of this library is to provide small to medium sized test cases that can be used by other researchers to test their algorithms. For this reason, we have compiled several types of problem instances with differences in the economic setup and different properties of the resulting Nash equilibria. The instances collected in this library are split into eight categories, (A-H; see Table 5). Category H contains the problems solved in the case study in Sect. 6.1, whereas categories A-G are constructed such that they fit the model described in Sect. 2 and satisfy Assumption 4.1 as well as Condition (9). In total there are 25 instances in the library. The instance data and results are publicly available at https://doi.org/10.7488/ds/3055.
For each problem instance, the provided data consists of the number of firms N , the number of scenarios T , the vector θ = (θ 1 , . . . , θ T ) of price intercepts of the linear inverse demand function, the slope b of the linear inverse demand function, the vector c = (c 1 , . . . , c N ) of production costs of the firms, and the vector w = (w 1 , . . . , w T ) of scenario weights. The capacity expansion costs S n for Category H are described in Sect. 6.1. In Categories A-G the capacity expansion costs S n are modeled as linear functions with slope s n and offset k n , see (10). Here, either each firm n has their own capacity expansion cost function S n depending only on x n , or several (or all) firms share a capacity expansion cost function, which then depends on their cumulative capacity. In the data for the test examples, this is indicated by firms being located at a node and all firms located in the same node share one capacity expansion cost function.
For each test instance the results contain a list of local Nash equilibria, the runtime 2 of Algorithm 1 and the number of function calls for Algorithms 2, 3, and 4. Each local Nash equilibrium consists of the vector of capacities x, the resulting payoff vector π and welfare (see (12)), the pattern τ , the set of firms with zero capacity Z , the information about exactly constrained firms δ, and the information whether the local Nash equilibrium is a (global) Nash equilibrium or not. If a local Nash equilibrium is not a Nash equilibrium, for one player n an alternative strategy x n with a better objective function value is given together with the generated revenue at that dominant point. Since Algorithm 4 stops after finding a better strategy for one player, we do not provide a complete list of players with dominating strategies. The results for all test instances can be downloaded from the above mentioned repository.

Conclusion
We have analyzed a classic peak-load-pricing setup, in which firms choose to build capacities to serve fluctuating demand. In our asymmetric setup, nonconvexities arise, which can induce the existence of multiple equilibria or even the failure of existence of a pure strategy equilibrium. For our approach to be applicable, it is crucial that the lower-level equilibrium is unique and that it is possible to analytically state the resulting lower-level outcome for different levels of capacity choices x and all scenarios t. Furthermore, our setup is chosen such that a systematic and clear partition of the x-space is possible, which allows us to efficiently search for all possible Nash equilibria. This results in certain requirements for the scenario-dependence of our model parameters. Possible extensions are discussed in detail in Remark 3.2.
Based on our theoretical insights, we developed a solution algorithm for the considered class of two-level MLFGs. To do so, we provided a detailed analysis of the solution of the lower-level capacity-constrained Cournot game, which enabled us to reformulate the two-level game as a single-level game. Although the profit functions of the resulting single-level Nash equilibrium problem are nonconcave and only piecewise differentiable, we could develop tailored optimality conditions, which all Nash equilibria have to satisfy. These conditions form the basis of the solution algorithm, which provably computes all Nash equilibria, but does not return any non-optimal stationary points. We showed that the number of pure strategy equilibria in the considered class of MLFGs is finite and that a pure strategy Nash equilibrium does not always exist.
We illustrated the importance of the considered class of MLFGs and the effectiveness of our solution algorithm in a case study, in which we were able to compute optimal strategic booking and nomination decisions in the entry-exit system, which is is the predominant mechanism in the European gas market. Our study deepens the mathematical understanding of MLFGs, as we are now able to completely solve a nontrivial class of MLFGs with important applications. Additionally, this special class of MLFGs and the corresponding problem instances provided in the test library can be used as a benchmark to asses the quality of solutions generated by other, possibly more general solution methods for MLFGs. Let us finally sketch some possible avenues for future research. Our approach allows for an interpretation of the different scenarios t both as fluctuating demand over a certain period of time as well as discrete realizations of uncertainty. For the case of risk-neutral upper-level decisions, the weights w t have to be calibrated to encompass both the frequency and the probability of the possible scenarios. In the context of uncertainties our approach could also be applied to handle risk-averse decisions of strategic firms, which would result in transformed upper-level objectives of firms (e.g., by applying risk functions, see, e.g., [2] or [56]), but would leave the solution of the lower-level problems untouched.
Our approach currently considers the case of many potentially asymmetric firms, in which each firm decides on investment and production for a single technology. An interesting and realistic extension of our approach would also be the case of firms deciding on several technologies-or in the context of our setting-groups of single technology firms jointly maximizing their profit. For the lower-level equilibria, this would induce a situation in which a firm first entirely uses the technology with cheapest production cost and then the more expensive technologies are subsequently put to work. In this case, lower-level equilibria can still be determined analytically and are unique. Thus, applying our conceptual approach would still be possible in general but would require additional notation taking into account the modified objectives of firms and to keep track of when technologies switch from zero to positive production. A full consideration of this multi-technology case would considerably inflate the notational burden and therefore is beyond the scope of our current analysis.
Last but not least, one can try to transfer the ideas used here to wider classes of MLFGs and to couple the approach with a network model to assess the impact of the interplay of strategic behavior and network restrictions on the efficiency of entry-exit gas markets.
Acknowledgements The authors thank the DFG for their support within project A05, B07, B08, and B09 in CRC TRR 154. This research has been performed as part of the Energie Campus Nürnberg and is supported by funding of the Bavarian State Government. The authors also thank three anonymous referees, whose recommendations helped to improve the article. In particular, the instance library was suggested by one of them.
Funding Open Access funding enabled and organized by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Appendix A: Notation
Symbols commonly used throughout the paper can be found in Table 6. Table 6 Symbols used throughout the paper. For fixed scenarios and/or capacities reduced symbols are used as stated in the relevant section

Problem variables and parameters
The two-level game Lower-level game in scenario t for fixed capacity x x n Capacity choice of firm n q n,t Production of firm n in scenario t Q t Aggregate production in scenario t π n (x) Objective function of firm n in φ n,t (q t ) Objective function of firm n in G t (x)

S n (x)
Cost function for capacity expansion of firm n Slope of all P t c n Variable production cost of firm n Decoratorŝ · Variable/set · at equilibrium

Sets of firms Z (x)
Firms with zero capacity Firms not in Z (x) with zero production in scenario t Table 6 continued Symbol Description Firms at full capacity with P t (x) = c n + bx n in scenario t Firms at full capacity with P t (x) > c n + bx n in scenario t Firms that are in C > t (x) in their 1 st constrained scenario t Scenarios First scenario, in which firm n is constrained Last scenario, in which some firm is in

Appendix B: Auxiliary results for Sect. 3
The effect of small unilateral deviations x + εe n on the equilibrium payoff φ n (x) of the same firm n is studied in the subsequent result.
Proof. Note that the equilibrium priceP(x) does not change if we treat firms from I = (x) or C = (x), i.e., firms that are on the boundary to being unconstrained, the same way as unconstrained firms: We focus on discussing the resulting changes in the equilibrium priceP(x) and the sets Z (x), I (x), U (x), C(x). The change in the equilibrium payoff then follows by comparing the formula forφ n (x) in x and x + εe n .
(a) For a firm n ∈ Z (x) only positive deviations ε > 0 are possible. In caseP(x) ≤ c n , firm n moves from Z (x) to I (x + εe n ) and nothing else changes.
In caseP(x) > c n , firm n moves from Z (x) to C(x + εe n ). Since this decreases the equilibrium price, firms from C = (x) are now in U (x + εe n ). This results in the new equilibrium pricê (b) For a firm n ∈ I (x) a deviation ε ∈ R in the capacity x n has no effect at all. (c) For a firm n ∈ U (x) small deviations ε ∈ R do not change the equilibrium priceP(x) and, since U (x) is defined via strict inequalities, all sets stay the same, too. (d) For a firm n ∈ C = (x) a small negative deviation ε < 0 increases the equilibrium price. Thus, firms from I = (x) are now in U (x + εe n ), which results in the new equilibrium priceP In contrast, a small positive deviation ε > 0 does not change the equilibrium price, because firm n moves from C = (x) to U (x + εe n ). (e) For a firm n ∈ C > (x) a small negative deviation ε < 0 increases the equilibrium price. Thus, firms from I = (x) are now in U (x + εe n ), which results in the new equilibrium priceP In contrast, a small positive deviation ε > 0 decreases the equilibrium pricebecause firm n stays in C(x + εe n )-and thus firms from C = (x) are now in U (x + εe n ). This results in the new equilibrium pricê We now give a proof of Lemma 3.1.
Proof Consider a given price intercept θ and a positive deviation ε > 0. Since the capacities x are fixed in this proof but the intercept θ varies, we denote the dependence of the important quantities on θ and not on x within this proof. As long as this deviation is small enough, the corresponding sets in the Nash equilibrium change to with the corresponding new equilibrium price given bŷ This formula is correct up to the point where the deviation is large enough to cause firms from I < (θ ) to move to I = (θ + ε) or firms from U (θ ) to move to C = (θ + ε). In these points, the map ε →P(θ + ε) is still continuous and strictly increasing but its slope changes. For θ 1 < θ 2 , this impliesP(θ 1 ) <P(θ 2 ) and thus I (θ 1 ) ⊇ I (θ 2 ) and C(θ 1 ) ⊆ C(θ 2 ).

Appendix C: Auxiliary results for Sect. 4
A sufficient condition for the set I t (x) of inactive firms being empty is given below.

Lemma C.1 Assume that in a scenario t, the price intercept θ t satisfies
Then, in the unique Nash equilibrium the equilibrium priceP t (x) satisfieŝ P t (x) > c n for all n = 1, . . . , N and, thus, the set of inactive firms I t (x) is empty.
Proof Since we only consider one scenario t in this proof, we omit the index t. We know that all firms n ∈ C(x) satisfyP(x) ≥ c n + bx n . Exploiting this in the definition of the equilibrium priceP(x), we can infer that Using the assumption on θ , this implieŝ The next result shows that in a Nash equilibriumx of the game , all firms are constrained at least in scenario T .
Proof Assume that there is a firm n with n ∈ U t (x) for all t = 1, . . . , T . Then, n / ∈ Z (x) and by Lemma B.1, its payoff for a small deviation ε ∈ R is given by Since S n (x) is positive and increasing, firm n can thus increase its payoff by reducing x n , a contradiction tox being a Nash equilibrium. Consequently, every firm n is constrained at least in t = T . As we have just shown for a Nash equilibriumx of (7), every firm n / ∈ Z (x) is constrained at least in scenario t = T and thus holds. Consequently, for all firms n / ∈ Z (x) we havê For firms n ∈ Z (x) the inequality holds due to γ > 0.
Below we give the proof of Theorem 4.2, which provides necessary optimality conditions for Nash equilibriax of .
Proof (a) For all firms n ∈ Z we know thatx n = 0 is the global maximum of x n → π n (x n ,x −n ) and, thus, the directional derivative has to satisfy π n (x, e n ) ≤ 0.
Here, we can use τ n = 1 and Lemma B.1 to compute the directional derivative (b) For all firms n ∈ E we know by definition of E = {n / ∈ Z : n ∈ C = τ n } that Sincex n > 0 is the global maximum of x n → π n (x n ,x −n ), both directional derivatives have to satisfy π n (x, e n ) ≤ 0 and π n (x, −e n ) ≤ 0. Using Lemma B.1 again yields (c) For all firms n ∈ F we know thatx n > 0 is the global maximum of x n → π n (x n ,x −n ) and, thus, both directional derivatives have to satisfy π n (x, e n ) ≤ 0 and π n (x, −e n ) ≤ 0. Using Lemma B.1, we can compute these directional derivatives and obtain Adding both directional derivatives yieldŝ Sincex n , b, w t > 0, this implies C = t = ∅ for all t ≥ τ n . Consequently, π n (x; −e n ) = −π n (x; e n ), i.e., the map x n → π n (x n ,x −n ) is differentiable at ∈ Z : τ n > δ}, which completes the proof.
Below, Theorem 4.3 is proven, which states how many solutions the stationarity conditions (8) can have.
Proof (a) We know by Theorem 4.2 thatx is one solution of the system of equations. It thus suffices to prove that the system has at most one solution to ensure uniqueness.
We can compute solutions x * = (x * Z , x * E , x * F ) of the system one after the other. The unique solution of the first equation is x * Z = 0. To see that the second equation has a unique solution x * E , note that for all t ≤ δ we have C > t = C t−1 and thuŝ The equilibrium priceP t (x) thus only depends on the value of x m of firms m with τ m < t. Consequently, the second equation has a unique solution x * E , which is computed in order of ascending values of τ n .
In case F = ∅, it remains to show that for given x * Z and x * E , the third equation has a unique solution x * F . To this end, recall that for all n ∈ F, we have We now prove that the map is strongly monotone on X F := [0, ∞) |F| . By Theorem 2.3.3(b) in [20], this implies that the complementarity system has exactly one solution and the equation H (x F ) = 0 thus has at most one solution Due to the assumptions on S n we know that for all x F , y F ≥ 0, we have Consequently, we obtain that for all x F , y F ≥ 0 it holds Since F = ∅, we know δ < T and C T = E ∪ F, U T = ∅ and thus holds. This proves the strong monotonicity of H on X F and that the third equation has at most one solution x * F ≥ 0. In this section, we describe how the different parts of Algorithm 1 work in detail. Checking the criteria for local optimality is straight-forward, so the majority of the section deals with the identification stationary points and the check for global optimality.
Lemma D.1 Suppose that Assumption 4.1 holds. Then, given a Nash equilibriumx of (7) we can compute the equilibrium prices as follows: (a) For all t with 1 ≤ t ≤ δ, Proof In case E = ∅, we have δ ≥ 1 and for all t ≤ δ,
holds. This shows Part (a). Moreover, for all δ < t ≤ T we havê This shows Part (b).
Lemma D.2 Suppose that Assumption 4.1 holds. Then, for a Nash equilibriumx = (x Z ,x E ,x F ) of (7) it holds that (c)x F is a solution of the system of equations H F (x F ) = 0, where H F (x F ) is defined as follows: In the definition of H F ,P t (x F ) is given bŷ for all t > δ.
Proof Condition (a) holds by definition. Condition (b) follows from the stationarity conditions (8) and the definition of E. Condition (c) follows from the stationarity conditions (8).
Combining these two observations with Theorem 4.3 yields the following result. This theorem shows us that Algorithm D.3 is correct. The conditions for local optimality have already been discussed in Theorem 4.2. Hence, it remains to discuss global optimality conditions and the correctness of Algorithm 4. We check for global optimality by checking that no firm n has an incentive to deviate from the solution. For every firm n, we generate all patterns τ , that are compatible withx −n , and compute bounds L < x n ≤ U for possible strategies x n of firm n with τ (x n ,x −n ) = τ . For each pattern τ , we then compute the optimal strategy x * n for firm n on the interval [max{0, L}, U ]. If this strategy leads to a strictly better payoff for firm n, then, by continuity, we have shown thatx is not a Nash equilibrium as there exists a better strategy on the interval (L, U ]. But if no pattern τ leads to a better strategy for firm n, we are sure that we have found a Nash equilibrium. The following lemma goes into more detail. ≥ 0, a firm n, and τ ∈ {1, . . . , T , T + 1} N be given.

Lemma D.4 Letx
(c) Let x n ≥ 0 be given with τ = τ (x n ,x −n ). Then, the function x n → π τ (x n ,x −n ) has its unconstrained maximum at the unique solutionx n of the equation t≥τ n w t P t,−n − c n − 2bx n |U t | + 1 − S n (x n ,x −n ) −x n ∇ x n S n (x n ,x −n ) = 0, whereP t,−n and U t are defined as in (14a) and (14b). The maximum x * on the interval [max{0, L}, U ], with L and U as in Eq. (15), is given by x * = min{max{L, 0,x n }, U }.
Proof (a) Condition (1) follows directly from the definition of Z (x). To compute the bounds on the pricesP t,−n , we use the definition ofP t (x), U t , and C t to obtain Rearrangement yields the bounds on P t,−n . (b) From the prices P t,−n and τ , we can derive bounds on the value of x n . The specific bounds follow from the definition of U t and C t . (c) For all x n ≥ 0 with τ (x n ,x −n ) = τ , the payoff of firm n has the form π n (x n ,x −n ) = π τ n (x n ,x −n ) = t<τ n w t 1 b (P t,−n − c n ) 2 + t≥τ n w t P t,−n − bx n |U t | + 1 − c n x n − x n S n (x n ,x n ).
Due to b > 0 and the assumptions on S n , this function is uniformly concave in x n and thus has exactly one unconstrained maximumx n , which is the unique solution of ∂π τ n ∂ x n (x n ,x −n ) = 0. The constrained maximum on [max{0, L}, U ] then is x * n = min{max{L, 0,x n }, U }.
With these results proven, we have shown that Algorithm 4 is correct. We summarize this in the following lemma.

Lemma D.5
Consider an arbitraryx ≥ 0. Then, Algorithm 4 terminates successfully if and only ifx is a Nash equilibrium of .