Post on 19-Oct-2020
a project by
ManuelWetzel,FriederBorggrefe21.09.2016
DLR
BenefitsofDecompositionMethodstoSpeed-upEnergySystemModellingandApplicationtoStochasticOptimization
2
1. Introduction• TheproblemofuncertaintyinEnergySystemModelling
2. Currentimplementationofstochasticoptimization• Fromdeterministictostochasticmodelling• ImprovingconvergencebyEnhancedBendersapproaches
3. Challengesandpossibleimprovements• Currentchallenges• Application topathoptimization
Content
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
TheproblemofuncertaintyinEnergySystemModelling
4
Theproblemofuncertaintyinenergysystemmodelling
• Longterm capacity expansion planning requires making decisions now,which have animpact onthe energy system for several decades.
• Context scenarios can give ageneral direction of development,however alargenumber of consistent sub-scenariosare possible.Thecurrentapproach usually considers only the main scenario and evaluatesrobustness 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
Pathdevelopment of anuncertain parameter
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
5
Bendersdecompositionseparatingcapacityexpansionplanning andeconomicdispatch
Bendersdecompositionfortwo-stagestochasticoptimization(L-shapedMethod)[Benders1962andVanSlyke 1969]
Masterproblem:• Decidenowwhichcapacities
shouldbeexpanded
Subproblem:• Decidelateroneconomic
dispatchtosatisfyelectricaldemandwithcapacitiesgivenbymasterproblem
1stStage:Capacity expansion –Installed capacities
2ndStage:Dispatch –Generationvariables
Linkingvariables:Installed capacities,connecting the capacityexpansion problem and the dispatch problem
Mathematicalformulation inLPtable
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
6
Bendersdecompositionseparatingcapacityexpansionplanning andeconomicdispatch
1.Two-stagedecisiontree
Stage1(Masterproblem)Investmentdecision
Stage2(Subproblem)Stochasticeconomicdispatchscenarios
2.Multi-stagedecisiontree
Stage2Dispatch&Investmentdecision2020
2016 2050
…
20252020
Stage1Investmentdecision2016
Dispatch
Investment 2045
Stage3Dispatch&Investmentdecision2025
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
Current implementation of stochasticprogramming
8
REMix SIMPLE
TheREMix Model
• Capacity expansion planning andeconomic dispatch
• High spatial,temporalandtechnological resolution
• Modularapproach to include heatsector,electromobility,DSMandothers
• Simplified version of REMix,usedas adevelopment platform
• Scalability of model dimensionsby generic data generation
Ø Modified for demonstratingimplementation approaches forstochastic optimization
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
9
Implementationof EnhancedBendersdecompositionapproaches
GAMSSimpleModel:• Capacity expansionplanning
and economic dispatch
1.Implementationof aBendersdecomposition approachSeperating capacity expansionand economic dispatch
Masterproblem:Investmentdecision
Subproblem:Economicdispatch
Suggested solutionCapacities for installed plantcapacities,electric storages and linksfor each region
Optimality CutInformation about the marginals of the firststage decision variables
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
DeterministicversionofTheGAMSSIMPLEmodel
10
• Each subproblem is weighted by aprobability and represents aspecific setof assumptions for uncertain parameters
Implementationof EnhancedBendersdecompositionapproaches
1.Adaptationof the Regions:• Seperate regions and type1.Implementationof aBendersdecomposition approachSeperate regions and type
2.Stochasticmodel withscenarios• Each scenario has a
probability• Stochasticmodel is stillsingle
threat
Masterproblem:Investmentdecision
Subproblem:Economicdispatchscenarios
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
Setof uncertain parameters• Electrical demand• Fuelprices• Wind timeseries• Solartimeseries• E-mobility usage
11
Types of optimality cuts
Singlecut• One optimality cut periteration
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
Weightedbyscenario probability
Weightedbyscenario probability
• Multicutsgive detailed information butincrease complexity [Birge 1988]• Singlecutsaggregate information thereforemore iterations are necessary• Dynamicswitching between cut-types is possible [Skar 2014]
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
12
Implementationof EnhancedBendersdecompositionapproaches
• SmallESMwith 3powerplants,3storages,2node linksand 8760h• Formulation as Deterministic Equivalent for small problems faster than
Bendersdecomposition,butleads tomemory restrictions inlargemodels
1.Adaptationof the Regions:• Seperate regions and type
2.Stochasticmodel withscenarios
4.Grid computing• Scenariosand parts of the
modell can be placed inseveral threats
5.DeterministicModel• One modell formaster and
subproblem
3.SimpleComputing• Scenariosare processedone
afteranother
Testing withModelnodes:3Scenarios:100=40GBRAM
Testing withModelnodes:3Scenarios:100=3-4GBRAM
Testing withModelnodes:3Scenarios:100<<3-4GBRAM
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
13
BendersDecompositionMaster Subproblem
• Subproblems canbesolvedinparallel• Memorydemandscales withnumber
ofparallelsolveprocesses
Implementationof EnhancedBendersdecompositionapproaches
DeterministicEquivalent
• SizeofLPincreaseswithnumberofscenarios,solvedbySIMPLEX/Barrier
• OutofmemoryfortypicalREMixproblemswithscenariodimension
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
14
Improvement to achieve asychronity
t
Synchronous Model Asynchronous Model
tIteration1 Iteration2 Iteration3 Iteration4Iteration1 Iteration2
• NewMastercan be startedas soon as afraction of scenarios are solved,new iteration has only partial information therefore the number ofiterations increases [Linderoth2003]
• Trade-off betweenmore iterations and parallelisation
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
15
Algorithm parameters
Number ofclusters
Number ofscenarios
Number ofconcurrentmasters
Number ofnodes
Number oftimesteps
Deletingoptimalitycuts?
Clustersubmissionby GUSS
Multiplecuts perscenario?
Number oftechnologies
Typeofoptimality
cuts
Fractionofsolved
scenarios
• Largenumber of parameters to optimize performance of EnhancedBendersAlgorithm making systematic testingnecessary
SIMPLEModel
Optimality Cuts
GUSSusage
Asynchronity
Solvelinkand Solver
Solveroptions
16
Method Clustercut Multicut Multicut +TR MC+ TR+GUSS
Iterations 138 77 54 61
Timeto solve 5:54h 4:42h 3:14h 2:51h
CPUload max 300% 449% 466% 134%
CPUload avg. 66.9% 70.8% 56.2% 18.6%
RAMusage max 0.58GB 0.58GB 0.48GB 0.67GB
RAMusage avg. 0.11GB 0.16 GB 0.11GB 0.26GB
Computational test results
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
• Modelbuilding timelimiting constraint,models are solved faster thangenerated therefore low average CPUload (100%equals 1core outof 32)
• Exchangeof information between GAMSand solver can be accelerated byusing shared memory and running GAMSand CPLEXindifferentthreads,this comes atthe cost of increased memory demand
Challenges and possible improvements
18
• Reducing computational overhead by using methods which simplify orreduce model building time(Usage of GUSS,externalizing model building)
• Balancing CPUload for migration to highperformance computing
• Generatingbetter cuts - insufficient electrical generation willcause allplanttypes inaregion to be built
• Deleting unused cuts inorder to keep the masterproblem as small aspossible while retaining important information
• Improving the starting point for the Trust-Regionapproach
• Combining stochastic optimization with decomposition onthe scenariolevel (decoposition inmodel nodes or timesteps)inaNested Bendersapproach
Challenges
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
19
Challenges
0
5
10
15
20
25
30
35
40
0
500
1000
1500
2000
2500
3000
3500
4000
4500
16:09:46
16:34:28
16:59:01
17:23:33
17:48:14
18:12:35
18:37:17
19:01:38
19:26:24
19:50:43
20:15:27
20:39:52
21:04:28
21:29:02
21:53:28
22:18:10
22:42:29
23:07:16
23:31:37
23:56:15
00:20:48
00:45:16
01:10:02
01:34:19
01:59:02
02:23:22
02:48:03
03:12:32
03:37:05
04:01:46
04:26:03
04:50:48
05:15:06
05:39:46
06:04:19
06:28:46
06:53:28
07:17:47
07:42:35
08:06:54
08:31:34
08:56:13
30.08.2016 31.08.2016
Summevon%CPU
Summevon%MEM
%CPU
%MEM
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
• Largescale scenario with typical synchronous behavior• Gapsindicate solving master while peaks represent parallelsubproblems• Highcorrelation between CPUand memory load indicating scalability with
number of parallelprocesses
20
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 examplefrom introduction
Result:3Context scenariopathways including3subscenarios each
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
21
Application to path optimization
2016 205020302020 2040 205020302020 2040
• Application of Bendersdecomposition incapacity expansion planning andeconomic dispatch leads to alargenumber of subproblems which can besolved inparallel
Masterproblem Subproblems
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
ProjectBEAM-ME
a project by
22
23
• J.Benders,"Partitioningproceduresforsolvingmixedvariablesprogramming problems,"NumerischeMathematik,vol.4,pp.238–252,1962.
• R.M.VanSlyke andR.Wets,"L-shapedlinearprogramswithapplicationstooptimalcontrolandstochasticprogramming," SIAMJournalonAppliedMathematics,vol.17,no.4,pp.638–663,1969.
• J.R.Birge andF.V.Louveaux,"Amulticut algorithmfortwo-stagestochasticlinearprograms,"EuropeanJournalofOperationalResearch,vol.34,no.3,pp.384–392,1988.
• C.Skar,G.Doorman and A.Tomasgard,"Large-scale powersystem planning using enhancedBendersdecomposition,"PowerSystemsComputation Conference(PSCC),pp.1-7,2014,,doi:10.1109/PSCC.2014.7038297
• J.T.Linderoth andS.J.Wrigth,"Implementingadecompositionalgorithmforstochasticprogrammingonacomputationalgrid," ComputationalOptimizationandApplications,vol.24,pp.207–250,2003.
References
Backup
25
GAMSGUSS
7.GUSSimplementation
1.Adaptationof the Regions:• Seperate regions and type
2.Stochasticmodel withscenarios
4.Grid computing• Scenariosand parts of the
modell can be placed inseveral threats
GUSS
• Gathersdatafromdifferentsources/symbolsincollectionofmodels
• Updatesabasemodelinstancewiththisscenariodata
• Solvestheupdatedmodelinstanceand
• Scattersthescenario resultsto
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
26
GUSS
• Gathersdatafromdifferentsources/symbolsincollectionofmodels
• Updatesabasemodelinstancewiththisscenariodata
• Solvestheupdatedmodelinstanceand
• Scattersthescenario resultsto
UsingGUSS
• GUSSisaGAMSfacilitythatpermitssolutionofasetofscenariosforaGAMSmodelmodifyingdatatoruneachscenario.
• GUSSisnotreallyasolver• organizesandpassesdata to
theothergamssolvers• Collectionofmodelsaresolved
inasinglepasswithoutneedingLOOPovermultiplesolves.
• fasterthanloopbecauseonlyonemodelisbuild
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
27
Challenges
• Increasenumberofcutshanded fromonescenarioinoneiteration
• Furtherimplementationsnecessarytoevaluateexpectedperformanceofstochasticoptimization inREMix andaccelerateconvergenceo Deletionofunnecessaryoptimalitycuts,o Differentparametrisationsofalgorithm,o Dynamicadaptationoftrustregion,o Improvementofstartingpoint
• FurtherdevelopmenttowardsCPUloadbalancing necessaryformigration tohighperformancecomputing
• UsingREMix:ModularityofREMix environmentcomplicatestheimplementationofBendersdecompositionInformationaboutallactivevariables,equationsandmarginals necessary
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
Summary
• ModelledinGAMSandsolvedinCPLEXtypicallywithBarrierAlgorithm• Formulationasdeterministicequivalentimpossibleduetomemory
restrictions
• Staringpointbyregional presolve withmeanoverstochasticparameters• UtilisationoftheGAMSGridComputingenvironmentincombinationwith
GUSSinordertosubmitclustersofsubscenarios tobesolvedsimultanously• Optimalitycutsareaddedtothemasterproblemeitherassinglecuts,
clustercuts orfullmulticut• Currentlynocut-deletionprocedureimplemented
29M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
• ModelledinGAMSandsolvedinCPLEXtypicallywithBarrierAlgorithm• Formulationasdeterministicequivalentimpossibleduetomemory
restrictions
• Staringpointbyregional presolve withmeanoverstochasticparameters• UtilisationoftheGAMSGridComputingenvironmentincombinationwith
GUSSinordertosubmitclustersofsubscenarios tobesolvedsimultanously• Optimalitycutsareaddedtothemasterproblemeitherassinglecuts,
clustercutsorfullmulticut• Currentlynocut-deletionprocedureimplemented
30
• WelchenEinflusshatdieWahleinesDekomponierungsverfahrens aufdieWahldesSolvers?MachtesdabeieinenUnterschiedobnachz.B.Zeit,KnotenoderErzeugungundZubaudekomponiertwird?
• SindSlackvariablen wieBalanceEnsure undLoadEnsure fürDekomponierungsverfahren immernoch sinnvoll?OderkannalternativfrüherabgebrochenundeineneueIterationgestartetwerden(branch andcut,analog zuMIP)?
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
31
• BenötigteZeitfürdenBaudesGAMSModells– mussreduziertwerden,– bei100SzenarienundmehrerenSekundenModellbauzeitgehteinGroßteilderZeitin
denOverhead.– GUSSscheintinderHinsichtgutanwendbardaModellnureinmalgebautwerdenmuss.– FürIterativeVerfahrenwäreoptimalwennsicheinvorhergebautesGUSSModellmit
neuenParameternupdatenließe(spartModellbauzeitinspäterenIterationen
• CPUsmüssensich(nahezu)vollständigauslastenlassen,– d.h.wennTeiledesClustersfertigsinddürfendiesenichtaufneueAufgabenwarten
müssen.– ->AsynchronesVerfahrennötig!!!– Problem:EssolltentrotzdemkeineneuenModellegebautwerden.
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
32
• HöhereGranularitätmusserreichtwerden.Wenn80kCoresgleichzeitiganeinemProblemrechnensollen,dieAnzahlsinnvollerSzenarienjedocheherimBereichvon30-100liegt(ohneZufallsvariablen/vollständigeKombinatorik)müssendieSubproblemeweiterunterteiltwerden(z.B.nachKnoten/Zeitschritten).
⇒ ZusammenspielderKopplung von1.)Dekomponierung einesstochastischenProblems und2.)Dekomponierung innerhalb einesSubproblems
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
33
• HoherAnpassungsgradderstochastischenElemente:verschiedeneProjektewerdenunterschiedlichestochastischeParameterverwenden,wiekanndasGanzebenutzerfreundlichimplementiertwerden?
• HoheModularitätvonREMix erfordertautomatischesAnpassenderBendersDekomposition (WelcheVariablenwerdenwannentschieden,welcheGleichungensindaktiv,welcheMarginals müssenfürdieOptimalitätscutszurückgeführtwerden)
• Modellsollweiterhindeterminitisch verwendetwerdenkönnenohneinallenFälleneinestochastischeDimensionberücksichtigenzumüssen(Optionalität führtzuKomplexitätdesGAMSCodes)
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
34
References
M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
0
1000000
2000000
3000000
4000000
5000000
6000000
7000000
8000000
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101105109113117121125129133137
Series1
Series2
Series3
Series4
Series5
Series6
Series7
Series8
35M.Wetzeland F.Borggrefe(DLR) Application of Stochastic Optimization inESM 21.09.2016
2500000
2550000
2600000
2650000
2700000
2750000
2800000
2850000
2900000
2950000
3000000
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101105109113117121125129133137
Series5
Series6
Series7
Series8