Skip to content

Bayesian calibration of Building Energy Models using Stan modeling language

License

Notifications You must be signed in to change notification settings

yiyuan1840/bc-stan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bc-stan

Description

bc-stan provides code for:

  1. Bayesian calibration of Building Energy Models using the Stan modeling language
  2. Parameter screening with Morris method

Related Publications

  1. Detailed description of this code can be found in Chong and Menberg (2018)
  2. Application case study of Bayesian calibration Chong et. al (2017)

Bayesian calibration of energy models using Stan

The stan code for Bayesian calibration is based on Kennedy and O'Hagan's (2001) Bayesian calibration framework and follows the statistical approach described in Higdon et. al. (2004).

Stan is portable across many computing environments. Two interfaces, R (main.R) and Python (main.py) are provided here to interface with the stan models in this repository.

Prerequisites

Install Stan and its required dependencies.

Usage

Main files

  1. main.R: R interface for running Stan model
  2. main.py: Python interface for running Stan model
  3. bcWithPred.stan: Stan model for Bayesian calibration of building energy models with predictive inferences.
  4. bcWithoutPred.stan: Stan model for Bayesian calibration of building energy models without predictive inferences.

To run Bayesian calibration with predictive inference in Stan, run main.R or main.py as is.

To run Bayesian calibration with predictive inference outside of Stan, comment lines 60-63 and line 85 and uncomment lines 65-68 and line 86 in main.R.

Parameter screening using Morris method

The Python code for parameter screening is based on Morris (1991) and implemented using the SALib python library.

Usage

Main files

  1. sensitivity.py: Python class for Morris method with E+ idf
  2. idf_functions.py: Python class containing functions to modify E+ idf

Prerequisites

Install eppy and SALib and their respective dependencies.

Contact

If you need to get in touch for information about the code or its usage, you may drop us an email.

About

Bayesian calibration of Building Energy Models using Stan modeling language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 36.1%
  • Stan 35.3%
  • Python 28.6%