31792 -- Advanced Optimization and Game Theory for
Energy Systems
Jalal Kazempour
January 4, 2021
26 June 2015
A few suggestions
• Please always mute your microphone, and only unmute while speaking.
• If you have a question during online lectures, you have two options:
Write your question in the chat box, or
Write in the chat box that you would like to ask a question, then I will invite you
to unmute and ask your question when the time is appropriate.
2 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
DTU Inside portal
Communications
(e.g., for video links)
Slides to be uploaded here
Projects reports to be uploaded here
3 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Three types of sessions
• Lectures
• Exercise sessions
During each lecture, we will have a few small exercises.
You will be kindly asked to individually work on exercises after the lecture.
We will discuss about the results of exercises in the first session of the next day.
You do not need to provide a report for exercises. However, you are highly encouraged to
be active during the exercise sessions, and nominate yourself to present your results
(with or without sharing your screen).
You can also ask your questions related to the content of the previous lecture.
• Q&A sessions
I will be online to answer any question that you may have about the course content or
your projects.
In the case you don’t have any question, you can skip these sessions.
4 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Lectures to be recorded!
Every single session will be recorded and the link will be shared right away with
course attendees only.
Lecture sessions will be publicly shared on YouTube late January. The exercise
and Q&A sessions will not be publicly shared.
5 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course schedule
Session 1 Session 2 Session 3
# Day Topic 15:00 – 15:45 16:00 – 16:45 17:00 – 17:45
Denmark time Denmark time Denmark time
Course
L1 January 4 Market clearing as an optimization problem Lecture (part 1) Lecture (part 2)
introduction
L2 January 5 Market clearing as an equilibrium problem Exercise session Lecture (part 1) Lecture (part 2)
L3 January 6 Desirable properties of market‐clearing mechanisms Exercise session Lecture (part 1) Lecture (part 2)
L4 January 7 Cooperative game theory in energy systems* Exercise session Lecture (part 1) Lecture (part 2)
‐ January 8 ‐ Exercise session Coffee Break! Q&A
L5 January 11 Stochastic market clearing Q&A Lecture (part 1) Lecture (part 2)
L6 January 12 Robust approaches for market clearing Exercise session Lecture (part 1) Lecture (part 2)
‐ January 13 ‐ Exercise session ‐ Q&A
L7 January 14 Bilevel programming in energy systems Q&A Lecture (part 1) Lecture (part 2)
L8 January 15 Optimization problems with decomposable structure Exercise session Lecture (part 1) Lecture (part 2)
‐ January 18 ‐ Exercise session ‐ Q&A
L9 January 19 Benders’ decomposition: Theory Q&A Lecture (part 1) Lecture (part 2)
L10 January 20 Benders’ decomposition: Applications Exercise session Lecture (part 1) Lecture (part 2)
L11 January 21 Augmented Lagrangian relaxation Exercise session Lecture (part 1) Lecture (part 2)
L12 January 22 ADMM and its variants Exercise session Lecture (part 1) Lecture (part 2)
‐ January 25 ‐ Q&A ‐ Q&A
6 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course schedule
Session 1 Session 2 Session 3
# Day Topic 15:00 – 15:45 16:00 – 16:45 17:00 – 17:45
Denmark time Denmark time Denmark time
Course
L1 January 4 Market clearing as an optimization problem Lecture (part 1) Lecture (part 2)
introduction
L2 January 5 Market clearing as an equilibrium problem Exercise session Lecture (part 1) Lecture (part 2)
L3 January 6 Desirable properties of market‐clearing mechanisms Exercise session Lecture (part 1) Lecture (part 2)
L4 January 7 Cooperative game theory in energy systems* Exercise session Lecture (part 1) Lecture (part 2)
‐ January 8 ‐ Exercise session Coffee Break! Q&A
L5 January 11 Stochastic market clearing Q&A Lecture (part 1) Lecture (part 2)
L6 January 12 Robust approaches for market clearing Exercise session Lecture (part 1) Lecture (part 2)
‐ January 13 ‐ Exercise session ‐ Q&A
L7 January 14 Bilevel programming in energy systems Q&A Lecture (part 1) Lecture (part 2)
L8 January 15 Optimization problems with decomposable structure Exercise session Lecture (part 1) Lecture (part 2)
‐ January 18 ‐ Exercise session ‐ Q&A
L9 January 19 Benders’ decomposition: Theory Q&A Lecture (part 1) Lecture (part 2)
L10 January 20 Benders’ decomposition: Applications Exercise session Lecture (part 1) Lecture (part 2)
L11 January 21 Augmented Lagrangian relaxation Exercise session Lecture (part 1) Lecture (part 2)
L12 January 22 ADMM and its variants Exercise session Lecture (part 1) Lecture (part 2)
‐ January 25 ‐ Q&A ‐ Q&A
* The (invited) teacher of lecture L4 is Dr. Liyang Han (DTU).
7 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Assessment
• Based on a project with 4 steps
o Individual project reports: each student four reports, one per step
o You can expect to receive feedback on your project reports
o Weighted equally (each report: 25% of the final grade)
o Report template and content: in the next slides
o Deadlines: in the next slides
Conversion of the final grade in percentage to the 7‐scale Danish grading system
(based on DTU instruction):
[92% ‐ 100%] ‐‐‐> Grade 12
[84% ‐ 92%) ‐‐‐> Grade 10
[68% ‐ 84%) ‐‐‐> Grade 7
[60% ‐ 68%) ‐‐‐> Grade 4
[50% ‐ 60%) ‐‐‐> Grade 2
[20% ‐ 50%) ‐‐‐> Grade 0 (fail)
[0% ‐ 20%) ‐‐‐> Grade ‐3 (fail)
8 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 0)
• Please pick a convex optimization problem applied to energy systems
9 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 0)
• Please pick a convex optimization problem applied to energy systems
It is straightforward to pick a linear optimization problem, but you can also pick a
more advanced convex but nonlinear optimization problem, like a conic problem
No binary variables (if you would like to add binaries, it is fine to relax them, making
continuous variables lying between 0 and 1)
10 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 0)
• Please pick a convex optimization problem applied to energy systems
It is straightforward to pick a linear optimization problem, but you can also pick a
more advanced convex but nonlinear optimization problem, like a conic problem
No binary variables (if you would like to add binaries, it is fine to relax them, making
continuous variables lying between 0 and 1)
A few potential examples:
• Optimal power flow (OPF) problem
• Security‐constrained OPF problem
• Electricity (or natural gas or heat) market‐clearing problem,
• Generation (or transmission) capacity expansion planning problem,
• Local energy market‐clearing problem,
• Flexibility market‐clearing problem
• Offering (bidding) strategy problem
11 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 0)
• Please pick a convex optimization problem applied to energy systems
It is straightforward to pick a linear optimization problem, but you can also pick a
more advanced convex but nonlinear optimization problem, like a conic problem
No binary variables (if you would like to add binaries, it is fine to relax them, making
continuous variables lying between 0 and 1)
A few potential examples:
• Optimal power flow (OPF) problem
• Security‐constrained OPF problem
• Electricity (or natural gas or heat) market‐clearing problem,
• Generation (or transmission) capacity expansion planning problem,
• Local energy market‐clearing problem,
• Flexibility market‐clearing problem
• Offering (bidding) strategy problem
If you have a specific problem in mind, you are welcome to contact me and suggest your idea.
12 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 0)
• Please pick a convex optimization problem applied to energy systems
It is straightforward to pick a linear optimization problem, but you can also pick a
more advanced convex but nonlinear optimization problem, like a conic problem
No binary variables (if you would like to add binaries, it is fine to relax them, making
continuous variables lying between 0 and 1)
• Please select a test case
Your test case is expected to be large‐scale enough: at least 1,000 variables
or at least 1,000 constraints, or both. To get an idea, the optimal hourly
dispatch problem of a single generator during a day yields 24 variables.
A few potential examples:
• IEEE test cases: https://labs.ece.uw.edu/pstca/
• The 24‐node IEEE RTS system: http://orbit.dtu.dk/files/ 120568114/An
13 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 1)
Step 1: Solving the problem picked in Step 0 in a deterministic manner (no
uncertainty)
• Solve the original (primal) problem in the programming language of your
preference (potential alternatives: GAMS, Python, Julia, MATLAB, etc)
• Derive the formulation of the dual optimization problem and solve it
• Derive the formulation of KKT conditions and solve it (either as a system of
equations, e.g., using solver PATH, or add an auxiliary objective function, e.g.,
minimize 1, and solve the resulting optimization problem as a nonlinear program)
• Report the number of variables, number of constraints, and the optimal value of
objective function (and the optimal value of other important variables such as, if
relevant, generation dispatch and market‐clearing prices) in each problem you
solved
Potential start‐date based on the course content: January 4, 2021
Deadline to hand in the report: January 12, 2021
14 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 2)
Step 2: Solving the problem under uncertainty (either option 1 or 2)
Option 1: Scenario‐based stochastic programming
‐ Generate >100 scenarios to model the uncertain parameter (e.g., wind power)
‐ Pick a part of scenarios (say 20% of scenarios, either arbitrarily or the most representative
ones) as training (in‐sample) scenarios and solve the stochastic problem
‐ Using the rest of scenarios as testing data, complete an out‐of‐sample analysis
‐ Compare the value of objective function obtained in both analyses above in terms of
expected value and standard deviation
‐ Analyze how the selection method and the number of in‐sample scenarios impact the out‐of‐
sample results
Option 2: Distributionally robust chance‐constrained programming
‐ Generate >100 scenarios as empirical data, and complete the same steps as those in option 1
Optional: Complete both options Potential start‐date: January 12, 2021
Deadline: January 22, 2021
15 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 3)
Step 3: Please consider one of following two options:
• Option 1: If relevant, solve your problem as a cooperative game. This is a relevant
option for any market‐clearing problem. The underlying problem could be either
deterministic (like the one in step 1) or stochastic (like the one in step 2).
• Option 2: If relevant, upgrade your problem to be a bilevel program, and solve it.
This is a relevant option for several problems such as offering strategy, capacity
expansion planning, etc. The underlying problem could be either deterministic
(like the one in step 1) or stochastic (like the one in step 2).
Optional: Complete both options
Potential start‐date if you select option 1: January 7, 2021
Potential start‐date if you select option 2: January 14, 2021
Deadline: January 25, 2021
16 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Course project (step 4)
Step 4: Decomposition
• Solve your stochastic problem in Step 2 in a decomposed manner (using the
decomposition method of your preference, either Benders, or Lagrangian
relaxation, or ADMM)
Optional: Implement two decomposition methods, separately.
Potential start‐date if you select Benders decomposition: January 20, 2021
Potential start‐date if you select Lagrangian relaxation or ADMM: January 22, 2021
Deadline: February 5, 2021
17 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Report template and content
• Single column, double space
• Length: as short and efficient as possible, maximum 5 pages (each report)
• A short introduction can be included.
• Formulation should be included in a complete way. If relevant, you can use a
compact representation of your formulation. The notation needs to be defined
precisely.
• It is recommended to provide the most important results in the form of figures or
tables (like writing a scientific paper). Please avoid including less important and
trivial results.
• You are more than welcome to discuss and elaborate on the results obtained and
to include computational analysis (e.g., CPU time) and policy implications (if
relevant).
• The report is a zip file including the pdf file of your project report and all
programming codes.
18 DTU Electrical Engineering, Technical University of Denmark 26 June 2015
Jalal Kazempour
Thanks for your attention!
Email: [email protected]
19 DTU Electrical Engineering, Technical University of Denmark 26 June 2015