Recent Releases of Vessim

Vessim - 0.15.0

This release focuses on simplifying real-time Software-in-the-Loop (SiL) experiments and streamlining how Vessim handles time and data.

Live Mode

Real-time, Software-in-the-Loop simulations are now explicit. Previously, running a simulation in real-time required passing low-level parameters to Environment.run() and interacting with historical traces would often get messy.

  • New: Real-time simulations are now instantiated through a dedicated Environment.live() classmethod, which forces the simulation clock to advance 1:1 with wall-clock time.
  • Removed: rt_factor is gone from Environment.run(). The behind_threshold argument has been moved to Environment.live().
  • Breaking: SilSignal now strictly requires Environment.live(). Attempting to use a SiL signal in a simulated environment will raise a RuntimeError.

Elapsed-Time Signal API

To make Live Mode reliable, we decoupled the simulation clock from absolute calendar dates. The simulation now only cares about how much time has elapsed since it started, rather than the absolute date on the calendar.

  • New: Signal.at(elapsed) replaces Signal.now(at=...). Time is now passed as elapsed time since sim_start (either a timedelta or elapsed seconds as a float).
  • Breaking: Custom Signal subclasses, as well as Actor.power(now) and Actor.state(now), must be updated to accept elapsed instead of a datetime.
  • Breaking: The internal Clock utility was removed. Custom simulators subclassing _ActorSim, _ControllerSim, or _MicrogridSim now receive sim_start directly instead of a Clock instance.

Traces and Datasets

With the shift to relative elapsed time, we overhauled how time-series data is ingested. We want to make it easier for users to bring their own data rather than relying on Vessim to maintain a registry of datasets.

  • New: Trace is now strictly offset-indexed. Row 0 sits at offset=0, and every other row is a positive offset from there. Trace.from_csv(..., scale=...) now natively handles both offset-indexed and datetime-indexed CSVs.
  • New: We replaced the old Solcast/WattTime archives with three simple examples: solar_example.csv (10 solar traces), load_example.csv (10 load traces), and a datetime-indexed watttime_example.csv for demonstrating calendar-data loading.
  • Breaking: When using datetime-indexed data for a Trace, you must now provide an explicit anchor (the timestamp in your data that corresponds to elapsed=0).
  • Removed: Trace.load() and the dataset registry (_data.py, ~/.cache/vessim downloads) are gone. Use Trace.from_csv() against the new examples in datasets/ or your own files.
  • Removed: We removed Trace.forecast(). In practice, built-in forecasting added too much complexity for edge cases, and most users were implementing custom forecasting solutions anyway.

Minor Changes

  • Environment.run(until=...) now accepts a timedelta, a datetime, an int/float (elapsed seconds), or None for indefinite runs.

Documentation Updates

  • Rewrote the Signals and Datasets concept page to explain the new offset-indexed model, with recipes for using your own CSVs or in-memory data.
  • Reworked the Getting Started guide and updated basic_example.py and sil_example.py to reflect the new API.

Full Changelog: https://github.com/dos-group/vessim/compare/0.14.0...0.15.0

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum 2 months ago

Vessim - 0.14.0

This release introduces a major architectural overhaul of the DES simulation core, generalized dispatchable resources, a new browser-based experiment viewer, and a full rewrite of the documentation.

🚀 New Features

Generalized Dispatchables

  • Introduced vs.Dispatchable: abstract base class for any controllable energy resource (batteries, diesel generators, gas turbines, etc.)
  • vs.Storage, vs.SimpleBattery, and vs.ClcBattery are now subclasses of Dispatchable, replacing the old Storage hierarchy
  • vs.DispatchPolicy replaces vs.Policy. It now receives grid_signals so policies can react to carbon intensity, pricing, or curtailment data
  • vs.DefaultDispatchPolicy replaces vs.DefaultPolicy

Simulation Architecture

  • Fully refactored DES pipeline: Actors → Microgrid → Controller (previously Actors → Grid → Storage → Controller)
  • Internal simulator _StorageSim got removed.
  • Internal simulator renamed from _GridSim to _MicrogridSim. This simulator is now also responsible for aggregating the actor's power output, applying the dispatch policy, and updating storage state.

Logging Improvements

  • CsvLogger writes a metadata.yaml (renamed from experiment.yaml) containing static run information including grid signals
  • MemoryLogger now stores a config dict alongside timeseries data, consistent with CsvLogger

Alpha: Vessim Viewer

  • New browser-based experiment viewer accessible via vessim view <results-dir> (CLI)
  • Visualizes simulation results from metadata.yaml and timeseries.csv (no running simulation required)
  • Panels include power balance, actor breakdown, dispatch, state-of-charge, grid signals, and microgrid info; Supports single-experiment and multi-experiment result directories.

Documentation

  • Documentation rewritten from scratch with new concept pages for Controllers, Dispatchables, Signals, and Software-in-the-Loop
  • Getting Started guide replaces the old tutorial notebooks
  • API reference reorganized to match new module structure
  • New overview figure and updated logos

Minor Improvements

  • Improved error messages in Trace signal for out-of-range data access
  • Improved error message in PrometheusSignal on connection failure
  • Improved SiL error messages and related unit tests

🔧 Breaking Changes

  • Dispatchables: vs.Policyvs.DispatchPolicy; vs.DefaultPolicyvs.DefaultDispatchPolicy; the old policy modules are removed
  • consumer flag: Moved from Signal to Actor (previously Signal had signal_type/consumer logic; now Actor(consumer=True/False) controls sign convention; default changed to False)
  • environment.microgrids: changed from list[Microgrid] to dict[str, Microgrid] for easier lookups by name
  • Plotly removed: Plotly-based utilities removed in favor of new vessim view

Full Changelog: https://github.com/dos-group/vessim/compare/0.13.1...0.14.0

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum 3 months ago

Vessim - 0.13.1

🐛 Bug Fixes

  • Fixed simulation time synchronization in grid simulator for software-in-the-loop experiments

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum 6 months ago

Vessim - 0.13.0

0.13.0

This release introduces a major refactoring of the controller architecture, a complete overhaul of the documentation, and several breaking changes to simplify the API and improve usability.

🚀 New Features

  • Direct Access: Controllers now have direct access to storage, policy, and actor instances which highly simplifies implementing custom control strategies.

🔧 Breaking Changes

  • Controller Architecture: The controller system has been fully refactored to rely on a single Mosaik entity, simplifying the simulation flow.
  • Logging: The Monitor class has been split into vs.MemoryLogger and vs.CsvLogger, providing more specific tools for data recording during simulations.
  • Renaming:
    • MicrogridPolicy -> Policy.
    • Actor.p -> Actor.power.
    • Controller variable time -> now.
  • Visualization: plot_microgrid_trace has been replaced by plot_result_df.
  • Removals: The deprecated SilActor has been removed.

📚 Documentation

  • New Theme: The documentation has been rewritten using Material for MkDocs, offering a modern, responsive interface.
  • Structure: Updated directory structure, new logos, and revised overview figures.
  • Examples: Examples have been migrated from notebooks to executable Python scripts.

🐛 Bug Fixes

  • Fixed multiple issues occurring in simulations without storage.
  • Resolved missing prometheus_client dependency.
  • Added missing type hints and improved docstrings across the codebase.

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum 6 months ago

Vessim - 0.12.0

0.12.0

Release 0.12.0 transforms Vessim from a pure simulation tool into a Software-in-the-Loop platform that can:

  • Monitor real energy consumption from production systems
  • React to live carbon intensity data for sustainability optimization
  • Expose simulated microgrids to external applications via REST APIs
  • Integrate with monitoring and alerting systems via Prometheus
  • Support hybrid simulations mixing real and simulated components

🚀 New Features

Software-in-the-Loop (SiL) Signals

  • vs.SilSignal: Abstract base class for signals that depend on external data sources
    • Eliminates blocking API calls during simulation steps through unified background polling with configurable update intervals
    • Thread-safe cached value storage with automatic cleanup
  • vs.PrometheusSignal: Signal for pulling energy usage data from Prometheus instances
    • Support for HTTP Basic Authentication
    • PromQL query support with automatic connection validation
  • vs.WatttimeSignal: Real-time marginal carbon intensity signals provided by the WattTime Data API
    • Automatic token management
    • Support for location-based region detection via latitude/longitude coordinates
    • Implements new user registration with interactive prompts

REST API and Monitoring

  • vs.Api: Api controller for exposing microgrids via REST API
    • Runs embedded FastAPI server in separate process
    • Real-time data streaming to external applications
    • Optional Prometheus exporter endpoint (by default http:localhost:8700/metrics) via export_prometheus=True
  • Preliminary dashboard which connects to the REST API, available via streamlit run gui/app.py

Grid Signals Support

  • support for external grid-level signals (carbon intensity, pricing, etc.)
  • Per-microgrid Interface: grid_signals parameter in add_microgrid()
  • Enables integration with vs.WatttimeSignal and vs.PrometheusSignal for real-time data and vs.Trace for historical datasets

🔧 Breaking Changes

  • BREAKING: Moved from vessim.cosim to separate vessim.environment and vessim.microgrid modules
  • BREAKING: Removed vs.CollectorSignal in favor of new vs.SilSignal
  • BREAKING: Replaced vs.ConstantSignal with vs.StaticSignal

🏗️ Bug Fixes and Architectural Improvements

  • Fixed Python 3.13 compatibility issues with docopt dependency
  • Improved error handling and validation, especially regarding real-time simulations and SiL dependencies
  • Better separation of concerns across modules
  • Improved type hints and documentation
  • Performance optimizations and thread-safe implementations for concurrent access

Full Changelog: https://github.com/dos-group/vessim/compare/0.11.0...0.12.0

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum 12 months ago

Vessim - 0.11.0

Major Changes

🔧 Controller Architecture Overhaul

  • Multi-microgrid support: Controllers can now manage multiple microgrids simultaneously
  • Centralized controller management: Controllers are now managed at the Environment level rather than per-microgrid

📊 Enhanced Plotting

  • Simplified plotting functions: Reworked plot_microgrid_trace() with cleaner, more consistent output
  • Plotting utilities in public API: Added plot_trace and plot_microgrid_trace to the main API

🏗️ Architecture Simplifications

  • Removed ActorBase class
  • Simplified Monitor class
  • Switched from energy (e) to power reporting (p_grid) for consistency

Documentation Updates

  • Updated first two tutorials to demonstrate new controller interface
  • Added third tutorial covering advanced controller usage

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum about 1 year ago

Vessim - 0.10.0

Breaking Changes

  • Removed ComputingSystem actor (use the generic Actor class instead)
  • Renamed vs.HistoricalSignal to vs.Trace
  • Renamed MockSignal to ConstantSignal

New Features

  • Enhanced plotting facilities with new vs.plot module
  • Added plot_microgrid_trace() function for visualizating simulation results
  • Improved Plotly-based interactive plots for better data exploration
  • Support for both detailed and overview plot layouts

Documentation & Examples

  • Restructured tutorials - Examples moved from examples/ to docs/tutorials/
  • Updated first three tutorials with improved plotting and clearer explanations
  • Enhanced Signal tutorial with new plotting capabilities
  • Added CLAUDE.md with development guidelines for AI assistance

Full Changelog: https://github.com/dos-group/vessim/compare/0.9.3...0.10.0

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum about 1 year ago

Vessim - 0.9.3

What's Changed

Full Changelog: https://github.com/dos-group/vessim/compare/0.9.2...0.9.3

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum about 1 year ago

Vessim - 0.9.2

Maintenance update

Full Changelog: https://github.com/dos-group/vessim/compare/0.9.1...0.9.2

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum about 1 year ago

Vessim - 0.9.1

What's Changed

Full Changelog: https://github.com/dos-group/vessim/compare/0.9.0...0.9.1

Energy Systems - Grid Management and Microgrid - Python
Published by marvin-steinke almost 2 years ago

Vessim - 0.9.0

What's Changed

Full Changelog: https://github.com/dos-group/vessim/compare/0.8.0...0.9

Energy Systems - Grid Management and Microgrid - Python
Published by marvin-steinke almost 2 years ago

Vessim - 0.8.0

What's Changed

  • Added Collector Signal #227
  • Fixed Increasing Real-Time Factor Offset #228

Full Changelog: https://github.com/dos-group/vessim/compare/0.7.0...0.8.0

Energy Systems - Grid Management and Microgrid - Python
Published by marvin-steinke about 2 years ago

Vessim - 0.7.0

What's Changed

  • Vessim now exposes all classes and utility methods on top-level. We recommend importing vessim as import vessim as vs (similar to import pandas as pd) to be able to then reference components via e.g. vs.Environment https://github.com/dos-group/vessim/pull/210
  • The co-simulation infrastructure was updated to ensure the correct order of simulator execution and allow setting storage/policy parameters through self.set_parameters. The storage API now uses Wh instead of Ws, and SimpleBattery SOC and min_SOC are now robust against floating point operations https://github.com/dos-group/vessim/pull/213
  • Changed the Actor-Signal Interface: The Actor class is not an abstract base class anymore and uses a Signal to define its behavior. This replaces the need for many custom implementations like the old Generator and PowerMeter classes and allows for more flexibility as most functionality can be defined through a Signal. Custom Actors are now to be subclassed from ActorBase https://github.com/dos-group/vessim/pull/211
  • Simulator names are now properly logged to allow for better identification in logging https://github.com/dos-group/vessim/pull/216

Full Changelog: https://github.com/dos-group/vessim/compare/0.6.0...0.7.0

Energy Systems - Grid Management and Microgrid - Python
Published by marvin-steinke about 2 years ago

Vessim - 0.6.0

What's Changed

  • Replaced the Redis+Docker implementation for the SiL module with native Python multiprocessing.Queue and reworked the vessim.sil.broker interface #195 #199 #206 #207
  • Rewrite of the Storage/StoragePolicy modules #198
  • Clock and sim_time have been removed from the public interface #193
  • Added dataset documentation #202 and updated Usage Examples #194 #200
  • Bugfixes related to the Microgrid initialization #196
  • Wattime dataset update #201

Full Changelog: https://github.com/dos-group/vessim/compare/0.5.0...0.6.0

Energy Systems - Grid Management and Microgrid - Python
Published by marvin-steinke about 2 years ago

Vessim - 0.5.0

What's Changed

  • Several API changes to Environment #175 #176 #183
  • Bugfix for infinitely running co-simulation #179
  • GridSim is now time-based by #181
  • HistoricalSignal rewrite and documentation #184
  • Website Rework #190

Full Changelog: https://github.com/dos-group/vessim/compare/0.4.0...0.5.0

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum over 2 years ago

Vessim - 0.4.0

What's Changed

  • Entirely reworked scenario API
  • HistoricalSignal.from_dataset(...) can now load read-to-use datasets. So far we included datasets provided by Solcast and Watttime

Full Changelog: https://github.com/dos-group/vessim/compare/0.3.2...0.4.0

Energy Systems - Grid Management and Microgrid - Python
Published by birnbaum over 2 years ago