Skip to main content

Python package for cosimulation of FMU based multi-energy systems

Project description



energysim (previously, FMUWorld) is a python-based tool that was developed specifically to simplify energy system based cosimulations. Currently, it allows users to combine:

  • Dynamic models packaged as Functional Mockup Units (FMUs)
  • Pandapower Networks packaged as pickle files
  • PyPSA models (BETA) packaged as Excel workbook
  • csv data files


energysim can be installed using PyPI index command:

pip install energysim

It uses the following packages to work:


energysim simplifies cosimulation setup by conceptualising the setup in an intuitive manner. The whole system is defined within a World() canvas. Within World(), users can specify different simulators by using commands such as add_fmu(), add_powerflow(), add_csv(), add_signal(). Apart from this, users can also specify initialisation options using the options() command, connections between simulators using the add_connections() command. Finally, the system can be simulated using the simulate() command. This method provides a results dataframe which can then be used for analysis of the multi-energy system simulation. Apart from simple simulations, energysim alo incudes a method to perform sensitivity analysis on selected parameters within the cosimulation environment.

A brief example is shown below:

#import package
from FMUWorld import World
#create world instance
my_world = World(stop_time = 1000, 
                logging = True, 
                exchange = 2,
                interpolate_results = False)

simLoc1 = os.path.join(working_dir,chp+'.fmu') #fmu location
simLoc2 = os.path.join(working_dir,elec+'.p') #pandapower network location

#add fmu
my_world.add_fmu(name = 'chp', 
                loc = simLoc1, 
                step_size = 2, 
                outputs = ['rampeQfuel.y.signal',
my_world.add_powerflow(name = 'elec', 
                loc = simLoc2, 
                step_size = 1e-3, 
                inputs = ['gen1.P']
                outputs = ['gen1.f',

#define connections
connections = 

#add connections

results = my_world.simulate()

More information is provided on the documentation page.


Please cite the following paper if you use energysim: Gusain, D, Cvetković, M & Palensky, P 2019, Energy flexibility analysis using FMUWorld. in 2019 IEEE Milan PowerTech., 8810433, IEEE, 2019 IEEE Milan PowerTech, PowerTech 2019, Milan, Italy, 23/06/19.

Project details

Release history Release notifications

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for energysim, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size energysim-0.0.1-py3-none-any.whl (35.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size energysim-0.0.1.tar.gz (18.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page