a project by
Manuel Wetzel, Frieder Borggrefe Prague, 21.09.2016
DLR
Benefits of Decomposition Methods to Speed-up Energy
System Modelling and Application to Stochastic Optimization
Contact:
2
1. Introduction
• The problem of uncertainty in Energy System Modelling
2. Current implementation of stochastic optimization
• From deterministic to stochastic modelling
• Improving convergence by Enhanced Benders approaches
3. Challenges and possible improvements
• Current challenges
• Application to path optimization
Content
M. Wetzel and F. Borggrefe (DLR) Application of Stochastic Optimization in ESM 21.09.2016
Abstract:
The transition of the energy system towards a sustainable supply with low carbon emissions requires the long term planning of power generation capacity expansion. Energy scenarios can give insight into the development of omplex electricity systems in the coming decades. Each scenario includes a large number of external factors which influence the pathway of energy system development. However, due to the long term nature of the energy transition, these external parameters (e.g. fuel prices, technology development,
weather influences etc.) contain large uncertainties. To a
certain degree, cross-impact-balance analysis can evaluate the consistency and improve the holistic image of future energy scenarios, but a large degree of uncertainty remains. So far, this problem was usually tackled by deterministic optimization with subsequent sensitivity analysis. Recent development
towards parallel computing allow for stochastic optimization over a large set of scenarios. When considering flexibility options like electrical energy storage, demand side
management and electric mobility, high temporal resolutions of the modelled energy system are required. Consequently, the implementation of stochastic optimization into high resolution optimizing energy system models will lead to an increased complexity, due to the additional scenario
dimension. This problem can be tackled using decomposition approaches like enhanced Benders decomposition in order to guarantee achieving the global optimum while taking
computational restrictions into account. Challenges arise especially regarding CPU load balancing for the aspired
migration to high performance computing. The presentation will discuss preliminary results from an extension of the
energy system model REMix, developed at the German
Aerospace Center (8760 h per year, developed in GAMS and solved as a LP or MIP using CPLEX). By implementing different decomposition techniques and improving convergence,
computational constraints can be overcome and the number of evaluated scenarios can be increased. Aim of this analysis is to increase the complexity of the stochastic models and
The problem of uncertainty in
Energy System Modelling
The problem of uncertainty in energy system modelling
• Long term capacity expansion planning requires making decisions now, which have an impact on the energy system for several decades.
• Context scenarios can give a general direction of development, however a large number of consistent sub-scenarios are possible. The current
approach usually considers only the main scenario and evaluates robustness by sensitivity analysis of sub scenarios.
Robust scenario High
Robust scenario Base
Robust scenario Low
Sensitivity analysis Sensitivity analysis Sensitivity analysis Sensitivity analysis Sensitivity analysis Sensitivity analysis 0 1000 2000 3000 4000 5000 6000 1 2 3 4 5 HighUp HighLo MidUp MidLo LowUp LowLo 2014 2020 2030 2040 2050 High Base Low
Model result Low
Model result Base
Model result High
5 Benders decomposition separating capacity expansion
planning and economic dispatch
Benders decomposition for two-stage stochastic optimization (L-shaped Method)
[Benders 1962 and Van Slyke 1969] Master problem:
• Decide now which capacities should be expanded
Sub problem:
• Decide later on economic dispatch to satisfy electrical demand with capacities given by master problem 1st Stage: Capacity expansion – Installed capacities 2nd Stage: Dispatch – Generation variables Linking variables:
Installed capacities, connecting the capacity expansion problem and the dispatch problem
Mathematical formulation in LP table
Benders decomposition separating capacity expansion planning and economic dispatch
1. Two-stage decision tree
Stage 1 (Master problem) Investment decision Stage 2 (Sub problem) Stochastic economic dispatch scenarios
2. Multi-stage decision tree
Stage 2 Dispatch & Investment decision 2020 2016 2050 … 2025 2020 Stage 1 Investment decision 2016 Dispatch Investment 2045 Stage 3 Dispatch & Investment decision 2025
Current implementation of stochastic
programming
REMix
SIMPLE
The REMix Model
• Capacity expansion planning and economic dispatch
• High spatial, temporal and technological resolution
• Modular approach to include heat sector, electromobility, DSM and others
• Simplified version of REMix, used as a development platform
• Scalability of model dimensions by generic data generation
Modified for demonstrating implementation approaches for stochastic optimization
9 Implementation of Enhanced Benders decomposition
approaches
GAMS Simple Model:
• Capacity expansion planning and economic dispatch
1. Implementation of a Benders decomposition approach Seperating capacity expansion
and economic dispatch Master problem: Investment decision Sub problem: Economic dispatch
Suggested solution
Capacities for installed plant capacities, electric storages and links for each region
Optimality Cut
Information about the marginals of the first stage decision variables
M. Wetzel and F. Borggrefe (DLR) Application of Stochastic Optimization in ESM 21.09.2016
Deterministic version of The GAMS SIMPLE model
• Each subproblem is weighted by a probability and represents a specific set of assumptions for uncertain parameters
Implementation of Enhanced Benders decomposition approaches
1. Adaptation of the Regions: • Seperate regions and type 1. Implementation of a Benders decomposition approach Seperate regions and type
2. Stochastic model with scenarios
• Each scenario has a probability
• Stochastic model is still single threat
Master problem:
Investment decision
Sub problem:
Economic dispatch scenarios
Set of uncertain parameters
• Electrical demand • Fuel prices
• Wind time series • Solar time series • E-mobility usage
11 Implementation of Enhanced Benders decomposition
approaches
• Small ESM with 3 power plants, 3 storages, 2 node links and 8760h
• Formulation as Deterministic Equivalent for small problems faster than Benders decomposition, but leads to memory restrictions in large models 1. Adaptation of the Regions:
• Seperate regions and type 2. Stochastic model with scenarios
4. Grid computing
• Scenarios and parts of the modell can be placed in several threats
5. Deterministic Model • One modell for master and
subproblem 3. Simple Computing
• Scenarios are processed one after another Testing with Model nodes: 3 Scenarios: 100 = 40 GB RAM Testing with Model nodes: 3 Scenarios: 100 = 3-4 GB RAM Testing with Model nodes: 3 Scenarios: 100 << 3-4 GB RAM
Benders Decomposition
Master Subproblem
• Subproblems can be solved in parallel • Memory demand scales with number
of parallel solve processes
Implementation of Enhanced Benders decomposition approaches
Deterministic Equivalent
• Size of LP increases with number of scenarios, solved by SIMPLEX / Barrier • Out of memory for typical REMix
13
Improvement by optimality cut type
Singlecut
• One optimality cut per iteration is submitted to master problem
Multicut
• Each subscenario submits an optimality cut each iteration
Clustercut
• Each cluster submits an optimality cut each iteration
Subproblem: Dispatch Master: Investment Weighted by scenario probability Weighted by scenario probability
• Multicuts give detailed information but increase complexity [Birge 1988] • Singlecuts aggregate information therefore more iterations are necessary • Dynamic switching between cut-types is possible [Skar 2014]
Improvement to achieve asychronity
t
Synchronous Model Asynchronous Model
t Iteration 1 Iteration 2 Iteration 3 Iteration 4 Iteration 1 Iteration 2
• New Master can be started as soon as a fraction of scenarios are solved, new iteration has only partial information therefore the number of
iterations increases [Linderoth 2003]
15
Algorithm parameters
Number of clusters Number of scenarios Number of concurrent masters Number of nodes Number of time steps Deleting optimality cuts? Cluster submission by GUSS Multiple cuts per scenario? Number of technologies Type of optimality cuts Fraction of solved scenarios• Large number of parameters to optimize performance of Enhanced Benders Algorithm making systematic testing necessary
SIMPLE Model Optimality Cuts GUSS usage Asynchronity Solvelink and Solver Solver options
Method Clustercut Multicut Multicut + TR MC + TR + GUSS
Iterations 138 77 54 61
Time to solve 5:54 h 4:42 h 3:14 h 2:51 h
CPU load max 300 % 449 % 466 % 134 %
CPU load avg. 66.9 % 70.8 % 56.2 % 18.6 %
RAM usage max 0.58 GB 0.58 GB 0.48 GB 0.67 GB
RAM usage avg. 0.11 GB 0.16 GB 0.11 GB 0.26 GB
Computational test results
• Model building time limiting constraint, models are solved faster than
generated therefore low average CPU load ( 100 % equals 1 core out of 32) • Exchange of information between GAMS and solver can be accelerated by
using shared memory and running GAMS and CPLEX in different threads, this comes at the cost of increased memory demand
• Reducing computational overhead by using methods which simplify or reduce model building time (Usage of GUSS, externalizing model building) • Balancing CPU load for migration to high performance computing
• Generating better cuts - insufficient electrical generation will cause all plant types in a region to be built
• Deleting unused cuts in order to keep the masterproblem as small as possible while retaining important information
• Improving the starting point for the Trust-Region approach
• Combining stochastic optimization with decomposition on the scenario level (decoposition in model nodes or timesteps) in a Nested Benders approach
19
Challenges
0 5 10 15 20 25 30 35 40 0 500 1000 1500 2000 2500 3000 3500 4000 4500 16 :0 9: 46 16 :3 3: 57 16 :5 8: 01 17 :2 2: 00 17 :4 6: 11 18 :1 0: 00 18 :3 4: 13 18 :5 8: 02 19 :2 2: 17 19 :4 6: 09 20 :1 0: 17 20 :3 4: 20 20 :5 8: 16 21 :2 2: 28 21 :4 6: 15 22 :1 0: 30 22 :3 4: 18 22 :5 8: 29 23 :2 2: 34 23 :4 6: 26 00 :1 0: 40 00 :3 4: 27 00 :5 8: 42 01 :2 2: 39 01 :4 6: 40 02 :1 0: 47 02 :3 4: 37 02 :5 8: 52 03 :2 2: 39 03 :4 6: 53 04 :1 0: 49 04 :3 4: 49 04 :5 8: 59 05 :2 2: 45 05 :4 6: 59 06 :1 0: 50 06 :3 4: 59 06 :5 9: 01 07 :2 2: 56 07 :4 7: 13 08 :1 0: 58 08 :3 5: 12 08 :5 9: 14 30.08.2016 31.08.2016Summe von %CPU Summe von %MEM
%CPU %MEM
M. Wetzel and F. Borggrefe (DLR) Application of Stochastic Optimization in ESM 21.09.2016
• Large scale scenario with typical synchronous behavior
• Gaps indicate solving master while peaks represent parallel subproblems • High correlation between CPU and memory load indicating scalability with
Application to path optimization
0 1000 2000 3000 4000 5000 6000 1 2 3 4 5 HighUp HighLo MidUp MidLo LowUp LowLo 2014 2020 2030 2040 2050 High Base Low Motivating example from introduction Result: 3 Context scenario pathways including 3 subscenarios each21
Application to path optimization
2016 2020 2030 2040 2050 2020 2030 2040 2050
• Application of Benders decomposition in capacity expansion planning and economic dispatch leads to a large number of subproblems which can be solved in parallel
Masterproblem Subproblems
Project BEAM-ME
a project by
23
• J. Benders, "Partitioning procedures for solving mixed variables programming problems,"
Numerische Mathematik, vol. 4, pp. 238–252, 1962.
• R. M. Van Slyke and R. Wets, "L-shaped linear programs with applications to optimal control and stochastic programming," SIAM Journal on Applied Mathematics, vol. 17, no. 4, pp. 638– 663, 1969.
• J. R. Birge and F. V. Louveaux, "A multicut algorithm for two-stage stochastic linear programs,"
European Journal of Operational Research, vol. 34, no. 3, pp. 384–392, 1988.
• C. Skar, G. Doorman and A. Tomasgard, "Large-scale power system planning using enhanced Benders decomposition," Power Systems Computation Conference (PSCC), pp. 1-7, 2014,, doi: 10.1109/PSCC.2014.7038297
• J. T. Linderoth and S. J. Wrigth, "Implementing a decomposition algorithm for stochastic
programming on a computational grid," Computational Optimization and Applications, vol. 24, pp. 207–250, 2003.