1 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 in one or more capacity-constrained Cournot games. We allow for \(N \ge 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 up- and 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.

2 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 \in {\mathbb {R}}^N\), \(n=1,\ldots ,N\), denote the canonical unit vectors of the vector space \({\mathbb {R}}^N\). For a sufficiently smooth function \(f:{\mathbb {R}}^N \rightarrow {\mathbb {R}}\), the partial derivative w.r.t. the variable \(x_n\) is denoted by \(\tfrac{\partial f}{\partial x_n}\) and the directional derivative at a point \(x \in {\mathbb {R}}^N\) in direction \(d \in {\mathbb {R}}^N\) is denoted by \(f'(x;d)\). 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 \(\Gamma \): In the upper level, firms \(n=1,\ldots , N\) simultaneously choose capacities \(x_n \ge 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 :{\mathbb {R}}^N \rightarrow (0,\infty )\). This cost function may be different for different firms n and can also depend on the others’ decisions \(x_m\), \(m \ne n\). We assume for all \(n=1,\ldots ,N\) that \(S_n\) is continuously differentiable and monotonically increasing in all variables \(x_m\), i.e.,

$$\begin{aligned} S_n(x + \varepsilon e_m) \ge S_n(x) \quad \text {for all }\,m = 1,\ldots , N \text { and } \varepsilon > 0, \end{aligned}$$

where \(x = (x_1,\ldots ,x_N)^\top \in {\mathbb {R}}^N\). Furthermore, we assume that \(x_n \mapsto S_n(x)x_n\) is convex, i.e., \(x_n \mapsto S_n(x) + x_n \tfrac{\partial S_n}{\partial x_n} (x)\) is monotonically increasing.

Given these capacities x, in the lower level, we consider several subsequent scenarios \(t=1,\ldots , T\), in which the same firms \(n=1,\ldots ,N\) compete in a capacity-constrained Cournot game \(G_t(x)\), i.e., they solve

$$\begin{aligned} \max _{q_{n,t}} \quad \phi _{n,t}(q_{n,t}) \mathrel {{\mathop :}{=}}P_t \left( \sum _{m=1}^N q_{m,t}\right) q_{n,t} - c_n q_{n,t} \quad \text {s.t.} \quad 0 \le q_{n,t} \le x_n. \end{aligned}$$
(1)

Here, \(x_n \ge 0\) is the previously chosen capacity from the upper level, \(c_n > 0\) denotes the production cost of firm n, \(Q_t \mathrel {{\mathop :}{=}}\sum _{m =1}^N q_{m,t}\) is an abbreviation for the overall produced quantity in scenario t, and

$$\begin{aligned} P_t(Q_t) = \theta _t - b Q_t \end{aligned}$$
(2)

with \(\theta _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 \(\theta _t\) and we assume, without loss of generality,

$$\begin{aligned} \theta _1< \theta _2< \cdots < \theta _T. \end{aligned}$$

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

$$\begin{aligned} q_{n,t} \mapsto \phi _{n,t}(q_{n,t})= & {} P_t \left( \sum _{m=1}^N q_{m,t}\right) q_{n,t} - c_n q_{n,t} \\= & {} -b q_{n,t}^2 + \left( \theta _t - b \sum _{m \ne n} q_{m,t} -c_n \right) q_{n,t} \end{aligned}$$

are strictly concave in \(q_{n,t}\), by Proposition 2 in [44], the game \(G_t(x)\) has a unique equilibrium \({\hat{q}}_t(x) \in {\mathbb {R}}^N\) for all scenarios t and all capacities \(x = (x_1,\ldots ,x_N)^\top \). If we denote the corresponding equilibrium price by \({\hat{P}}_t(x)\), then the equilibrium payoff for each firm n in scenario t is given by

$$\begin{aligned} {\hat{\phi }}_{n,t}(x) \mathrel {{\mathop :}{=}}\left( {\hat{P}}_t(x) - c_n\right) {\hat{q}}_{n,t}(x). \end{aligned}$$

On the upper level, every firm n thus chooses its capacity \(x_n \ge 0\) such that its overall gain is maximized, i.e., firm n solves the problem

$$\begin{aligned} \max _{x_n} \quad \pi _n(x) \mathrel {{\mathop :}{=}}\sum _{t=1}^T w_t {\hat{\phi }}_{n,t}(x) - S_n(x)x_n \quad \text {s.t.} \quad x_n \ge 0. \end{aligned}$$
(3)

Here, \(w_t > 0\) are weights that can be used to reflect the probability or importance of the individual scenarios t.

The game \(\Gamma \) is defined as the two-level MLFG described by (3) and (1). The structure of this game is illustrated in Fig. 1.

Fig. 1
figure 1

Illustration of the multi-leader multi-follower game \(\Gamma \)

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,\ldots ,T\) take place after the capacities are fixed. Since each scenario t is only connected to the upper level and independent of other scenarios \({\tilde{t}}\ne t\), each scenario t is a subgame of the MLFG.

The structure of \(\Gamma \) also implies that all Nash equilibria \((\hat{x}^\top ,\hat{q}^\top )^\top \in {\mathbb {R}}^N \times {\mathbb {R}}^{T N}\) of the game \(\Gamma \) have the property that for all \(t=1,\ldots ,T\), the vector \({\hat{q}}_t = {\hat{q}}_t({\hat{x}})\) is the unique Nash equilibrium of the subgame \(G_t(x)\).

Theorem 2.1

Let \((\hat{x},\hat{q}) \in {\mathbb {R}}^N \times {\mathbb {R}}^{T N}\) be a Nash equilibrium of the game \(\Gamma \). Then, this Nash equilibrium is subgame perfect.

Our goal is to construct an algorithm that computes all Nash equilibria \({\hat{x}} \in [0,\infty )^N\) of the two-level game \(\Gamma \). The main idea of this algorithm is as follows: For every given vector \(x \ge 0\), the capacity-constrained Cournot games \(G_t(x)\) have unique Nash equilibria \({\hat{q}}_t(x)\) for all \(t=1,\ldots ,T\). We can provide explicit formulae for these Nash equilibria and the resulting equilibrium payoff \({\hat{\phi }}_{n,t}(x)\) and can thus reduce the two-level game to the single-level game (3). However, the objective functions \(\pi _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 \(\Gamma \) 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.

3 Analysis of the lower level

For a fixed price intercept \(\theta > 0\) and capacities \(x_n \ge 0\), we now consider the capacity-constrained Cournot game G(x), where every firm \(n=1,\ldots ,N\) solves

$$\begin{aligned} \max _{q_n} \quad \phi _n(q) \mathrel {{\mathop :}{=}}P\left( \sum _{m=1}^N q_m\right) q_n - c_n q_n \quad \text {s.t.} \quad 0 \le q_n \le x_n, \end{aligned}$$

with \(c_n > 0\), \(b > 0\), and \(P(Q) = \theta - b Q\). 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 equilibrium \({\hat{q}}(x)\). For our analysis, we need very specific information about this unique Nash equilibrium \({\hat{q}}(x)\) and the corresponding equilibrium payoffs    \({\hat{\phi }}_n(x)\). To be precise, we need to know the effect of varying the price intercept \(\theta \) and the capacities x on the above mentioned quantities.

Our first step is thus to provide an explicit formula for the unique Nash equilibrium \({\hat{q}}(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 \in [0, x_n]\) and we can thus split them in the sets

$$\begin{aligned} Z(x)&\mathrel {{\mathop :}{=}}\{n=1,\ldots ,N:x_n = 0\}, \\ I(x)&\mathrel {{\mathop :}{=}}\{n \notin Z(x):{\hat{q}}_n(x) = 0\}, \\ C(x)&\mathrel {{\mathop :}{=}}\{n \notin Z(x):{\hat{q}}_n(x) = x_n\}, \\ U(x)&\mathrel {{\mathop :}{=}}\{1, \ldots , N\} \setminus (Z(x) \cup I(x) \cup C(x)) \end{aligned}$$

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 equilibrium \({\hat{q}}(x)\) the equilibrium price is given by

$$\begin{aligned} {\hat{P}}(x) = \frac{\theta + \sum _{m \in U(x)} c_m - b \sum _{m \in C(x)} x_m}{|U(x)|+1}, \end{aligned}$$
(4)

the equilibrium strategies are

$$\begin{aligned} {\hat{q}}_n(x) = {\left\{ \begin{array}{ll} 0, &{} \text {if } n \in I(x) \cup Z(x), \\ \frac{{\hat{P}}(x) - c_n}{b}, &{} \text {if } n \in U(x), \\ x_n, &{} \text {if } n \in C(x), \end{array}\right. } \end{aligned}$$
(5)

and the equilibrium payoff reads

$$\begin{aligned} {\hat{\phi }}_n(x) = {\left\{ \begin{array}{ll} 0, &{} \text {if } n \in I(x) \cup Z(x), \\ \frac{1}{b}({\hat{P}}(x) - c_n)^2, &{} \text {if } n \in U(x), \\ ({\hat{P}}(x) - c_n)x_n, &{} \text {if } n \in C(x). \end{array}\right. } \end{aligned}$$

Using the equilibrium price \({\hat{P}}(x)\), we can also characterize the sets I(x), U(x), C(x) by

$$\begin{aligned} \begin{aligned} I(x)&= \{n \notin Z(x):{\hat{P}}(x) \le c_n\}, \\ U(x)&= \{n \notin Z(x):c_n< {\hat{P}}(x) < c_n + b x_n\}, \\ C(x)&= \{n \notin Z(x):{\hat{P}}(x) \ge c_n + b x_n\}. \end{aligned} \end{aligned}$$
(6)

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:

$$\begin{aligned} I^<(x)&= \{n \in I(x):{\hat{P}}(x) < c_n \}, \\ I^=(x)&= \{n \in I(x):{\hat{P}}(x) = c_n \}, \\ C^=(x)&= \{n \in C(x):{\hat{P}}(x) = c_n + b x_n\}, \\ C^>(x)&= \{n \in C(x):{\hat{P}}(x) > c_n + b x_n\}. \end{aligned}$$

Recall that in the two-level game \(\Gamma \), the equilibrium payoff \({\hat{\phi }}_{n,t}(x)\) for all scenarios t is a part of the objective function \(\pi _n(x)\) of firm n. For this reason, we need to understand the effect of component-wise changes \(x + \varepsilon e_n\), \(\varepsilon \in {\mathbb {R}}\), on the equilibrium payoff \(\hat{\phi }_n(x)\) of the same firm n. As long as a deviation \(x + \varepsilon e_n\) does not change the sets Z(x), I(x), U(x), and C(x), the equilibrium payoff \(\hat{\phi }_n(x)\) is constant w.r.t. \(x_n\), if \(n \in Z(x) \cup I(x) \cup U(x)\), and strictly concave in \(x_n\), if \(n \in 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 \in \{1,\ldots ,N\}\) and a small deviation \(x + \varepsilon e_n\) and compute its effect on the equilibrium payoff \({\hat{\phi }}_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 \mapsto \hat{\phi }_n(x)\), see Fig. 2 for a schematic illustration:

  • In case \(n \in Z(x)\), only positive deviations are possible and the map is locally concave.

  • In case \(n \in I (x) \cup U(x)\), the map is locally constant.

  • In case \(n \in C^=(x)\), the map is locally concave but may have a kink in \(x_n\).

  • In case \(n \in 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 \mapsto {\hat{\phi }}_n(x)\) has a nonconcave kink at \(x_n\).

Fig. 2
figure 2

Schematic illustration of the x-space for \(N=2\) firms. Highlighted from firm 1’s perspective are the cases \(1\in C^{>}(x)\) (in blue), \(1\in U(x)\) (in gray) and, regarding the map \(x_1 \mapsto \phi _1(x)\), \(1\in C^{=}(x)\) without kink (in green), \(1\in C^{=}(x)\) with concave kink (in orange), \(1\in C^{>}(x)\) with nonconcave kink due to \(2\in C^{=}(x)\) (in red) (color figure online)

Since the equilibrium payoffs \({\hat{\phi }}_{n,t}(x)\) are a part of the upper-level objective function \(\pi _n(x)\), this implies that we have to handle two difficulties when computing Nash equilibria of \(\Gamma \):

  1. (1)

    Equilibrium strategies may be points at which \(x_n \mapsto \pi _n(x)\) is not differentiable.

  2. (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) = \emptyset \). 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) = \emptyset \) 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 \(\Gamma \) we have not just one lower-level game G(x) but instead one such game \(G_t(x)\) for each scenario \(t=1,\ldots , T\). These games differ only in the price intercept \(\theta _t\). The following result states that the outcome of G(x) is, in a certain sense, monotone w.r.t. the price intercept \(\theta \). Its proof can be can be found in “Appendix B”.

Lemma 3.1

Consider two capacity-constrained Cournot games \(G_1(x), G_2(x)\), which differ only in the price intercept \(\theta _1 < \theta _2\), and let \({\hat{q}}_1(x), {\hat{q}}_2(x)\) be the corresponding Nash equilibria. Then, \({\hat{P}}_1(x) < {\hat{P}}_2(x)\), i.e., the equilibrium price increases for higher intercepts. Furthermore, \(I_1(x) \supseteq I_2(x)\) and \(C_1(x) \subseteq C_2(x)\), i.e., the set of inactive firms shrinks and the set of constrained firms grows with larger intercepts \(\theta _t\).

Since we assumed that the price intercepts satisfy

$$\begin{aligned} \theta _1< \theta _2< \cdots < \theta _T, \end{aligned}$$

the previous result ensures that for all fixed capacities \(x \ge 0\), the sets \(C_t(x)\) of constrained firms in scenarios \(t=1,\ldots ,T\) satisfy the inclusions

$$\begin{aligned} C_1(x) \subseteq C_2(x) \subseteq \cdots \subseteq C_T(x). \end{aligned}$$

Furthermore, since the equilibrium prices \({\hat{P}}_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, \ldots , T\) on the lower level differ only in the price intercepts \(\theta _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,\ldots ,T\) such that the inclusions

$$\begin{aligned} C_1(x) \subseteq C_2(x) \subseteq \cdots \subseteq C_T(x) \end{aligned}$$

hold for all capacities \(x \ge 0\) and that \(n \in 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 \ge 0\), the value of

$$\begin{aligned} \frac{{\hat{P}}_t(x) - c_{n,t}}{b_t} = \frac{\theta _t + \sum _{m \in U_t(x)} c_{m,t} - b_t \sum _{m \in C_t(x)} x_m - \Big ( |U_t(x)|+1 \Big ) c_{n,t}}{\Big ( |U_t(x)|+1 \Big ) b_t} \end{aligned}$$

is strictly increasing in t for all firms \(n = 1, \ldots ,N\)—or at least for all firms \(n \in C_t(x)\).

Lemma 3.1 shows that this is the case for strictly increasing intercepts \(\theta _1< \cdots < \theta _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> \cdots > b_T\) or uniformly decreasing production costs \(c_{n,t} = c_n + \Delta _{t}\) with \(\Delta _1> \cdots > \Delta _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 \(\theta _t \), and costs \(c_{n,t} = c_n + \Delta _t\) it suffices to demand \(\theta _1 - \Delta _1< \cdots < \theta _T - \Delta _T\).

4 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, \ldots , T\), which differ in the price intercepts \(\theta _1< \theta _2< \cdots < \theta _T\). For every scenario t, we then know that the corresponding game \(G_t(x)\) has a unique equilibrium \({\hat{q}}_{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)=\emptyset \) for all t. More precisely, we assume the following.

Assumption 4.1

For all \(x \ge 0\) and all \(t=1,\ldots ,T\), the equilibrium price satisfies \({\hat{P}}_t(x) > c_n\) for all \(n=1,\ldots ,N\).

By Lemma C.1 in the appendix, this is ensured, e.g., if

$$\begin{aligned} \theta _1 > (|N|+1) \max _{m=1,\ldots ,N} \{c_m\} - \sum _{m=1}^N c_m. \end{aligned}$$

In addition to the capacity-constrained Cournot games \(G_t(x)\), we now also consider the Nash equilibrium problem \(\Gamma \) on the upper level, in which the capacities \(x_n \ge 0\) are chosen. Recall that here all firms \(n = 1, \ldots , N\) solve the problem

$$\begin{aligned} \max _{x_n} \quad \pi _n(x_n,x_{-n}) \mathrel {{\mathop :}{=}}\sum _{t=1}^T w_t \hat{\phi }_{n,t}(x_n, x_{-n}) - S_n(x_n, x_{-n})x_n \quad \text {s.t.} \quad x_n \ge 0, \end{aligned}$$
(7)

where we use the shorthand \(x_{-n} \in {\mathbb {R}}^{N-1}\) to indicate the strategies \((x_m)_{m \ne 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 \ge 0\). Consider an arbitrary \(x \ge 0\) with the corresponding set Z(x). Then, for all \(t = 1,\ldots , T\) the games \(G_t(x)\) have unique Nash equilibria \({\hat{q}}_t(x)\) with associated sets \(U_t(x)\) and \(C_t(x)\). Due to \(\theta _1< \cdots < \theta _T\) and Lemma 3.1, we immediately know

$$\begin{aligned} {\hat{P}}_1(x)< {\hat{P}}_2(x)< \cdots < {\hat{P}}_T(x) \quad \text {and} \quad C_1(x) \subseteq C_2(x) \subseteq \cdots \subseteq C_T(x). \end{aligned}$$

Thus, if a firm n is constrained in a scenario t, i.e., \(n \in C_t(x)\), then it remains constrained for all subsequent scenarios \(t+1, \ldots ,T\). Furthermore, \(n \in 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, \ldots , T\). However, one can prove that in a Nash equilibrium \({\hat{x}}\) of (7) we always have \(U_T({\hat{x}}) = \emptyset \), see Lemma C.2 in the appendix.

For a Nash equilibrium \({\hat{x}}\) of (7) we thus introduce the following notation:

$$\begin{aligned} \tau _n({\hat{x}})&\mathrel {{\mathop :}{=}}{\left\{ \begin{array}{ll} 1, &{} \text {if } n \in Z({\hat{x}}), \\ \min \{t \in \{1,\ldots ,T\}:n \in C_t({\hat{x}})\}, &{} \text {else}, \end{array}\right. } \\ \tau ({\hat{x}})&\mathrel {{\mathop :}{=}}(\tau _1(x), \ldots , \tau _N(x)) \in {\mathbb {N}}^N, \\ E({\hat{x}})&\mathrel {{\mathop :}{=}}\{n \notin Z({\hat{x}}):n \in C^=_{\tau _n({\hat{x}})}({\hat{x}})\}, \\ F({\hat{x}})&\mathrel {{\mathop :}{=}}\{1,\ldots ,N\} \setminus (Z({\hat{x}}) \cup E({\hat{x}})), \\ \delta ({\hat{x}})&\mathrel {{\mathop :}{=}}{\left\{ \begin{array}{ll} 0, &{} \text {if } E({\hat{x}}) = \emptyset , \\ \max \{\tau _n({\hat{x}}):n \in E({\hat{x}})\}, &{} \text {else}. \end{array}\right. } \end{aligned}$$

Then, \(\tau _n({\hat{x}})\) is the first scenario, in which firm n is constrained, \(E({\hat{x}})\) is the set of all firms, which are “equality-constrained” in their first constrained scenario, \(F({\hat{x}})\) is the set of all firms, which are strictly unconstrained/constrained in all scenarios, and \(\delta ({\hat{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.

Fig. 3
figure 3

Schematic illustration of the x-space for \(N=2\) firms and \(T=3\) scenarios. Highlighted are \({\bar{x}}\) (in blue) with \(\tau (\bar{x}) = (1, 3)\), \(E(\bar{x}) = \emptyset \), \(F(\bar{x})=\{1, 2\}\), \(\delta (\bar{x})=0\) and \({{\tilde{x}}}\) (in red) with \(\tau ({\tilde{x}}) = (3, 2)\), \(E({\tilde{x}}) = \{2\}\), \(F({\tilde{x}})=\{1\}\), \(\delta ({\tilde{x}})=2\) (color figure online)

These definitions allow us to describe certain sets and quantities more easily, e.g.,

$$\begin{aligned} U_t({\hat{x}})&= \{n \notin Z({\hat{x}}):t< \tau _n({\hat{x}})\} \quad \text {and} \quad C_t({\hat{x}}) = \{n \notin Z({\hat{x}}):t \ge \tau _n({\hat{x}})\}, \\ \pi _n({\hat{x}})&= \sum _{t < \tau _n({\hat{x}})} w_t \tfrac{1}{b} \left( {\hat{P}}_t({\hat{x}}) - c_n\right) ^2 + \sum _{t \ge \tau _n({\hat{x}})} w_t \left( {\hat{P}}_t({\hat{x}}) - c_n\right) {\hat{x}}_n - S_n({\hat{x}}) {\hat{x}}_n. \end{aligned}$$

For the remainder of this section, let \({\hat{x}} \ge 0\) be an arbitrary Nash equilibrium of (7). To keep the notation more compact, we use the abbreviations \(Z \mathrel {{\mathop :}{=}}Z({\hat{x}})\), \(\tau \mathrel {{\mathop :}{=}}\tau ({\hat{x}})\), etc. and denote the equilibrium price in scenario t by

$$\begin{aligned} {\hat{P}}_t({\hat{x}}) = \frac{\theta _t + \sum _{m \in U_t} c_m - b \sum _{m \in C_t}{\hat{x}}_m}{|U_t|+1} = \frac{\theta _t + \sum _{m \in U_t \cup C_t^=} c_m - b \sum _{m \in C_t^>}{\hat{x}}_m}{|U_t \cup C_t^=|+1}. \end{aligned}$$

Using this terminology, we can derive necessary first-order optimality conditions for a Nash equilibrium \({\hat{x}}\); see “Appendix C” for a proof.

Theorem 4.2

Let Assumption 4.1 hold and \({\hat{x}}\) be an arbitrary Nash equilibrium of (7). Then, the following holds for \({\hat{x}} = ({\hat{x}}_Z, {\hat{x}}_E, \hat{x}_F)\):

  1. (a)

    For all \(n \in Z\) we have \({\hat{x}}_n = 0\) and the directional derivative satisfies

    $$\begin{aligned} \pi _n'({\hat{x}}; e_n) = \sum _{t \ge \tau _n} w_t \left[ \hat{P}_t({\hat{x}}) - c_n - \frac{b {\hat{x}}_n}{|U_t \cup C_t^=|+1} \right] - S_n({\hat{x}}) - {\hat{x}}_n \tfrac{\partial S_n}{\partial x_n} ({\hat{x}}) \le 0. \end{aligned}$$
  2. (b)

    For all \(n \in E\) we have \({\hat{x}}_n = \frac{1}{b} (\hat{P}_{\tau _n}({\hat{x}}) - c_n) > 0\) and the directional derivatives satisfy

    $$\begin{aligned} \pi _n'({\hat{x}}; e_n)&= \sum _{t \ge \tau _n+1} w_t \left[ \hat{P}_t({\hat{x}}) - c_n - \frac{b {\hat{x}}_n}{|U_t \cup C_t^=|+1} \right] \\&\quad - S_n({\hat{x}}) - {\hat{x}}_n \tfrac{\partial S_n}{\partial x_n} ({\hat{x}}) \le 0, \\ \pi _n'({\hat{x}}; -e_n)&= - \sum _{t \ge \tau _n} w_t \left[ \hat{P}_t({\hat{x}}) - c_n - \frac{b {\hat{x}}_n}{|U_t|+1} \right] + S_n({\hat{x}}) + {\hat{x}}_n \tfrac{\partial S_n}{\partial x_n} ({\hat{x}}) \le 0. \end{aligned}$$
  3. (c)

    For all \(n \in F\) we have \(C_t^= = \emptyset \) for all \(t \ge \tau _n\) and \(x_n \mapsto \pi _n(x_n,{\hat{x}}_{-n})\) is differentiable at \({\hat{x}}_n\) with

    $$\begin{aligned} \tfrac{\partial \pi _n}{\partial x_n} ({\hat{x}}) = \sum _{t \ge \tau _n} w_t \left[ \hat{P}_t({\hat{x}}) - c_n - \frac{b {\hat{x}}_n}{|U_t |+1} \right] - S_n({\hat{x}}) - {\hat{x}}_n \tfrac{\partial S_n}{\partial x_n} ({\hat{x}}) = 0. \end{aligned}$$
  4. (d)

    The sets E and F are given by

    $$\begin{aligned} E = \{n \notin Z:\tau _n \le \delta \} \quad \text {and} \quad F = \{n \notin Z:\tau _n > \delta \}. \end{aligned}$$

This result makes several important observations possible. For a Nash equilibrium \({\hat{x}}\), we only need to know \(\tau ({\hat{x}}), Z({\hat{x}}), \delta ({\hat{x}})\) and can recover all other sets via

$$\begin{aligned} E(\hat{x})&= \{n \notin Z({\hat{x}}) : \tau _n({\hat{x}}) \le \delta ({\hat{x}})\},\\ F(\hat{x})&= \{n \notin Z({\hat{x}}) : \tau _n({\hat{x}})> \delta ({\hat{x}})\},\\ U_t({\hat{x}})&= \{n \notin Z({\hat{x}}) : t < \tau _n({\hat{x}})\},\\ C_t({\hat{x}})&= \{n \notin Z({\hat{x}}) : t \ge \tau _n({\hat{x}})\},\\ C_t^=({\hat{x}})&= {\left\{ \begin{array}{ll} \{n \notin Z({\hat{x}}) : \tau _n({\hat{x}}) = t\}, &{} \text {if } t \le \delta ({\hat{x}}), \\ \emptyset , &{} \text {if } t > \delta ({\hat{x}}). \end{array}\right. } \end{aligned}$$

We thus focus on \(\tau ({\hat{x}})\), \(Z({\hat{x}})\), and \(\delta ({\hat{x}})\) and the other sets are then given as above.

Every Nash equilibrium \({\hat{x}}\) needs to satisfy the stationarity conditions

$$\begin{aligned} \begin{aligned} {\hat{x}}_n = 0&\quad \text {for all } n \in Z({\hat{x}}), \\ {\hat{P}}_{\tau _n}({\hat{x}}) = c_n + b {\hat{x}}_n&\quad \text {for all } n \in E({\hat{x}}), \\ \tfrac{\partial \pi _n}{\partial x_n} ({\hat{x}}) = 0&\quad \text {for all } n \in F({\hat{x}}). \end{aligned} \end{aligned}$$
(8)

Additionally, every Nash equilibrium \({\hat{x}}\) needs to satisfy the local optimality conditions

$$\begin{aligned} \begin{aligned} \pi _n'({\hat{x}}; e_n) \le 0&\quad \text {for all } n \in Z({\hat{x}}), \\ \pi _n'({\hat{x}}; e_n) \le 0&\quad \text {for all } n \in E({\hat{x}}), \\ \pi _n'({\hat{x}}; -e_n) \le 0&\quad \text {for all } n \in E({\hat{x}}). \end{aligned} \end{aligned}$$

In the next section, we use these conditions to develop a solution algorithm for \(\Gamma \). 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 \(\tau = \tau ({\hat{x}})\), \(Z = Z({\hat{x}})\), and \(\delta = \delta ({\hat{x}})\), which is the Nash equilibrium \({\hat{x}}\); see “Appendix C” for the proof. Since there are only finitely many possibilities for \(\tau ,Z,\delta \), this immediately implies that \(\Gamma \) has at most finitely many Nash equilibria.

Theorem 4.3

Suppose that Assumption 4.1 holds and assume that the functions \(S_n\) are chosen such that the map

$$\begin{aligned} x \mapsto \left( S_n(x) + x_n \tfrac{\partial S_n}{\partial x_n} (x)\right) _{n =1}^N \end{aligned}$$

is monotone on \([0,\infty )^N\).

  1. (a)

    Let \({\hat{x}} \ge 0\) be a Nash equilibrium of \(\Gamma \) and \(\tau = \tau ({\hat{x}})\), \(Z = Z({\hat{x}})\), and \(\delta = \delta (\hat{x})\). Then, the system of equations

    $$\begin{aligned} x_n = 0&\quad \text {for all } n \in Z, \\ {\hat{P}}_{\tau _n}(x) = c_n + b x_n&\quad \text {for all } n \notin Z, \, \tau _n \le \delta , \\ \tfrac{\partial \pi _n}{\partial x_n} (x) = 0&\quad \text {for all } n \notin Z, \, \tau _n > \delta , \end{aligned}$$

    has exactly one solution \(x^* \ge 0\), which is \(x^* = {\hat{x}}\).

  2. (b)

    The Nash equilibrium problem \(\Gamma \) has at most \((N+1)(T+1)^{N}\) Nash equilibria and thus all Nash equilibria are isolated.

5 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 \(\Gamma \). The idea of this algorithm is as follows:

  1. 1.

    For all values of \(\tau \), Z, and \(\delta \) that can occur in a Nash equilibrium, compute candidates \({\hat{x}}\) by solving the stationarity conditions (8).

  2. 2.

    Check the local optimality conditions in \({\hat{x}}\), i.e., whether all feasible directional derivatives are nonpositive for all \(n \in Z \cup E\).

  3. 3.

    Verify if \({\hat{x}}_n\) is globally optimal for all firms n.

Note that the stationarity conditions used in the first step ensure \(\tfrac{\partial \pi _n}{\partial x_n} ({\hat{x}}) = 0\) for \(n \in F\), but do not take the objective function \(\pi _n\) into account for \(n \in Z \cup E\). For this reason, in the second step, we check the signs of the feasible directional derivatives for all \(n \in Z \cup E\). Recall that we have to work with directional derivatives here, because for \(n \in Z\), the function \(\pi _n\) is not defined for \(x_n < 0\) and for \(n \in E\), the function \(\pi _n\) may have a kink at \({\hat{x}}_n\).

Since each function \(x_n \mapsto \pi _n(x_n,{\hat{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 \(\pi _n\) can have nonconcave kinks and local optimality is thus not sufficient. To this end, for all concave pieces of the map \(x_n \mapsto \pi _n(x_n,{\hat{x}}_{-n})\) we compute its maximum on the subset of \([0,\infty )\), where this piece is correct, and compare it with \(\pi _n({\hat{x}}_n)\).

figure a

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 \(\Gamma \). To this end, we have to prove that all Nash equilibria \({\hat{x}}\) 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 \(\Gamma \) under suitable assumptions on the functions \(S_n\).

Theorem 5.1

Suppose that Assumption 4.1 holds.

  1. (a)

    Then, Algorithm 1 only returns Nash equilibria of the game \(\Gamma \).

  2. (b)

    If, additionally, the functions \(S_n\) are chosen such that the map

    $$\begin{aligned} x \mapsto \left( S_n(x) + x_n \tfrac{\partial S_n}{\partial x_n}(x)\right) _{n =1}^N \end{aligned}$$
    (9)

    is monotone on \([0,\infty )^N\), then Algorithm 1 computes all Nash equilibria of the game \(\Gamma \).

We need the additional assumption on the maps \(S_n\) to be able to guarantee that the algorithm finds all Nash equilibria of \(\Gamma \): Let \({\hat{x}}\) be a Nash equilibrium with corresponding parameters \(\tau ,Z,\delta \). Then under Assumption (9), Theorem 4.3 guarantees that for these parameters the stationarity conditions (8) have exactly one solution, namely the Nash equilibrium \({\hat{x}}\). Thus, for these parameters the Nash equilibrium \({\hat{x}}\) is the candidate computed in the first step of the algorithm.

If, in contrast, for parameters \(\tau ,Z,\delta \) corresponding to a Nash equilibrium \({\hat{x}}\) 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 \(\tau ,Z,\delta \). 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—besides \({\hat{x}}\)—the 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 \(\tau ,Z,\delta \).

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 \ge 0\) we have

    $$\begin{aligned}&\sum _{n=1}^N (S_n(x) + x_n \tfrac{\partial S_n}{\partial x_n}(x) - S_n(y) - y_n \tfrac{\partial S_n}{\partial x_n}(y)) (x_n - y_n) \\&\quad = \sum _{n=1}^N (S_n(x_n) + x_n \tfrac{\partial S_n}{\partial x_n}(x_n) - S_n(y_n) - y_n \tfrac{\partial S_n}{\partial x_n}(y_n)) (x_n - y_n) \ge 0. \end{aligned}$$
  • If the costs \(S_n\) are jointly given by

    $$\begin{aligned} S_n(x) = s\left( \sum _{n=1}^N x_n \right) \quad \text {for all }\,n=1,\ldots ,N \end{aligned}$$

    with \(s:[0,\infty ) \rightarrow (0,\infty )\) being affine linear and non-decreasing, i.e., \(s' \ge 0\) is constant, then \(x_n S_n(x)\) is convex. Additionally, for all \(x, y \ge 0\) and by using the abbreviations \(X \mathrel {{\mathop :}{=}}\sum _{n=1}^N x_n\), \(Y \mathrel {{\mathop :}{=}}\sum _{n=1}^N y_n\), we obtain

    $$\begin{aligned}&\sum _{n=1}^N \left( S_n(x) + x_n \tfrac{\partial S_n}{\partial x_n}(x) - S_n(y) - y_n \tfrac{\partial S_n}{\partial x_n}(y)\right) (x_n - y_n) \\&\quad = \sum _{n=1}^N \big (s(X) + x_n s'(X) - s(Y) - y_n s'(Y)\big ) (x_n - y_n) \\&\quad = (s(X) - s(Y))(X-Y) + s'(X) \Vert x-y\Vert _2^2 \ge 0 \end{aligned}$$
  • In combinations of the previous two cases, i.e., when the firms \(n=1,\ldots ,N\) can be divided into disjoint groups \(N_v \subseteq \{1,\ldots ,N\}\) such that for all \(n \in N_v\) the costs \(S_n(x) = S_v(\sum _{m \in {N_v}}x_m)\) are given by the same affine linear and non-decreasing function, which depends only on members of the group \(N_v\).

We close this section with two academic examples illustrating (a) that the game \(\Gamma \) does not always have a Nash equilibrium and (b) the importance of the global optimality check in Algorithm 4.

  1. (a)

    For \(N=T=2,\ \theta =(10, 20),\ b=1,\ c=(2.5, 5),\ w=(1, 1)\), and linear capacity costs \(S_n(x)=2(x_1+x_2)\) for \(n=1,2\), the game \(\Gamma \) has neither a Nash equilibrium nor points satisfying the local optimality conditions; see Fig. 4.

  2. (b)

    For \(N=2,\ T=3,\ \theta =(10, 12, 15),\ b=1,\ c=(4, 5),\ w=(1, 1, 1)\), and linear capacity costs \(S_n(x)=x_1+x_2+2.2\) for \(n=1,2\), the game \(\Gamma \) again has no Nash equilibrium. However, there exists a point fulfilling the local optimality conditions; see Fig. 5.

Fig. 4
figure 4

For \(\tau =(1,1)\) and \(\tau =(1,2)\), there exist Nash equilibria \({\bar{x}=(5/2, 5/4)}\) (in blue) and \({\hat{x}=(30/11, 25/22)}\) (in red) w.r.t. the local payoff functions \(\pi _n^\tau \). However, these are not Nash equilibria of \(\Gamma \) due to a nonconcave kink in \(\pi _1\). Algorithm 2 eliminates those points in the consistency check, because they are exactly on the border between both areas (color figure online)

Fig. 5
figure 5

Algorithms 2 and 3 only return the candidate \({\hat{x}=(2.15, 1.4)}\) (in red) satisfying the local optimality conditions. However, \({\hat{x}}\) is not a Nash equilibrium of \(\Gamma \) since \({\hat{x}_1}\) is dominated by \({\bar{x}_1=2.3}\) (in blue) for firm 1 (color figure online)

6 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.

6.1 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,\ldots , 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

$$\begin{aligned} N_v = \{n=1,\ldots ,N : v_n = v\} \end{aligned}$$

be the set of all firms located at an entry node v. Firms \(n \in N_v\) are able to book capacities \(x_n \ge 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^{\text {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 \mathrel {{\mathop :}{=}}\sum _{m \in 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^{\text {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 day-ahead market. This day-ahead market is represented in the lower level of our model, where \(t = 1,\ldots ,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 \(\Gamma \) 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 \in N_v\), the map \(x_n \mapsto x_n S_{v_n}(\sum _{m \in N_{v_n}} 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^{\text {TC}}_{v} > 0\), several examples for booking costs are given below:

  • Constant booking costs:

    $$\begin{aligned} S_v\left( X_v\right) = k_v. \end{aligned}$$
  • Linearly increasing booking costs:

    $$\begin{aligned} S_v\left( X_v\right) = s_v X_v+ k_v. \end{aligned}$$
    (10)
  • 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 \(\varepsilon \)-neighborhood of \(X^{\text {TC}}_{v}\):

    $$\begin{aligned} \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!S_v\left( X_v\right) = {\left\{ \begin{array}{ll} k_v, &{} \displaystyle \text {if } X_v< X^{\text {TC}}_{v} - \varepsilon , \\ \displaystyle \frac{s_v}{4\varepsilon } \left( X_v - X^{\text {TC}}_{v} + \varepsilon \right) ^2 + k_u, &{} \displaystyle \text {if } X^{\text {TC}}_{v}- \varepsilon \le X_v < X^{\text {TC}}_{v} + \varepsilon , \\ \displaystyle s_v\left( X_v-X^{\text {TC}}_{v}\right) + k_v, &{} \displaystyle \text {if } X^{\text {TC}}_{v} + \varepsilon \le X_v. \\ \end{array}\right. } \end{aligned}$$
    (11)

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) \ne \emptyset \) 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) = \emptyset \) 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 €/TWh.

We assume that firms can book (purchase) capacities at two different entry nodes AB, 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.Footnote 1 We calibrated the linear demand functions based on observed spot-market 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),

$$\begin{aligned} \theta _1=109, \quad \theta _2=126, \quad \theta _3=184, \quad \theta _4=306, \quad \theta _5=442, \quad \text {and} \quad b=66.2295. \end{aligned}$$

Finally, we choose the weights of all days \(t=1,\ldots ,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^{\text {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 AB.

The unit cost for procuring (or producing) gas for all firms is given by the parameters

$$\begin{aligned} c_1 = 14, \quad c_2=14.5, \quad c_3=15, \quad c_4=13. \end{aligned}$$

The booking costs \(S_v\) at both entry nodes \(v = A, B\) are assumed to be constant up to the technical capacity \(X^{\text {TC}}_v\) and linearly increasing afterward, with a smoothed intermediate part as given in (11). We choose the same parameters for both nodes \(v = A,B\):

$$\begin{aligned} k_v=10, \quad s_v=10b, \quad \varepsilon = 0.5\cdot 10^{-5}. \end{aligned}$$

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^{\text {TC}}_v = \infty \) 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 \(\Gamma \) 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 capacities \({\hat{X}}\) decreases for a larger number of participating firms, but is always larger than 4.

Table 1 Reference values for infinite technical capacities

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^{\text {TC}}_A\) available at node A. The total technical capacity \(X^{\text {TC}}_A + X^{\text {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.

Table 2 Setup of the different considered settings

For each of the seven settings, our algorithm returned a single Nash equilibrium of the game \(\Gamma \). The resulting Nash equilibria for all settings are given in Table 3. Here \({\hat{X}}_A, {\hat{X}}_B\) denote the total capacity booked at nodes AB.

Table 3 Nash equilibria of the different considered settings
Table 4 Comparison of Nash equilibrium and welfare solution in all seven settings

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 equilibrium—denoted by \(W^{\text {NE}}(\hat{x})\) and \(S_v(\hat{x})\) for \(v=A,B\)—to the solution of the welfare maximization problem

$$\begin{aligned} \begin{aligned} \max _{x, q} \quad&\sum _{t=1}^{T} w_t \left[ \int _0^{Q_t} P_t(y) \,\mathrm {d}y - \sum _{n=1}^{N}c_n q_{n,t}\right] - \sum _{v\in \{A,B\}} \int _{0}^{X_v}S_v(y) \,\mathrm {d}y \\ \text {s.t.} \quad&0\le q_{n,t} \le x_n \quad \text {for all }\,n=1,\ldots ,N,\ t=1,\ldots ,T. \end{aligned} \end{aligned}$$
(12)

We denote the objective value of the welfare problem by \(W^{\text {Opt}}\) and the respective booking costs at node v by \(S_v^{\text {W}}\). The welfare value in the Nash equilibrium, i.e., \(W^{\text {NE}}(\hat{x})\), is calculated by evaluating the objective function value of (12) for the given Nash equilibrium \(\hat{x}\) and the resulting nominations \(\hat{q}\) according to (5) and \(\tau (\hat{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., \(X_v \le X^{\text {TC}}_v\) for \(v=A,B\). Compared to 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^{\text {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^{\text {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 booking \({\hat{x}}_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. \(\tau _4(\hat{x})=5\), whereas in Settings 2 and 3 it is already nominating its full capacity in scenario \(t=4\), i.e., \(\tau _4(\hat{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 \(\sum \pi _n(\hat{x})\) is increasing when the number of active firms is decreasing. In contrast, the generated welfare in the Nash equilibrium \(\hat{x}\) 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^{\text {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({\hat{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({\hat{x}}) + S_B({\hat{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.

Table 5 Overview of the eight different categories

6.2 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 \(\theta = (\theta _1, \ldots , \theta _T)\) of price intercepts of the linear inverse demand function, the slope b of the linear inverse demand function, the vector \(c = (c_1,\ldots ,c_N)\) of production costs of the firms, and the vector \(w = (w_1, \ldots , 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 runtimeFootnote 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 \(\pi \) and welfare (see (12)), the pattern \(\tau \), the set of firms with zero capacity Z, the information about exactly constrained firms \(\delta \), 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.

7 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.