Examples Overview

This notebook gives an overview of the different example files and what they are used for. They are organised following the folder structure of the Examples directory. Click on the notebook titles to open them.

Surrogate Modelling

Interactive Surrogate

An overview of lots of BESOS functionality. We define an EnergyPlus model with two parameters, generate samples that span the design space, use these to train a surrogate model, then explore the design space using an interactive plot that queries the surrogate model.

Overview of Surrogate modelling on BESOS

This notebook gives an overview of surrogate modelling on BESOS, with links to many other example notesbooks that demonstrate specific functionality: - Fitting a Gaussian Process model - Fitting a feed-forward Neural Network - Fitting a Neural-Network using TensorFlow - Using an adaptive fitting algorithm


Building Optimization

This notebook gives an overview of building design optimization. It uses EnergyPlus via an Evaluator and defines the optimization problem using Parameters and Descriptors.

Optimization Run Flexibility

It is possible to change the configuration of the algorithm part way through the optimisation process, or even to switch algorithms completely. Doing so requires using Platypus algorithms directly, instead of the algorithm wrappers provided through the optimization module.

Objectives and Constraints

There are two ways to use the outputs of an Evaluator: Objectives and Constraints. These are both made using the MeterReader and VariableReader classes.

Energy Hub

Overview of Energy Hub modelling on BESOS

This notebook gives an overview of the Energy Hub model, with links to the following example notesbooks that demonstrate specific functionality: - Run EHub is a simple example that walks through the use of EHub using the original workflow. - Exploring Command Line Features of EHub explains the command line features of the EHub model. - Adding custom constraints shows how to add three different types of custom constraints. - Modify existing constraint edits an existing constraint of the base model to add a subsidy for certain renewable technologies. - Remove existing constraint turns off an existing constraint. - Rooftop Constraint adds a constraint which limits roof size on which solar technologies can be installed. - Time Varying Grid Price adds a time series which represents grid price. - Time Resolved Carbon Factors combines Energy Hub modelling in BESOS with analysis of the wider power system using SILVER. - Storage plots gives graphical results showing how a storage device is operated. - Overriding Input Data gets load data for some typical days from a separate file, overwrites the time series and solves the model for each time series. - Multiple Hubs gives an overview of how hubs are linked together. - Linear Powerflow adds linear powerflow constraints to the Energy Hub model. - Edit Excel is a notebook to edit the input excel file. - Edit Networks Excel is a notebook to edit the networks excel file. - EHEvaluator demonstrates the EHEvaulator. - EP to EH Evaluators shows how to combine an Energy Hub and and EnergyPlus Evaluator. - PyEHub Parameter Editor shows how to define BESOS Parameters for PyEHub models.

Data Analysis

Bayesian Network

A stochastic generator of hourly electricity use in a residential building fitted to measured data, to generate synthetic profiles for a Monte Carlo analysis.

Fitting Grey-box Models

This notebook and associated files implement the methods used in a paper applying grey-box models to building temperature data to obtain building characteristics. It also shows how notebooks can be used as the front-end for scripts written as pure Python .py files.

Parametrics and Sensitivity Analysis

Parametric Analysis

How to define a parametric (brute-force) analysis using an EnergyPlus model, and get the energy use for all combinations of parameter values.

Morris Screening

Implementation of the Morris screening global sensitivity method.

Sobol Sensitivity Analysis

Implementation of the Sobol global variance-based sensitivity analysis method.



How to use the three BESOS evaluators: - the EnergyPlus Evaluator (EvaluatorEP) - the Generic Evaluator (EvaluatorGeneric) - the Energy Hub Evaluator (EvaluatorEH)

Example of how to use EvaluatorGeneric to wrap multiple evaluators or functions for multiple objectives problem.


Descriptors specify what kinds of values are valid for a parameter.


Selectors identify which part of a model to modify for a given parameter, and how to modify it.

Generic Selectors

Generic Selectors let you provide a function which modifies the building, for when you need more customisation than other selectors provide.

Custom EnergyPlus Evaluator functions

Custom functions can be executed on the EnergyPlus results.

Running EnergyPlus directly

Various ways of running EnergyPlus directly and interacting with models via EPPy.

Automatic Error Handling

Sometimes there are parts of the design space that we want to explore that will cause the EnergyPlus simulation to fail, such as invalid combinations of parameter values. In this example, we demonstrate how this is handled using an undefined material to represent an invalid state.

Different Version of EnergyPlus

Use different version of EnergyPlus to run simulation.

Cluster computing

Cluster Submission

Job submission to the Compute Canada cloud or similar can be integrated into the notebook workflow, as seen here. Also provided are tutorials on Linux terminal commands and SFTP file transfer.



Some basic examples of geomeppy library.