Skip to main content

Vessim Logo

Vessim is a Python library for simulating datacenter energy systems.

Vessim models the interaction between datacenter demand and energy infrastructure, helping you understand how design and control decisions affect cost, carbon emissions, and resilience.

Documentation · Getting started · Explore example results

  • Simulation studies: Compare infrastructure and control strategies across demand, weather, and operating scenarios. Explore design choices through parameter sweeps, optimization, or probabilistic simulations.
  • Live modeling: Connect real applications to a simulated energy system through REST APIs. Test how a scheduler or controller responds to changing power availability.
  • Digital twins: Model an energy system alongside the real installation using live measurements. Explore possible futures, such as prolonged low renewable generation or a grid outage.

Getting started

Install Vessim with Python 3.9 to 3.15:

python -m pip install vessim

This example models three days of datacenter demand, solar generation, and battery operation. Surplus solar power charges the battery, which supplies demand when solar generation falls. The grid supplies any remaining deficit and receives surplus power once the battery is full.

Download solar_example.csv into your working directory, then run:

import vessim as vs

# Scale the solar profile to a 2.4 kW installation.
solar = vs.Trace.from_csv("solar_example.csv", column="Berlin", scale=2400)

env = vs.Environment(sim_start="2026-01-01", step_size=5 * 60)
env.add_microgrid(
    name="site",
    actors=[
        vs.Consumer("load", signal=700),
        vs.Producer("solar", signal=solar),
    ],
    dispatchables=[vs.SimpleBattery("battery", capacity=1000), vs.GridConnection()],
)
recorder = env.add_controller(vs.Recorder("results/basic_example"))
env.run(until=3 * 24 * 3600)

metrics = recorder.metrics["microgrids"]["site"]
print(f"Grid import: {metrics['grid_import'] / 1000:.2f} kWh")
print(f"Grid export: {metrics['grid_export'] / 1000:.2f} kWh")
Grid import: 26.71 kWh
Grid export: 11.08 kWh

Explore this example in your browser, or open your saved results locally:

python -m vessim view results/basic_example

The Getting Started walkthrough explains how the components work together. To use your own data, see Actors and Signals.

Explore further

Example What you can explore
Exploring microgrid configurations Compare wind, solar, and battery configurations over a year. View results
Optimization Search for designs with different cost and emissions trade-offs. View results
Dispatch strategies Compare control policies across demand scenarios. View results
Demand response Adjust workload concurrency under a flexible grid connection agreement
Custom metrics Calculate electricity costs, emissions, and your own study objectives

Run the examples locally with a shared setup and reproducible commands.

For live measurements and REST control, install pip install 'vessim[live]' and use vs.Environment.live(). To connect external simulators through Mosaik, install pip install 'vessim[mosaik]'.

Publications

If you use Vessim in your research, please cite:

Philipp Wiesner, Ilja Behnke, Paul Kilian, Marvin Steinke, and Odej Kao. Vessim: A Testbed for Carbon-Aware Applications and Systems. ACM SIGENERGY Energy Informatics Review 4 (5), 2024.

More papers are listed in the documentation!

About

Vessim was originally developed at the research group for Distributed and Operating Systems at TU Berlin. It is now maintained at the Machine Learning Systems Lab at the University of Cambridge.

Metadata

Release files for vessim 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vessim 0.16.0
File Size Uploaded Provenance Actions
vessim-0.16.0.tar.gz 30.5 MB Without provenance Details for vessim-0.16.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vessim 0.16.0
File Interpreter ABI Platform Actions
vessim-0.16.0-py3-none-any.whl Python 3 none any Details for vessim-0.16.0-py3-none-any.whl

Total release size: 31.1 MB

Release files / vessim-0.16.0.tar.gz

Download URL vessim-0.16.0.tar.gz
Size 30.5 MB
Tags Source
SHA-256 checksum
How to use checksums
48d236ead5f3cc00e638e655a94c11406a652466ffbef6ffca87f99db855b2f2
BLAKE2b-256 checksum
How to use checksums
40417328cbe0206468f70e6dfe3e59ed5cf1d7cc0a62985be115bd8b9692d39b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / vessim-0.16.0-py3-none-any.whl

Download URL vessim-0.16.0-py3-none-any.whl
Size 505.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a818510485a6c33b72216547572c41a51deb6e3b8a054cd64213087465130e92
BLAKE2b-256 checksum
How to use checksums
1468adf5894f69d742efd1f356cb425e8d56f0ab96197182c0537717d5b52d3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for vessim 0.16.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page