Energy planning: Mathematical optimization meets municipal practice

In the project "Energieplanung im Quartier", researchers from the University of Konstanz collaborate with the city of Konstanz and its municipal utility provider to develop a simulation tool. With the "scenario editor", users can estimate the costs and consequences of planned energy measures ahead of time.
© MTK / Achim Mende

Cities like Konstanz have growing populations that also need a larger amount of energy. But where should energy networks be expanded? And what kinds of energy should be prioritized in this expansion? Many cities and municipalities face the real challenge of planning energy infrastructure for the future. Local residents, too, have to decide, for example, whether to buy a heat pump or install solar panels on their houses. As a Smart Green City in the context of the federal funding programme for Smart Cities model projects, the city of Konstanz and researchers at the University of Konstanz are collaborating on the project "Energieplanung im Quartier" (in German) focusing on energy usage in the Stadelhofen quarter of Konstanz.

© Marion Voigtmann

"The idea behind this project is to develop a strategic planning tool for the energy supply of the future. For example, it could help with decisions about how to expand energy networks or renovate houses. It is ultimately about ensuring long-term energy security and affordability for all members of society."

Stefan Volkwein, professor of numerical optimization

Reaching this goal requires many players to work together. On the research side, the collaboration partners include Stefan Volkwein and his doctoral researcher colleague Carl Eggen from the Department of Mathematics as well as Daniel Keim (professor of data analysis and visualization) and his doctoral researcher Alexander Frings from the Department of Computer and Information Science. In a three-step process, the research team works in close collaboration with the city of Konstanz and its municipal utility provider Stadtwerke Konstanz.

The first step is collecting the necessary raw data and preparing it for further use. The second step requires developing a customized mathematical model that takes in the prepared data, processes it and optimizes it for the stated question. The third – and final – step involves visualizing the results in an easy-to-understand way. "For me, it was particularly exciting to see how we can use optimization methods to calculate real energy networks – so, to solve a practical problem like the one we're currently facing with energy grids", Eggen says.

The data basis
Frings, a computer scientist, works with real-life data – from different sources. This includes public data from the land survey register of the state of Baden-Württemberg, the city of Konstanz's energy usage plans and data on the energy network from the local utility provider. "Of course we have to keep data on critical infrastructure confidential. And, for data protection reasons, we can't directly share data from the energy usage plans for each individual house", Frings explains. "We fulfil these requirements by always grouping together at least five buildings into clusters. This process is also used in the census. At the same time, you have to prepare your data in a way that allows you to make the calculations you need. It is especially time-consuming to standardize data from different sources and bring them on to a comparable level that provides a solid data basis for creating the model.

The mathematical model
Carl Eggen also worked on developing the mathematical model describing the actual power grid in Konstanz-Stadelhofen as precisely as possible – including the different energy sources, the respective networks and the energy demand of the corresponding customers.

The connection between the power grid and the mathematical model lies in the networks used in the field of mathematics, too. Throughout the process, he also needed to account for physical considerations and the laws of physics, like the conservation of energy or resistances in power lines.

© Marion Voigtmann

"In order to create the mathematical framework, we look at the existing networks and the nodes within them: How does electricity flow from point A to point B – does it take place via a direct line, or does it have to take a detour? Where are nodes – like houses or transformer stations – located? And do the nodes only connect electrical lines? Or district heating lines as well?"

Carl Eggen, doctoral researcher from the Department of Mathematics

How is this expressed mathematically? "This is nothing more than a list of mathematical formulas that creates a model, a programme", the mathematician explains. "We thus attempt to describe our energy network with the help of mathematical equations and inequations that include variables. This allows us to create an abstraction and power up our whole mathematical toolbox of algorithms to answer the questions we are working on." Variables can include, for example, the number of lines installed – for power and district heating. Or which heating technologies are installed in the houses. How much have they been renovated? How much energy needs to be sent through the lines?

© Marion Voigtmann

The energy planning project for Konstanz-Stadelhofen.
 

The "scenario editor": from the model to optimization
The current energy consumption serves – at least initially – as a fixed input parameter. But, as Volkwein says, once the mathematical model has been constructed, it is possible to adjust certain parameters or variables and make calculations for different scenarios: "During optimization, the total costs for the mathematical model are minimized for specific aspects, such as energy sources, demand for energy, network expansion or overall performance. The process only considers potential scenarios for the energy networks that fulfil the mathematical model and, thus, remain optimal when implemented in the real world." In the end, people who use the scenario editor should be able to change these inputs themselves and receive corresponding optimal scenarios as an output.

The scenario editor is also where the computer scientists with expertise in data visualization come into play. Frings used Konstanz-Stadelhofen as it appears on OpenStreetMaps as the geographical basis for the editor. Houses grouped into clusters all appear in the same colour.

"The page shows a short menu that lets you select which scenario you would like to see. For example, if I pick the standard scenario for district heating, I get an overview of how the district heating network in the area could be expanded. This means we can also show what would take place in the case of optimization, if I connect a particular street to the network – or not, and what the consequences would be for the surrounding streets."

Alexander Frings, doctoral researcher from the Department of Computer and Information Science
© Keim research group – Data Analysis & Visualization, University of Konstanz

The scenario editor displays the individual neighborhoods in Konstanz, using Stadelhofen as an example: on the left is the map application with interactive markers; on the right is an overview of the selected scenario with detailed information about buildings. The data has not yet been verified, so the results are still unreliable. (As of March 2026)
 

The researchers plan to integrate an additional application related to renovation calculations into the editor. The aim is to give residents the option to calculate the impact of specific renovation measures – for each individual building – and to get an estimate for the corresponding costs.

The project "Energieplanung im Quartier" will receive a total of 750,000 euros by the end of 2026. Two-thirds of the funding is provided through the "Smart Cities model projects" programme of the Federal Ministry for Housing, Urban Development and Building. The collaboration between the city of Konstanz, its utility provider and researchers is what makes the project special – despite the challenges. "Bringing our research into the real world means more than focusing on practical problems – it also means communicating about our work so that everyday people understand it", says Volkwein as he smiles and adds: "I think a lot of people don't realize how much mathematics plays a role in our day-to-day lives. Just look at the technical devices that we use every day."

On the other hand, there are plenty of mathematicians who would prefer to work on theoretical research rather than such transfer projects. Volkwein emphasizes: "Of course, we need to conduct mathematical research. Yet, as researchers, we can't afford not to think about the benefits that our mathematical research has for society."
 

Marion Voigtmann

By Marion Voigtmann - 16.04.2026