eprllib: use EnergyPlus as an environment for RLlib
This repository provides a set of methods to establish the computational loop of EnergyPlus within a Markov Decision Process (MDP), treating it as a multi-agent environment compatible with RLlib. The main goal is to offer a simple configuration of EnergyPlus as a standard environment for experimentation with Deep Reinforcement Learning.
Installation
Python >=3.12 and <=3.14 is required. To install eprllib, simply use pip:
pip install eprllib
Key Features
- Integration of EnergyPlus and RLlib: This package facilitates setting up a Reinforcement Learning environment using EnergyPlus as the base, allowing for experimentation with energy control policies in buildings.
- Simplified Configuration: To use this environment, you simply need to provide a configuration in the form of a dictionary that includes state variables, metrics, actuators (which will also serve as agents in the environment), and other optional features.
- Flexibility and Compatibility:
eprllibeasily integrates with RLlib, a popular framework for Reinforcement Learning, enabling smooth setup and training of control policies for actionable elements in buildings.
Usage
- Import
eprllib. - Configure
EnvConfigto provide a EnergyPlus model based configuration, specifying the parameters required (seeeprllib.Env.EnvConfig). - Configure RLlib algorithm to train the policy.
- Execute the training using RLlib or Tune.
Occupancy forecasts
When user_occupation_forecast is enabled, forecast names have the form
<agent>: User Occupation Forecast: +<relative hour>h<timestep>. Relative
hour 0 is the current clock hour; timesteps are one-based. The observation
contains complete rows from hour 0 through occupation_prediction_hours,
inclusive. Thus it has a fixed shape and includes every future slot in the
requested horizon, as well as already elapsed slots in hour 0 and extra slots
in the last row. In particular, +0h1 and +24h1 are different observations.
This replaces the previous wrapped hour names and changes the observation
shape. At startup, the current slot is applied; after a timestep is reported,
the next slot is applied.
Set occupation_time_steps_in_hour on ObservationSpec to match the model's
zone timestep count (default 6; the bundled profiles have six slots per hour).
The runner rejects mismatches. To forecast holidays, provide
occupation_holidays as a list of ISO dates, for example
["2026-12-25", "2027-01-01"]. The current date uses EnergyPlus's holiday
index; future dates not in the list are assumed to be non-holidays, including
for occupancy prepared across midnight. At the begin callback the actual
EnergyPlus holiday index corrects an incorrect assumption for the applied
occupancy. Without a complete future calendar, forecasts may differ from actual
holiday schedules.
confidence_level=1.0 alone does not make future predictions deterministic:
the default positive lambdaa decays confidence toward 0.5. Set lambdaa=0
as well for a deterministic forecast, subject to the holiday limitation above.
Contribution
Contributions are welcome! If you wish to improve this project or add new features, feel free to submit a pull request. Checkout our Code of Conduct and How to Contribute documentation.
Licency
MIT License
Copyright (c) 2024 Germán Rodolfo Henderson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2023 Ray Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Metadata
Release files for eprllib 1.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eprllib-1.8.0.tar.gz | 6.7 MB | With provenance | Details for eprllib-1.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eprllib-1.8.0-py3-none-any.whl | Python 3 | none | any | Details for eprllib-1.8.0-py3-none-any.whl |
Total release size: 10.0 MB
Release files / eprllib-1.8.0.tar.gz
| Download URL | eprllib-1.8.0.tar.gz |
|---|---|
| Size | 6.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d9f281630b0b32f2656c598bbf582ac941d7c55963adc2cbcc13d54344b2b6f
|
|
BLAKE2b-256 checksum How to use checksums |
3a5aabcec6490cbf1baa39aa5923657cb0bdc4327c849431b572ae01a5e42dad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logRelease files / eprllib-1.8.0-py3-none-any.whl
| Download URL | eprllib-1.8.0-py3-none-any.whl |
|---|---|
| Size | 3.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c92f645d49bfa98f573933907844fc499d833a910e45cc5ec7712c4b504284d
|
|
BLAKE2b-256 checksum How to use checksums |
e0b842b958111a92d680b0e932be76066f05995e39fddab22cfc2bf7c8c6aae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logSecurity for eprllib 1.8.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for eprllib-1.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logA 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.