Skip to main content

A library for Building and Energy Simulation, Optimization and Surrogate-modelling

Project description

analysis domains encompassed by BESOS.

BESOS: Building and Energy Systems Optimization and Surrogate-modelling

PyPI Latest Release PyPi Package format PyPI Downloads License: GPL v3

Documentation

pipeline status Coverage Code style: black pre-commit

BESOS is a collection of modules for the simulation and optimization of buildings and urban energy systems. BESOS is designed to help researchers and practitioners to design more sustainable, district-integrated buildings. It integrates EnergyPlus and EnergyHub simulation software with optimization and machine learning functionality. this includes lots of help with 'surrogate modelling', where machine learning models are fitted to data generated by parametric runs of detailed simulation models. BESOS facilitates running large-scale parametric analyses of EnergyPlus or EnergyHub models with output in a pandas DataFrame and using this to train machine learning surrogate models with scikit-learn or TensorFlow. We provide access to commonly used optimization algorithms via existing optimization toolboxes.

Installing BESOS

Ensure that you have Python 3.7+ and the corresponding version of pip. pip install besos[complete] (If you do not want to run the example notebooks, you can use pip install besos, which will install with less dependencies.)

Install Dependencies

We use third party software to run building models (EnergyPlus), to solve EnergyHub models (a MILP solver), and make use of Rbfopt (via Bonmin). To use this functionality you need to install the software for the corresponding the task. GLPK and Bonmin are optional, it is possible to use Besos without them.

Install Energyplus

Download EnergyPlus here. (BESOS is currently supporting versions from 8.8-9.3+).

For windows: After downloading the installation file, double click the setup file to start installing. After setup is complete, navigate to your System Properties and in the Advanced tab, select Environment Variables. In either your User Variables or System Variables (Depending on your permissions), double click on Path and add the location of your EnergyPlus folder to the end of it. Ensure the path is C:\EnergyPlusV{version} for proper integration with Besos.

For linux: Run the downloaded script, and accept the prompt to add symlinks. Ensure the path is /usr/local/EnergyPlus-{version} for proper integration with Besos.

TensorFlow (only required to use TensorFlow)

TensorFlow is a machine learning library of which we have provided some examples. This package is quite large 300 mb therefore we have not added this to the requirements.

To install TensorFlow use pip install.

pip install tensorflow

MILP solver (only required to use EnergyHub)

EnergyHub modelling requires a linear programming solver that is supported by PuLP, such as GLPK, CPlex, or Gurobi. To learn about how to setup a custom solver please review the readthedocs page on Customizing EnergyHub Solver.

GLPK is free and open source. It can be found here. If you are using a Debian based operating system, you can install GLPK with sudo apt install glpk-utils

Optional: Bonmin (only required to use RBFopt)

Bonmin is required to use the RBFopt optimizer. How to install Bonmin can be found here.

Running Example Notebooks

Examples of Besos' functionality are provided through example notebooks. The notebooks can be viewed as Python scripts or through a Jupyter notebook.

You can run notebooks from the Besos platform, which has the besos library and all dependencies pre-installed, or you can install Jupyter locally.

To run the notebooks you need Juptyer installed. Jupyter can be installed using: pip install juptyer and launched from the current directory with jupyter notebook.

Contributing and Support

When creating gitlab issues, please search the existing gitlab issues to see if someone else has already made the same request.

Feature Requests

To request a feature open a new issue with your feature request.

Bug reports/Questions

If you have found a bug, please open a gitlab issue describing the bug. Make sure to include steps to reproduce the bug. Ideally, include a small bit of code that causes the bug. If the bug causes an error, please include the traceback. If the bug causes the wrong behaviour, please mention what besos should do in this situation.

Code contributions

If you are interested in contributing to the code please review the readthedocs page on contributing to the code.

Example notebooks

A good way to start is using the example notebooks. They are described in the examples overview

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

besos-2.1.0.tar.gz (2.3 MB view hashes)

Uploaded Source

Built Distribution

besos-2.1.0-py3-none-any.whl (2.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page