Sinergym

Sinergym provides a Gymnasium-based interface to interact with simulation engines such as EnergyPlus. This allows control in simulation time through custom controllers, including reinforcement learning (RL) agents.

*Sinergym* diagram

Github latest release Github last commit Pypi version Pypi downloads GitHub Contributors Github issues GitHub pull requests Github License Pypi Python version DockerHub last version

Note

Please, help us to improve Sinergym by reporting questions and issues here. Detailed information on how to report issues is available here.

Synergym includes the following features:

  • ⚙️ Simulation engines compatibility. Sinergym is currently compatible with the EnergyPlus Python API for controller-building communication. Future updates may include additional engines such as OpenModelica.

  • 📊 Benchmark environments. Similar to Atari or Mujoco, Sinergym allows the use of benchmarking environments to test and compare RL algorithms or custom control strategies.

  • 🛠️ Custom experimentation. Sinergym enables effortless customization of experimental settings. Users can create their own environments or customize pre-configured ones within Sinergym. Select your preferred reward functions, wrappers, controllers, and more!

  • 🏠 Automatic building model adaptation. Automatic adaptation of building models to align with user-defined settings.

  • 🪛 Automatic actuator control. Seamless management of building actuators via the Gymnasium interface. Users only need to specify actuator names, and Sinergym will do the rest.

  • 🤖 Stable Baselines 3 integration. Sinergym is highly integrated with Stable Baselines 3 algorithms, wrappers and callbacks.

  • Controller-agnostic. Any controller compatible with the Gymnasium interface can be integrated with Sinergym.

  • ☁️ Google Cloud execution. Support for easy Google Cloud execution.

  • 📈 Weights and Biases logging. Automate the logging of training and evaluation data, and record your models in the cloud. Sinergym facilitates reproducibility and cloud data storage through Weights and Biases integration.

  • 📒 Notebook examples. Learn how to get the most out of Sinergym through our Jupyter notebooks.

  • 📚 Extensive documentation, unit tests, and GitHub actions workflows. Sinergym follows proper development practices facilitating community contributions.

Contributing

If you are interested in contributing to the development of Sinergym, there are several ways you can get involved:

  • Reporting bugs or suggesting improvements through issues.

  • Assisting in the development of new features or fixing existing bugs.

Before contributing, please refer to CONTRIBUTING.md for additional information.

Projects using Sinergym

The following are some of the projects that utilize Sinergym.

If you would like to be included in the list, just open a pull request requesting it. Before doing so, please add the following badge to your repository:

Examples

If you are new to using Sinergym, you will need to perform some initial setup. Please refer to the Installation section for a detailed guide on this process.

Once the setup is complete, we recommend running the examples available in the examples directory to explore the different features the tool offers.

Citing Sinergym

If you use Sinergym in your work, please, cite our paper:

@article{Campoy2025sinergym,
   title     = {Sinergym – A virtual testbed for building energy optimization with Reinforcement Learning},
   author    = {Alejandro Campoy-Nieves and Antonio Manjavacas and Javier Jiménez-Raboso and Miguel Molina-Solana and Juan Gómez-Romero},
   journal   = {Energy and Buildings},
   volume    = {327},
   articleno = {115075},
   year      = {2025},
   issn      = {0378-7788},
   doi       = {10.1016/j.enbuild.2024.115075},
   url       = {https://www.sciencedirect.com/science/article/pii/S0378778824011915},
}