- \(U, P\)
set of generating units(nodes) and firms(portfolios).

- \(K\)
set of loads.

- \(N,L\)
set of power system nodes and lines.

- \(c_u, k_u\)
Variable cost ($/MWh) and capacity(MW) of unit \(u\)

- \(d_j\)
Fixed load (demand) at node \(j\).

- \(\hat{c}_u, \hat{g}_u\)
Offered price-quantity pair of unit \(u (0\leq \hat{c}_u \leq \hat{C}_u).\)

- \(g_u, \pi_u\)
Dispatch (MW) and profit ($/h) of unit \(u\).

- \(x_{uk}, y_{uk}\)
Binaries which select the price-quantity strategy of each unit \(u\).

- \(E^0\)
Set of equations which determine optimal economic dispatch.

- \(E^{(p,s)}\)
in the candidate strategy combination and in the alternative in which portfolio \(p\) chooses strategy \(s\).

- \(p_{ij}\)
active power injection from node i to j, more specific it is the amount of power measured at node j.

- \(B_{ij}\)
\(\operatorname{Im} (1/Y_{ij})\) imaginary part of inverse admittance matrix (or, alternatively \(1/x_{ij}\), where \(x_{ij}\) is line reactance).

- \(k^{(i,j)}\)
is the coefficient for loss modeling which is equal to \(\frac{R^{(i,j)}\cdot 4}{(V_i + V_j)^2}\)

- \(R^{(i,j)}\)
resistance of line \((i,j)\).

- \(V_i\)
nominal voltage at bus \(i\).

The first case is \[XY = 0\] which is then represented as \[Xb + Y(1-b) = 0,\] which could be replaced by \[\begin{aligned} 0\leq X&\leq Mb\\ 0\leq Y&\leq M(1-b)\\ M&\rightarrow \infty.\end{aligned}\]

The second case is the \(XY\) as a term but when \[X = \sum_i a_i x_i + a_0, x_i\in \{0,1\}\] representation is allowed. Then \(XY\) can be expressed as \[\begin{aligned} XY &= \sum_i a_i z_i + a_0 Y, \\ z_i &= x_iY.\end{aligned}\]

The last expression could in turn be expressed as a pair \[\begin{aligned} z_i&\leq Y\\ 0\leq z_i &\leq x_i\cdot M.\end{aligned}\] However, this will work only for a certain type of the functional that will ensure that the maximum \(z_i\) value is always preferable. This inequalities could be tightened \[\begin{aligned} Y \leq &z_i + (1 - x_i) \cdot M \leq M \\ 0\leq &z_i \leq Y\end{aligned}\] which ensures that \(z_i = Y\) when \(x_i = 1\) and \(z_i = 0\) otherwise.

We start with formulating inner problem, which is going to be a DC based OPF problem with no losses. This simplification is done in order to keep the problem generally computationally solvable in reasonable time. \[\begin{aligned} \bar{c}\sum_k d_k - \sum_u \hat{c}_u g_u &\rightarrow max && \label{eq:lowlev_func}\\ \sum_{k\in j} d_k &- \sum_{i}p_{ij} - \sum_{u\in j} g_u = 0 &&\forall j\in N &| &\lambda_j\label{eq:lowlev_con_first}\\ p_{ij} &= B_{ij}(\theta_i - \theta_j)&&\forall (i,j)\in L^0 &|& \mu^0_{ij} \\ p^{min}_{ij}&\leq p_{ij} \leq p^{max}_{ij},&& \forall (i,j) \in L^0 &| &\sigma^l_{ij}, \sigma^u_{ij} \\ p_{ij} &= B_{ij}(\theta_i - \theta_j) + M(b_{ij} - 1) + r_{ij}, && \forall (i,j) \in L^1 & | &\mu^1_{ij} \\ b_{ij}p^{min}_{ij}&\leq p_{ij} \leq b_{ij}p^{max}_{ij}, && \forall (i,j) \in L^1 & | &\sigma^l_{ij}, \sigma^{u}_{ij} \\ 0&\leq r_{ij} \leq 2M(1 - b_{ij}), && \forall (i,j) \in L^1 & | & \rho^l_{ij}, \rho^u_{ij} \\ 0&\leq g_u \leq \hat{g}_u &&\forall u & | & \omega^{l}_g, \omega^{u}_g \\ 0&\leq d_k \leq \hat{d}_k &&\forall i & | & \nu^{l}_k, \nu^{u}_k \\ &b_{ij} \in \{0, 1\}\label{eq:lowlev_con_last}\end{aligned}\]

In order to model Nash Equilibrium we have to solve similar inner problems but with different parameters. The system described above is linear, so KKT conditions are sufficient for global optimum. Hence, we can refer to this problem as to the equations system with inner variables and outer parameters.

Let’s denote the \(\phi=(g,p,\theta,r)\) as the vector of primal inner variables for that problem and the \(\psi = (\lambda, \mu, \sigma, \rho, \nu, \omega)\) as the vector of duals.

Next, we denote as \(E(\hat{g}, \hat{c}, b;\phi, \psi) = 0\) the system of constraints above complemented by KKT conditions, which is equivalent to problem formulation. Then, required subproblems used to filter the Nash Equilibrium are formulated as \(E(\hat{g}^{(s,p)}, \hat{c}^{(s,p)}, b; \phi^{(s,p)}, \psi^{(s,p)}) = 0\), where

- \(\hat{g}^{(s,p)}\)
is reduced variable set of \(\hat{g}_u\) for \(u\notin p\), the strategy for \(u\in p\) is fixed;

- \(\hat{c}^{(s,p)}\)
ditto for bidded cost;

- \((\cdot)^{sp}\)
is inner variable for this system (independent from originals).

For the sake of briefness we will omit the full Lagrangian expression here. To completely define \(E^0(\hat{g}, \hat{c}; \phi, \psi)\) we will write down the KKT conditions.

The first order optimality conditions are \[\begin{aligned} \nabla_{g_u}L &= \hat{c}_u - \lambda_j - \omega^l_u + \omega^u_u = 0 \label{eq:lowlev_KKT_nescon_first}\\ \nabla_{d_k}L &= -\bar{c} + \lambda_j - \nu^l_k + \nu^u_k = 0 \\ \nabla_{\theta_j}L &= -\sum_{i}\mu_{ij}B_{ij} + \sum_{k}\mu_{jk}B_{jk} = 0 \\ \nabla_{p_{ij}}L &= -\lambda_j + \mu_{ij} -\sigma_{ij}^l + \sigma_{ij}^u = 0 \\ %\nabla_{b_{ij}}L &= -\mu_{ij}M + \sigma^l_{ij}p^{l}_{ij} - \sigma_{ij}^u p^{u}_{ij} + 2M\rho_{ij}^u= 0 \\ \nabla_{r_{ij}}L &= -\mu_{ij} - \rho^l_{ij} + \rho^u_{ij} = 0 \label{eq:lowlev_KKT_nescon_last}\end{aligned}\] The complementarity conditions \[\begin{aligned} \sigma_{ij}^l (p_{ij} - p_{ij}^l) &= 0 && {ij}\in L^0\\ \sigma_{ij}^u (p^u_{ij} - p_{ij}) &= 0 && {ij}\in L^0\\ \sigma_{ij}^l (p_{ij} - b_{ij} p_{ij}^l) &= 0 && {ij}\in L^1\\ \sigma_{ij}^u (b_{ij} p^u_{ij} - p_{ij}) &= 0 && {ij}\in L^1\\ \rho^l_{ij} r_{ij} &