1 Problem Description

We consider the problem of optimizing the design of several interconnected national or regional energy systems with a high share of renewable energy. Our goal is to simultaneously determine the dimensioning and the operation of a power plant fleet involving several energy sectors at minimum overall costs. Given a scenario year, this fleet must cover regional demands for electricity, several types of heat, and transportation, which are given by time series at an hourly resolution, while adhering to the technical constraints of all components and a CO2 emission budget. Figure 1 illustrates the general decisions we have to take, i.e., the dimensioning of all technologies in each region and the hourly operation of all components producing, consuming, or transforming energy.

Fig. 1
figure 1

Left: Primary energy sources and exchange capacities defined by technology installation. Right: Electricity production and consumption per technology defined by operational schedules

Integer and linear programming formulations, which are commonly used for combined capacity and operations planning problems of this type, often lead to models that are way too large to be solved efficiently in practice. The main contribution of this paper is to show the efficiency of a Lagrangian solution approach that decomposes the problem into several single unit-commitment-type problems and, thus, allows us to solve problems with much less computational resources. For the sake of brevity, we neglect data uncertainty, the multi-period nature of the long-term energy system development and non-convexities stemming from discrete decisions in this paper and only consider the setting of a deterministic single-stage planning problem formulated as a continuous linear model. Possible extensions are discussed briefly in the outlook chapter.

The problem described above is modeled as a linear program using the SCOPE toolset developed at Fraunhofer IEE. SCOPE is a comprehensive and flexible energy systems modeling and planning tool implemented in MATLAB [12]. A detailed description of SCOPE and its modules can be found in [3,4,5, 9, 13] and the references therein.

In the problem variant addressed in this paper, we consider pure power generators (i.e. condensing power plants, gas turbines, wind turbines and PV systems) as well as storage technologies (i.e. batteries, hydrogen storages, and hydroelectric storages) in the electricity sector. These technologies contribute to regional electricity markets and a global CO2 budget. The regional electricity markets are interconnected via so-called NTC links, which form the underlying electrical power network. In the heat sector, we distinguish between local and district heating and industrial process heating at different temperature levels, whose respective demand time series must be met. In our model, we consider several types of renewable or conventionally operated combined heat and power plants as well as a wide variety of pure heat producers (e.g. condensing boilers, solarthermal and geothermal energy) and heat pumps, which participate in the electricity market as flexible consumers. In the transport sector, industrial and personal transportation needs and driving characteristics are described by different time series of transportation demands. The optimization can draw on pure electric vehicles, catenary trucks, hydrogen vehicles or plug-in hybrids, which can use both electricity and liquid (fossil or renewable) fuels. In addition to the NTC links, some regions and energy sectors are also linked via the exchange of fossil or renewable gas, which can be produced in power-to-gas plants or electrolysers and used in gas turbines, for example. The task is to optimize the dimensioning and the operation of all components in the system such that the sum of investment and operational costs is minimized. For this, the model has to simultaneously decide how much capacity of which type to install in which region of the network and how to operate these over the planning horizon.

2 Lagrangian Approach and Implementation

Using the LP-tool set of SCOPE, the above problem is modelled as a linear programming model. In principle, the overall model contains a sub-model for each technology and for each region where this technology can be installed. These sub-models contain the variables and the ‘local’ constraints describing the dimensioning and the operation of a single technology without paying attention to the other technologies, similar to a unit commitment model for a single power plant. Additional ‘global’ energy balance, demand, and budget constraints then link the sub-models of all technologies that contribute to the respective regional energy balances, markets, and budgets. For each regional thermal and transport market, a single variable per participating technology is used to describe its market share and a single equality enforces a proper market split. This allows to optimize the mix of technologies in each region, but each technology’s share remains fix for the entire planning horizon. Once the shares are decided, the power production of each technology must exactly meet its share of the corresponding demand time series over the entire planning horizon. For electricity more flexibility among the technologies’ shares is permitted. Here, the model contains an individual energy balance equality per region and per hour of the planning horizon to ensure that power production and import meet consumption, export, and base demand. Finally, there are a few global constraints describing the CO2 emission budget and a simplified gas network.

We illustrate this for the combined heat and power plant (CHP) technology. The overall LP contains one sub-model per region and fuel type to (cumulatively) model all corresponding CHP units. Each sub-model contains a variable P inst to describe the installed capacity and a variable x chp ∈ [0, 1] to describe the thermal demand share of the CHP units in the corresponding region. To model the operation of CHP, each sub-model uses numerous time-indexed variables: P(t) and Q(t) with t ∈ T := {1, …, 8760} describe the electric and thermal power generation of the main unit per hour, P pth(t) and Q bk(t) the corresponding backup units’ thermal generation, and QS(t), QS in(t), QS out(t) the level, the addition, and the withdrawal from the integrated thermal storage unit, etc. Numerous local constraints ensure the valid operation of the units: Inequalities P(t) ≤ P inst and Q(t) ≤ γP inst for all t ∈ T bound the power and heat generation by the installed capacity and equalities (1 − loss) ⋅ QS(t − 1) + QS in(t) − QS out(t) = QS(t) for all t ∈ T model the dynamics of the thermal storage, for example. To ensure that the CHP units satisfy their share of the regional thermal demand time series D th(t), each sub-model contains the equalities Q(t) + Q bk(t) + QS out − QS in(t) = x chp ⋅ D th(t) for all t ∈ T. Global constraints linking the CHP sub-models with other sub-models, are, for example, thermal market share and electric energy balance equalities. For each region, a single equality ∑uThTx u = 1 ensures that the shares of all technologies in ThT that contribute to the thermal demand (with chp ∈ ThT) sum up to 1. Similarly, but permitting to vary the technologies’ shares over time, equalities ∑uElTP u(t) = D el(t) for all t ∈ T (with P chp(t) := P(t) − P pth(t) and chp ∈ ElT) ensure that electricity production and consumption are balanced in each region and hour.

For the large European scenarios we are interested in, even solving the continuous linear models is extremely challenging: The presolved LPs contain up to 50 mio variables, 50 mio constraints, and 200 mio non-zeros and solving them as monolithic LPs using CPLEX on a machine with 64 CPUs and 264 GB RAM takes up to 30 days.

In order to compute (near-optimal) solutions for these LPs faster, we developed a Lagrangian relaxation approach that actively exploits the special structure of the model. For an overview on Lagrangian relaxation and decomposition we refer the reader to the survey articles [10, 11]. A description of its application to unit commitment and network design problems can be found in [1, 2]. As mentioned above, the coefficient matrix of the overall LP has a near-block structure, with blocks corresponding to the technologies’ sub-models linked only by few energy balance and budget constraints. The idea of the proposed approach is to relax these linking constraints, which disturb the block structure, and penalize their violation in the objective function by a linear term. Thus, the remaining relaxation decomposes into independent sub-problems, where each sub-problem only models the dimensioning and the operation of a single technology in one region. As these sub-problems are much smaller and easier to solve, this allows a more efficient solution of the overall problem by solving the sub-problems independently.

For the CHP sub-model described above, the thermal demand share and electric energy balance equalities are relaxed. This affects the objective coefficients of the variables x chp, P(t), P pth(t) via the Lagrangian multipliers, but breaks the interdependency with other sub-models contributing to the same region’s heat and electric balances.

In our implementation we use the general purpose bundle method CONICBUNDLE [6, 7] to solve the Lagrangian dual problem. As the model is generated by the SCOPE toolset, a special MATLAB-to-C++ interface has been implemented to use CONICBUNDLE with MATLAB and to solve the independent sub-problems of the relaxation in parallel. The sub-problems are (re-)solved using the dual simplex of CPLEX 12.7.1 [8], which performed most efficient when iteratively resolving the subproblems.

A disadvantage of the Lagrangian relaxation approach is that solutions obtained by solving the subproblems are in general not fully feasible for the original problem. However, these partial solutions are useful in heuristics to construct feasible near-optimal solutions. Aggregating the subproblems’ solutions, the CONICBUNDLE solver used in our implementation computes fractional solution candidates for the original model, for which the violation of the relaxed constraints converges towards 0. Thus, solution candidates obtained in later iterations of the algorithms are nearly feasible, which is often sufficient in our application. In order to compute fully feasible solutions, we also implemented a heuristic that fixes the variables of all but the most flexible and controllable technologies (i.e. gas units, boilers, and emergency units) to the candidate’s values and then solves the original model for the few remaining variables of those technologies.

In order to guarantee a stable and efficient operation of the method, all sub-problems must be reasonably bounded and numerically well-conditioned. To ensure this, we had to implement extra bound setting/strengthening and preprocessing routines for the sub-models within SCOPE. To cope with numerical difficulties, the sub-models for several technologies had to be revised. Still, especially problems with large operational time-horizons are numerically notoriously difficult. Finally, we had to ensure that the constraints that are relaxed in the approach are scaled (before relaxing) in such a way that the corresponding optimal Lagrangian multipliers do not differ by too many orders of magnitude and that the resulting penalties are in the same order of magnitude as the original objective function. Otherwise relaxed constraints might be fully ignored by the method, as they appear numerically insignificant, or convergence takes too long.

3 Results

Using our approach, we can solve the considered problems with less computational resources. Solving the subproblems sequentially substantially reduces the required RAM, so even large problems can be handled on a standard workstation. Instead of 128 GB and more required for the barrier algorithm to run efficiently, the Lagrangian approach only needed 12 GB RAM to solve models with operational schedules covering all 8760 h of a 1 year time-horizon. On the other hand, solving the subproblems in parallel, we can exploit multiprocessor machines very effectively. In contrast to the barrier algorithm, the value of the Lagrangian relaxation progresses rather fast in the first iterations before stalling near the optimal value. Thus, the method allows us to efficiently compute bounds and solutions near the optimum, which is sufficient for parameter studies. Table 1 shows the progression of both methods on a machine with two E5-2690v4 CPUs (28 cores at 2.6 GHz) and 256 GB RAM for two typical benchmark instances with 902 units in 21 regions and time-horizons of 200 and 8760 h, respectively.

Table 1 Progression of Lagrangian decomposition and barrier algorithm (without crossover) for two small benchmark instances with 200 h (left) and a 8760 h (right) planning horizon

The solution candidates obtained from the Lagrangian relaxation in later iterations are nearly feasible and converge towards the original LP solution. Figures 2 and 3 show how well the solution candidates obtained from the Lagrangian approach at the end resemble both the aggregated energy production and consumption values as well as the operational schedule of the optimal solution of the original complete LP model.

Fig. 2
figure 2

Aggregated electricity production and consumption for the Lagrangian relaxation’s solution candidate and the solution of the complete LP model for the 8760 h benchmark instance

Fig. 3
figure 3

Operational schedules for the Lagrangian relaxation’s solution candidate and the solution of the complete LP model for the 200 h benchmark instance

4 Outlook

In the future, we plan to apply this approach to mixed-integer versions of the model. These permit a more accurate modeling of operational limits, downtimes, and start-up times of certain technologies, which may have a significant impact on the cost and operation of these components. Furthermore, we plan to address the multi-period version of the problem, where several incremental expansion stages of the energy system are considered. This will enable us to analyze so-called development paths of energy systems, to quantify the path’s impact on the final system, and to identify so-called bridging technologies. In both cases, the generalization of the approach is straightforward.