Game-Theoretical Models for Energy Markets Júlia Barbosa


Follow the presentation

What is Game Theory? „Game theory is the study of multiperson decision problems.“

Gibbons, R. (1992). A Primer in Game Theory

Normal-Form Representation: \[ \mathcal{G} = \{N,S = S_1 \times ... \times S_N, U:S \rightarrow \mathbb{R}^N\} \]

Do the players play without observing the other player's moves?
Yes → Static No → Dynamic

Is each players payoff function known by every other player?
Yes → Complete Information No → Incomplete Information

Do the players know the full history of the game at each move?
Yes → Perfect Information No → Imperfect Information
Illustrative Example The Peace War Game*
What if B plays first and A observes B's move before playing?

If players are rational, what is the most likely game outcome?

It depends on the game conditions!

*Modified

Nash-Equilibrium (NE)


Steady state where no player can benefit by unilaterally changing its strategy.
Market Equilibrium and Perfect Markets
Consumers and producers are price-takers
Social Welfare = Consumer Utility(CS) - Production Cost (PC)
Equilibrium Problems: quantity and price are variables.
Example 1: Nash Equilibrium Cournout Competition in Local Energy Markets
Each producer wants to maximize their profit:

\[\begin{aligned} \max_{x_p} &\left(\pi - k^m_p\right) x_p \\ \text{s.t.}&\\ & \sum_{p' \in P}x_{p'} = D \\ & \pi = a(D_0 - D)\\ & c_p - x_p \geq 0 \end{aligned}\]

The KKT-Conditions constitute a Mixed Complementarity Problem (MCP):

\[\begin{aligned} 0 = \pi - aD - k_p^m -\alpha_p &\perp x_p \text{ free} \; \; \forall p\\ 0 \leq c_p- x_p &\perp \alpha_p \geq 0 \; \; \forall p\\ 0 = \pi - a(D_0 -D) &\perp \pi \text{ free}\\ 0 = \sum_{p' \in P} x_{p'} - D &\perp D \text{ free} \\ \end{aligned} \]

Implementation in Julia available here.
Example 2: Generalized Nash Equilibria Cornout Competition with CO\(_2\) Emission Constraint
The formulation is now:

\[\begin{aligned} 0 = \pi - aD - k_p^m &\perp x_p \text{ free} \; \; \forall p\\ 0 \leq c_p- x_p &\perp \alpha_p \geq 0 \; \; \forall p \\ 0 \leq M - \sum_{p'} x_{p'}e_{p'} & \perp \phi_p \geq 0 \; \; \forall p\\ 0 = \pi - a(D_0 -D) &\perp \pi \text{ free} \\ 0 = \sum_{p' \in P} x_{p'} - D &\perp D \text{ free} \\ \\ \end{aligned} \]

\[ 0 \leq M - \sum_{p'} x_{p'}e_{p'} \perp \phi_p \geq 0 \; \; \forall p\\ \] The strategy set of each player depends on the strategies of the other players. (GNE)
This system is non-square !!!

If a trading system is implemented, the prices of the permits are the same for all producers, i.e,
\[ \phi_p = \phi \; \; \forall p \] The system is now square and has an unique NE.

\[\begin{aligned} 0 = \pi - aD - k_p^m &\perp x_p \text{ free} \; \; \forall p\\ 0 \leq c_p- x_p &\perp \alpha_p \geq 0 \; \; \forall p \\ 0 \leq M - \sum_{p'} x_{p'}e_{p'} & \perp \phi \geq 0 \; \; \forall p\\ 0 = \pi - a(D_0 -D) &\perp \pi \text{ free} \\ 0 = \sum_{p' \in P} x_{p'} - D &\perp D \text{ free} \\ \\ \end{aligned} \]

Implementation in Julia available here.
Example 3: Dynamic Game with a Single Leader Stackelberg Competition

Leader plays first, followers observe and then play a cornout-competition game.

The problem can be formulated as:

\[\begin{aligned} &\max_{x_l} \pi x_l - k_l^m x_l \\ & \text{s.t.} \\ &c_l - x_l \geq 0 \\ &\text{NE Problem from Example 1} \end{aligned} \]

Note that the NE problem is now a constraint of the leader problem.

This is a bilevel problem, where the lower level is a NEP.

Complementarity conditions can be replaced by a non-linear transformation.

Implementation in Julia available here.
Example 4: EPEC Power Market Model Strategic quantity decisions by Generators

Two producers A and B (leaders) maximize their profits from energy sales.
TSO (follower) maximizes profit from energy arbitrage between nodes.

Adapted from Complementarity Modeling in Energy Markets, by Gabriel A., Conejo A., Fuller J., Hobbs B. and Ruiz C. (2013)

Formulation of follower problem:

\[\begin{aligned} &\max_{s_n} \sum_{n \in N} \phi_n s_n \\ & \text{s.t.} \\ & s_1 - C \leq 0\\ & - s_1 - C \leq 0 \\ \end{aligned} \]

MPEC Formulation of leader at node \(n\) Problem:

\[\begin{aligned} &\max_{x_{n}} \pi_{n} x_{n} \\ & \text{s.t.} \\ & x_{n} - c_{n} \leq 0 \\ & x_{n} - s_{n} = D_{n} \; \; \forall n \in N \\ & \pi_n = a_n(D_{0,n} - D_n) \; \; \forall n \in N \\ & \text{Follower Problem KKT Conditions} \\ \end{aligned} \]

Note that we have two MPEC problems, one for each leader → EPEC.
How solve a EPEC?
The most common strategy is Diagonalization

1. Define a initial set of strategies for the leaders

2. While not convergence and not max iterations

3. For each leader \(l\):
    i. Solver the Leader \(l\) MPEC problem, given the strategies of the other leaders
    ii. Reset the strategies of the leader \(l\) with the new strategies

4. Check convergence

5. If interation limit reached → algotithm failed

6. If not converged, go to 2, else finished

Implementation in Julia available here.

Summary
  • Game theoretical fomulations allow to model imperfect markets.
  • Given convex objetive functions and constraint qualifications, multiple interdependent optmization problems can be replaced by their KKT-Conditions.
  • GNE problems can lead to non-square models, real world assumptions may help to eliminate variables.
  • MPECs can be solved with non-linear transformations of complementarity constraints.
  • EPECs can be solved used diagonalization.
Thank you!

Julia examples:
https://github.com/JP-Barbosa/GT4EM

This presentation
https://jp-barbosa.github.io/RevealGT4EM/

Questions, comments or ideas?
mail@juliabarbosa.net