Sinergym provides a Gymnasium-based interface to interact with building simulations. This allows control in simulation time through custom controllers, including reinforcement learning agents
Project description
About 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 agents.
For more information about Sinergym, refer to its documentation.
Main features
⚙️ Simulation engines compatibility. Sinergym is currently compatible with the EnergyPlus Python API for controller-building communication.
📊 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. Sinergym provides several features to execute experiments in Google Cloud.
📈 Weights & 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 notebooks examples.
📚 Extensive documentation, unit tests, and GitHub actions workflows. Sinergym follows proper development practices facilitating community contributions.
Project structure
This repository is organized into the following directories:
sinergym/: the source code of Sinergym.docs/: Sinergym's documentation sources.examples/: notebooks with several examples illustrating how to use Sinergym.tests/: Sinergym tests code.scripts/: auxiliary and helper scripts.
Available environments
For a complete and up-to-date list of available environments, please refer to our documentation.
Installation
Read INSTALL.md for detailed installation instructions.
Usage example
This is a simple script using Sinergym:
import gymnasium as gym
import sinergym
# Create environment
env = gym.make('Eplus-datacenter-mixed-continuous-stochastic-v1')
# Initialization
obs, info = env.reset()
truncated = terminated = False
# Run episode
while not (terminated or truncated):
action = env.action_space.sample() # random action selection
obs, reward, terminated, truncated, info = env.step(action)
env.close()
Several usage examples can be consulted here.
Contributing
To report questions and issues, open an issue following the provided templates. We appreciate your feedback!
Check out CONTRIBUTING.md for specific details on how to contribute.
To better adhere to the required standards of this repository, we recommend running the following command:
chmod +x hooks/*
git config core.hooksPath hooks
This will add git hooks that execute before using typical commands (add, commit, push, etc.) to verify that the methodology is correct before proceeding with the process.
Projects using Sinergym
The following are some of the projects using Sinergym:
📝 If you want to appear in this list, feel free to open a pull request and include the following badge in your repository:
Repository activity
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},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sinergym-3.10.0.tar.gz.
File metadata
- Download URL: sinergym-3.10.0.tar.gz
- Upload date:
- Size: 3.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bc87c620c9603989248ae1b1d2f1aa1328215e2aede92423c5fa6cbd5cfc72b
|
|
| MD5 |
9f55572b59c0adcdfe0a0b0b729006ad
|
|
| BLAKE2b-256 |
0140e5e1aab74366fd1ffeb1ce5f4a00260f598c6c43be7f24e76f9d3beaa4d7
|
Provenance
The following attestation bundles were made for sinergym-3.10.0.tar.gz:
Publisher:
create_release.yml on ugr-sail/sinergym
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinergym-3.10.0.tar.gz -
Subject digest:
7bc87c620c9603989248ae1b1d2f1aa1328215e2aede92423c5fa6cbd5cfc72b - Sigstore transparency entry: 628092889
- Sigstore integration time:
-
Permalink:
ugr-sail/sinergym@1f3bdd26eddef0485849f88d063f805d0c3ee955 -
Branch / Tag:
refs/tags/v3.10.0 - Owner: https://github.com/ugr-sail
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_release.yml@1f3bdd26eddef0485849f88d063f805d0c3ee955 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sinergym-3.10.0-py3-none-any.whl.
File metadata
- Download URL: sinergym-3.10.0-py3-none-any.whl
- Upload date:
- Size: 3.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a45abc489607c463874774fd463b07630473c2b3eca6212cd6417310d4b81b9
|
|
| MD5 |
644f50303a7514313045e770e4765708
|
|
| BLAKE2b-256 |
081d5713e62d69faf73188f40b421563daccc429a91b4cba889742c2acd86c54
|
Provenance
The following attestation bundles were made for sinergym-3.10.0-py3-none-any.whl:
Publisher:
create_release.yml on ugr-sail/sinergym
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sinergym-3.10.0-py3-none-any.whl -
Subject digest:
5a45abc489607c463874774fd463b07630473c2b3eca6212cd6417310d4b81b9 - Sigstore transparency entry: 628092933
- Sigstore integration time:
-
Permalink:
ugr-sail/sinergym@1f3bdd26eddef0485849f88d063f805d0c3ee955 -
Branch / Tag:
refs/tags/v3.10.0 - Owner: https://github.com/ugr-sail
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_release.yml@1f3bdd26eddef0485849f88d063f805d0c3ee955 -
Trigger Event:
release
-
Statement type: