Skip to main content

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

Project description

Importable files

parameters contains different classes used to represent the attributes of the building that can be varied, such as the thickness of the insulation, or the window to wall ratio. These parameters are separate from the value that they take on during any evaluation of the model.

objectives defines the classes used to measure the building simulation and to generate output values.

sampling includes functions used in selecting values for parameters in order to have good coverage of the solution space.

evaluator contains tools that convert parameters and their values into measurements of the properties of the building they represent.

optimizer provides wrappers for the platypus and rbf_opt optimisation packages

  • Performs the conversion between our Problem type and platypus' Problem type automatically.
  • Converts Pandas DataFrames to populations of platypus Solutions
  • Supports NSGAII, EpsMOEA, GDE3, SPEA2 and and other algorithms
  • Supports rbf_opt

problem defines classes used to bundle the parameters, objectives and constraints, and to manage operations that involve all of them at once, such as converting data related to the problem to a DataFrame

eppy_funcs contains miscellaneous functions used to interact with the eppy package.

  • Initialises idf objects
  • Window adjustment helper functions
  • Variable name conversions

config defines various constants and defaults used in the other files.

Example notebooks

Polished

Polished notebooks have a reasonable amount of markdown/comments explaining how to use the features that they demonstrate. Consider starting with Quick Tour.

Automtic Error Handling

Creating and evaluating Parameters shows how to make different kinds of parameters, sample data for them, and simulate the energy use of a building with those parameters.

Descriptors, Evaluators, Selectors, and Objectives and Constraints all cover the class with the same name. They go into detail on the different variations available when using this class and it's default settings.

Quick Tour shows most of the main features of BESOS, without going into tons of detail. (The main omitted features is optimization)

Optimisation Run Flexibility shows how platypus optimizers can be stopped and started mid-run, and some optimization settings can be changed before resuming.

Unpolished

These notebooks are bare-bones examples of the features in action. They do not have much/any explanation, and need some playing around with to learn from.

Adaptive Surrogate More features Uses a pyKriging surrogate model (wrapped in an AdaptiveSurrogate evaluator) to train a surrogate model on several features. Measures the changes in the r-squared values of the models before and after adaptively adding points to the model.

Adaptive Surrogate Subclass Describes in detail each method used to set up the AdaptiveSurrogate to wrap a pyKriging surrogate, and demonstrates training it and adding interpolation points.

Fit surrogate generates energy use data from a simulation and trains a surrogate model on it.

Genetic Algorithm-SR

Genetic Algorithm minimises energy use of a parameterized building using NSGAII, a genetic algorithm.

Mixed Type Optimisation

Optimisation with surrogate trains a model of energy use, and then optimises over this model. Since the model is faster that the EnergyPlus simulation, more iterations can be performed.

Pareto Front Demonstrates some different plotting approaches for the optimization results and intermediary values.

RBF opt A demonstration of the rbf-opt algorithm.

Rbf-Model An implementation of a radial-basis-function surrogate model, wrapped in an AdaptiveSurrogate. It could be useful if we wanted to tinker with the rbf-opt algorithm.

Sample data generation Scratch code used to generate sample data. This notebook is not complete, and some of the code is unused.

Old notebooks

These notebooks have not been kept up to date, they were used to explore potential changes. Buttons was a test of fancier user interface options, BESOS_demo was made to be deployed on syzygy, and had some paths to EnergyPlus hardcoded to get around installation constraints. BESOS_Demo was converted to Hello World.

Supporting Files

In most cases, these files will not need to be imported by users.

__init__ defines how these files should be imported as a module.

IO_Objects defines some abstract superclasses that are used for the objects that handle input and output of evaluators (Parameters/Objectives/Descriptors/etc).

errors defines error classes used by this module.

eppySupport has some old functions for interacting with eppy, only one of which is currently in use. (by parameters) It could be trimmed and merged with eppy_funcs.

example_ui supported the Buttons notebook, and is also out of date. It hid some of the code that generates the user interface.

Design Notes

The primary purpose of these tools is to facilitate combining building simulation tools, machine learning techniques, and optimisation algorithms. It does not attempt to provide new tools in any of these domains.

Two dimensional data should be stored in or converted to a DataFrame where possible, especially for user facing data.

Reasonable defaults should be available where possible.

There should be simple versions of core features available which can be used out of the box.

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-1.0.3.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

besos-1.0.3-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file besos-1.0.3.tar.gz.

File metadata

  • Download URL: besos-1.0.3.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for besos-1.0.3.tar.gz
Algorithm Hash digest
SHA256 3cb2e9382938edcc6c44eb233b0b705be7a72e92f55f1963cbc3d69bae1babd4
MD5 ed8ce3c754a75175e03b8fb22cfea84d
BLAKE2b-256 a56955f1eb6413c1b49ad27d159b5c972a78e96ea87467085acf6d53016b05f4

See more details on using hashes here.

File details

Details for the file besos-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: besos-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for besos-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 578f6892debe61219e6c402857e3946087a4090d8647c873c4091bbc0b7f6588
MD5 93c844c5655d5c691afe8ba2c50ae5e0
BLAKE2b-256 8b49105d092f681394eab2e3a79609e03ac087cda31abff07ea005626fc060d4

See more details on using hashes here.

Supported by

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