Skip to content

THD-Spatial-AI/buem

 
 

Repository files navigation

BuEM — Building Energy Model

Documentation License: MIT Python 3.13+

BuEM computes hourly heating and cooling demand for buildings using the ISO 13790 5R1C thermal-network method combined with a linear-programming solver. It exposes a REST API that accepts GeoJSON and returns energy profiles, making it straightforward to integrate with urban energy-system models.

Full documentation: https://buem.readthedocs.io/en/latest/


Quick Start

# 1. Clone and create the environment
git clone https://github.com/somadsahoo/buem.git
cd buem
conda env create -f environment.yml
conda activate buem_env

# 2. Verify the installation
buem validate

# 3. Run the thermal model
buem run

# 4. Start the API server (includes Swagger UI)
buem api
# Open http://localhost:5000/api/docs

For detailed installation instructions (conda, Docker, editable install), see the Installation Guide.


CLI Reference

buem <command> [options]
Command Description
buem run [--plot] [--milp] Run the thermal model for a single building
buem api [--dev] [--port N] Start the REST API server (Gunicorn / Flask)
buem validate Verify the installation and environment
buem version Print the installed BuEM version
buem multibuilding [--test MODE] [--workers N] Run parallel multi-building processing
buem --help            # Show all commands
buem <command> --help  # Show options for a specific command

Full CLI options and examples: Modules → Integration


API Server

BuEM includes a Flask-based HTTP API with interactive Swagger UI documentation.

buem api          # Start on http://localhost:5000
buem api --dev    # Flask development server
Endpoint Method Description
/api/process POST Process GeoJSON FeatureCollection (batch)
/api/run POST Run model for a single building config
/api/files/<filename> GET Download result file
/api/health GET Health check
/api/docs GET Swagger UI (interactive API browser)
/api/openapi.yaml GET OpenAPI 3.1 specification

Full API reference: API Integration


Docker

docker compose up          # Start the API in a container
docker compose down        # Stop and remove containers

Docker configuration details: Deployment


Documentation

Section Link
Introduction & theory Introduction
Installation (conda, Docker) Installation
Module reference Modules
API integration & schemas API Integration
Deployment & production Deployment

Publications

Publication list will be added here.


Acknowledgements

BuEM is developed at Utrecht University as part of the CETP programme, funded by the NWO (Dutch Research Council).

Building typology data is derived from the TABULA/EPISCOPE project (IEE TABULA — Typology Approach for Building Stock Energy Assessment).


License

This project is licensed under the MIT License — see the LICENSE file for details.


Requirements

  • Python ≥ 3.13
  • Key dependencies: cvxpy, flask, numpy, pandas, pvlib, scipy

Full dependency list: Installation → Prerequisites

About

BuEM is a single building model for simulating heating/cooling demands based on ISO 52106-1

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 93.5%
  • Shell 3.9%
  • PowerShell 1.4%
  • Batchfile 1.1%
  • Dockerfile 0.1%