Vessim

A co-simulation testbed for energy-aware and carbon-aware applications and systems, based on Mosaik.
https://github.com/dos-group/vessim

Category: Energy Systems
Sub Category: Grid Management and Microgrid

Keywords

carbon-aware co-simulation energy-system simulation software-in-the-loop testbed

Keywords from Contributors

sustainability

Last synced: about 5 hours ago
JSON representation

Repository metadata

A co-simulation testbed for carbon-aware computing systems 🍃

README.md

Vessim

PyPI version
Tests
License
Supported versions

Vessim is a co-simulation testbed for carbon-aware systems that allows you to simulate how your computing systems interact with local renewable energy sources, battery storage, and the public grid.
It connects domain-specific simulators for power generation and energy storage with real software and hardware.

What can I do with Vessim?

Vessim helps you to understand and optimize how your (distributed) computing system interacts with (distributed) renewable energy sources and battery storage.

  • Carbon-aware applications: Develop applications that automatically reduce their energy consumption when the grid is powered by fossil fuels, and increase activity when renewable energy is abundant.
  • Energy system composition: Experiment with adding solar panels, wind turbines, or batteries to see how they would affect your energy costs and carbon emissions.
  • Plan for outages and extreme events: Simulate power outages or renewable energy fluctuations to understand risks and test backup strategies.
  • Quality assurance: Apply Vessim in continuous integrating testing to validate software roll-outs in a controlled environment.

Vessim can run simulations faster than real-time, includes historical datasets for realistic scenarios, and can simulate multiple microgrids in parallel.
You can test scenarios using historical data or connect real applications and hardware to simulated energy systems.

Check out the official documentation!

Simple scenario

The scenario below simulates a microgrid consisting of a simulated computing system (which consistently draws 700W),
a single producer (a solar power plant who's production is modelled based on a dataset provided by Solcast), and a battery.
The Monitor periodically stores the energy system state in a CSV file.

import vessim as vs

environment = vs.Environment(sim_start="2022-06-15", step_size=300)  # 5 minute step size

microgrid = environment.add_microgrid(
    name="datacenter",
    actors=[
        vs.Actor(name="server", signal=vs.StaticSignal(value=-700)),  # negative = consumes power
        vs.Actor(name="solar_panel", signal=vs.Trace.load("solcast2022_global", column="Berlin", params={"scale": 5000})),  # 5kW maximum
    ],
    storage=vs.SimpleBattery(capacity=100),
)

# Write results to CSV
monitor = vs.Monitor([microgrid], outfile="./results.csv")
environment.add_controller(monitor)

environment.run(until=24 * 3600)  # 24h simulated time

Software-in-the-loop scenario

Vessim can simulate the energy systems of real applications and hardware.
The following example

  1. pulls energy consumption data from a Prometheus monitoring system
  2. exposes the simulated microgrid via a REST API, including the current marginal carbon intensity of the public grid (provided by Watttime).
import vessim as vs

environment = vs.Environment(sim_start="2022-06-15", step_size=5)  # 5 second step size

microgrid = environment.add_microgrid(
    name=f"gpu_cluster_in_berlin",
    actors=[
        vs.Actor(name="gpu_cluster", signal=vs.PrometheusSignal(
            prometheus_url="http://localhost:30826/prometheus",
            query=f"sum(DCGM_FI_DEV_POWER_USAGE)",  # sum of all GPUs' power consumption
            username="username",
            password="xxxxxxxxxx"
        ))
    ],
    grid_signals={"mci_index": vs.WatttimeSignal(
        username="username",
        password="xxxxxxxxxx",
        location=(52.5200, 13.4050),  # Berlin coordinates
    )},
)

rest_api = vs.Api([microgrid], export_prometheus=True)
environment.add_controller(rest_api)

environment.run(until=24 * 3600, rt_factor=1)  # 24h in real-time mode

Installation

You can install the latest release of Vessim
via pip:

pip install vessim

If you require software-in-the-loop (SiL) capabilities, you should additionally install the sil extension:

pip install vessim[sil]

Work in progress

Our team at the Distributed and Operating Systems group at TU Berlin is actively working to improve Vessim.
We are currently working on the following aspects and features:

  • Vessim X Exalsius: We are working on integrating Vessim into Exalsius' GPU provisioning and scheduling.
  • Vessim X Flower: We are working on integrating Vessim into the federated learning framework Flower.
  • Vessim X Vidur: We are working on integrating Vessim into the LLM simulator Vidur.
  • System Advisor Model (SAM): We are working on integrating NREL's SAM as a subsystem in Vessim, allowing for better simulation of solar arrays, wind farms, and other types of renewable energy generators.
  • Battery degradation: We are working on integrating NREL's BLAST-Lite for modeling battery lifetime and degradation
  • Calibration: We are working on a methodology for calibrating Vessim simulations on real hardware testbeds.

Datasets

Vessim comes with ready-to-user datasets for solar irradiance and average carbon intensity provided by

We're working on documentation on how to include custom datasets for your simulations.

Publications

If you use Vessim in your research, please cite our paper:

For details in Vessim's software-in-the-loop simulation methodology, refer to our journal paper:

For BibTeX citations and more related papers, please refer to the documentation.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 965
Total Committers: 7
Avg Commits per committer: 137.857
Development Distribution Score (DDS): 0.714

Commits in past year: 72
Committers in past year: 1
Avg Commits per committer in past year: 72.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
marvin.steinke m****e@c****e 276
Philipp Wiesner w****r@t****e 254
kilianp14 P****n@g****e 206
amandamalk0601 a****1@w****m 147
marvin.steinke m****e@c****e 74
Ovi T o****r@g****m 6
GitHub Action a****n@g****m 2

Committer domains:


Issue and Pull Request metadata

Last synced: 11 days ago

Total issues: 49
Total pull requests: 198
Average time to close issues: about 2 months
Average time to close pull requests: 8 days
Total issue authors: 6
Total pull request authors: 9
Average comments per issue: 0.8
Average comments per pull request: 0.4
Merged pull request: 167
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 10
Past year average time to close issues: N/A
Past year average time to close pull requests: 9 minutes
Past year issue authors: 0
Past year pull request authors: 4
Past year average comments per issue: 0
Past year average comments per pull request: 0.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/dos-group/vessim

Top Issue Authors

  • marvin-steinke (25)
  • Impelon (7)
  • kilianp14 (7)
  • birnbaum (6)
  • amandamalk0601 (3)
  • ArneTR (1)

Top Pull Request Authors

  • marvin-steinke (73)
  • birnbaum (48)
  • kilianp14 (39)
  • amandamalk0601 (24)
  • Impelon (8)
  • crai0 (2)
  • Cem2024 (2)
  • ghafek (1)
  • fnetX (1)

Top Issue Labels

  • enhancement (22)
  • bug (9)
  • question (8)
  • documentation (7)
  • not important (5)
  • wontfix (1)

Top Pull Request Labels

  • documentation (9)
  • enhancement (7)
  • codex (4)

Package metadata

pypi.org: vessim

A simulator for carbon-aware applications and systems.

  • Homepage:
  • Documentation: https://vessim.readthedocs.io/
  • Licenses: MIT License
  • Latest release: 0.12.0 (published 5 months ago)
  • Last Synced: 2025-12-23T11:09:54.565Z (3 days ago)
  • Versions: 26
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 204 Last month
  • Rankings:
    • Dependent packages count: 6.633%
    • Average: 18.622%
    • Dependent repos count: 30.611%
  • Maintainers (1)

Score: 11.531600005235036