vessim

A co-simulation testbed for carbon-aware applications and systems 🍃

https://github.com/dos-group/vessim

Science Score: 59.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    3 of 7 committers (42.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

carbon-aware co-simulation energy-system simulation software-in-the-loop testbed
Last synced: 6 months ago · JSON representation

Repository

A co-simulation testbed for carbon-aware applications and systems 🍃

Basic Info
Statistics
  • Stars: 65
  • Watchers: 8
  • Forks: 7
  • Open Issues: 2
  • Releases: 12
Topics
carbon-aware co-simulation energy-system simulation software-in-the-loop testbed
Created about 3 years ago · Last pushed 7 months ago
Metadata Files
Readme License

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.

```python import vessim as vs

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

microgrid = environment.addmicrogrid( name="datacenter", actors=[ vs.Actor(name="server", signal=vs.StaticSignal(value=-700)), # negative = consumes power vs.Actor(name="solarpanel", 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).

```python import vessim as vs

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

microgrid = environment.addmicrogrid( name=f"gpuclusterinberlin", actors=[ vs.Actor(name="gpucluster", signal=vs.PrometheusSignal( prometheusurl="http://localhost:30826/prometheus", query=f"sum(DCGMFIDEVPOWERUSAGE)", # sum of all GPUs' power consumption username="username", password="xxxxxxxxxx" )) ], gridsignals={"mciindex": vs.WatttimeSignal( username="username", password="xxxxxxxxxx", location=(52.5200, 13.4050), # Berlin coordinates )}, )

restapi = vs.Api([microgrid], exportprometheus=True) environment.addcontroller(restapi)

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

and

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

  • Name: DOS Group at TU Berlin
  • Login: dos-group
  • Kind: organization
  • Location: Technische Universität Berlin

Distributed and Operating Systems group at Technische Universität Berlin

GitHub Events

Total
  • Release event: 13
  • Watch event: 18
  • Delete event: 8
  • Push event: 48
  • Pull request review event: 2
  • Pull request event: 5
  • Fork event: 3
  • Create event: 17
Last Year
  • Release event: 13
  • Watch event: 18
  • Delete event: 8
  • Push event: 48
  • Pull request review event: 2
  • Pull request event: 5
  • Fork event: 3
  • Create event: 17

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 965
  • Total Committers: 7
  • Avg Commits per committer: 137.857
  • Development Distribution Score (DDS): 0.714
Past Year
  • Commits: 81
  • Committers: 2
  • Avg Commits per committer: 40.5
  • Development Distribution Score (DDS): 0.099
Top Committers
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 (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 52
  • Total pull requests: 151
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 6
  • Total pull request authors: 7
  • Average comments per issue: 0.77
  • Average comments per pull request: 0.41
  • Merged pull requests: 134
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 12
  • Average time to close issues: 28 days
  • Average time to close pull requests: 13 days
  • Issue authors: 1
  • Pull request authors: 5
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.08
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • marvin-steinke (25)
  • Impelon (7)
  • kilianp14 (7)
  • birnbaum (6)
  • amandamalk0601 (3)
  • ArneTR (1)
Pull Request Authors
  • marvin-steinke (73)
  • birnbaum (48)
  • kilianp14 (39)
  • amandamalk0601 (24)
  • Impelon (8)
  • crai0 (2)
  • Cem2024 (2)
Top Labels
Issue Labels
enhancement (22) bug (9) question (8) documentation (7) not important (5) wontfix (1)
Pull Request Labels
documentation (9) enhancement (7) codex (4)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 79 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 26
  • Total maintainers: 1
pypi.org: vessim

A simulator for carbon-aware applications and systems.

  • Versions: 26
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 79 Last month
Rankings
Dependent packages count: 6.6%
Average: 18.6%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 6 months ago