Master Thesis in Mathematics-Economics

FACULTY OF SCIENCE
UNIVERSITY OF COPENHAGEN
Master Thesis in Mathematics-Economics
Pavol Hronsky
Department of Mathematical Sciences
Strategic Behavior of Power Producers in TwoStage Electricity Markets
Supervisor: Salvador Pineda Morente
Submitted: June 1th 2015
Preface
"It doesn’t matter what topic you have chosen for research,
and what research you are doing. But it always matter who
is your advisor and how he is using you."
I would like to express my gratitude to my supervisor Salvador Pineda Morente for the
useful comments, remarks and engagement through the learning process of this master thesis. Furthermore I would like to thank my loved one, Simona Galkova, who has supported me
throughout entire process, both by keeping me harmonious and helping me when needed
the most.
Abstract
The strategic behavior of the conventional power producers and its influence on the twostage energy market with the stochastic producers outcome is considered in this thesis. The
bilevel Stackelberg game formulation is used to model the simultaneous strategic decision
making process in the day-ahead and balancing market bids in the production capacity and
the reserve capacity. The upper level problem maximizes the power producer’s profit whilst
the lower level problem minimizes the total expected operation cost based on the producers
decisions. The original bilevel problem is further transformed into the equivalent one-level
mathematical programming with equilibrium constraints optimization problem using the
Karush-Kuhn-Tucker conditions on the underlying stochastic market clearing model. Resulting nonlinear problem is additionally augmented using the Fortuny-Amat procedure to
linearize the complementarity constraints, as well as with the procedure to linearize the
product of the binary and continuous variables resulting into the mixed integer linear problem to ensure the global optimality. Finally, the equilibrium problem with equilibrium constraints is constructed and solved using the diagonalization procedure.
Contents
1 Introduction
1.1 Motivation . . . . .
1.2 Literature review .
1.3 Approach . . . . . .
1.4 Thesis organization
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9
10
12
13
14
2 Energy Market
2.1 Centrally operated markets . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 Short term decision making . . . . . . . . . . . . . . . . . . .
2.2 Liberalized markets . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 Short term decision making . . . . . . . . . . . . . . . . . . .
2.3 Impact of stochastic generating units penetrating energy markets
2.3.1 Market clearing example without stochastic producer . . .
2.3.2 Market clearing example with stochastic producer . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
16
16
17
17
18
18
20
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3 Mathematical Theory
22
3.1 Introduction to optimization problems . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1.1 Lagrange dual function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.1.2 Complementarity slackness . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.1.3 Karush-Kuhn-Tucker conditions . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2 Game theory in energy market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2.1 Nash equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2.2 Cournot oligopoly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.2.3 Stackelberg game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3 MPEC - Mathematical programming with equilibrium constraints optimization problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.1 Fortuny-Amat linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3.2 Binary and continuous variable linearization . . . . . . . . . . . . . . . . 34
3.4 EPEC - Equilibrium programming with equilibrium constraints optimization
problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4 Modeling
4.1 General assumptions . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Stochastic market clearing . . . . . . . . . . . . . . . . . . . . . .
4.3 Profit maximization by strategic generating unit . . . . . . . . .
4.3.1 NLP - Nonlinear programming model . . . . . . . . . . .
4.3.2 MINLP - Mixed integer nonlinear programming model
4
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
36
37
38
39
39
42
CONTENTS
4.3.3 MILP - Mixed integer linear programming problem . . . . . . . . . . . . .
4.4 Diagonalization algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
45
5 Numerical Experiments
47
5.1 Market parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.2 Perfect competition benchmark results . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2.1 The influence of the consumption level on the production levels and the
profits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.3 Strategic behavior of single company . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.3.1 Production capacity optimization . . . . . . . . . . . . . . . . . . . . . . . 54
5.3.2 Reserve capacity optimization . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.4 Strategic behavior by multiple companies . . . . . . . . . . . . . . . . . . . . . . 56
5.4.1 Optimal strategic decisions in production . . . . . . . . . . . . . . . . . . 57
5.4.2 Optimal strategic decisions in production and reserves . . . . . . . . . . 58
5.4.3 Results comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6 Conclusion and Future Research
60
6.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.2 Future Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Appendices
66
A GAMS: Sets, parameters and variables
67
B GAMS: Nonlinear model
70
C GAMS: Mixed integer linear model
72
D GAMS: EPEC
75
5
List of Tables
3.1 Simple strategic game. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Simple strategic game without Nash equilibrium. . . . . . . . . . . . . . . . . . .
3.3 Simple strategic game with multiple Nash equilibria. . . . . . . . . . . . . . . . .
28
29
30
5.1 Market parameters: technical parameters of the generating units. . . . . . . . .
5.2 Market parameters: plausible scenario realizations of the capacity factors, corresponding probabilities and the demand. . . . . . . . . . . . . . . . . . . . . . .
5.3 Perfect competition: the day-ahead market production levels. . . . . . . . . . .
5.4 Perfect competition: the balancing market upward and downward reserve, the
re-dispatch and the load shedding. . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5 Perfect competition: the market prices and the profits. . . . . . . . . . . . . . . .
5.6 Case 1: the merit order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.7 Case 2: breaking the merit order. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.8 Illustrative example: market prices and producers’ profits after strategic bidding in the production capacity by the generating unit g 1 . . . . . . . . . . . . . .
5.9 Illustrative example: market prices and producers’ profits after strategic bidding in the reserve capacity by the generating unit g 3 . . . . . . . . . . . . . . . .
5.10 The optimal production capacity bids by the individual company. . . . . . . . .
5.11 The long term Nash equilibrium where all the market participants optimize the
production capacity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.12 The optimal production and reserve capacity bids by the individual company. .
5.13 The long term Nash equilibrium where all the market participants optimize the
production capacity and the reserve capacity. . . . . . . . . . . . . . . . . . . . .
5.14 The comparison of the profits according to the perfect competition, strategic
behavior considering the production capacity and the reserve capacity. . . . . .
49
6
49
49
50
50
52
52
55
56
57
57
58
58
59
List of Figures
1.1 The demand and supply curve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.1 Energy market price setting without stochastic unit. . . . . . . . . . . . . . . . .
2.2 Energy market price setting with stochastic unit. . . . . . . . . . . . . . . . . . .
19
20
3.1 Diagonalization iterative process. . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
5.1 The consumption influence on the market outcome experiment: production
vs. demand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 The consumption influence on the market outcome experiment: profit vs. demand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
51
53
Notation
The main notation used in the thesis is described below for a quick reference. Other symbols,
not described in this section, are explained further within the text when used.
A. Indices
g
Index of conventional generating units.
j
Index of stochastic generating units.
s
Index of plausible scenarios.
B. Parameters
cg
Cost of production ($/MWh).
c g+
c g−
LOL
Cost of upward reserve ($/MWh).
V
Value of lost load ($/MW).
pg
Conventional generating unit g minimal production capacity (MW).
pg
Conventional generating unit g maximal production capacity (MW).
r¯g
Conventional generating unit g maximal reserve capacity (MW).
wj
Stochastic generating unit j maximal production capacity (MW).
πs
Scenario s probability.
d
Demand (MW).
Cost of downward reserve ($/MWh).
C. Variables
pi
Conventional generating unit g production level (MWh).
r g+s
r g−s
Conventional generating unit g upward reserve dispatched in scenario s (MWh).
Conventional generating unit g downward reserve dispatched in scenario s (MWh).
wj
Stochastic generating unit j planned production (MWh).
∆w j s
Dispatch of stochastic generating units(MWh).
hs
Load shedded in scenario s (MW).
p̂ g
Conventional generating unit g strategic production capacity (MW).
rˆg
Conventional generating unit g strategic reserve capacity (MW).
D. Random Variables
ρjs
Capacity factor of stochastic generating unit j in scenario s from 0 to 1.
8
Chapter 1
Introduction
"Wind power is very popular! It has a lot of fans."
9
CHAPTER 1. INTRODUCTION
1.1 Motivation
Electricity. People in the modern world simply cannot live without it. The basic human
needs nowadays are water, food, a shelter and the electricity. Indeed, this might be little
exaggerated and not everyone’s case but think about it for a while. The electricity brings us
the most daily comforts. However, nobody or a very few realize how complex the background
behind it is. People think of it as a service as any other, for which they usually pay a fixed
monthly fee, otherwise their local distributor cuts them off. It is as easy as to buy apples at a
local market. However, it is not.
At the first look, it may appear as a same commodity as any other. And yet the electricity
is defined by series of properties that separate it from all others.
• The biggest and the most complex difference is that the electricity unlike any other
goods cannot be properly stored. Naturally, there exist batteries where the electricity
can be stored. However, price, performance and inconvenience presently make this
option not possible in terms of volumes needed to store these days. Future may change
this but for now the electricity must be generated and consumed at the same levels
which makes the electric systems very dynamic and highly complex.
• The second specific property is connected with transportation. The electricity cannot
be put in a box like apples and driven on a truck from distributors to customers. The
electricity, or the electric power, is transmitted over a large grid. A direction of a flow is
determined by the particular laws of physics (in this case Kirchhoff’s laws). The current
distribution depends on an impedance in the grid and other elements through which
the electricity flows.
• The third characteristics that makes the electricity a very particular commodity is the
fact that the electricity demand is almost completely inelastic, i.e. whatever the price
is, the electricity consumed is almost the same.
Add these to the fact that the electricity needs to be transmitted to nearly every corner of
the world where people live and you start to realize how sophisticated the systems must be
in order to ensure the balance between the generation and consumption at any moment.
The great portion of these maintaining tasks are calculated by supercomputers in energy
management centers or independent system operators (ISO). The computers perform various tasks such as: a consumption estimation at different buses in the span of minutes, hours,
days or even months in advance. Other determine production levels to meet this demand.
Providing the electric power to people is a very noble achievement, but let us not forget
about generation companies. Nothing is for free, thus an economic aspect of this situation
must inevitably be kept in mind. Most producing companies are private holdings and so
their first concern is to maximize their profit.
10
CHAPTER 1. INTRODUCTION
Alongside an ongoing liberalization and a deregulation of the energy markets [1] and a
resulting effort of the European Union for an united European energy market [2], market
competition occurs [3]. Therefore, a process to rethink and update old fashioned energy
market models and implement new ideas has already begun.
Liberalized free markets are aimed to be driven by an essential microeconomics theory,
the law of demand and supply [4]. In the long time horizon, the market price and the production is determined as an intersection of the demand and supply curve, see the figure 1.1.
The point of intersection is also called the Nash equilibrium [5].
Price ($/MWh)
demand
12.5
supply
50
Energy (MWh)
Figure 1.1: The demand and supply curve.
The course of the liberalization is directed towards the perfect competition. However,
there are still some barriers that prevent the markets from a full transformation into the perfect competition, mainly the number of companies inside the market. Therefore, the energy
market structure resembles more an imperfect competition and thus offers strategic behavior opportunities to all participants. Moreover, private companies are driven by the profit
maximization [6]. Thus, there is a new space for companies capable of exercising the market
power in order to rise their profit via enhancing strategic decision making process [7].
11
CHAPTER 1. INTRODUCTION
The main objective of this thesis is to investigate an effect of a strategic behavior of power
producers on a market clearing outcome. In summary, a research question we attempt to
answer is, assuming a generating company applies strategic decisions on the production capacity and/or the reserve capacity bids in the two-stage energy market including stochastic
producers, does it lead to a higher profit for the chosen producer?
In summary, a research question we attempt to answer is, assuming a generating company applies strategic decisions on the production capacity and/or the reserve capacity bids
in the two-stage energy market including stochastic producers, does it lead to a higher profit
for the chosen producer?
1.2 Literature review
While modeling real world problems (for instance the energy market production and distribution) we often face obstacles of random events like a stochastic customer demand [8] or
on the other hand a stochastic supply from producers (wind power) [9]. Mathematical foundations for this modeling are to be found in the linear programming [10] or more concretely
in the stochastic programming [11].
Different market clearing models with a significant number of stochastic producers included are well presented in [12, 13, 14]. These market clearing algorithms mostly come in
a form of convex optimization problem [15], which are easily solved by modern software
(GAMS) using powerful algorithms and solvers (CPLEX) [16].
Imperfect competitive markets such as Bertrand or Cournot models are assumed and
studied in details in [17, 18] considering all market participants behave strategically and this
strategic behavior is implemented into a market clearing model.
The energy market mechanics works in a sequential order. Firstly, producers submit the
bids to the ISO and then the ISO according to those bids determines the optimal power dispatch. To utilize this, an advanced approach to maximize the power producer’s profit is to
construct a bilevel programming problem, the so called Stackelberg game. A upper level
problem maximizes the power producer’s profit whilst a lower level problem settles the optimal market outcome by minimizing the total operation cost [19, 20, 21, 22].
Recall the research question, two main attributes were already named. Firstly, the strategic bidding and secondly the stochastic producers. In [20] the authors focus on an interaction between energy suppliers in the centralized market where both the electricity and the
reserves are traded simultaneously. A MPEC approach is used to develop an optimal bidding
strategy in the production and the reserves. An auction pricing mechanism is assumed to be
pay-as-bid. The strategic behavior is represented via the suppliers’ bid functions, where the
optimal parameters need to be determined in order to maximize the profit.
12
CHAPTER 1. INTRODUCTION
The reference [21] aims to strategically determine the bids into the day-ahead market and
the reserve markets. An approach is nearly identical to the one used in this thesis. However,
the focus is on the fact that in the reality, cost parameters of a competition are usually not
know but estimated. Therefore each generating unit can only approximate the behavior of
the rest of the competition.
In [19] authors start from a multi-leader-one-follower Stackelberg game. A single firm
bilevel model is transformed into the mathematical programming with equilibrium constraints problem, where an upper level problem maximizes the company’s profit and a lower
level problem solves a market clearing model maximizing the social welfare. The model is
oriented only on one kind of market (a day-ahead market) optimizing the production capacity with no reference to the reserves. Withdrawing the production capacity from the market leads to the higher prices and thus to the higher profit. The nonlinear MPEC problem
is successfully solved using a penalty interior point algorithm finding a local optimal solution. Eventually, the Nash equilibrium is reached assuming all players behave strategically
according to the single firm’s MPEC model results.
Moreover, in [22] price caps are proposed to prevent the market participants who solve
the Stackelberg game, to withhold the reserve capacity, so the market price would not rise
too high. It is proved that the price caps do not utterly prevent the producers withholding
the reserve capacity. However, it is an effective tool to intercept an arbitrary rise in the price.
1.3 Approach
To successfully approach the research question, the following steps are made. Firstly, an underlying two-stage stochastic market clearing model is developed being inspired by the one
in [13]. The stochastic market clearing model serves the ISO to optimally set the production
levels and upward or downward reserve levels in the case of different (but plausible) output
scenarios from a stochastic generating unit and the market prices. The pricing mechanism
in the stochastic market clearing breaks the standard marginal pricing used in [20]. The objective is to minimize the total operation cost in the first stage plus expected costs in the
second stage such that all production and demand constraints are satisfied. The model is
formulated as a standard linear programming problem.
In order to incorporate the strategic behavior to the model the leader-follower Stackelberg game is constructed. The strategic bidding striving for the higher profit is performed
by a single firm in both the production capacity unlike in [22] and the reserve capacity as
opposed to [19] which are the decision variables for the upper level problem.
The lower level problem minimizes the operation cost using the stochastic market clearing model. With regard to an attempt to solve the Stackelberg game, the lower level stochas-
13
CHAPTER 1. INTRODUCTION
tic market clearing model is transformed into the complementarity problem using KarushKuhn-Tucker conditions. Subsequently, these are further used as the constraints for upper
level problem imposing the optimal solution of the lower level problem. Eventually, a new
model from the MPEC family is created maximizing production company’s profit anticipating the impact of its decisions (the production capacity and reserve capacity submitted to
the ISO) on the market outcome.
This MPEC model is nonlinear programming problem (NLP) for which the optimal solution guarantees only the local optimum. Therefore focusing on finding the global optimum
of the problem, the nonlinear elements are transformed into mixed integer linear equalities
and inequalities. These transforms the nonlinear problem into the mixed integer linear programming problem (MILP), which guarantees the global optimum. However, in order to get
something, we need to give something in return. In our case a continuity of the decision
variables is dropped to successfully solve the MILP model [23]. Note, that these results may
not be optimal to the original NLP problem. However, the obtained discrete results are later
used as the starting point for the original NLP problem.
Finally, the Nash equilibrium is obtained by solving an equilibrium problem when all
producers maximize their profits solving the designed MPEC. The EPEC problem is solved
using a diagonalization procedure.
1.4 Thesis organization
Further, the thesis is organized in the following way. An introduction about energy markets
and how they work is described in the chapter 2. In the chapter 3, an essential mathematical
theory and procedures used throughout the thesis are explained. Assumptions connected
to the models and concrete models are formulated and presented in the chapter 4. Illustrative examples and results are presented and commented in the chapter 5. Finally, a general
summary is unveiled and a future research is suggested in the chapter 6.
14
Chapter 2
Energy Market
"Don’t mess with an electrical engineer. It MEGAHERTZ!"
15
CHAPTER 2. ENERGY MARKET
This chapter presents energy market operations now and in the past. An intention is to
clarify the notions of centrally operated markets and liberalized markets, their differences
and an influence of one on another. Furthermore, a magnitude of impact of stochastic
producers penetration into the energy markets is examined. Eventually the market model
scheme used throughout the thesis is introduced and described.
2.1 Centrally operated markets
Under the centrally operated markets or the regulated energy markets we understand an old
scheme used throughout the whole world until late 1980s. It refers to a regulated monopoly
business model, where companies providing electric energy owned and operated all production and transmission in an assigned area. Many countries’ demand was supplied by a single
publicly owned company prior to the liberalization process [9].
The regulated monopoly represents the commitment to supply any consumer demand
in the given area striving to minimize the total operation cost. On the other hand, consumers
have not a possibility to change their supplier. However, they are protected by a regulator,
who may institute minimal standards of the service or set the prices for the electricity. The
price for the electricity is naturally set to the maximal satisfaction for both the suppliers and
the customers.
2.1.1 Short term decision making
The subject of the short term decision making process is typically to set the production in
a span of one week ahead. The conventional generating units plan on hourly basis. These
short term plans have to cooperate with a long term decisions which may include a maintenance work, emission plans or a fuel quota management.
The ability to adjust (flexibility) the production of the conventional generating units is
limited by the technical properties of each generating unit. The upward or downward ramp
constraints limit how quickly steam power plant can modify the output rate. Therefore, an
accuracy of the short term plans is extremely crucial and the focus must be set on details
such as a start-up and shut-down timetable, fuel costs, a wind or solar forecast, a demand
forecast, etc..
These decisions are strongly connected with weekly or daily hydroelectric operations as
well as with the system reserve capacity requirements. Hydroelectric power plants are more
flexible in the sense of changing the production level than conventional steam generators.
In fact, there are no significant start-up or shut-down costs and theoretically no capacity
production limits. Thus they elegantly supplement the steam generating units. On the other
hand, an investment into the hydroelectric power plant is much higher because the hydro16
CHAPTER 2. ENERGY MARKET
electric power plant cannot be built anywhere, since a number of climatic factors must be
taken into a consideration.
One last crucial requirement must be highly considered. Concretely the reliability criteria. Series of immediate actions must be performed in the case of one or more plants fail.
Otherwise the system may not be able to provide enough energy to supply the required demand.
2.2 Liberalized markets
Oppositely to the centrally operated market stands a liberalized energy market or a marketbased decentralized approach. Note that it does not mean that all regulations from the previous regime are dropped. It merely means that electric power system operations and planning
are being highly decentralized. A new structure is based on a competition and an institution
of an electricity market. New wholesale markets have been established for energy producers
and consumers, who are the ones trading on those markets. However, unlike the centrally
operated market, consumers are free to choose their own supplier, generally according to
economical reasons.
In contrast with the centrally operated markets where the production and the transmission of the energy was provided by a single company, in the competition market these two
things have to be utterly separated. The energy transmission cannot be part of a competitive
fight over the production levels. The network activities must be completely independent of
a competitive business.
Moreover, system operations and expansions are the decisions made by the companies
themselves. Every individual company maximizes its profit by every means possible. Therefore, regulation institutions need to ensure that even a rigid strategic behavior of each market
participant actually seeks the maximization of a social welfare.
This is achieved through an independent system operator. Although we talk about the
decentralized approach, the real time system operations are still a centralized job. The independent system operator supervises the system safety and ensures the system usability. This
is, of course, conditional on the total independence from competition interests.
2.2.1 Short term decision making
As well as in the centrally operated market, some short term decisions must be made in the
liberalized market. On the top of all mentioned in the section 2.1.1 about the short term
decision making in the regulated markets, the companies in the deregulated markets must
count with the influence of a competition. A crucial role is played by organized markets,
17
CHAPTER 2. ENERGY MARKET
particularly a day-ahead markets, intraday markets and balancing markets, determining the
production levels and market prices to provide the publicly affordable electricity.
The day-ahead market is typically the most important market in respect of a traffic volume. The energy companies in order to follow their long term strategic goals focus heavily
on competing in daily bids in the day-ahead market 24 hours before the actual energy dispatch. Consequently, when all bids are submitted, the ISO determines the output for each
generating unit and the market corresponding market price.
A short while before the day-ahead dispatch is deployed, the real values of the demand or
other predictions are obtained. It may happen that there is an unintentional energy surplus
or shortage scheduled. Therefore there exist the balancing market to support the day-ahead
market. The balancing market takes place approximately 15 minutes prior to the actual dispatch. It ensures to cover the irregularities regarding the demand or the supply forecast when
they occur. Not every participant from the day-ahead market participates in the balancing
market. The flexible producers submit new bids to the balancing market operator resulting
into a energy re-dispatch and a respective price to fill the supply gaps.
2.3 Impact of stochastic generating units penetrating energy
markets
Multiple reasons support a globally large penetration of stochastic generating units, for instance wind turbines or solar farms, into the conventional energy markets. These reasons
can be economic: nearly zero production cost or climate: pollution caused by coal and gas
power plants, source exhaustion.
Particularly, the zero production costs may have positive impact on the electricity market
price. To support this claim a following simple example is presented.
2.3.1 Market clearing example without stochastic producer
Let us consider a small market consisting of three conventional generating units supplying
electric energy. The production costs c g are $20/MWh, $25/MWh and $30/MWh respectively. The minimum production limits p g are 0MW for all generating units and maximum
production limits p g are 100MW, 75MW and 75MW respectively. The goal of the system operator is to maximize the social welfare, or put into another words, to minimize the total production cost needed to supply given consumption level d = 190MW . The ISO determines
the optimal production levels and market price solving the model (2.1) in merit order, i.e.
18
CHAPTER 2. ENERGY MARKET
the least expensive energy is deployed first. We formulate this problem as following:
min
pg
3
X
cg p g
(2.1a)
g =1
s. t. p g ≤ p g ≤ p g
3
X
g = 1, . . . , 3,
(2.1b)
pg = d .
(2.1c)
g =1
The objective function (2.1a) minimizes the total cost of the operation whilst the planned
production levels are within the technical limits of the generating units (2.1b) and the sum
of the individual production levels equals the required demand (2.1c).
The figure 2.1 displays the generation level bids as a stepwise supply function with the
corresponding production costs as well as consumers’ demand. The market equilibrium
price is defined as the intersection of the demand and the supply function, thus the market
price is $30/MWh and the scheduled production levels are 100MWh, 75MWh and 15MWh
respectively.
d
30
Price ($/MWh)
25
20
g1
0
0
g2
100
g3
175 190
250
Energy (MWh)
Figure 2.1: Energy market price setting without stochastic unit.
19
CHAPTER 2. ENERGY MARKET
2.3.2 Market clearing example with stochastic producer
Assume that a single stochastic producer enters this existing market. The production cost
of the stochastic producer c w is assumed to be $0/MWh and its planned production level
is w = 30MWh. The model (2.1) is updated to incorporate this stochastic producer into the
market.
min
pg
3
X
cg p g + cw w
(2.2a)
g =1
s. t. p g ≤ p g ≤ p g
3
X
g = 1, . . . , 3,
(2.2b)
pg + w = d .
(2.2c)
g =1
The objective function (2.2a) now contains also the production cost of the stochastic generating unit. The production levels of the conventional generating units are still within the
same technical limits as before (2.2b). The difference is that the demand is served by both
the conventional generators and the stochastic generator (2.2c).
Observe the result when the stochastic generating unit is connected to the existing market network in the figure 2.2.
d
30
Price ($/MWh)
25
20
g1
w
0
0
30
g2
130
g3
190 205
Energy (MWh)
Figure 2.2: Energy market price setting with stochastic unit.
20
280
CHAPTER 2. ENERGY MARKET
The market equilibrium shifts to the point where the lower equilibrium market price is
chosen to be 25$/MWh with the respective optimal production levels 100MW, 60MW and
0MW. Due to the zero production costs of the stochastic generator the total operation cost
decreased from 100 × 20 + 75 × 25 + 15 × 30 = $4, 325 in the section 2.3.1 to 100 × 20 + 60 × 25 +
0 × 30 + 0 × 30 = $3, 500 in the section 2.3.2.
The stochastic generating units seem to be perfect solution in order to lower the market
price, maximize the social welfare and the consumer satisfaction. On the other hand, there
is an apparent disadvantage. Although having very reliable options in cases of a weather
prediction, we can never estimate the stochastic output to the fixed value with 100% accuracy. Therefore, while implementing the wind power output into optimization models all the
plausible scenarios (wind output) with the respective probabilities are taken into the consideration.
A stochastic market clearing model is a key stone of this thesis and is presented in the
beginning of the chapter 4.
21
Chapter 3
Mathematical Theory
"A mathematician is a blind man in a dark room
looking for a black cat which isn’t there."
22
CHAPTER 3. MATHEMATICAL THEORY
The mathematical apparatus needed and used throughout the thesis to answer the proposed research question is introduced in the following chapter. It is divided into three sections related to the different areas of mathematics, concretely, an introduction to optimization problems (assumptions and definitions), an introduction to a game theory applied assuming an economic decision making process, and last but not least, an introduction to an
approach required to solve more advanced optimization models.
3.1 Introduction to optimization problems
All work done in this thesis is related to the mathematical optimization problems in the following form:
min
x
s. t.
f o (x)
(3.1a)
f i (x) ≤ 0,
i = 1, . . . , k,
(3.1b)
h i (x) = 0,
i = 1, . . . , l ,
(3.1c)
x ∈ Rn .
(3.1d)
Any point x̃ ∈ Rn satisfying equations (3.1b) and (3.1c) is called a feasible point. The feasible point, whose objective value is lower than all objective values of all points in a neighboring set, is called a point of local optimum.
The feasible point, whose objective value is lower than any other feasible point’s objective
value, is called a point of global optimum. Such point is denoted x ∗ ∈ Rn and its objective
value is denoted as p ∗ . Furthermore, the following inequality holds:
¡ ¢
f x ∗ ≤ f (x̃) .
(3.2)
A special subset of these problems is called convex optimization problems. The main
difference is in the structure, namely, the objective function (3.1a) is convex, the inequality
constraints (3.1b) are convex and the equality constraints (3.1c) are affine [15].
A reason why we are interested in the convex optimization problems is that the locally
optimal points are also globally optimal. Therefore, an algorithm seeking for the optimal
points can stop whenever it finds the locally optimal point (knowing it is also globally optimal). In a case of non-convexity the locally optimal point does not have to be necessary the
globally optimal.
23
CHAPTER 3. MATHEMATICAL THEORY
3.1.1 Lagrange dual function
Any optimization problem in the form of (3.1) has its Lagrangian according to [15]. The
Lagrangian is created by introducing dual variables λ ∈ Rk+ and ν ∈ Rl , called Lagrange multipliers, to the problem (3.1) associated with the equations (3.1b) and (3.1c) respectively.
L (x, λ, ν) = f o (x) +
k
X
λi f i (x) +
i =1
l
X
νi h i (x).
(3.3)
i =1
Definition 1. The Lagrange dual function is derived from the equation (3.3)
(
g (λ, ν) = inf {L (x, λ, ν)} = inf f o (x) +
x
x
k
X
λi f i (x) +
i =1
l
X
)
νi h i (x) .
(3.4)
i =1
The Lagrange dual function is a piece-wise infimum of the Lagrangian, thus is concave.
Moreover, if the Lagrangian (3.3) is unbounded, then the Lagrange dual function (3.4) has
optimal value −∞.
The Lagrange dual function provides a lower bound for the convex optimization problem. A relationship between the Lagrange dual function and the convex optimization problem is investigated, starting with the equation (3.4)
g (λ, ν) = inf {L (x, λ, ν)} .
(3.5)
x
Let us have any feasible point x̃ ∈ Rn for (3.1). Then, we say
inf {L (x, λ, ν)} ≤ L (x̃, λ, ν) .
x
(3.6)
Continuing with the Lagrangian definition
L (x̃, λ, ν) = f o (x̃) +
k
X
λi f i (x̃) +
i =1
l
X
νi h i (x̃).
(3.7)
i =1
Moreover, the feasible point x̃ satisfies the equation (3.1b), thus the first sum on the right
hand side is non-positive. It also satisfies the equation (3.1c), therefore the second sum on
the right hand side is always zero, resulting into
f o (x̃) +
k
X
i =1
λi f i (x̃) +
l
X
νi h i (x̃) ≤ f o (x̃) .
(3.8)
i =1
Hence,
g (λ, ν) ≤ f o (x̃) .
(3.9)
Knowing that each pair of λ ∈ Rk+ and ν ∈ Rl provides the lower bound for the optimiza24
CHAPTER 3. MATHEMATICAL THEORY
tion problem, naturally, we wish to find the best lower bound possible. Therefore, a new
unconstrained optimization problem arises
max g (λ, ν)
(3.10a)
λ,ν
s. t. λi ≥ 0,
i = 1, . . . , k,
ν ∈ Rn .
(3.10b)
(3.10c)
¡
¢
Any couple of points λ̃, ν̃ ∈ Rk+ × Rl are called feasible points of a dual problem and a
following inequality holds:
¡
¢
¡
¢
g λ∗ , ν∗ ≥ g λ̃, ν̃ ,
(3.11)
where λ∗ and ν∗ are optimal points of (3.10) with optimal value denoted as d ∗ .
Following the definition of the Lagrangian dual problem as the best lower bound for the
original problem (3.1) a new important inequality called a weak duality appears
d ∗ ≤ p ∗.
(3.12)
Moreover, having the original problem convex, the inequality (3.12) transforms into an
equality called a strong duality
d ∗ = p ∗.
(3.13)
The equation (3.13) provides a tool to check an optimality, if a problem is hard to solve,
by comparing so far obtained primal and dual solutions. A difference between primal and
dual solution is called an optimal duality gap. To quantify how good is the latest solution we
simply measure the optimal duality gap.
3.1.2 Complementarity slackness
Obtaining the optimal solutions to the problems (3.1) and (3.10), the strong duality (3.13) is
achieved only when a complementarity slackness holds. However, what exactly is the complementarity slackness?
We begin with the strong duality (3.13)
¡ ¢
¡
¢
f o x ∗ = g λ∗ , ν∗ .
(3.14)
By the definition of the Lagrangian dual function (3.4)
(
¡
fo x
¢
∗
= inf f o (x) +
x
k
X
i =1
λ∗i f i (x) +
25
l
X
i =1
)
ν∗i h i (x) .
(3.15)
CHAPTER 3. MATHEMATICAL THEORY
Finding infimum for the right hand side of the inequality
(
inf f o (x) +
x
k
X
i =1
λ∗i f i (x) +
l
X
i =1
)
k
l
¡ ¢ X
¡ ¢ X
¡ ¢
ν∗i h i (x) ≤ f o x ∗ +
λ∗i f i x ∗ +
ν∗i h i x ∗ .
i =1
(3.16)
i =1
Points x ∗ and λ∗ satisfy the equations (3.1b) and (3.1c) and the equation (3.10b) respectively, thus similarly to the equation (3.9) we have
k
l
¡ ¢ X
¡ ¢ X
¡ ¢
¡ ¢
fo x∗ +
λ∗i f i x ∗ +
ν∗i h i x ∗ ≤ f o x ∗ .
i =1
(3.17)
i =1
However, studying more closely the previous chain of the events we observe that
k
l
¡ ¢
¡ ¢ X
¡ ¢ X
¡ ¢
¡ ¢
fo x∗ ≤ fo x∗ +
λ∗i f i x ∗ +
ν∗i h i x ∗ ≤ f o x ∗ .
i =1
(3.18)
i =1
Therefore, all inequality signs change to the equality signs as the first and the last term
in the whole chain is the same. Hence, the following, called the complementarity slackness,
must hold
¡ ¢
λ∗i f i x ∗ = 0,
i = 1, . . . , k,
(3.19)
as the whole sum of non-positive numbers must sum to 0, thus every non-positive element
of the sum must be equal to 0.
3.1.3 Karush-Kuhn-Tucker conditions
Some ideas on the optimality conditions when solving the unconstrained Lagrange dual
problem are presented in the previous subsection. There exists a set of conditions that are
both necessary and sufficient to optimally solve the convex optimization problem. They are
called the Karush-Kuhn-Tucker (KKT) conditions.
Definition 2. Given the convex optimization problem (3.1), the KKT conditions are
primal feasibility
f i (x) ≤ 0,
i = 1, . . . , k,
(3.20a)
h i (x) ≤ 0,
i = 1, . . . , l ,
(3.20b)
i = 1, . . . , k,
(3.20c)
dual feasibility
λi ≥ 0,
26
CHAPTER 3. MATHEMATICAL THEORY
complementarity slackness
λi f i (x) = 0,
i = 1, . . . , k,
(3.20d)
and the first order optimality
∇ f o (x) +
k
X
λi ∇ f i (x) +
i =1
l
X
νi ∇h i (x) = 0.
(3.20e)
i =1
The property of sufficiency means that any x ∈ Rn satisfying the equations (3.20a)-(3.20e)
gives the optimal solution to the convex optimization problem (3.1).
A problem of such form is called a complementarity problem (CP) and more on this topic
can be found in [24]. This is extremely useful when modelling some of the microeconomics
market principles of game theory.
3.2 Game theory in energy market
Game theory definition by [7] is a bag of analytical tools designed to help us understand
the phenomena that we observe when decision-makers interact. Games can be divided into
many categories based on assumptions that are made. Essential assumptions in all kinds of
games about participants are:
1. the players behave rationally, for instance maximizing the utility (or the profit),
2. the players think strategically, i.e. always taking into account their and the other participants possibilities and react optimally to them.
Furthermore, an idea of perfect information is expected in this thesis. It means that all
participants in the game know exactly the same as all their opponents.
A general game consists of these elements:
• a set A of actions,
• a set C of consequences and a consequence function g : A → C ,
• an utility function u : C → R.
Analytically written, the rationality property has the following mathematical optimization problem expression
max
¡
¢
u g (a)
s. t. a ∈ A .
27
(3.21a)
(3.21b)
CHAPTER 3. MATHEMATICAL THEORY
The objective function (3.21a) maximizes the utility of the consequence when the certain
action is played, such that the the action a is within the set of the possible actions (3.21b).
The strategic games between multiple players (usually finite set N ) can be written into
an |N |-dimensional cube, where each dimension represents a single player’s i discrete decision space consisting of actions Ai . Each combination of the actions played by all players
forms a n-tuple of the corresponding utilities.
Let us demonstrate a simple example of such strategic game between two players X and
Y . The set of actions of player X is A X = {L, R} and the set of actions for player Y is A Y =
{T, B }. The utility values corresponding to individual couples of actions are summarized in
the table 3.1
Table 3.1: Simple strategic game.
Y \X
L
R
T
(2,2)
(3,1)
B
(1,1)
(4,0)
Having defined the game, our goal is to determine the behavior (actions) of the individual
players. Using common sense we observe that the player X has no reason to choose the
action R, as in the both cases of the opposing player’s actions the utility of choosing the
action L is higher (2 > 1 and 1 > 0).
A preference relation between the actions L and R is defined in this case as
¡
¢
¡
¢
L Â R ⇔ u g (L) > u g (R) .
(3.22)
In this example the action L is called a dominant strategy over the action R, thus the
action R can be eliminated from the game table as there is not rational conclusion to choose
this action.
Observe, that the same reasoning cannot be applied for the player Y , as the utility of
choosing the action T is greater only in the case the player X chooses the action L (2>1),
but the utility is less than choosing the action B in the case the player X choses the action R
(3<4).
Fortunately in this example, the player Y anticipates the player X to play the action L as it
dominates the action R, therefore the player Y decides to choose greater utility and plays the
action T . Choosing the best option (the highest utility) possible when fixing all opponents
decisions to a single action is also a called best response. It is one of the best ways how to
determine the expected behaviour, when dominant strategies cannot be decided.
To sum things up, the expected result of the game is that the player X plays the strategy L
and earns 2 along with the player Y plays the strategy T and earns also 2. The winning pair
28
CHAPTER 3. MATHEMATICAL THEORY
of strategies is called the equilibrium in pure strategies.
3.2.1 Nash equilibrium
In the previous example, the equilibrium in the pure strategies was obtained. However, what
is the equilibrium? The concept of equilibrium was proposed by John Forbes Nash Jr. [5],
thus the Nash equilibrium. It is one of the biggest breakthroughs in the modern economics.
The definition of the Nash equilibrium is fairly simple.
¡ ∗ ∗¢
, a i , where subscript i
Definition 3. The Nash equilibrium is called a set of strategies a −i
denotes a particular player i and subscript −i denotes a subset of all other players. Moreover,
a following preference relation holds
¡
¢ ¡ ∗
¢
∗
a −i
, a i∗ º a −i
, ai ,
∀a i ∈ Ai , ∀i ∈ N .
(3.23)
The asterisk denotes the strategy played according to the Nash equilibrium whereas the
strategy without asterisk deviates from the Nash equilibrium. The idea behind is that, being
in the Nash equilibrium, no player has any incentive to change the optimal strategy given
that all other players continue with their optimal choices.
However, a uniqueness or even an existence of the Nash equilibrium in the strategic
games is not assured. There are plenty of examples where there is no Nash equilibrium or
there are several.
An illustrative example, in the table 3.2, demonstrates a game setting without the Nash
equilibrium in the pure strategies.
Table 3.2: Simple strategic game without Nash equilibrium.
Y \X
L
R
T
(1,0)
(0,1)
B
(0,1)
(1,0)
In the table 3.2 the best response of the player X on the player Y choosing the action T
is the action R and when choosing the action B it is the action L. On the other hand, the
best response of the player Y on the player X choosing the action L is the action T and when
choosing the action R it is the action B . Thus in every strategy profile one or the other player
has the incentive to change their strategy.
Poles apart, observe an instance, in the table 3.3, of the strategic game setting without
the unique Nash equilibrium in the pure strategies.
29
CHAPTER 3. MATHEMATICAL THEORY
Table 3.3: Simple strategic game with multiple Nash equilibria.
Y \X
L
R
T
(1,1)
(0,0)
B
(0,0)
(2,2)
In table 3.3 the best response of player X on player Y choosing the action T is the action
L and when choosing the action B it is the action R. Additionally, the best response of player
Y on player X choosing the action L is the action T and when choosing the action R it is the
action B . Therefore, the strategy profiles (L, T ) and (R, B ) are both the Nash equilibria. Note,
that both players would most probably prefer to choose the equilibrium (R, B ) as it earns
them higher utility than equilibrium (L, T ).
Changing utility values to (1,1) in the case of (R, B ) would result into the same set of Nash
equilibria, but there would be no telling which equilibrium to choose as they would both
benefit the same.
So far the pure strategies have been mentioned without any further explanation. There
exists also a mixed strategies term, but those are not concern of this master thesis and therefore are left out. However, if the reader would like to know more about these, basic information can be found for instance in [7, 25].
3.2.2 Cournot oligopoly
Firstly, an oligopoly is a definition of a single market, where multiple firms (producers) participate, compete against each other and their strategic decision making processes affect the
market outcome.
The Cournot oligopoly, named after Antoine Augustin Cournot, is the a special type the
decision process in the market. The producers, according to [26], in the Cournot oligopoly
obey certain assumptions:
• a number of the producers is relatively small,
• all producers compete in quantities,
• all producers generate homogenous goods,
• all producers posses certain market power, therefore their output affects a market price,
• producers do not form alliances, they do not cooperate and
• the decisions are made simultaneously.
30
CHAPTER 3. MATHEMATICAL THEORY
Naturally, in the energy market the product is the energy provided by generating units
and the quantity is calculated in MW. These producers compete in the market to grab a share
in the consumption level.
To illustrate the decision each producer i has to make, a very simple optimization problem example is presented
max x i p
xi
Ã
X
!
x g −C (x i )
(3.24a)
g
s. t. x i ∈ X,
(3.24b)
where C (·) is the cost of fuel function, p(·) is the inverse demand function relating price
and produced quantity in the market and X is the set of some production constraints (3.24b).
The objective function (3.24a) maximizes the one’s profit depending on the price given by the
total market outcome.
3.2.3 Stackelberg game
For the purposes of this master thesis, the Stackelberg game [27], named after Heinrich Freiherr von Stackelberg, is introduced.
The main difference between the Stackelberg game (or the bilevel game) and the classical
strategic game is the lack of simultaneousness. Unlike the classical strategic game where the
players choose their actions simultaneously, in the bilevel game the players choose sequentially, hence there exist two distinguished types of the players in the bilevel game: leaders
and followers.
As the names suggest, the leaders reveal their decisions before the followers do. After the
leaders provide the information about their actions, the followers react to newly obtained
information. A key aspect is that the leaders try to decide their decisions anticipating the
reactions of the followers.
Inheriting some of the main concepts in [28], from the mathematical optimization point
of view, the bilevel optimization problem looks like
min
x
s. t.
f o (x, y)
(3.25a)
f i (x, y) ≤ 0,
h i (x, y) = 0,



min



y ∈ arg
s. t.





fˆo (x, y)
fˆi (x, y) ≤ 0,
i = 1, . . . , p,










ĥ i (x, y) = 0, i = 1, . . . , q. 
31
i = 1, . . . , k,
(3.25b)
i = 1, . . . , l ,
(3.25c)
(3.25d)
CHAPTER 3. MATHEMATICAL THEORY
The leader’s optimization problem (3.25) includes the follower’s subproblem (3.25d) inside. A solution that maximizes the leader’s profit is called a strong Stackelberg solution.
However, a weak Stackelberg solution leads to the lower profit for the leader if the follower’s
problem has multiple solutions, the case of the non-unique equilibrium.
Obviously, this kind of problems cannot be solved by any conventional techniques used
when solving the linear or the nonlinear programming problems. Hence, there is a need for
a new solution approach.
3.3 MPEC - Mathematical programming with equilibrium constraints optimization problems
The mathematical programming with equilibrium constraints is an approach to solve the
bilevel problem (3.25). The original bilevel problem (3.25) is transformed into the MPEC
form and consecutively solved as the linear or the nonlinear programming problem, assuming that the lower level optimization problem is convex.
The MPEC transformation of the bilevel problem (3.25) is
min
x,y
s. t.
f o (x, y)
(3.26a)
f i (x, y) ≤ 0,
i = 1, . . . , k,
(3.26b)
h i (x, y) = 0,
i = 1, . . . , l ,
(3.26c)
y solves CP of (3.25d).
(3.26d)
If the problem (3.25d) is convex, the complementarity problem is in the form of KKT
conditions (3.20). Hence, the KKT conditions for (3.25d) are
fˆi (x, y) ≤ 0,
i = 1, . . . , p,
(3.27a)
ĥ i (x, y) = 0,
i = 1, . . . , q,
(3.27b)
λ̂i ≥ 0,
i = 1, . . . , p,
(3.27c)
λ̂i fˆi (x, y) = 0,
i = 1, . . . , p,
(3.27d)
∇ y fˆo (x, y) +
p
X
i =1
λ̂i ∇ y fˆi (x, y) +
q
X
ν̂i ∇ y ĥ i (x, y) = 0,
(3.27e)
i =1
where λ̂ and ν̂ are the corresponding dual variables for the inequality and equality constraints in the lower level problem (3.25d) respectively. The MPEC model of the bilevel prob-
32
CHAPTER 3. MATHEMATICAL THEORY
lem (3.25) is
min
x,y
s. t.
f o (x, y)
(3.28a)
f i (x, y) ≤ 0,
i = 1, . . . , k,
(3.28b)
h i (x, y) = 0,
i = 1, . . . , l ,
(3.28c)
fˆi (x, y) ≤ 0,
i = 1, . . . , p,
(3.28d)
ĥ i (x, y) = 0,
i = 1, . . . , q,
(3.28e)
λ̂i ≥ 0,
i = 1, . . . , p,
(3.28f)
i = 1, . . . , p,
(3.28g)
λ̂i fˆi (x, y) = 0,
∇ y fˆo (x, y) +
p
X
λ̂i ∇ y fˆi (x, y) +
i =1
q
X
ν̂i ∇ y ĥ i (x, y) = 0.
(3.28h)
i =1
The equation (3.28h) consists only of the gradient with respect to the variable y, because
the variable x is in this context assumed to be a parameter for the lower level problem.
The MPEC problem inherited all the convex and affine constraints except for the equation (3.28g), which makes it the non-convex optimization problem.
3.3.1 Fortuny-Amat linearization
Our intention is to solve the optimization problem that leads to the global optimum. Therefore, the complementarity slackness equation (3.28g) needs to be reformulated. To achieve
this, a procedure proposed in [29] is used.
Proposition 1 (The Fortuny-Amat linearization of the complementarity constraints). Assume having variables x, z and following constraints
z ≥ 0,
Ax + b ≥ 0,
(3.29)
z(Ax + b) = 0,
where A is an arbitrary matrix and b is an arbitrary vector of the satisfactory dimensions.
Then the complementarity constraint are linearized as using the following equations instead
z ≥ 0,
Ax + b ≥ 0,
z ≤ uM 1 ,
Ax + b ≤ (1 − u)M 2 ,
where u ∈ {0, 1} and M 1 , M 2 are large enough constants.
33
(3.30)
CHAPTER 3. MATHEMATICAL THEORY
Note, that an implementation of the inequalities (3.30) into (3.28) instead of the equation (3.28g) changes the model from the nonlinear problem to the mixed integer linear problem. However, modern solving algorithms are capable of finding the global optimum in the
mixed integer linear problems.
3.3.2 Binary and continuous variable linearization
Further in the text, the product of the binary and continuous variables is encountered. Similarly, this procedure generates mixed integer linear problem.
Proposition 2 (The linearization of the product of the binary and continuous variables). Assume having variables u ∈ {0, 1}, x ∈ Rn where x has lower and upper bounds x and x̄ respectively and the following nonlinear equation needs to be evaluated:
z = ux.
(3.31)
A new variable z̃ ∈ Rn is introduced. The following set of equations results in the product
of the binary and continuous variables.
z = x − z̃,
ux ≤ z ≤ u x̄,
(3.32)
(1 − u)x ≤ z̃ ≤ (1 − u)x̄.
3.4 EPEC - Equilibrium programming with equilibrium constraints optimization problems
The equilibrium programming with equilibrium constraints problems are a new set of problems emerged from solving an equilibrium problem with multiple MPECs. Consider, that
every competitive player i in a market solves the MPEC problem. The EPEC aims to find the
long term market equilibrium between these players.
The commonly used and a preferred procedure to solve the EPEC problems is called a
diagonalization. The diagonalization is the iterative procedure solving each participant’s
MPEC problem in every iteration once. In the beginning, an initial input parameters are
needed. At the end of every iteration, the input parameters are updated based on the results
received from each MPEC solved. Simply put, we have N game participants. Each of them
34
CHAPTER 3. MATHEMATICAL THEORY
solves the following MPEC problem.
min
s. t.
f oi
¡
x1 , . . . , x N , y
¢
¡
i
¢
f j x 1 , . . . , x N , y ≤ 0,
¡
¢
h ij x 1 , . . . , x N , y = 0,
j = 1, . . . , k,










j = 1, . . . , l , 






y solves CP (x 1 , . . . , x N )
i = 1, . . . , N .
(3.33)
The iterative process of the diagonalization is best described in the figure 3.1.
³
◦
START
j =0
³
/ x 0, . . . , x 0
1
N
O
j
j
j
x 2 ,x 3 ,...,x N
j
j
j
x 1 ,x 3 ,...,x N
´
/ M PEC 1
/ x j +1
1
◦
/ M PEC 2
/ x j +1
2
◦
/ x j +1
N
◦
´
..
.
³
◦
◦
j
j
j
x 1 ,x 2 ,...,x N −1
NO
´
/ M PEC N
¯ j +1
¯
¯x
−xj¯ < ε o
◦
Y ES
STOP
Figure 3.1: Diagonalization iterative process.
¡
¢
0
Starting from the initial values of decision variables³ x 10 , x 20 , . . . , x N
, each player
i solves
´
0
the MPEC problem (3.33) fixing the decision variables x 10 , . . . , x 0j −1 , x 0j +1 , . . . , x N
of all other
players to their previous optimal values. Putting this into the game theory words, every producer is trying, by solving the MPEC, to provide the best response on the decisions made
by the rest of the competition. This way the N new decision variable values are calculated
and used as the input in the next iteration. Repeating the whole process of finding the best
responses on the best responses, the diagonalization method terminates when a change of
all the decision variables between the iterations i − 1 and i is less than an arbitrary tolerance
ε.
For more information about EPECs, their applications and solution procedures, we suggest to read [30, 31, 32].
35
Chapter 4
Modeling
"Classification of mathematical problems as linear
and nonlinear is like classification of the Universe
as bananas and non-bananas."
36
CHAPTER 4. MODELING
The following chapter firstly addresses general assumptions about mathematical models
used throughout the thesis. Secondly, the stochastic market clearing model is presented and
discussed. Thirdly, an advanced single power producer profit maximization model is built
on the top of the presented stochastic market clearing model in the form of the nonlinear
programming problem, which is further enhanced and transformed into a mixed integer
linear programming problem. Finally, an algorithm used to solve an equilibrium problem is
illustrated.
4.1 General assumptions
This section presents the basic assumptions used during the preparation of the models.
• The cost functions of the power producers are linear.
• The market participants are assumed to be rational when behaving strategically, i.e.
the profit maximizing.
• Every power producer has the perfect information about the market, i.e. the cost functions of all power producers and the demand are known preceeding the auction.
• The required load is utterly inelastic.
• The cost of the energy spillage is equal to zero.
• The ISO clears the market using the two-stage stochastic market clearing.
– In the first stage, 24 hours before the dispatch, the day-ahead market production
levels and the day-ahead market price is determined.
– Then, approximately 15 minutes before the actual dispatch, the balancing market
re-deploys the reserves, according to the realized wind output scenario if needed,
and states the respective balancing market prices.
• There is no reserve market, i.e. the generating units are being paid only for the deployed upward or downward reserve.
• When perfect competition is assumed, the generating units bid according to their real
technical limits.
37
CHAPTER 4. MODELING
4.2 Stochastic market clearing
The two-stage stochastic market clearing inspired by [13] is formulated as follows:
³
´
πs c g p g + c g+ r g+s − c g− r g−s + V LOL h s
min
+
X
s. t.
pg ≤ pg ≤ p g ,
∀g ,
(4.1b)
0 ≤ wj ≤ w j,
∀j,
(4.1c)
0 ≤ hs ≤ d ,
X
X
w j + pg = d ,
∀s,
(4.1d)
p g ,w j ,h,r g s ,r g−s ,∆w j s g ,s
j
(4.1a)
(4.1e)
g
p g ≤ p g + r g+s − r g−s ≤ p g ,
∀g , s,
(4.1f)
0 ≤ r g+s ≤ r g ,
∀g , s,
(4.1g)
0 ≤ r g−s ≤ r g ,
∀g , s,
(4.1h)
0 ≤ w j + ∆w j s ≤ ρ j s w j ,
´
X
X³ +
∆w j s +
r g s − r g−s + h s = 0,
∀ j , s,
(4.1i)
∀s.
(4.1j)
j
g
The presented two-stage market clearing model with both the conventional and the stochastic generating units aims is to minimize the expected production cost (maximize the social
welfare) as well as to minimize the cost of lost load. This is achieved by the objective function
(4.1a). Operations of the conventional and the stochastic producers within their technical
limits is secured by the equations (4.1b) and (4.1c) respectively. Involuntarily shed energy
is bounded by the actual consumption level in the equation (4.1d). Moreover, the first stage
demand is satisfied through the power balance equation (4.1e).
Considering different scenarios for an outcome generated by the stochastic producers,
the second stage electricity re-dispatch must appear between the technical limits of the conventional generating units governed by the equation (4.1f). Upward and downward reserves
are physically bounded by the equations (4.1g) and (4.1h) respectively. The re-dispatch of the
stochastic generating units is bounded by the actual electricity production in each scenario
through the equation (4.1i). Eventually, the second stage re-dispatch imposes the power balance equations (4.1j) for each scenario.
The formulation (4.1) provides the optimal day-ahead power dispatch of the conventional generating and the stochastic generating unit to supply the required demand. Additionally, the balancing market covers the plausible contingencies caused by the variability
of the stochastic generating unit by deploying the optimal scheduled upward or downward
reserve of the flexible conventional generators. All of this is supervised by the independent
system operator ensuring the total cost of the operation is minimized.
38
CHAPTER 4. MODELING
4.3 Profit maximization by strategic generating unit
The economic theory assumes that the rational conventional power producer g maximizes
its profit. In order to follow this goal each conventional generating unit may submit strategic
bids to the ISO anticipating the market clearing outcome according to the (4.1). We focus
on the strategic bids into both the production capacity and the reserve capacity. Those are
represented by new decision variables p̂ g and rˆg respectively.
4.3.1 NLP - Nonlinear programming model
For simplicity a new nomenclature is introduced. The variables have been grouped according to their presence in either the day-ahead market or the balancing market into
©
ª
ΦD = p g , w j
and
n
o
ΦBs = r g+s , r g−s , ∆w j s , h s .
The dual variables are included after a colon for each constraint. Recall that the auction
mechanism works sequentially, therefore the Stackelberg game is modeled. To earn a higher
profit each strategic power producer g solves the following bilevel problem:
min
p̂ g ,rˆg
·
´¸ ·
³
´¸
X ³ + +
X
− −
B
+
D
−
c g p g + πs c g r g s − c g r g s − p g λ + πs λs r g s − r g s
s
(4.2a)
s
s. t. p g ≤ p̂ g ≤ p g ,
(4.2b)
0 ≤ rˆg ≤ r g ,



min


ΦD ,ΦB






s. t.




















 ΦD , ΦB 
s
∈ arg
 λD , λB 



s

























´
P ³
πs c g p g + c g+ r g+s − c g− r g−s + V LOL h s
g ,s
p g ≤ p g ≤ p̂ g
0 ≤ wj ≤ w j
: η g , ηg ,
: µj , µj ,
0 ≤ h s ≤ d : δs , δs ,
P
P
: λD ,
j w j + g pg = d
p g ≤ p g + r g+s − r g−s ≤ p̂ g
(4.2c)










∀g , 





∀j, 






∀s, 





: αg s , αg s ,


∀g , s, 





+
+
+

0 ≤ r g s ≤ rˆg : βg s , βg s ,
∀g , s, 




−
−
−

0 ≤ r g s ≤ rˆg : βg s , βg s ,
∀g , s, 





0 ≤ w j + ∆w j s ≤ ρ j s w j : ω j s , ω j s ,
∀ j , s, 



³
´

P
P


+
−
B
∆w
+
r
−
r
+
h
=
0
:
π
λ
,
∀s.
js
s
s s
j
g
gs
gs
(4.2d)
39
CHAPTER 4. MODELING
The objective function (4.2a) minimizes the expected production and reserve costs minus the expected revenue, thus maximizes the profit. The equations (4.2b) and (4.2c) bounds
the strategical decision variables within the real technical limits. The lower level problem
(4.2d) is identical to (4.1), however instead of the real technical limits for the production p g
and the capacity r g new decision variables p̂ g and rˆg from the upper level problem are used.
To successfully solve the bilevel problem (4.2), a transformation of the lower level problem (4.2d) is required. The lower level problem (4.2d) is convex, because the objective function is convex, the inequality constraints are convex and the equality constraints are affine,
thus the KKT conditions (3.20) impose the optimal solution of the lower level problem (4.2d).
40
CHAPTER 4. MODELING
Hence, the following optimization problem is equivalent with the problem (4.2):
min
p̂ g ,rˆg ,ΦD ,ΦB
·
´¸
³
´¸ ·
X
X ³ + +
+
−
B
− −
D
c g p g + πs c g r g s − c g r g s − p g λ + πs λs r g s − r g s
(4.3a)
s
s
s. t. p g ≤ p̂ g ≤ p g ,
(4.3b)
0 ≤ rˆg ≤ r g ,
(4.3c)
p g ≤ p g ≤ p̂ g ,
∀g ,
(4.3d)
p g ≤ p g + r g+s − r g−s ≤ p̂ g ,
∀g , s,
(4.3e)
0 ≤ r g+s ≤ rˆg ,
∀g , s,
(4.3f)
0 ≤ r g−s ≤ rˆg ,
∀g , s,
(4.3g)
(4.1c), (4.1d), (4.1e), (4.1i), (4.1j),
(4.3h)
+
−
−
η g , η g , µ j , µ j , δ s , δ s , α g s , α g s , β+
g s , βg s , βg s , βg s , ω j s , ω j s ≥ 0,
´
³
¡
¢
p g − p g η g = 0,
p g − p̂ g ηg = 0,
¡
¢
w j − w j µ j = 0,
w j µ j = 0,
∀g , j , s,
(4.3i)
∀g ,
(4.3j)
∀j,
(4.3k)
h s δs = 0,
(h s − d ) δs = 0,
³
´
³
´
αg s p g − p g − r g+s + r g−s = 0,
αg s p g + r g+s − r g−s − p̂ g = 0,
³
´
+
+
ˆ
r g+s β+
=
0,
r
−
r
g βg s = 0,
gs
gs
³
´
−
−
ˆ
r g−s β−
=
0,
r
−
r
g βg s = 0,
gs
gs
¡
¡
¢
¢
ω j s −w j − ∆w j s = 0,
ω j s w j + ∆w j s − ρ j s w j = 0,
X¡
¢
−αg s + αg s − λD = 0,
c g − η g + ηg +
∀s,
(4.3l)
∀g , s,
(4.3m)
∀g , s,
(4.3n)
∀g , s,
(4.3o)
∀ j , s,
(4.3p)
∀g ,
(4.3q)
∀j,
(4.3r)
πs V LOL − δs + δs − πs λBs = 0,
∀s,
(4.3s)
+
B
πs c g+ − αg s + αg s − β+
g s + βg s − πs λs = 0,
∀g , s,
(4.3t)
−
B
− πs c g− + αg s − αg s − β−
g s + βg s + πs λs = 0,
∀g , s,
(4.3u)
− ω j s + ω j s − πs λBs = 0,
∀ j , s.
(4.3v)
s
− µj + µj +
X¡
¢
−ω j s + ω j s − λD = 0,
s
The equations (4.3a)-(4.3c) in the presented MPEC model have the same function as in
the previos model (4.2). The optimal solution to the lower level problem (4.2d) is ensured by
the following constraints received from KKT conditions, namely, the primal feasibility of the
underlying market clearing model is achieved by the equations (4.3d)-(4.3h), the dual feasibility by the equation (4.3i), the complementarity by the equations (4.3j)-(4.3p) and eventually optimality by the equations (4.3q)-(4.3v). Observe, that the model (4.3) is non-convex
and nonlinear because of the objective function (4.3a) and the complementarity constraints
41
CHAPTER 4. MODELING
(4.3j)-(4.3p) and therefore the solution to this optimization problem does not guarantee the
global optimum.
4.3.2 MINLP - Mixed integer nonlinear programming model
We are able to linearize the complemetarity constraints by the procedure proposed by FortunyAmat in the section 3.3.1 introducing binary variables and creating the mixed integer nonlinear problem. Note that even after the implementation of the Fortuny-Amat procedure,
the model (4.3) still does not guarantee the global optimum, therefore further steps towards
the global optimum are made afterwards.
We begin with the linearization of the complementarity slackness equations (4.3j)-(4.3p).
Those are substituted by their linearized versions created by the proposed Fortuny-Amat
procedure as:
η g ≤ u gP M P ,
P
ηg ≤ u Pg M ,
W
µ j ≤ uW
j M ,
W
µ j ≤ uW
j M ,
δs ≤ u sH M H ,
H
δs ≤ u sH M ,
αg s ≤ u gAs M A ,
A
αg s ≤ u gAs M ,
RP
RP
β+
,
g s ≤ ug s M
RP
β+
g s ≤ ug s M
RP
,
RM
RM
β−
,
g s ≤ ug s M
RM
β−
g s ≤ ug s M
RM
,
DW
ω j s ≤ u DW
,
js M
ω j s ≤ u DW
js M
DW
,
³
´
p g − p g ≤ 1 − u gP p g ,
³
´
p̂ g − p g ≤ 1 − u Pg p g ,
³
´
w j ≤ 1 − uW
j wj,
³
´
w j − w j ≤ 1 − uW
j wj,
¢
¡
h s ≤ 1 − u sH d ,
¡
¢
d − h s ≤ 1 − u sH d ,
³
´
p g + r g+s − r g−s − p g ≤ 1 − u gAs p g ,
´
³
p̂ g − p g − r g+s + r g−s ≤ 1 − u gAs p g ,
´
³
r g+s ≤ 1 − u gRP
s rg,
´
³
rˆg − r g+s ≤ 1 − u RP
gs r g,
³
´
r g−s ≤ 1 − u gRM
s rg,
³
´
rˆg − r g−s ≤ 1 − u RM
gs r g,
³
´
w j + ∆w j s ≤ 1 − u DW
ρjsw j,
js
³
´
ρ j s w j − w j − ∆w j s ≤ 1 − u DW
ρjsw j,
js
∀g ,
(4.4a)
∀g ,
(4.4b)
∀j,
(4.4c)
∀j,
(4.4d)
∀s,
(4.4e)
∀s,
(4.4f)
∀g , s,
(4.4g)
∀g , s,
(4.4h)
∀g , s,
(4.4i)
∀g , s,
(4.4j)
∀g , s,
(4.4k)
∀g , s,
(4.4l)
∀ j , s,
(4.4m)
∀ j , s,
(4.4n)
RP
RM
RM
where the big M s are constants and u gP , u Pg , u W
, uW
, u sH , u sH , u gAs , u gAs , u gRP
s , u g s , ug s , u g s ,
j
j
u DW
, u DW
are the binary variables.
js
js
Substituting the equations (4.4a)-(4.4n) for the equations (4.3j)-(4.3p) in the model (4.3)
results in the completely mixed integer linear constraints. Number of substitutions into the
objective function (4.3a) are made to dispose of the nonlinearity.
42
CHAPTER 4. MODELING
Firstly, we substitute the equation (4.3q) for λD into the term p g λD obtaining
µ
¶
X¡
¢
−αg s + αg s
p g λ = p g c g − η g + ηg +
D
(4.5)
s
= c g p g − η g p g + ηg p g − p g
X¡
¢
αg s − αg s .
(4.6)
s
Consecutively, the equations (4.3j) are substituted, resulting in
= c g p g − p g η g + p̂ g ηg −
X¡
¢
p g αg s − p g αg s .
(4.7)
s
Eventually, the equations (4.3m) are substituted in, resulting into
= c g p g − p g η g + p̂ g ηg −
X
s
´
³
´ X
³
αg s p g − r g+s + r g−s + αg s −r g+s + r g−s + p̂ g .
(4.8)
s
Secondly, we substitute λBs from the equation (4.3t) into the term πs λBs r g+s
´
³
+
πs λBs r g+s = r g+s πs c g+ − αg s + αg s − β+
g s + βg s ,
+
+ +
= πs c g+ r g+s − αg s r g+s + αg s r g+s − β+
g s r g s + βg s r g s ,
(4.9)
(4.10)
then the equations (4.3n), acquiring
= πs c g+ r g+s − αg s r g+s + αg s r g+s + β+
g s rˆg .
(4.11)
Thirdly, we substitute λBs from the equation (4.3u) into the term πs λBs r g+s
πs λBs r g−s
= r g−s
³
−
πs c g− − αg s + αg s + β−
g s − βg s
´
,
−
− −
= πs c g− r g−s − αg s r g−s + αg s r g−s + β−
g s r g s − βg s r g s
(4.12)
(4.13)
and then the equations (4.3o), acquiring
= πs c g− r g−s − αg s r g−s + αg s r g−s − β−
g s rˆg .
(4.14)
Finally, we substitute equations (4.8), (4.11) and (4.14) into equation (4.3a) receiving the
new objective function for the single conventional generating unit
¶
µ
¶
µ
¶
µ
X
X
X +
−
p g η g + αg s − p̂ g ηg + αg s − rˆg
βg s + βg s .
s
s
(4.15)
s
Note, that the equation (4.15) is still nonlinear, however, in this form it can be further
used to create a mixed integer linear model. Hence, the final representation of the mixed
43
CHAPTER 4. MODELING
integer nonlinear MPEC problem derived from the initial producer’s minimization problem
(4.2) is
min
p̂ g ,rˆg ,ΦD ,ΦBs
s. t.
µ
¶
µ
¶
µ
¶
X
X
X +
−
p g η g + αg s − p̂ g ηg + αg s − rˆg
βg s + βg s
(4.16a)
p g ≤ p̂ g ≤ p g ,
(4.16b)
0 ≤ rˆg ≤ r g ,
(4.16c)
(4.3d ) − (4.3h),
(4.16d)
s
s
s
+
−
−
η g , η g , µ j , µ j , δ s , δ s , α g s , α g s , β+
g s , βg s , βg s , βg s , ω j s , ω j s ≥ 0,
∀g , j , s,
(4.16e)
(4.4a) − (4.4n),
(4.16f)
(4.3q) − (4.3v).
(4.16g)
4.3.3 MILP - Mixed integer linear programming problem
In order to reach the global optimum, we transform the mixed integer nonlinear model (4.16)
into the mixed integer linear model, whose solution guarantees the global optimal solution.
The drawback of this procedure is that the decision space has to be discretized and thus the
global optimum reached is not necessarily optimal to the original problem (4.2), because the
discretized decision space is not smooth enough.
However, first things first, we introduce new variables to discretize the decision space
p̂ g = ∆p
s,i
rˆg = ∆r
v gPi ,
(4.17a)
v gRi ,
(4.17b)
X
X
s,i
where ∆p and ∆r are constants that sum up to the p̂ g and rˆg using the binary variables
v gPi
and v gr i respectively. Substituting the equations (4.17) into objective function (4.15) we
obtain
µ
¶
µ
¶
µ
¶
X
X P
X
X R X +
−
p g η g + αg s − ∆p v g i ηg + αg s − ∆r v g i
βg s + βg s .
s
i
s
i
(4.18)
s
Observe, that now we have the product of the binary variables and the continuous ones
in the objective function (4.18). By applying the proposed procedure in the section 3.3.2 we
are able to linearize these products by introducing new free variables z gPsi , z̃ gPsi and z gRsi , z̃ gRsi .
Finally, the MILP model for single generating unit g is
44
CHAPTER 4. MODELING
min
p̂ g ,rˆg ,ΦD ,ΦB
s. t.
µ
¶
X
X
X
p g η g + αg s − ∆p z gPsi − ∆r z gRsi
s
s,i
(4.19a)
s,i
¡
¢
z gPsi = ηg + αg s − z̃ gPsi ,
³ RP
´
RM
0 ≤ z gPsi ≤ v gPi M + M
,
´ ³ RP
´
³
RM
,
0 ≤ z̃ gPsi ≤ 1 − v gPi M + M
´
³
−
R
z gRsi = β+
g s + βg s − z̃ g si ,
³ RP
´
RM
0 ≤ z gRsi ≤ v gRi M + M
,
´ ³ RP
³
´
RM
0 ≤ z̃ gRsi ≤ 1 − v gRi M + M
,
(4.17),
∀s, i ,
(4.19b)
∀s, i ,
(4.19c)
∀s, i ,
(4.19d)
∀s, i ,
(4.19e)
∀s, i ,
(4.19f)
∀s, i ,
(4.19g)
(4.19h)
(4.16b) − (4.16g ).
(4.19i)
The model (4.19) is the mixed integer linear programming problem which can be solved
by modern branch-and-cut or branch-and-bound algorithms such as the ones used in CPLEX.
After the MILP model is solved and the optimal solution is find, we assume that it is very
close to the actual global optimal solution of the original problem (4.3). Hence, we use this
result as a starting point to solve the original NLP version of the bilevel problem obtaining
the global optimal value in the continuos decision space.
4.4 Diagonalization algorithm
This section very briefly outlines the diagonalization procedure presented in the section 3.4
in the following pseudocode. Note, that if not stated otherwise, the subscript g denotes the
one particular power producer and the subscript −g denotes the rest of the power producers.
45
CHAPTER 4. MODELING
Algorithm 1 Diagonalization
Require:
p OLD
= 0, ∀g ;
g
OLD
rg
= 0, ∀g ;
N EW
pg
= p̄ g , ∀g ;
N EW
rg
= r¯g , ∀g ;
terminate = false;
repeat q
¢2
¢2 ¡
¡ OLD
P
p g − p gN EW + r gOLD − r gN EW < ε then
if g
terminate = true;
else
p OLD
= p gN EW , ∀g ;
g
r gOLD = r gN EW , ∀g ;
terminate = false;
end if
for g =1 to 3 do
OLD
p̂ −g = p −g
;
OLD
rˆ−g = r −g ;
. initial values definition
. master iteration
. termination condition
. fix non-active decision variables
. fix non-active decision variables
solve (4.19) for g ;
solve (4.3) for g ;
. unfix both non-active decision variables
p gN EW = p̂ g ;
r gN EW = rˆg ;
end for
until terminate == true
. saving obtained new values
. saving obtained new values
46
Chapter 5
Numerical Experiments
"We use epsilons and deltas in mathematics because
mathematicians tend to make errors."
47
CHAPTER 5. NUMERICAL EXPERIMENTS
This chapter demonstrates the functionality of the models presented in the chapter 4.
Firstly, a benchmark market equilibrium outcome using the stochastic market clearing model
(4.1) is obtained assuming the perfect competition between the market participants. This
result is further compare with the results of the experiments, where the market participants
behave strategically. Concretely, using the models (4.19) and (4.3), we compare this result
with the two instances of the strategic decisions by a single company, either being competitive only in the production capacity or only in the reserve capacity.
Finally, two examples of the equilibrium problems, solved by the algorithm 1 proposed
in (4.4), are presented and discussed. These help us to determine the long term equilibrium
in the energy market, where in the first example the market participants are optimizing only
the production capacity and in the second example all the market participants optimize both
the production capacity and the reserve capacity.
5.1 Market parameters
The technical parameters determining the market configuration are presented and described
in this section, before the actual examples are shown. These are summarized in the tables 5.1
and 5.2. Recall that the parameters include the day-ahead production costs c g , the upward
reserve costs c g+ , the downward reserve costs c g− and the load shedding cost V LOL , the conventional generating units technical limits p g and p g as well as the stochastic technical limits
w j . Moreover, they include the information about the plausible scenarios, namely the wind
capacity factor ρ j s and scenario probabilities πs . Last but not least, the demand level d to be
satisfied is also stated.
Note that the generating unit g 1 is the least expensive, but utterly inflexible. On the other
hand the generating unit g 3 is the most expensive but also the most flexible one. The upward and downward reserve costs are a bit higher and a bit lower than the production costs
respectively for the practical reasons to avoid the multiplicity of the dispatch solution. However, in the reality, the upward and downward reserve costs differ from the production costs
of the conventional generating units refund the change in the day-ahead production level
scheduled by the ISO.
48
CHAPTER 5. NUMERICAL EXPERIMENTS
Table 5.1: Market parameters: technical parameters of the generating units.
units
costs ($/MWh)
technical limits (MW)
cg
c g+
c g−
pg
pg
rg
g1
20.00
19.90
20.10
0
100
0
g2
25.00
24.90
25.10
0
75
20
g3
30.00
29.90
30.10
0
75
30
wj
shedding
cost ($/MWh)
300.00
j1
100
Instead of calling the scenarios one, two or three, we use the terms low, medium and high
to reflect the capacity factor value in the respective scenario order.
Table 5.2: Market parameters: plausible scenario realizations of the capacity factors, corresponding probabilities and the demand.
scenarios
low
medium
high
πs
0.30
0.50
0.20
ρ 1s
0.10
0.33
0.57
d (MW)
205
5.2 Perfect competition benchmark results
In order to effectively examine the effect of the strategic decisions applied by the conventional generating units we need some benchmark result to compare with. This benchmark
result is the market clearing settlement, using the stochastic market clearing model (4.1), assuming the perfect competition between all the market participants. The assumption of the
perfect competition means that none of the market participants bid strategically, i.e. all of
them bid according to their real technical limits and costs. The day-ahead market outcome
is shown in the table 5.3, the balancing market outcome is shown in the table 5.4 and the corresponding market prices and the profits are displayed in the table 5.5. The total operation
cost in the perfectly competitive benchmark market is $3,883.91.
Table 5.3: Perfect competition: the day-ahead market production levels.
production (MWh)
pg
g1
g2
g3
100
68
0
wj
w1
37
49
CHAPTER 5. NUMERICAL EXPERIMENTS
Table 5.4: Perfect competition: the balancing market upward and downward reserve, the
re-dispatch and the load shedding.
upward reserve
downward reserve
re-dispatch
load shedding
(MWh)
(MWh)
(MWh)
(MWh)
scenario
+
r 1s
+
r 2s
+
r 3s
−
−r 1s
−
−r 2s
−
−r 3s
∆w j s
hs
low
0
7
20
0
0
0
-27
0
medium
0
4
0
0
0
0
-4
0
high
0
0
0
0
-20
0
20
0
Table 5.5: Perfect competition: the market prices and the profits.
market
price
unit
day-ahead
balancing ($/MWh)
($/MWh)
low
medium
high
26.50
30.10
25.10
24.60
expected
scenario profit ($)
profit ($)
low
medium
high
g1
650.00
650.00
650.00
650.00
g2
113.70
137.00
102.00
108.00
g3
0.00
0.00
0.00
0.00
j1
784.89
167.80
880.10
1,472.50
Couple remarks to the presented results:
• The highest profit earned is by the stochastic generating unit because of the zero production cost.
• The generating unit g 1 is the least expensive from the conventional producers thus it
is primarily dispatched earning the most profit.
• On the other hand, there is no output scheduled for the unit g 3 . Even though if scenario
1 occurs and the unit g 3 is requested to produce 20MWh, the price in the balancing
market during this scenario is equal to unit’s g 3 marginal costs, thus it earns zero profit.
5.2.1 The influence of the consumption level on the production levels and
the profits
To investigate how the consumption level influences the market outcome and producers’
profits, the stochastic market clearing model (4.1) is put to the following experiment: the
50
CHAPTER 5. NUMERICAL EXPERIMENTS
consumption level is gradually increased by 20MW from an initial level of 0MW up to a level
of 260MW. Every time the market clearing model determines the optimal market production
levels and the respective profits. These production levels and profits are displayed in the
figures 5.1 and 5.2 respectively.
g1
100
g2
g3
90
j1
80
Production level
70
60
50
40
30
20
10
0
0
20
40
60
80
100
120
140
160
180
200
220
240
260
Demand
Figure 5.1: The consumption influence on the market outcome experiment: production vs.
demand.
Observe, that the production levels do not strictly follow the merit order. This is caused
by the stochastic market clearing model (4.1). Without the loss of the generality, to clarify
this, let us focus on the situation, where the consumption d = 80MW is needed and the wind
output is scheduled to 30MW. Two cases are investigated:
Case 1:
Following the strict merit order we fix the output from the generating units g 2 and g 3 to 0MW.
This leaves us with the production of the g 1 = 50MW . According to the market clearing then
the system operator in the balancing market requests the generating unit g 2 to deploy the
+
upward reserve in the first scenario r 21
= 20MW due to the energy shortage. This evolves
into the following expected cost, the day-ahead and scenario operation costs displayed in
the table 5.6.
51
CHAPTER 5. NUMERICAL EXPERIMENTS
Table 5.6: Case 1: the merit order.
expected operation
day-ahead production
scenario operation costs ($)
cost ($)
cost ($)
low
medium
high
1,150.60
1,000.00
502.00
0.00
0.00
Case 2: According to the stochastic market clearing model the optimal dispatch is breaking the merit order of the day-ahead production by planning the dispatch as g 1 = 47MW,
g 2 = 3MW and g 3 = 0MW. The system operator in this case also requests to deploy the up+
ward reserve in the first scenario r 21
= 20MW, but the operator also orders to repurchase
some amount back by the flexible generating unit g 2 in the second and the third scenario
−
−
because of the power surplus, thus r 22
= r 23
= 3MW. The expected costs and the day-ahead
and scenario operation costs are displayed in the table 5.7.
Table 5.7: Case 2: breaking the merit order.
expected operation
day-ahead production
scenario operation costs ($)
cost ($)
cost ($)
low
medium
high
1,113.31
1,015.00
502.00
-74.70
-74.70
Comparing the tables 5.6 and 5.7 we notice that the stochastic market clearing model
breaks the merit order, by anticipating the plausible wind output in the different scenarios
and deploys the more expensive flexible units in the day-ahead stage (increasing the dayahead operation cost). However, eventualy this leads to the lower total expected operation
costs.
52
CHAPTER 5. NUMERICAL EXPERIMENTS
g1
1000
g2
g3
900
j1
800
700
Profit
600
500
400
300
200
100
0
0
20
40
60
80
100
120
140
160
180
200
220
240
260
Demand
Figure 5.2: The consumption influence on the market outcome experiment: profit vs. demand.
Number of final observations can be made from the figures 5.1 and 5.2:
• When the consumption level is very low, the production is expected to be covered
mostly by wind power generator (free energy). In case of the energy shortage, the flexible conventional units are capable to use their upward reserves.
• While the demand level increases, the least expensive generating unit takes lead in
production. The other two produce only as much as needed to re-dispatch upward or
downward reserves (according to the previous explanation).
• When the least expensive generating unit is dispatched at maximum capacity, the second least expensive generating unit in order increases production as expected.
• Eventually, the most expensive generating unit must increase production to satisfy the
demand, however producing at the marginal price, thus without any positive profit.
• There is a small decrease in the scheduled wind power (from 37MWh to 33MWh) between d = 200MW and d = 220MW and further on. Note, that the unit g 2 is being dispatched at the full capacity, thus the only unit capable of upward reserves is g 3 . Using
a similar argument to the one used in the case study above the scheduled wind output
53
CHAPTER 5. NUMERICAL EXPERIMENTS
is adjusted by the stochastic market clearing in order to decrease the total expected
operation cost taking into consideration the wind output contingencies.
5.3 Strategic behavior of single company
All the previous results assumed the perfect competition between the producers, i.e. all the
generating units submit their real technical limits (the production capacity and the reserve
capacity) to the ISO. This section intends to present the effect of the strategic behavior by
the generating units, submitting the optimized bids to the ISO in order to achieve the higher
profit via two illustrative examples. To be able to compare these with the benchmark results
the demand is fixed to d = 205MW.
5.3.1 Production capacity optimization
Recall the section 2.3, the example presented how the market price can be lowered when
stochastic producer enters the market. From the point of view of a single conventional producer, the aim of this subsection is to reach the opposite effect by withdrawing the production capacity (and fixing the reserve to the technical limit) leading to an increased market
price and thus higher profit.
The protagonist is the generating unit g 1 . The mechanics of the market dictates the producers to submit their bids to the ISO first and then the ISO clears the market according
to the received bids determining the optimal production levels and the equilibrium prices.
Therefore, this is modeled as a bilevel problem where the generating unit is the leader optimizing the production bid and thus maximizing its profit anticipating the follower’s, the ISO,
optimal market outcome after receiving those bids. In the section 4.3 it has been shown how
to transform a bilevel problem into an equivalent one-level optimization problem.
To achieve the globally optimal result, two models are solved straight one after the other.
Firstly, the mixed integer linear model (4.19) is solved to provide the globally optimal result
in discretized decision space, which however does not have to be optimal to the original
problem (4.2). Secondly, using the previous result as the starting point the nonlinear model
(4.3) is solved obtaining the globally optimal decision to the original problem (4.2).
Therefore, solving the models as described we get the optimal bid in production capacity
by the generating unit g 1 is p̂ 1 = 97MW. The total expected operation cost after this strategic bid is $3,900.59. Corresponding profits for the generating units are summarized in the
table 5.8.
54
CHAPTER 5. NUMERICAL EXPERIMENTS
Table 5.8: Illustrative example: market prices and producers’ profits after strategic bidding
in the production capacity by the generating unit g 1 .
market
price
unit
day-ahead
balancing ($/MWh)
($/MWh)
low
medium
high
30.00
30.10
29.98
29.90
expected
scenario profit ($)
profit ($)
low
medium
high
g1
867.18
867.18
867.18
867.18
g2
296.70
299.74
299.26
285.74
g3
0.00
0.00
0.00
0.00
j1
865.41
258.08
950.86
1,562.78
Withdrawing the production capacity led to the increased prices in both the day-ahead
market and the balancing market. A direct consequence is the higher profit primary for the
generating unit g 1 , increasing it by 33.4% from $650.00 to $867.18. Moreover, the increased
prices positively influence the profit of the generating unit g 2 , increasing it’s profit by 160.9%
from $113.70 up to $296.70. The generating unit g 3 still has zero profit. A small increase
in the profit is noticed also with the stochastic producer j 1 , raising its profit by 9.1% from
$784.89 to $856.41.
This illustrative example proved that the strategic bid to the production capacity may
consequence into the higher profit than bidding the actual technical limit.
5.3.2 Reserve capacity optimization
Similarly to the previous example, we focus on the strategic optimization of the reserve bid by
the generating unit g 3 seeking the positive profit. Until now, the unit g 3 did not reach positive
profit. Hence, the similar approach as before is used. However, in this instance we fix the
production capacity to the actual technical limit. The value of the optimal bid in the reserve
capacity is rˆ3 = 10MW and the expected total operation cost is $3,880.69. Corresponding
profits for the generating units are summarized in the table 5.8.
55
CHAPTER 5. NUMERICAL EXPERIMENTS
Table 5.9: Illustrative example: market prices and producers’ profits after strategic bidding
in the reserve capacity by the generating unit g 3 .
market
price
unit
day-ahead
balancing ($/MWh)
($/MWh)
low
medium
high
30.00
41.77
25.10
24.60
expected
scenario profit ($)
profit ($)
low
medium
high
g1
1,000.00
1,000.00
1,000.00
1,000.00
g2
376.20
456.67
340.00
346.00
g3
69.60
116.67
48.00
53.00
j1
819.89
99.97
960.60
1,548.00
The optimized strategic bid by the generating unit g 3 fulfilled the goal and led to the
increase in the profit from $0.00 up to $69.60. Comparing the tables 5.8 and 5.9 we observe
that the effect of the reserve capacity withdrawal on the prices is higher, especially the dayahead price and the price in the first scenario. As a result, the profit for the generating unit g 1
comparing to the benchmark values increased by 53.85% from $650.00 to $1,000.00 and the
profit of the generating unit g 2 raised by %230.87 from $113.70 to $376.20. On the other hand,
this change in the prices negatively influenced the profit of the stochastic unit j 1 comparing
with the previous example, increasing its profit by only 4.27% from $784.89 to $819.89.
Solving the two previous example we have shown that submitting the optimized bids to
the ISO may lead to the increased profits for the conventional generators despite the fact,
that the total expected operation costs in each of the examples are approximately the same.
The reason why the total expected cost are approximately the same is that the expected cost
does not depend on the market price but only on the submitted production and reserve costs
from the generating units.
5.4 Strategic behavior by multiple companies
The previous subsection dealt with the example where only single conventional generating
unit behaved strategically and optimized its decision variables. This section expands this
idea on all the other conventional producers in the same market. The goal is to find the long
term Nash equilibrium in the power market.
The papers already published in this field usually assume the conventional generators
being strategic only in the day-ahead production bids [19, 20, 21]. We extend this with the
strategic bidding in the reserve capacity as well and compare the obtained results.
56
CHAPTER 5. NUMERICAL EXPERIMENTS
To reach the long term market Nash equilibrium in the next examples, the diagonalization procedure presented in the section 3.4 is used. The stopping constant ε in the diagonalization algorithm 1 is set to 0.01.
5.4.1 Optimal strategic decisions in production
The market in the first experiment comprises of the conventional power producers, who
optimize their production capacity to maximize their own profit.
The diagonalization algorithm converges in 27 master iterations reaching the long term
Nash equilibrium in the market. The optimal production capacity bids for the individual
units are displayed in table 5.10.
Table 5.10: The optimal production capacity bids by the individual company.
unit
strategic production
capacity (MW)
g1
100
g2
75
g3
20
The total expected operation cost is $3,881.09 and the market outcome of the Nash equilibrium is displayed in the table 5.11.
Table 5.11: The long term Nash equilibrium where all the market participants optimize the
production capacity.
market
price
unit
day-ahead
balancing ($/MWh)
($/MWh)
low
medium
high
32.47
50.00
25.10
24.60
expected
scenario profit ($)
profit ($)
low
medium
high
g1
1,247.00
1,247.00
1,247.00
1,247.00
g2
561.45
682.26
507.96
513.96
g3
119.40
398.00
0.00
0.00
j1
844.59
-148.61
1,100.99
1,693.39
Observe, that the difference between the results in the tables 5.5 and 5.11 is significant.
The first generating unit g 1 nearly doubled the profit increasing it by 91.85% from $650.00 to
57
CHAPTER 5. NUMERICAL EXPERIMENTS
$1,247.00. Even greater raise in the profit experienced the generating unit g 2 increasing its
profit by 393.80% from $113.70 to $561.45.
Quite interesting is the bid from the generating unit g 2 setting p̂ 3 = 20MW. It indirectly
imposes the reserve capacity as well which presumably results in the higher market prices in
the day-ahead and balancing market.
The stochastic unit j 1 increased its profit only a small bit by 7.61% from $784.89 to $844.59.
5.4.2 Optimal strategic decisions in production and reserves
Allowing the optimization of the decision variables for both the production capacity and also
the reserve capacity we end up with the results displayed in the table 5.12 after the diagonalization algorithm converges in 89 master iterations.
Table 5.12: The optimal production and reserve capacity bids by the individual company.
strategic production
strategic reserve
capacity (MW)
capacity (MW)
g1
100
0
g2
48
0
g3
47
24
unit
The total expected operation cost is $3,868.94 and the market equilibrium prices and
profits are presented in the table 5.13.
Table 5.13: The long term Nash equilibrium where all the market participants optimize the
production capacity and the reserve capacity.
market
price
unit
day-ahead
balancing ($/MWh)
($/MWh)
low
medium
high
33.98
50.00
30.00
19.90
expected
scenario profit ($)
profit ($)
low
medium
high
g1
1,398.00
1,398.00
1,398.00
1,398.00
g2
431.04
431.04
431.04
431.04
g3
280.83
553.22
95.52
335.52
j1
871.86
-28.66
1,121.34
1,598.94
58
CHAPTER 5. NUMERICAL EXPERIMENTS
5.4.3 Results comparison
The results from the tables 5.5, 5.11 and 5.13 are extracted and summarized in the table 5.14.
Table 5.14: The comparison of the profits according to the perfect competition, strategic
behavior considering the production capacity and the reserve capacity.
perfect
strategic production
strategic production and
competition ($)
capacity ($)
reserve capacity ($)
g1
650.00
1,247.00
1,398.00
g2
113.70
561.45
431.04
g3
0.00
119.40
280.83
j1
784.89
844.59
871.86
unit
Observe, that results from the sections 5.4.1 and 5.4.2 show the conventional generating
units earn higher profit when they behave strategically than in the case of the perfect competition. Moreover, the results for the unit g 1 and g 3 from the section 5.4.2 are better with
respect to the section 5.4.1, increasing their profits by 12.11% and 135.20% respectively.
The profit of the generating unit g 2 in the section 5.4.2 may not seem intuitively correct
as it actually decreases with respect to the profit earned in the section 5.4.1. However, keep
in mind that even the profit is lower, it is still the most that unit g 2 can earn when the rest of
the competition stick to their equilibrium decisions.
59
Chapter 6
Conclusion and Future Research
"Some papers contain much that is new and much that
is true. Unfortunately, that which is true is not new and
and that which is new is not true."
60
CHAPTER 6. CONCLUSION AND FUTURE RESEARCH
6.1 Conclusion
In this thesis, the comparison of the different possibilities how the conventional producers
may strategically behave in the two-stage energy market including the wind power producers was presented. The strategic behavior generally pursues the maximization of the profit
through the optimized bids in the production capacity and the reserve capacity.
To successfully approach this problem, firstly the underlying stochastic market clearing
minimizing the total expected operation cost was created. The stochastic market clearing
is cast as two-stage stochastic programming problem optimizing simultaneously the dayahead dispatch in the first stage as well as the reserve redeployment in the second stage.
According to the market mechanics, the bilevel Stackelberg game is formulated for the
individual power producer. The power producer maximizes its profit in the upper level problem whilst anticipating the optimal outcome from the market clearing cost minimization in
the lower level problem. Furthermore, the bilevel problem is transformed into the equivalent one-level optimization nonlinear problem using the KKT conditions applied on the
lower problem. The convexity of the lower level problem implies that the solution to the
KKT conditions complementarity problem is optimal.
The global optimality of the solution to the nonlinear problem is not guaranteed in general. Therefore to obtain the globally optimal results, the nonlinear problem needs to be
further improved. The Fortuny-Amat procedure to linearize the complementarity slackness
in the KKT conditions is used as well as the procedure to linearize the product of the binary
and continuous variables, resulting into the mixed integer linear problem. The solution to
this type of problems guarantees the global optimality. However, the solution in the discretized decision space to the mixed integer problem is not necessarily the optimal solution
to the original problem. Hence we solved both models sequentially, firstly the mixed integer
linear model to provide the best starting point for the nonlinear model.
Eventually, several examples are solved to provide the insight into the energy market settlement as the stochastic market clearing breaks the merit order. Finally, two EPEC models
solved by the diagonalization procedure are presented and compared to the perfect competition Nash equilibrium where all the market participants bid according to their real technical
limits.
We have shown, that two out of the three conventional generators positively increased
their profit when being strategic in both the production capacity and the reserve capacity
compared to the case when all producers optimize only the production capacity bids. Concretely, the least expensive but utterly inflexible unit g 1 increased the profit by 12.11% and
the most expensive and most flexible unit g 3 increased profit by 135.20%. On the other hand,
the generating unit g 2 decreased the profit by 23.23%.
61
CHAPTER 6. CONCLUSION AND FUTURE RESEARCH
6.2 Future Research
The future research can be oriented in one or more of the following ways.
• Extend the stochastic market clearing model (4.1) with the network.
• Compare the existing (or extended) stochastic market clearing model to the different
market clearing. For example to the one that does not optimize the day-ahead production and reserve re-dispatch simultaneously but sequentially.
• Incorporate the double-sided auction, allowing the demand bids, or add the stochastic
demand support.
• Include the approach presented in [33] for avoiding the pricing multiplicity [34] to set
the market prices according to the specific criteria.
• Allow for a different strategic behavior for the conventional generating units, for instance Bertrand. Or some of the units does not have to behave strategically at all. Then
solve the EPEC problem of the proposed mixed behavior market.
62
Bibliography
[1] T. Jamasb and M. Pollitt, “Electricity market reform in the European Union: review of
progress towards liberalisation and integration,” The Energy Journal, vol. 26, no. 201,
pp. 11–41, 2005.
[2] F. McGowan, “The single energy market and energy policy: conflicting agendas?,” Energy Policy, vol. 17, no. 6, pp. 547–553, 1989.
[3] W. J. Baumol and A. S. Blinder, Economics: Principles and Policy. Cengage Learning,
2010.
[4] W. Nicholson and C. Snyder, Microeconomic theory: basic principles and extensions.
South-Western College Pub, 2008.
[5] J. Nash, “Non-Cooperative Games,” Annals of Mathematics, vol. 54, pp. 286–295, 1951.
[6] M. S. Nazir and F. D. Galiana, “Cournot Gaming in Joint Energy and Reserve markets,”
Energy, pp. 1–20, 2011.
[7] M. J. Osborne and A. Rubenstein, A Course In Game Theory. The MIT Press, 1994.
[8] S. Wallace and S. Fleten, “Stochastic programming models in energy,” Handbooks in
Operations Research and Management Science, vol. 10, pp. 637–638, 2003.
[9] D. Laloux and M. Rivier, “Technology and Operation of Electric Power Systems,” in Regulation of the Power Sector (I. J. Perez-Arriaga, ed.), ch. 1, pp. 1–46, London: Springer,
2013.
[10] R. J. Vanderbei, Linear Programming - Foundations and Extensions. Springer, third ed.,
2008.
[11] J. Birge and F. Louveaux, Introduction to stochastic programming. Springer Science &
Business Media, 2011.
63
BIBLIOGRAPHY
[12] G. Pritchard, G. Zakeri, and A. Philpott, “A Single-Settlement, Energy-Only Electric
Power Market for Unpredictable and Intermittent Participants,” Operations Research,
vol. 58, pp. 1210–1219, 2010.
[13] J. M. Morales, A. J. Conejo, K. Liu, and J. Zhong, “Pricing electricity in pools with wind
producers,” IEEE Transactions on Power Systems, vol. 27, no. 3, pp. 1366–1376, 2012.
[14] J. M. Morales, M. Zugno, S. Pineda, and P. Pinson, “Electricity market clearing with
improved scheduling of stochastic production,” European Journal of Operational Research, vol. 235, no. 3, pp. 765–774, 2014.
[15] S. Boyd and L. Vandenberghe, Convex Optimization, vol. 25. Cambridge University
Press, 2010.
[16] R. E. Rosenthal, “GAMS- A User’s Guide,” 2015.
[17] K. Neuhoff, J. Barquin, M. G. Boots, A. Ehrenmann, B. F. Hobbs, F. A. M. Rijkers, and
M. Vázquez, “Network-constrained Cournot models of liberalized electricity markets:
The devil is in the details,” Energy Economics, vol. 27, no. 3, pp. 495–525, 2005.
[18] L. Wang, M. Mazumdar, M. D. Bailey, and J. Valenzuela, “Oligopoly models for market
price of electricity under demand uncertainty and unit reliability,” European Journal of
Operational Research, vol. 181, no. 3, pp. 1309–1321, 2007.
[19] B. F. Hobbs, C. Metzler, and J. S. Pang, “Strategic gaming analysis for electric power
networks: An MPEC approach,” IEEE Trans. Power Systems, to be published, vol. 15,
no. 2, pp. 638–645, 2000.
[20] H. Haghighat, H. Seifi, and A. R. Kian, “Gaming analysis in joint energy and spinning
reserve markets,” IEEE Transactions on Power Systems, vol. 22, no. 4, pp. 2074–2085,
2007.
[21] S. Soleymani, A. M. Ranjbar, and A. R. Shirani, “New approach for strategic bidding of
Gencos in energy and spinning reserve markets,” Energy Conversion and Management,
vol. 48, pp. 2044–2052, 2007.
[22] J. Zhao, B. Brereton, and M. Montalvo, “Gaming-based reserve constraint penalty factor
analysis,” IEEE Transactions on Power Systems, vol. 26, no. 2, pp. 616–626, 2011.
[23] X. Bai, S. M. Shahidehpour, V. C. Ramesh, and E. Yu, “Transmission analysis by nash
game method,” IEEE Transactions on Power Systems, vol. 12, no. 3, pp. 1046–1052, 1997.
[24] F. Facchinei and J.-S. Pang, Finite-Dimensional Variational Inequalities and Complementarity Problems. Springer, 2003.
64
BIBLIOGRAPHY
[25] K. Leyton-Brown and Y. Shoham, Essentials of game theory, vol. 2. Morgan and Claypool
Publishers, 2008.
[26] J. Church and R. Ware, Industrial organization: a strategic approach. McGraw-Hill,
2000.
[27] H. von Stackelberg, The Theory of the Market Economy. Oxford University Press, 1952.
[28] J. F. Bard, “Practical Bilevel Optimization (Book).,” Transportation Science, vol. 36,
p. 144, 2002.
[29] J. Fortuny-Amat and B. McCarl, “A Representation and Economic Interpretation of a
Two-Level Programming Problem,” 1981.
[30] C.-L. Su, Equilibrium Problems with Equilibrium Constraints: Stationarities, Algorithms, and Applications. PhD thesis, Stanford University, 2005.
[31] C. Gabriel, Steven A., Conejo, Antionio J., Fuller, J. David, Hobbs, Benjamin F., Ruiz,
Complementarity Modeling in Energy Markets. Springer, 2013.
[32] S. Wogrin, J. Barquín, and E. Centeno, “Capacity expansion equilibria in liberalized electricity markets: An EPEC approach,” IEEE Transactions on Power Systems, vol. 28, no. 2,
pp. 1531–1539, 2013.
[33] N. Alguacil, J. M. Arroyo, and R. Garciá-Bertrand, “Optimization-based approach for
price multiplicity in network-constrained electricity markets,” IEEE Transactions on
Power Systems, vol. 28, no. 4, pp. 4264–4273, 2013.
[34] W. W. Hogan, “Multiple Market-Clearing Prices, Electricity Market Design and Price Manipulation,” Electricity Journal, vol. 25, no. 4, pp. 18–32, 2012.
65
Appendices
66
Appendix A
GAMS: Sets, parameters and variables
1
2
3
4
5
6
7
8
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
SET
g "Conventional generating units"
sg(g) "Strategic conventional generating units (subset of g)"
j "Stochastic generating units"
s "Wind forecast scenarios"
ip "Number of discrete steps for production capacity"
ir "Number of discrete steps for reserve capacity"
;
PARAMETER
pi(s) "Scenario probabilities"
c_unit(g) "Production cost"
c_plus(g) "Upward reserve energy cost"
c_minus(g) "Downward reserve energy cost"
V_LOL "Value of lost load"
p_up(g) "Conventional generating units maximal production capacity"
p_lo(g) "Conventional generating units minimal production capacity"
w_up(j) "Stochastic generating units maximal production capacity"
w_lo(j) "Stochastic generating units minimal production capacity"
d "Demand"
r_up(g) "Maximal flexibility capacity"
rho(j, s) "Stochastic parameter"
M_P_lo "Big M for eta_lo"
M_P_up "Big M for eta_up"
M_W_lo "Big M for mu_lo"
M_W_up "Big M for mu_up"
M_L_lo "Big M for delta_lo"
M_L_up "Big M for delta_up"
M_A_lo "Big M for alpha_lo"
M_A_up "Big M for alpha_up"
M_BP_lo "Big M for beta_plus_lo"
M_BP_up "Big M for beta_plus_up"
67
APPENDIX A. GAMS: SETS, PARAMETERS AND VARIABLES
M_BM_lo "Big M for beta_minus_lo"
M_BM_up "Big M for beta_minus_up"
M_O_lo "Big M for omega_lo"
M_O_up "Big M for omega_up"
p_delta(g) "Discrete step in strategic production capacity"
r_delta(g) "Discrete step in strategic reserve capacity"
33
34
35
36
37
38
39
;
41
VARIABLE
z_nlp "Total expected operation cost of nlp model"
z_minlp "Total expected operation cost of milp model"
p(g) "Conventional generating units production level"
w(j) "Stochastic generating units production level"
r_plus(g, s) "Stochastic generating units upward reserve"
r_minus(g, s) "Stochastic generating units upward reserve"
w_delta(j, s) "Re−dispatch"
h(s) "Load shedding"
lambda_D "dual variable to demand equation: day−ahead price"
lambda_B(s) "dual variables to re−dispatch equations: balancing prices"
p_hat(g) "Strategic production capacity"
r_hat(g) "Strategic reserve capacity"
z_P(g, s, ip) "Product of optimal production capacity and dual variables"
z_hat_P(g, s, ip) "Product of optimal production capacity and dual
variables auxiliary variable"
z_R(g, s, ir) "Product of optimal reserve capacity and dual variables"
z_hat_R(g, s, ir) "Product of optimal reserve capacity and dual variables
auxiliary variable"
;
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
POSITIVE VARIABLE
eta_lo(g) "dual variable to conventional units lower production limit"
eta_up(g) "dual variable to conventional units upper production limit"
mu_lo(j) "dual variable to stochastic units lower production limit"
mu_up(j) "dual variable to conventional units upper production limit"
delta_lo(s) "dual variable to load shedding lower limit"
delta_up(s) "dual variable to load shedding upper limit"
alpha_lo(g, s) "dual variable to production plus re−dispatch lower limit"
alpha_up(g, s) "dual variable to production plus re−dispatch upper limit"
beta_plus_lo(g, s) "dual variable to upward reserve lower limit"
beta_plus_up(g, s) "dual variable to upward reserve upper limit"
beta_minus_lo(g, s) "dual variable to downward reserve lower limit"
beta_minus_up(g, s) "dual variable to downward reserve upper limit"
omega_lo(j, s) "dual variable to re−dispatch lower limit"
omega_up(j, s) "dual variable to re−dispatch upper limit"
;
68
APPENDIX A. GAMS: SETS, PARAMETERS AND VARIABLES
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
BINARY VARIABLE
u_P_lo(g) "Fortuny−Amat binary variable for lower conventional production
limit constraint"
u_P_up(g) "Fortuny−Amat binary variable for upper conventional production
limit constraint"
u_W_lo(j) "Fortuny−Amat binary variable for lower stochastic production
limit constraint"
u_W_up(j) "Fortuny−Amat binary variable for upper stochastic production
limit constraint"
u_L_lo(s) "Fortuny−Amat binary variable for lower load shedding limit
constraint"
u_L_up(s) "Fortuny−Amat binary variable for upper load shedding limit
constraint"
u_A_lo(g, s) "Fortuny−Amat binary variable for lower production plus re−
dispatch limit constraint"
u_A_up(g, s) "Fortuny−Amat binary variable for upper production plus re−
dispatch limit constraint"
u_BP_lo(g, s) "Fortuny−Amat binary variable for lower upward reserve limit
constraint"
u_BP_up(g, s) "Fortuny−Amat binary variable for upper upward reserve limit
constraint"
u_BM_lo(g, s) "Fortuny−Amat binary variable for lower downward reserve
limit constraint"
u_BM_up(g, s) "Fortuny−Amat binary variable for upper downward reserve
limit constraint"
u_O_lo(j, s) "Fortuny−Amat binary variable for lower re−dispatch limit
constraint"
u_O_up(j, s) "Fortuny−Amat binary variable for upper re−dispatch limit
constraint"
v_P(g, ip) "Auxiliary binary variable for product of optimal production
capacity and dual variables"
v_R(g, ir) "Auxiliary binary variable for product of optimal reserve
capacity and dual variables"
;
69
Appendix B
GAMS: Nonlinear model
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
* Profit maximization
producer_profit_nlp .. z_nlp =E= SUM(g$sg(g),c_unit(g)*p(g)+SUM(s,pi(s)*(
c_plus(g)*r_plus(g,s)−c_minus(g)*r_minus(g,s)))−p(g)*lambda_D+SUM(s,pi(s
)*(lambda_B(s)*(r_plus(g,s)−r_minus(g,s)))));
* Strategic decisions
production_cap_lo(g) .. p_hat(g) =G= 0;
production_cap_up(g) .. p_up(g)−p_hat(g) =G= 0;
reserve_cap_lo(g) .. r_hat(g) =G= 0;
reserve_cap_up(g) .. r_up(g)−r_hat(g) =G= 0;
* Primal feasibility
c_prod_lo(g) .. p(g) =G= 0;
c_prod_up(g) .. p_hat(g)−p(g) =G= 0;
s_prod_lo(j) .. w(j) =G= 0;
s_prod_up(j) .. w_up(j)−w(j) =G= 0;
shedd_lo(s) .. h(s) =G= 0;
shedd_up(s) .. d−h(s) =G= 0;
demand .. SUM(j,w(j))+SUM(g,p(g))−d =E= 0;
redispatch_lo(g,s) .. p(g)+r_plus(g,s)−r_minus(g,s) =G= 0;
redispatch_up(g,s) .. p_hat(g)−p(g)−r_plus(g,s)+r_minus(g,s) =G= 0;
upward_lo(g,s) .. r_plus(g,s) =G= 0;
upward_up(g,s) .. r_hat(g)−r_plus(g,s) =G= 0;
downward_lo(g,s) .. r_minus(g,s) =G= 0;
downward_up(g,s) .. r_hat(g)−r_minus(g,s) =G= 0;
scenario_lo(j,s) .. w(j)+w_delta(j,s) =G= 0;
scenario_up(j,s) .. rho(j,s)*w_up(j)−w(j)−w_delta(j,s) =G= 0;
redispatch(s) .. SUM(j,w_delta(j,s))+SUM(g,r_plus(g,s)−r_minus(g,s))+h(s) =
E= 0;
* Complementarity constraints
com_eta_lo(g) .. eta_lo(g)*(p(g)−p_lo(g)) =E= 0;
com_eta_up(g) .. eta_up(g)*(p_hat(g)−p(g)) =E= 0;
com_mu_lo(j) .. mu_lo(j)*w(j) =E= 0;
com_mu_up(j) .. mu_up(j)*(w_up(j)−w(j)) =E= 0;
70
APPENDIX B. GAMS: NONLINEAR MODEL
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
48
49
50
com_delta_lo(s) .. delta_lo(s)*h(s) =E= 0;
com_delta_up(s) .. delta_up(s)*(d−h(s)) =E= 0;
com_alpha_lo(g,s) .. alpha_lo(g,s)*(p(g)+r_plus(g,s)−r_minus(g,s)−p_lo(g))
=E= 0;
com_alpha_up(g,s) .. alpha_up(g,s)*(p_hat(g)−p(g)−r_plus(g,s)+r_minus(g,s))
=E= 0;
com_beta_plus_lo(g,s) .. beta_plus_lo(g,s)*r_plus(g,s) =E= 0;
com_beta_plus_up(g,s) .. beta_plus_up(g,s)*(r_hat(g)−r_plus(g,s)) =E= 0;
com_beta_minus_lo(g,s) .. beta_minus_lo(g,s)*r_minus(g,s) =E= 0;
com_beta_minus_up(g,s) .. beta_minus_up(g,s)*(r_hat(g)−r_minus(g,s)) =E= 0;
com_omega_lo(j,s) .. omega_lo(j,s)*(w(j)+w_delta(j,s)) =E= 0;
com_omega_up(j,s) .. omega_up(j,s)*(rho(j,s)*w_up(j)−w(j)−w_delta(j,s)) =E=
0;
* Optimality
partial_p(g) .. c_unit(g)−eta_lo(g)+eta_up(g)+SUM(s,−alpha_lo(g,s)+alpha_up
(g,s))−lambda_D =E= 0;
partial_w(j) .. −mu_lo(j)+mu_up(j)+SUM(s,−omega_lo(j,s)+omega_up(j,s))−
lambda_D =E= 0;
partial_h(s) .. pi(s)*V_LOL−delta_lo(s)+delta_up(s)−pi(s)*lambda_B(s) =E=
0;
partial_r_plus(g,s) .. pi(s)*c_plus(g)−alpha_lo(g,s)+alpha_up(g,s)−
beta_plus_lo(g,s)+beta_plus_up(g,s)−pi(s)*lambda_B(s) =E= 0;
partial_r_minus(g,s) .. −pi(s)*c_minus(g)+alpha_lo(g,s)−alpha_up(g,s)−
beta_minus_lo(g,s)+beta_minus_up(g,s)+pi(s)*lambda_B(s) =E= 0;
partial_w_delta(j,s) .. −omega_lo(j,s)+omega_up(j,s)−pi(s)*lambda_B(s) =E=
0;
MODEL mpec_pr_nlp "MPEC using NLP formulation"
/ ALL /
;
71
Appendix C
GAMS: Mixed integer linear model
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
* Profit maximization
producer_profit_milp .. z_milp =E= SUM((g,s)$sg(g),p_lo(g)*(eta_lo(g)+SUM(s
,alpha_lo(g,s)))−SUM(bp,p_delta(ip)*z_p(g,s,ip))−SUM(br,r_delta(ir)*z_R(
g,s,ir)));
* Discrete p_hat
p_hat_eq(g)$sg(g) .. p_hat(g) =E= SUM((s,ip),p_delta(ip)*v_P(g,ip));
z_P_eq(g,s,ip)$sg(g) .. z_P(g,s,ip) =E= (eta_up(g)+alpha_up(g,s))−z_hat_P(g
,s,ip);
z_P_lo(g,s,ip)$sg(g) .. z_P(g,s,ip) =G= 0;
z_P_up(g,s,ip)$sg(g) .. v_P(g,ip)*(M_BP_up+M_BM_up)−z_P(g,s,ip) =G= 0;
z_hat_P_lo(g,s,ip)$sg(g) .. z_hat_P(g,s,ip) =G= 0;
z_hat_P_up(g,s,ip)$sg(g) .. (1−v_P(g,ip))*(M_BP_up+M_BM_up)−z_hat_P(g,s,ip)
=G= 0;
z_P_row(g,ip)$(sg(g) AND (ORD(ip)>2)) .. v_P(g,ip−1)−v_P(g,ip) =G= 0;
* Discrete p_hat
r_hat_eq(g)$sg(g) .. r_hat(g) =E= SUM((s,ir),r_delta(ir)*v_R(g,ir));
z_R_eq(g,s,ir)$sg(g) .. z_R(g,s,ir) =E= (beta_plus_up(g,s)+beta_minus_up(g,
s))−z_hat_R(g,s,ir);
z_R_lo(g,s,ir)$sg(g) .. z_R(g,s,ir) =G= 0;
z_R_up(g,s,ir)$sg(g) .. v_R(g,ir)*(M_BP_up+M_BM_up)−z_R(g,s,ir) =G= 0;
z_hat_R_lo(g,s,ir)$sg(g) .. z_hat_R(g,s,ir) =G= 0;
z_hat_R_up(g,s,ir)$sg(g) .. (1−v_R(g,ir))*(M_BP_up+M_BM_up)−z_hat_R(g,s,ir)
=G= 0;
z_R_row(g,ir)$(sg(g) AND (ORD(ir)>2)) .. v_R(g,ir−1)−v_R(g,ir) =G= 0;;
* Strategic decisions
production_cap_lo(g) .. p_hat(g) =G= 0;
production_cap_up(g) .. p_up(g)−p_hat(g) =G= 0;
reserve_cap_lo(g) .. r_hat(g) =G= 0;
reserve_cap_up(g) .. r_up(g)−r_hat(g) =G= 0;
* Primal feasibility
c_prod_lo(g) .. p(g) =G= 0;
c_prod_up(g) .. p_hat(g)−p(g) =G= 0;
72
APPENDIX C. GAMS: MIXED INTEGER LINEAR MODEL
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
s_prod_lo(j) .. w(j) =G= 0;
s_prod_up(j) .. w_up(j)−w(j) =G= 0;
shedd_lo(s) .. h(s) =G= 0;
shedd_up(s) .. d−h(s) =G= 0;
demand .. SUM(j,w(j))+SUM(g,p(g))−d =E= 0;
redispatch_lo(g,s) .. p(g)+r_plus(g,s)−r_minus(g,s) =G= 0;
redispatch_up(g,s) .. p_hat(g)−p(g)−r_plus(g,s)+r_minus(g,s) =G= 0;
upward_lo(g,s) .. r_plus(g,s) =G= 0;(ip)
upward_up(g,s) .. r_hat(g)−r_plus(g,s) =G= 0;
downward_lo(g,s) .. r_minus(g,s) =G= 0;
downward_up(g,s) .. r_hat(g)−r_minus(g,s) =G= 0;
scenario_lo(j,s) .. w(j)+w_delta(j,s) =G= 0;
scenario_up(j,s) .. rho(j,s)*w_up(j)−w(j)−w_delta(j,s) =G= 0;
redispatch(s) .. SUM(j,w_delta(j,s))+SUM(g,r_plus(g,s)−r_minus(g,s))+h(s) =
E= 0;
Complementarity
*
comp_eta_lo_left(g) .. u_P_lo(g)*M_P_lo =G= eta_lo(g);
comp_eta_lo_right(g) .. (1−u_P_lo(g))*p_up(g) =G= p(g);
comp_eta_up_left(g) .. u_P_up(g)*M_P_up =G= eta_up(g);
comp_eta_up_right(g) .. (1−u_P_up(g))*p_up(g) =G= p_hat(g)−p(g);
comp_mu_lo_left(j) .. u_W_lo(j)*M_W_lo =G= mu_lo(j);
comp_mu_lo_right(j) .. (1−u_W_lo(j))*w_up(j) =G= w(j);
comp_mu_up_left(j) .. u_W_up(j)*M_W_up =G= mu_up(j);
comp_mu_up_right(j) .. (1−u_W_up(j))*w_up(j) =G= w_up(j)−w(j);
comp_delta_lo_left(s) .. u_L_lo(s)*M_L_lo =G= delta_lo(s);
comp_delta_lo_right(s) .. (1−u_L_lo(s))*d =G= h(s);
comp_delta_up_left(s) .. u_L_up(s)*M_L_up =G= delta_up(s);
comp_delta_up_right(s) .. (1−u_L_up(s))*d =G= d−h(s);
comp_alpha_lo_left(g,s) .. u_A_lo(g,s)*M_A_lo =G= alpha_lo(g,s);
comp_alpha_lo_right(g,s) .. (1−u_A_lo(g,s))*p_up(g) =G= p(g)+r_plus(g,s)−
r_minus(g,s);
comp_alpha_up_left(g,s) .. u_A_up(g,s)*M_A_up =G= alpha_up(g,s);
comp_alpha_up_right(g,s) .. (1−u_A_up(g,s))*p_up(g) =G= p_hat(g)−p(g)−
r_plus(g,s)+r_minus(g,s);
comp_beta_plus_lo_left(g,s) .. u_BP_lo(g,s)*M_BP_lo =G= beta_plus_lo(g,s);
comp_beta_plus_lo_right(g,s) .. (1−u_BP_lo(g,s))*r_up(g) =G= r_plus(g,s);
comp_beta_plus_up_left(g,s) .. u_BP_up(g,s)*M_BP_up =G= beta_plus_up(g,s);
comp_beta_plus_up_right(g,s) .. (1−u_BP_up(g,s))*r_up(g) =G= r_hat(g)−
r_plus(g,s);
comp_beta_minus_lo_left(g,s) .. u_BM_lo(g,s)*M_BM_lo =G= beta_minus_lo(g,s)
;
comp_beta_minus_lo_right(g,s) .. (1−u_BM_lo(g,s))*r_up(g) =G= r_minus(g,s);
comp_beta_minus_up_left(g,s) .. u_BM_up(g,s)*M_BM_up =G= beta_minus_up(g,s)
;
73
APPENDIX C. GAMS: MIXED INTEGER LINEAR MODEL
65
66
67
68
69
70
71
72
73
74
75
76
78
79
80
comp_beta_minus_up_right(g,s) .. (1−u_BM_up(g,s))*r_up(g) =G= r_hat(g)−
r_minus(g,s);
comp_omega_lo_left(j,s) .. u_O_lo(j,s)*M_O_lo =G= omega_lo(j,s);
comp_omega_lo_right(j,s) .. (1−u_O_lo(j,s))*rho(j,s)*w_up(j) =G= w(j)+
w_delta(j,s);
comp_omega_up_left(j,s) .. u_O_up(j,s)*M_O_up =G= omega_up(j,s);
comp_omega_up_right(j,s) .. (1−u_O_up(j,s))*rho(j,s)*w_up(j) =G= rho(j,s)*
w_up(j)−w(j)−w_delta(j,s);
Optimality
*
partial_p(g) .. c_unit(g)−eta_lo(g)+eta_up(g)+SUM(s,−alpha_lo(g,s)+alpha_up
(g,s))−lambda_D =E= 0;
partial_w(j) .. −mu_lo(j)+mu_up(j)+SUM(s,−omega_lo(j,s)+omega_up(j,s))−
lambda_D =E= 0;
partial_h(s) .. pi(s)*V_LOL−delta_lo(s)+delta_up(s)−pi(s)*lambda_B(s) =E=
0;
partial_r_plus(g,s) .. pi(s)*c_plus(g)−alpha_lo(g,s)+alpha_up(g,s)−
beta_plus_lo(g,s)+beta_plus_up(g,s)−pi(s)*lambda_B(s) =E= 0;
partial_r_minus(g,s) .. −pi(s)*c_minus(g)+alpha_lo(g,s)−alpha_up(g,s)−
beta_minus_lo(g,s)+beta_minus_up(g,s)+pi(s)*lambda_B(s) =E= 0;
partial_w_delta(j,s) .. −omega_lo(j,s)+omega_up(j,s)−pi(s)*lambda_B(s) =E=
0;
MODEL mpec_pr_milp "MPEC using MILP formulation"
/ ALL /
;
74
Appendix D
GAMS: EPEC
1
ALIAS (g,k);
3
PARAMETER
true "termination condition"
p_old(g) "Auxiliary variable for production capacity in diagonalization"
p_new(g) "Auxiliary variable for production capacity in diagonalization"
r_old(g) "Auxiliary variable for reserve capacity in diagonalization"
r_new(g) "Auxiliary variable for reserve capacity in diagonalization"
price_D "Day−ahead market price"
price_B(s) "Balancing market price in scenario s"
scenario_c_profit(g, s) "Conventional generating unit i profit in scenario
s"
expected_c_profit(g) "Conventional generating unit i expected profit"
scenario_s_profit(j, s) "Stochastic generating unit j profit in scenario s
"
expected_s_profit(j) "Stochastic generating unit j expected profit"
;
4
5
6
7
8
9
10
11
12
13
14
15
17
18
19
20
21
* Initial values
r_old(g) = 0;
r_new(g) = r_up(g);
p_old(g) = p_lo(g);
p_new(g) = p_up(g);
75
APPENDIX D. GAMS: EPEC
31
32
33
34
35
36
37
38
39
40
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
64
65
66
67
68
69
* Master iterations
REPEAT(
* Termination condition
IF(SUM(g, ABS(r_old(g) − r_new(g)) + ABS(p_old(g) − p_new(g))) < 0.01,
true = 1;
ELSE
r_old(g) = r_new(g);
p_old(g) = p_new(g);
true = 0;
);
LOOP(k,
sg(k) = YES;
* Fix non−strategic generators
r_hat.FX(g)$(NOT sg(g)) = r_old(g);
p_hat.FX(g)$(NOT sg(g)) = p_old(g);
* Solve
SOLVE mpec_pr_milp USING MIP MINIMIZING z_milp;
SOLVE mpec_pr_nlp USING NLP MINIMIZING z_nlp;
Save
new solution
*
r_new(g)$(sg(g)) = r_hat.L(g);
p_new(g)$(sg(g)) = p_hat.L(g);
* UnFix
r_hat.LO(g)$(NOT sg(g)) = 0;
r_hat.UP(g)$(NOT sg(g)) = r_up(g);
p_hat.LO(g)$(NOT sg(g)) = p_lo(g);
p_hat.UP(g)$(NOT sg(g)) = p_up(g);
* Reset strategic generator
sg(k) = NO;
);
UNTIL true
);
price_D = lambda_D.L;
price_B(s) = lambda_B.L(s);
scenario_c_profit(g, s) = (price_D * p.L(g) + price_B(s) * (r_plus.L(g, s)
− r_minus.L(g, s))) − (c_unit(g) * p.L(g) + c_plus(g) * r_plus.L(g, s) −
c_minus(g) * r_minus.L(g, s));
expected_c_profit(g) = SUM(s, pi(s) * scenario_c_profit(g, s));
scenario_s_profit(j, s) = price_D * w.L(j) + price_B(s) * (rho(j, s) * w_up
(j) − w.L(j));
expected_s_profit(j) = SUM(s, pi(s) * scenario_s_profit(j, s));
76