Skip to main content

District-level energy hourly simulation of buildings

Project description

Building_eload

Version: 0.4.0

Python Version PyPI Pipeline

District-level building energy simulation at hourly resolution.

This model was first presented in the research article : https://doi.org/10.1016/j.enbuild.2026.117409

building_eload is developed as a library, released on PyPI. The Snakemake workflow reproducing the paper's results lives in a separate repository (building_eload_paper), pinned to the published 0.4.x releases of this package.

Overview

building_eload runs a two-stage pipeline:

  1. Static simulation: annual building-level energy estimates and calibration.
  2. Dynamic simulation: hourly electricity load profiles from static outputs.

Main dependency:

  • buildingmodel (for static building physics simulation)

Installation

git clone https://git.persee.minesparis.psl.eu/planeterr/building_eload.git
cd building_eload
pip install -e .

If needed by your workflow, also install buildingmodel in editable mode.

Data Paths Exposed by the Package

Defined in building_eload/__init__.py:

  • data_path["data"]
  • data_path["bdtopo"]
  • data_path["elmas"]
  • data_path["simulation"]
  • data_path["activity_calendar"]
  • data_path["validation"]
  • data_path["climate"]
  • data_path["representative_districts"]
  • plot_path
  • download_link

Data Layout

The data/ directory is not tracked in git (multi-GB). All paths in data_path resolve relative to the repository root:

data/
├── activity_calendar/          # occupant activity calendars (10-min time step)
├── bdtopo/                     # BDTOPO building footprints (downloaded per region)
├── calibration/                # static-model calibration outputs
├── climate/                    # ERA5-derived weather files (see scripts/climate)
├── elecdom/                    # Elecdom appliance panel data
├── elmas/                      # ELMAS dataset
├── representative_districts/   # clustering outputs (medoid districts)
├── simulation/                 # static + dynamic simulation results
└── validation/                 # ORE / Enedis / RTE measured consumption

Download sources are listed in building_eload.download_link (BDTOPO regions, district list, occupant diaries, ORE annual consumption, ELMAS); helpers live in building_eload.utils.data_download. Reference data (districts, BDTOPO fallback) is otherwise fetched through the buildingdata package. The unit test suite runs without data/; the integration tests (StaticSimulation/DynamicSimulation/validation runs) require it.

Current Core API

Static simulation (building_eload.core.static_simulation)

Main classes:

  • StaticParameters
  • StaticSimulation
  • StaticResults
  • BuildingModelResults
  • StaticProcessor

Primary methods used by users:

  • StaticSimulation.run()
  • StaticSimulation.run_energy_demand()
  • StaticResults.save_results(save_dict: Optional[dict[str, bool]] = None)

Dynamic simulation (building_eload.core.dynamic_simulation)

Main classes:

  • DynamicParameters
  • DynamicSimulation

Primary methods used by users:

  • DynamicSimulation.from_files(district_id, parameters)
  • DynamicSimulation.from_static_results(static_results, parameters)
  • DynamicSimulation.run()
  • DynamicSimulation.save_results()
  • DynamicSimulation.plot_results(...)

Minimal Usage

Tutorials for both simulation processes are available in : /doc/tutorials

1) Static simulation

import numpy as np
from building_eload.core.static_simulation import StaticParameters, StaticSimulation


district_id = "262320000"
eu = np.arange(0.7, 1.3, 0.05).round(2)
hs = np.arange(16.0, 22.5, 0.5).round(1)
energy_use_parameters = [
    {"actual_heating_set_point": hs[i], "energy_use_factor": eu[i]}
    for i in range(len(hs))
]

params = StaticParameters(
    n_inference=10,
    calibration_year=2023,
    climate_year=None,
    energy_use_parameters=energy_use_parameters,
)

sim = StaticSimulation(district_id=district_id, parameters=params)
results = sim.run()
results.save_results()

2) Dynamic simulation

from building_eload.core.dynamic_simulation import DynamicParameters, DynamicSimulation


district_id = "262320000"
params = DynamicParameters(
    year=2023,
    run_non_residential=True,
    run_again=True,
)

sim = DynamicSimulation.from_files(district_id=district_id, parameters=params)
sim.run()
sim.save_results()

Script Entry Points (Current)

  • Static simulation:
python -m building_eload.scripts.simulation.static.run
  • Parallel static simulation:
python -m building_eload.scripts.simulation.static.run_parallel
  • Dynamic simulation:
python -m building_eload.scripts.simulation.dynamic.run
  • Parallel dynamic simulation:
python -m building_eload.scripts.simulation.dynamic.run_parallel
  • Validation:
python -m building_eload.scripts.validation.run
  • Climate preprocessing:
python -m building_eload.scripts.climate.generate_climates

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

building_eload-0.6.0-py3-none-any.whl (151.1 kB view details)

Uploaded Python 3

File details

Details for the file building_eload-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: building_eload-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 151.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for building_eload-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93f4d9ee4de66b3f23ed36b1f1820a63082cb8a73add68ee90df8b336dae3cd5
MD5 5f9428d2a3e2e074edc1bf913bc51184
BLAKE2b-256 046e1588249334eaba4fb38a14b4815beb249df7f331f6ee86659d06d26d8326

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