chz056 / BEAR

22 stars 4 forks source link

BEAR

Physics-Principled Building Environment for Control and Reinforcement Learning

Authors: Chi Zhang, Yuanyuan Shi and Yize Chen

University of California San Diego, Hong Kong University of Science and Technology

GitHub Homepage: BEAR.

Thank you for choosing BEAR.

BEAR is a physics-based Building Environment for Control And Reinforcement Learning. The platform is intended for building dynamics modeling and building energy management, and it allows researchers to efficiently benchmark both model-based and model-free (Reinforcement Learning) controllers using a broad collection of standard building models in Python without the need of co-simulation using other building simulators. For implementation convenience, three elements (building type, weather type, and city) can be selected by users to create a customized environment. You can read the detailed presentation of BEAR in our paper:

Zhang, C., Shi, Y., & Chen, Y. (2022). BEAR: Physics-Principled Building Environment for Control and Reinforcement Learning 14th ACM International Conference on Future Energy Systems (e-Energy). 2023, arXiv. https://doi.org/10.48550/arXiv.2211.14744

Usage example

Two examples "QuickStart" and "CustomizeModel_example" are provided for demonstration in Google Colab. Try it out HERE.

Quick reminder: Download the folder "BEAR" and upload it to your Drive in "My Drive", then run the cells.

Manual Installation

To manually install BEAR, please follow the steps below:

  1. Clone the Repository

    Clone the BEAR repository to your local machine:

    git clone https://github.com/chz056/BEAR.git
  2. Navigate to the Cloned Directory

    Change directory to the cloned repository:

    cd BEAR
  3. Install Requirements (Optional) If you plan to use a virtual environment, you can create one using:

    python -m pip install virtualenv
    python -m venv myenv
    source myenv/Scripts/activate # on unix-like systems

    Install the required Python packages using pip:

    pip install -r requirements.txt
  4. Run the Main Script

    Now, you can run the quickstart.py script to start using BEAR:

    python quickstart.py

And that's it! You've successfully installed and set up BEAR on your local machine.

Please report any issues with installation or bugs in the code in the Issues section.

Functionalities

The main functionalities of BEAR are the following :

Environment Variables

BEAR supports a set of user-defined variables as inputs and provides an OpenAI Gym interface. Here is a table of all settings that users could modify:



Buildings

For creating a large variety of building models, BEAR includes 16 different types of building at 19 locations. Here are lists of available buildings, weathers, and locations:



RL algorithms

Researchers from the machine learning and reinforcement learning community can design new environments and algorithms with minimal knowledge of the underlying dynamics and models and thus can focus more on algorithm development and evaluation. BEAR provides an OpenAI Gym interface. Users can perform simulations in the customized environment with any classic model-based control or learning-based controllers. Examples are shown in the google colab notebook.

Simplifications

BEAR enables an automated pipeline to process building geometry, weather and occupancy information to a composable RL environment. Compared to the actual building model, our model makes several simplifications regarding the zone shape, the window/door open schedules, and the shadowing function. Detailed model assumptions are listed below: