applications of sddp in electricity markets with
TRANSCRIPT
![Page 1: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/1.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Applications of SDDP in electricity markets withhydroelectricity
Andy PhilpottElectric Power Optimization Centre
University of Auckland.www.epoc.org.nz
SESO Workshop, Paris, June 1, 2017.
![Page 2: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/2.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Motivation
SDDP developed in late 1980s by Mario Pereira andcolleagues.There are now many implementations of SDDP.We have been using it in EPOC for 20 years.Talk about how we use it.
![Page 3: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/3.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Summary
1 Introduction
2 Background
3 Stochastic Dual Dynamic Programming
4 Approximating New Zealand electricity system
5 How do we know software is bug free?
6 How do we know model approximations are correct?
7 Understanding variation in policies
8 ResultsSome backtesting resultsContract pricingRooftop solar valuation
![Page 4: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/4.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Summary
1 Introduction
2 Background
3 Stochastic Dual Dynamic Programming
4 Approximating New Zealand electricity system
5 How do we know software is bug free?
6 How do we know model approximations are correct?
7 Understanding variation in policies
8 ResultsSome backtesting resultsContract pricingRooftop solar valuation
![Page 5: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/5.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Hydrothermal scheduling
Find a water release policy over next T weeks that minimizes theexpected thermal fuel cost of meeting demand over this period.Unsatisfied demand is met by shedding load at a shortage cost. Apolicy is not a fixed plan - it is a decision rule that says at thebeginning of each week “given previous observations and actions,do the following”. This means that water release actions are notpredetermined but will depend on observations.
![Page 6: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/6.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Mathematical description
min E[∑Tt=1 c
>t vt + VT+1(xT+1)
]s.t. g(ut ) + vt = d(t),
xt+1 = xt − A(ut + st ) +Wt ,x1 = x̄ ,ut ∈ U , vt ∈ V , st ≥ 0, t = 1, . . . ,T .
![Page 7: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/7.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Expected marginal water value for a single reservoir
Water release policies for a single-reservoir can bespecified by an expected marginal water value measured in$/m3 This is defined for each possible reservoir level, andis the opportunity cost of releasing one unit of water.The optimal policy generates from all thermal plant thatare no more expensive (in $/MWh) than the expectedmarginal water value multiplied by a conversion factor(cubic metres per MWh).The water release policy solves a stage optimizationproblem: minimize the current cost of thermal generationplus the expected future cost of meeting demand. Theslope of this future cost function at level x is (minus) themarginal water value at this level.
![Page 8: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/8.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
SDDP and electricity markets
SDDP policies for national electricity systems seek aminimum-cost solution for a social planner.New Zealand has operated a deregulated electricitymarket since 1996.SDDP policies for the country are not used to value water.EPOC primarliy uses SDDP policies as a counterfactual toestimate how competitive the market was in past years.This is commonly called backtesting.
![Page 9: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/9.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Optimal solutions and competitive market outcomes(Philpott, Ferris and Wets, 2016)
Water release policies from system optimization give asocial planning solution.Social planning models correspond to perfectlycompetitive partial equilibrium when:
market participants act as risk-neutral price takers;markets are complete;market participants problems are convex;market participants agree on probability distributionsof random outcomes.
When market participants are risk averse then socialplanning models correspond to perfectly competitivepartial equilibrium when additionally:
risk measures are coherent and comparable;markets for risk are complete.
![Page 10: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/10.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Criticisms from backtesting
The SDDP solution is only an approximation of themarket, so counterfactual prices are wrong.How does one know that the SDDP software being usedhas no bugs?Can one be sure that SDDP gives an optimal operatingpolicy for a whole year?Can SDDP policies identify the cause of any difference inoutcomes (and offer a remedy)? Are counterfactual pricesdifferent because of lack of competition, or from attitudesto risk, or from something else?
![Page 11: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/11.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Summary
1 Introduction
2 Background
3 Stochastic Dual Dynamic Programming
4 Approximating New Zealand electricity system
5 How do we know software is bug free?
6 How do we know model approximations are correct?
7 Understanding variation in policies
8 ResultsSome backtesting resultsContract pricingRooftop solar valuation
![Page 12: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/12.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Stochastic Dual Dynamic Programming (SDDP)
Computes a water release policy when there are a number ofdifferent reservoirs with (possibly) different locations, differentinflow processes and different river systems. This can givedifferent results from aggregated reservoirs. Optimal release isno longer determined by a single marginal water value. Theoptimal releases u given storages x and next period’s inflowW , is computed by the recursive stage problem:
Vt (x) = E[min c>t v + Vt+1(x − A(u + s) +W )]s.t. g(u) + v = d(t),
u ∈ U , v ∈ V , s ≥ 0.
![Page 13: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/13.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Cuts
We need to define the function Vt+1. This is never known exactly but isapproximated by the pointwise maximum of linear functions of x that arecalled cuts. SDDP algorithms like DOASA update these cuts usingsampling procedures. For the New Zealand system about 5000-10000cuts are needed in each week to define Vt accurately enough. This cantake a lot of computation.
![Page 14: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/14.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Bounds
At each iteration of the algorithm SDDP gives a lowerbound on the expected cost of an optimal policy. Thisincreases as the algorithm proceeds.At each iteration of the algorithm SDDP gives acandidate policy (defined by the cuts). This can besimulated to estimate its expected cost and see how closeit is to the current lower bound.Solutions are judged to be optimal (enough) when aconfidence interval of their expected cost is close to thelower bound.
![Page 15: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/15.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Inflow Models
Inflow models preserve spatial dependence betweencatchments.Stagewise independent inflows sampled from historicalrecord (the default for EMI-DOASA).Inflows sampled independently from historical values withvariance increased to model correlation (DIA model inEMI-DOASA).PARMA models: simplest is AR1 model (PSR’s SDDPand CEPEL’s NEWAVE).PARMA models for logarithm of inflows (AR modelavoiding negative inflows).Markov Chain model of climate state and inflows(Philpott & de Matos, 2012).
![Page 16: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/16.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Summary
1 Introduction
2 Background
3 Stochastic Dual Dynamic Programming
4 Approximating New Zealand electricity system
5 How do we know software is bug free?
6 How do we know model approximations are correct?
7 Understanding variation in policies
8 ResultsSome backtesting resultsContract pricingRooftop solar valuation
![Page 17: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/17.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Approximating the New Zealand electricity system
NZ has a nodal market with 250 nodes.Wholesale market is dispatched every 30 minutes usingsoftware called SPD. This yields generation levels forevery generator and 250 prices every half hour.SPD inputs (offers of energy that are made by generators,network constraints and demand) are made public twoweeks after the day of dispatch.NZ electricity regulator has developed a GAMS/CPLEXmodel that replicates SPD output. It is called vSPD.So one can run counterfactual tests on market outcomesfrom two weeks ago.
![Page 18: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/18.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
The SPD network
Network diagram of New Zealand transmission grid.
![Page 19: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/19.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
What about hydro?
In a counterfactual, thermal agents offer energy at shortrun marginal cost (SRMC) which is cost from fuel,operations and maintenance and carbon.Run-of-river hydro agents, wind agents and geothermalagents offer energy at SRMC=0.Hydro agents with storage offer energy at SRMC=themarginal value of stored water. In the true market this isdifferent from what one gets from SDDP. In a competitivecounterfactual market SRMC can be set to the marginalvalue of water from SDDP
![Page 20: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/20.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
The network with hydro reservoirs shown
![Page 21: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/21.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
A three-node SDDP network with hydro
![Page 22: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/22.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Computing a counterfactual for a calendar year
Obtain historical reservoir levels for January 1, previousyears inflow data and system data for year.For month m = 1 to 12
Solve SDDP model starting at beginning of month m to givean optimal policyFor each day d in month m
Solve a vSPD model for 48 trading periods linked by waterconservation constraints and paying marginal value fromSDDP cuts for all stored water used over the day;Output quantities of interest for each period (prices, dispatch,reservoir levels);Record reservoir levels for the start of the next day;
Next dayRecord reservoir levels for the start of the next month;
Next month
![Page 23: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/23.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Summary
1 Introduction
2 Background
3 Stochastic Dual Dynamic Programming
4 Approximating New Zealand electricity system
5 How do we know software is bug free?
6 How do we know model approximations are correct?
7 Understanding variation in policies
8 ResultsSome backtesting resultsContract pricingRooftop solar valuation
![Page 24: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/24.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
DOASA
DOASA stands for
Dynamic Outer Approximation Sampling Algorithm.
DOASA is an implementation of SDDP in C++ developed byGeoff Pritchard and Andy Philpott.
EMI-DOASA is the version of DOASA available on the NZElectricity Authority EMI site for free use in New Zealand.There are CLP and Gurobi versions.
![Page 25: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/25.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
JADE(Based on joint work with Lea Kapelevich and Oscar Dowson)
JADE stands for
Just Another DOASA Environment
JADE is an implementation of DOASA developed by LeaKapelevich in the scripting language Julia. It uses the Juliapackages StochDualDynamicProgram developed by OscarDowson, JuMP developed by Iain Dunning and Miles Lubin atMIT, and any LP solver (CLP, Gurobi, CPLEX, XPRESS).
JADE was developed completely independently from DOASA,but adopts the same modelling assumptions and reads thesame input files. Because of its use of the JuMP modellinglanguage, JADE can be easily configured to verify DOASAcode changes and detect bugs.
![Page 26: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/26.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
JADE and DOASA lower bounds
JADE and DOASA follow the same trajectories in computing lowerbounds for the expected cost of the optimal policy.
![Page 27: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/27.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Simulated value of policies
Policies give essentially the same distributions when simulated withMonte Carlo inflows.
![Page 28: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/28.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Historical simulations
![Page 29: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/29.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Solution times
JADE using the Gurobi solver is faster than EMI-DOASA using CLP, buta bit slower than EMI-DOASA using Gurobi.
![Page 30: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/30.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Summary
1 Introduction
2 Background
3 Stochastic Dual Dynamic Programming
4 Approximating New Zealand electricity system
5 How do we know software is bug free?
6 How do we know model approximations are correct?
7 Understanding variation in policies
8 ResultsSome backtesting resultsContract pricingRooftop solar valuation
![Page 31: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/31.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Test JADE with three and six load blocks
3 blocks 6 blocks
Solve time increases with load blocks.
Year 3 blocks 6 blocks
Simulated expected cost of policies computed using 3 and 6 blocks in amodel using 6 blocks.
![Page 32: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/32.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Test JADE with different inflow models
JADE policy computed with 5000 cuts and simulated in historicalyears.
![Page 33: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/33.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Test JADE with cut selection(De Matos, Philpott and Finardi, 2015)
In each stage optimization, Level 1 dominance cut selection ignoresdominated cuts at visited states (but restores them at the end).
![Page 34: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/34.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Cut selection policy evaluation
Effect of cut selection on simulated policy value.
![Page 35: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/35.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Historical simulations with cut selection
Cut selection affects policy in dry year.
![Page 36: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/36.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
SDDP policies are random
Year Average Standard Dev.2000 286,225,815 82,3052001 475,933,285 88,0752002 342,189,502 100,0762003 387,975,202 5,158,7082004 256,211,965 348,4402005 487,581,431 529,4472006 349,597,459 64,1292007 449,998,785 8,4122008 501,068,672 42,335,4122009 345,045,595 19,058
Table: Sample average and standard deviation ($) from simulating 10SDDP optimal policies.
![Page 37: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/37.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Summary
1 Introduction
2 Background
3 Stochastic Dual Dynamic Programming
4 Approximating New Zealand electricity system
5 How do we know software is bug free?
6 How do we know model approximations are correct?
7 Understanding variation in policies
8 ResultsSome backtesting resultsContract pricingRooftop solar valuation
![Page 38: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/38.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Plans and policies
Multistage stochastic programming formalizes theplanning process, to give a mathematical description of aplan with contingencies, assuming a given scenario treefor uncertain parameters throughout.To enact the plan, we take the first-stage action thenrecompute a new first-stage action after time has passedand new information (i.e. new data) becomes available.This typically involves a new scenario tree that can bequite different.If viewed as a policy, the solution to a multistagestochastic program is really just a heuristic.
![Page 39: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/39.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Convergence of SDDP
Suppose we solve SDDP from an initial state x(0) to give aset of cuts for each stage. The upper bound and lower boundappear to have converged.
Now starting from x(0) simulate the policy many times withnew random seeds. One finds the policy performs worse thanexpected. Is this perhaps post-decision disappointment?
It’s not, as this still happens with a deterministic two-stageproblem.
![Page 40: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/40.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Two-stage example(Dowson, 2016)
0.5 1.0 1.5
2
0
2
x
obj
Plot of f (x) = x +max{−x , 3x − 2}
Minimizing the function f (x) over [0, 1] is equivalent to
P:min x + y2s.t. x − y1 = 0
y1 + y2 ≥ 0−3y1 + y2 ≥ −2x ∈ [0, 1]
This has optimal solution set [0, 12 ].
![Page 41: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/41.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Benders decomposition
Start at solution (0,−1) to
MP: min x + θs.t. x ≤ 1
θ ≥ −1x ≥ 0
At x = 0, we get
SP:min y2s.t. y1 = x [π]
y1 + y2 ≥ 0−3y1 + y2 ≥ −2
has solution y1 = y2 = 0, π = −1, and cut θ ≥ 0+−1(x − 0).
![Page 42: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/42.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Benders decomposition
MP: min x + θs.t. x ≤ 1
θ ≥ −1θ ≥ −xx ≥ 0
0.5 1.0 1.51
0
1
2
3
x
obj
True objective function is blue. Approximation of objective function (red)gives an optimal solution x = 0, θ = 0.
![Page 43: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/43.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Suppose we now simulate the policy
The policy is defined by
MP: min x + θs.t. x ≤ 1
θ ≥ −1θ ≥ −xx ≥ 0.
But MP also has solution (1,−1). At x = 1, we get
SP:min y2s.t. y1 = x [π]
y1 + y2 ≥ 0−3y1 + y2 ≥ −2
has solution y1 = 1, y2 = 1,and optimal value 1. So the cuts attermination do not define an optimal policy if stage problems havealternative solutions.
![Page 44: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/44.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
What is the missing cut?
We require enough cuts possibly at every optimal solution to astage problem.
0.5 1.0 1.5
2
1
0
1
2
3obj
If we add a cut θ ≥ 3x − 2 at x = 1 then the overall objective of MP isthe maximum of red and green functions = the true objective of the
problem (blue).
![Page 45: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/45.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
The takeaway message for SDDP
SDDP terminates when the lower bound and upper bound onoptimal value are suffi ciently close.
This means that the first stage decision is the first stagedecision of some policy that is close to optimal.
SDDP appears to give an optimal policy, but only only for thestates it visits. It is not an optimal policy until cuts arecomputed for every possible state we could be in.
It is essential in backtesting tore-solve SDDP model withupdated reservoir storages as simulation proceeds.
SDDP policies are random objects based on forward pathsamples and might give variable results when applied to agiven realization (e.g. a backtest).
![Page 46: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/46.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Summary
1 Introduction
2 Background
3 Stochastic Dual Dynamic Programming
4 Approximating New Zealand electricity system
5 How do we know software is bug free?
6 How do we know model approximations are correct?
7 Understanding variation in policies
8 ResultsSome backtesting resultsContract pricingRooftop solar valuation
![Page 47: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/47.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Backtesting 2008
![Page 48: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/48.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Backtesting 2008
![Page 49: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/49.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Wholesale prices in 2008
Daily average Auckland prices in 2008.
![Page 50: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/50.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Backtesting contract prices for 2012(Joint work with Hamish Mellor)
Historical weekly average prices at Benmore in 2008 compared withDOASA predictions at start of year (no rolling horizon).
![Page 51: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/51.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Marking up thermal offers
Each large thermal unit can be represented in DOASA as severalwith increasing heat rates.
![Page 52: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/52.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
2008 price comparison
Actual and counterfactual prices for 2008 with marked up fuelcosts, no rolling horizon.
![Page 53: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/53.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
2012 comparison
![Page 54: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/54.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Simulated time average prices in 2012
Benmore time average price simulations using DOASA policy for 2012.Highest time average price is $450/MWh, but expected price is
$50.86/MWh. CFDs traded 1/1/2012 at $88.15/MWh.
![Page 55: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/55.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
Rooftop solar evaluation(Joint work with Jerome Clavel, EPFL)
Run DOASA with different assumptions on level ofrooftop solar installations.Use NIWA irradiation figures and panel effi ciencies toreduce demand in trading periods and times of year.Estimate panel costs at (NZ)$500-600 per square metre(accounting for inverters).This amounts to $15/m2/year over 35-40 year life.
![Page 56: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/56.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
DOASA results
Assuming 2008 demand, 1 km2 of panels decreases expected cost by $6M. Current capital cost of panels and inverters = $15M/year
($15/m2/year assuming 35 years life).
![Page 57: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/57.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
The End
THE END
![Page 58: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/58.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
References
Pereira M.V.F. and Pinto L.M.V.G. Multi-stage stochasticoptimization applied to energy planning. Math Prog,52(1):359—375, 1991.
De Matos, V., Philpott, A.B. and Finardi, E.C., Improving theperformance of Stochastic Dual Dynamic Programming, Journal ofComputational and Applied Mathematics, 290, 196-208, 2015.
Philpott, A. B., Matos, V. L. D., and Finardi, E. C., On SolvingMultistage Stochastic Programs with Coherent Risk Measures.Operations Research, 61, 957-970, 2013.
Mellor, H., Electricity Contracts and Price Premia, Project report,Engineeering Science, 2016.
![Page 59: Applications of SDDP in electricity markets with](https://reader031.vdocuments.net/reader031/viewer/2022012409/616a508b11a7b741a351265b/html5/thumbnails/59.jpg)
Introduction Background Stochastic Dual Dynamic Programming Approximating New Zealand electricity system How do we know software is bug free? How do we know model approximations are correct? Understanding variation in policies Results
References
Kapelevich, L., DOASA in Julia, Project report, EngineeeringScience, 2016.
Clavel, J., Optimizing solar energy in New Zealand, Masters Thesis,EPFL, 2016.
Dowson, O., Dual degeneracy in Benders decomposition and itsimplication for Stochastic Dual Dynamic Programming, EPOCTechnical report, 2016.