AnyMOD.jl: A Julia package for creating energy system models

AnyMOD.jl is a Julia framework for creating large-scale energy system models with multiple periods of capacity expansion. It applies a novel graphbased approach that was developed to address the challenges in modeling high levels of intermittent generation and sectoral integration. Created models are formulated as linear optimization problems using JuMP.jl as a backend. To enable modelers to work more efficiently, the framework provides additional features that help to visualize results, streamline the read-in of input data, and rescale optimization problems to increase solver performance.

limited to a single year and, opposed to models using time-slices, cannot 20 analyze development pathways for today's system. 21 Against this background, AnyMOD.jl provides a framework for modeling 22 the long-term transformation of the energy system with the level of detail 23 necessary to represent fluctuating renewables and long-term storage. The 24 framework implements a novel graph-based method introduced in Göke [10] 25 that varies the level of temporal and spatial detail by energy carrier to keep 26 models with high resolution computationally tractable. The approach also 27 enables to model the substitution of energy carriers and, on the practical 28 side, facilitates the read-in of input data. 29 AnyMOD.jl follows an easy to use, but difficult to master principle. Since The package is implemented in Julia. Its key dependencies are JuMP.jl 46 as a backend for linear optimization and DataFrames.jl for data processing [11,12]. The framework uses PyCall.jl to create an internal Python envi-48 ronment and apply the Python packages NetworkX and Plotly for plotting.

49
Gurobi is added as an optional dependency, because its function to compute 50 irreducible inconsistent subsystems is utilized to debug infeasible models.  After construction, the AnyModel object is passed to the createModel! 99 function, which creates all the variables and constraints of the underlying 100 optimization problem optModel. These variables and constraints are again 101 assigned to model parts and stored as data frames. For instance, Table   102 2 depicts a data frame of generation variables. The column on the right  Table 3.

110
After the optimization problem is created, its objective is set with the se-  In conclusion a predefined resolution of input data either results in an highly 140 inefficient read-in of input data or restricts modelling capabilities.

141
To resolve this problem, AnyMOD.jl does not predefine the resolution of

148
The implementing algorithm builds on the idea to "inherit" missing data for 149 a specific node from its relatives in the hierarchical tree. Input: data frame requiring data, parameter object, hierarchical trees Output: data frame with parameters assigned find matches of data frame with parameter data; for I do try to inherit new data for missing nodes; if new data obtained then add newly obtained data to parameter object; find new matches of data frame and parameter data; if no unmatched rows in data frame anymore then exit loop; end end end if parameter has default value then use default for unmatched rows; else drop unmatched rows; end Therefore, in the first step the maximum range of coefficients is decreased 191 by substituting variables. In the example, x 1 is substituted with 10 3 x 1 , which 192 results in the system displayed in Eq. 2. (2) Since the first step decreased the maximum range, in the second step 10 −3 x 1 + 10 5 x 2 + 10 2 x 3 ≤ 10 2 b 1 10 −3 x 1 + 10 5 x 2 + 10 3 x 3 ≤ 10 3 b 2 10 3 x 1 + AnyMOD.jl uses default factors for substitution that depend on the variable  with energy system models [14]. The research leading to these results has received funding from the Euro-