Speeding up Energy System Models - a Best Practice Guide
Total Page:16
File Type:pdf, Size:1020Kb
Speeding up Energy System Models - a Best Practice Guide Yvonne Scholz1, Benjamin Fuchs1, Frieder Borggrefe1, Karl-Kien Cao1, Manuel Wetzel1, Kai von Krbek1, Felix Cebulla1, Hans Christian Gils1, Frederik Fiand2, Michael Bussieck2, Thorsten Koch3, Daniel Rehfeldt4, Ambros Gleixner4, Dmitry Khabi5, Thomas Breuer6, Daniel Rohe6, Hannes Hobbie7, David Sch¨onheit7, Hasan Umitcan¨ Yilmaz8, Evangelos Panos9, Samir Jeddi10, and Stefanie Buchholz11 1German Aerospace Center 2GAMS Software GmbH 3Technische Universit¨atBerlin 4Zuse Institute Berlin 5High Performance Computing Center Stuttgart 6Juelich Research Centre 7Technische Universit¨atDresden 8Karlsruhe Institute of Technology 9Paul Scherrer Institute 10University of Cologne 11Technical University of Denmark June 30, 2020 2 Contents 1 Introduction 13 1.1 Energy system optimization models: characteristics and dimensions............... 14 1.1.1 Specific characteristics of different energy system model types.............. 15 1.1.2 The Optimization Environment GAMS.......................... 17 1.2 Solution algorithms.......................................... 17 1.3 High performance computing.................................... 18 1.3.1 High performance computing in Germany......................... 19 1.4 The model experiment in BEAM-ME................................ 20 1.4.1 Participating models and partner institutions....................... 20 1.4.2 Aim of the model experiment................................ 20 1.4.3 Structure of the model experiment............................. 20 I Modeling Based Performance Enhancement 25 2 Overview of modeling based performance enhancement methods 27 2.1 Model reduction........................................... 27 2.1.1 Slicing............................................. 28 2.1.2 Spatial Aggregation..................................... 28 2.1.3 Temporal Aggregation.................................... 29 2.1.4 Technological Aggregation.................................. 29 2.2 Heuristics: Nested Approaches................................... 30 2.2.1 Rolling Horizon........................................ 31 2.2.2 Temporal Zooming...................................... 31 2.3 Mathematically exact decomposition techniques.......................... 32 2.3.1 Dantzig-Wolfe Decomposition................................ 32 2.3.2 Lagrange Relaxation..................................... 32 2.3.3 Benders Decomposition................................... 32 2.3.4 Further Aspects....................................... 36 3 Performance analyses of modeling based strategies in REMix 37 3.1 Materials and methods........................................ 38 3.1.1 Overview........................................... 38 3.1.2 Modeling setup........................................ 39 3.1.2.1 Essential model constraints............................ 40 3.1.2.2 Solver parametrization and hardware environment............... 41 3.1.2.3 Original REMix instances and their size..................... 42 3.1.3 Implementations....................................... 43 3.1.3.1 Approaches for model reduction by aggregation................ 43 3.1.3.2 Rolling horizon dispatch.............................. 44 3 3.1.3.3 Sub-annual temporal zooming.......................... 45 3.1.4 Evaluation framework.................................... 47 3.1.4.1 Parameterization of speed-up approaches.................... 47 3.1.4.2 Computational indicators............................. 48 3.1.4.3 Accuracy indicators................................ 48 3.2 Results................................................. 49 3.2.1 Pre-analyses and qualitative findings............................ 49 3.2.1.1 Order of sets.................................... 49 3.2.1.2 Sparse vs. dense.................................. 49 3.2.1.3 Slack variables and punishment costs...................... 50 3.2.1.4 Coefficient scaling and variable bounds..................... 51 3.2.2 Aggregation of individual dimensions............................ 52 3.2.2.1 Spatial aggregation................................ 52 3.2.2.2 Temporal aggregation............................... 55 3.2.3 Heuristic decomposition................................... 56 3.2.3.1 Rolling horizon dispatch without grid computing................ 57 3.2.3.2 Temporal zooming................................. 59 3.2.3.3 Temporal zooming with grid computing..................... 61 3.3 Discussion............................................... 64 3.3.1 Summary........................................... 64 3.3.2 Into context.......................................... 65 3.3.3 Limitations.......................................... 65 3.3.4 Methodological improvements................................ 66 3.4 Conclusions.............................................. 67 II Technical Performance Enhancement 69 4 Overview of technical performance enhancement 71 4.1 A hand-tailored parallel algorithm................................. 71 4.1.1 Exploiting the problem structure within an interior-point algorithm.......... 71 4.1.2 Improving performance and scalability........................... 72 4.1.2.1 Solving the Schur complement.......................... 72 4.1.2.2 Improving the solution algorithm......................... 73 4.1.2.3 Preconditioning.................................. 74 4.1.2.4 Presolving the problem.............................. 74 4.1.3 Further improvements.................................... 74 4.2 High Performance Computing.................................... 76 4.2.1 High performance computing architectures........................ 76 4.2.2 Distributed-Shared-Memory achitecture and Message Passing Interface......... 77 4.2.3 Computers used at HLRS.................................. 80 4.2.4 Use of Supercomputer at HLRS............................... 81 4.2.4.1 File Systems at HLRS............................... 81 4.2.4.2 Module Environment at HLRS.......................... 83 4.2.4.3 Batch system on Hazel Hen............................ 83 4.2.5 Computers used at JSC................................... 84 4.2.5.1 JURECA...................................... 84 4.2.5.2 JUWELS...................................... 84 4.2.5.3 JUST........................................ 84 4.3 Preparing Energy System Models for High Performance Computing with GAMS....... 85 4.3.1 Motivation.......................................... 85 4.3.2 Model Annotation...................................... 85 4 4.3.3 Model Generation and Solution Reporting......................... 86 4.3.3.1 All-at-Once Model Generation.......................... 87 4.3.3.2 Speeding up All-at-Once Model Generation................... 88 4.3.3.3 Distributed Model Generation.......................... 88 4.3.3.4 Solution Reporting................................. 89 4.3.3.5 Known Limitations................................ 90 4.3.3.6 Using Different Platforms for Model Generation and Solution Process.... 90 4.3.4 Useful Tools.......................................... 91 4.3.4.1 checkanno...................................... 91 4.3.4.2 stripjac....................................... 91 4.3.4.3 solveJacobian.................................... 92 4.3.5 Solving a GAMS Model Instance using the GAMS/PIPS-IPM Solver Link....... 92 4.3.5.1 Compiling gmschk and gmspips......................... 93 4.3.5.2 Running gmschk.................................. 93 4.3.5.3 Running gmspips................................. 93 4.3.5.4 Examples...................................... 94 5 Performance analysis of technical performance enhancement 103 5.1 Performance and Scalability of PIPS-IPM++........................... 103 5.2 Systematic testing of PIPS++ with REMix instances....................... 105 5.3 Performance Analysis of PIPS-IPM++ with HPC tools..................... 106 5.3.1 Performance Analysis after optimization.......................... 110 III Results of the model experiment 115 6 Performance analyses in the model experiment 117 6.1 Concept of the model experiment.................................. 117 6.2 Lessons learned from annotation.................................. 117 6.3 Solving energy system models on HPC............................... 118 6.4 Performance analyses of modeling based strategies in the model experiment.......... 118 6.5 Conclusions of the model experiment................................ 119 IV Conclusion 121 7 Overall Conclusions from the BEAM-ME Project 123 V Appendices 137 A The SIMPLE Model - A Simplified ESM 139 A.1 Motivation.............................................. 139 A.2 Automated Input Data Generation................................. 139 A.2.1 Input Data vs. Model Data................................. 139 A.3 The SIMPLE Models - How to run?................................ 140 A.3.1 Generic Parameters..................................... 140 A.4 Basic SIMPLE Model - simpleBase.gms .............................. 140 A.4.1 Symbols............................................ 140 A.4.1.1 Sets......................................... 140 A.4.1.2 Parameters..................................... 141 A.4.1.3 Variables...................................... 141 A.4.1.4 Equations...................................... 142 5 A.4.2 Equation Definitions..................................... 142 A.4.3 Model Overview....................................... 144 A.5 Extensions to the Basic SIMPLE Model - simple.gms ...................... 146 A.5.1 Rolling Horizon........................................ 146 A.5.2 Benders Decomposition................................... 147 A.5.3 Lagrangian Relaxation...................................