The Advanced Controls Test Bed (ACTB) is a virtual buildings test bed that interfaces external controllers to high-fidelity Spawn of EnergyPlus models. The ACTB has two interfaces to Python control libraries:
Spawn of EnergyPlus is a model-exchange framework that allows the simulation of building envelope and internal gains models in EnergyPlus, and their HVAC systems and controls in Modelica.
This makes the ACTB a flexible and user-friendly framework for developing and evaluating advanced controls using high-fidelity building models.
The ACTB is based on the BOPTEST framework available here and the BOPTEST OpenAI Gym interface.
The ACTB is currently in its first release version and might undergo changes, contain broken modules, or function unexpectedly. Please report all issues in the Issues tab at the top of the page.
The ACTB works with Linux and macOS out of the box, but requires an additional software layer for working on Windows. If you are a Windows user, please install the Windows Subsystem for Linux (WSL) by following the instructions here. You will simply need to start an instance of the WSL first, then run the commands found in the various instructions of this repository in the Linux terminal that will be launched.
The ACTB is packaged as a Docker container, please install Docker by following the instructions here.
While the Docker container comes with Python and all the dependencies installed, if you are running a controller script externally you will need to install Python and a few libraries. For Python, please install Python 3.9 by following these links for Linux, macOS, or Windows.
Note: If you have several versions of Python installed, make sure you are running Python 3.9 by replacing python
commands with python3
whenever the command is present in the instructions.
We strongly recommend installing and using pip
to manage Python libraries.
Follow the instructions here to install pip.
With pip installed, just open a terminal window, cd
at the root of the ACTB
and run:
pip install -r requirements.txt
If you have several versions of Python installed, you may need to replace pip
by pip3
in the above command to make sure you
are installing these libraries for your Python 3.
Make sure the Docker daemon is running.
Build the Docker containers by running $ make build
Run the Docker containers by running $ make run
Run an example test controller in a separate terminal:
$ cd examples/python/MPC-spawnrefsmalloffice && python main.py
to test a MPC controller.$ cd examples/python/RLC-spawnrefsmalloffice && python DQN_Test_run.py
to test a RLC controller.$ cd examples/python/RBC-spawnrefsmalloffice && python supervisory_example.py
to test the RBC controller.Shutdown a test case container by selecting the container terminal window, Ctrl+C
to close port, and make stop
to stop the Docker container.
Remove the test case Docker image by $ make remove-image
.
Please refer to the ReadMe file present in the actb_client
directory for more details on the API usage.
The ACTB is based on BOPTEST-service, a merge between BOPTEST and Alfalfa. It is supplemented by a library of high-fidelity Spawn models and two advanced controller interfaces. A metamodeling framework allows the generation of reduced order models from Spawn data, in order to provide computationally-efficient models for MPC planning models and RLC pre-training (see the RLC guide here).
Two advanced controller interfaces are currently available for the ACTB.
/interfaces/dompc
, along with a ReadMe file and examples of applications. It is used by the MPC example found in /examples/python/MPC-spawnrefsmalloffice
./interfaces/openai-gym
, along with a ReadMe file and examples of applications. It is used by the RLC example found in /examples/python/RLC-spawnrefsmalloffice
Testcases are found in the /boptest-service/boptest/testcases
directory. Example controllers to go with these test cases are found under the /examples
directory.
For the moment, one Spawn test case is available. It represents the U.S. Department of Energy's Small Office Building.
It is provided with a documentation, found under /boptest-service/boptest/testcases/spawnrefsmalloffice/docs
.
Currently, the ACTB has some issues that we are aware of and are working towards solving. These are:
/boptest-service
contains a copy of the boptest-service
repo.
/boptest-service/boptest/testcases
contains Spawn of EnergyPlus test cases, including docs, models, and configuration settings./examples
contains examples of MPC and RLC Python controllers that interact with Spawn models./interfaces
contains the clients for interfacing do-mpc and OpenAI Gym to the ACTB/metamodeling
contains prototype code for the metamodeling framework/templates
contains template Modelica code for a test case emulator model.We gratefully acknowledge funding by the U.S. Department of Energy under Project 3.2.6.80, titled Multi-Objective Deep Reinforcement Learning Controls.
To develop the ACTB, we rely on the following software:
This project is led by Professor Gregor Henze, at the University of Colorado Boulder. It is developed and maintained by Dr. Thibault Marzullo, Sourav Dey, and Nicholas Long, at the University of Colorado Boulder.
Former project members: