Agent-based Optimal Energy Flow of an Integrated Energy System

Agent-based Optimal Energy Flow of an Integrated Energy System

Climate change is one of the most pressing issues facing the world today. Countries have various ways to tackle this, but ultimately, all should have the goal of reducing emissions in order to stabilize global warming. This can be achieved through changes in behavior and technology advancements.


An integrated energy system (IES) emerged as an option to better operate and optimize the current energy system. In order to achieve this, two challenges had to be overcome.

The first challenge was to combine different energy system analyses. Traditionally this was done separately, and the interaction of different subsystems wasn’t considered.

The second challenge was that there was a gap in the agent-based methodology applied at the network level. Most studies using this methodology focused on the local level, such as individual buildings, or even micro-grids.

Schematic diagram of integrated-energy systems

Schematic diagram of integrated-energy systems


Researchers at UCL created a project with two aims. The first was to further develop previous agent-based modeling for multi-energy networks. The second was to experiment with integrated energy system simulation using real-world case study data.

AnyLogic was chosen as the simulation platform because it can be completely dedicated to agent-based modeling, has a very user-friendly interface, and can easily be integrated with a JAVA package.

The objective of this project was to simulate energy flow. Energy flow describes the states of the energy network.

In a network, energy flows from one node or bus to other nodes. The magnitude and phase angle of voltage at every node, as well as the active and reactive power flowing through the circuit, can be understood through energy flow analysis.

Energy flow analysis is particularly important for network extension planning and determining the best operation of existing systems.

In the model, the classic power system was followed, where there are three node types – slack, control, and load.

For an integrated system, the researchers needed to incorporate multiple energy vectors into such a system so that they could adopt an energy hub. These vectors were electricity, gas, and heat.

This hub is a mixed energy vector system with three features:

This multi-energy network is modeled by a group or system of interconnected energy hubs.

Systematic diagram of energy hubs

Systematic diagram of energy hubs

The model was developed using graph theory, which means trying to find the shortest path from one place to another. In this case, the shortest path from one node to another. In addition, every node had to follow the conservation laws, meaning that every flow into the node must be balanced by the outflow.

An algorithm computed by agents in a decentralized manner was used to calculate the energy flow in the electric system. By aggregating these results, the behavior of a whole network could be calculated.

For the pipeline networks, the calculation result was mimicked using the electric flow method from before.

The model needed to import data from published articles including the type of the node or bus, network configuration, and the associated active and reactive power of each node or bus.

Energy network case study

Energy network case study – example of data obtained from published articles


In this multi-energy or integrated energy system, researchers modeled electricity, natural gas, and heating of water. Using the inputs of the model and the variables from existing case studies, every active and reactive power and magnitude and phase angle of voltage could be computed.

Using just one node, as an example illustrated below, the apparent power and complex voltage values, as well as the flow potential for gas networks, and district heating networks could be observed.

Model demonstration showing results at one specific node

Model demonstration showing results at one specific node

In the future, the researchers hope to integrate a dynamic energy consumption profile into the system. In addition, agent-based modeling has extremely promising potential in decentralized optimization, and so a future model could explore this in multi-region integrated energy systems.

The case study was presented by Ruiqiu Yao from the UCL Department of Civil, Environmental and Geomatic Engineering, at the AnyLogic 2021 Conference.

The slides are available as a PDF.

Similar case studies

More case studies

Get a brochure with industry case studies