Skip to content

0.12.0

Latest
Compare
Choose a tag to compare
@birnbaum birnbaum released this 31 Jul 15:47

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: 0.11.0...0.12.0