Skip to main content

Calibrates a residential building energy model to utility bills.

Project description

OpenStudio™ HPXML Calibration

ci

A package to automatically calibrate an OpenStudio-HPXML residential building model against utility bills.

The implementation relies heavily on BPI-2400-S-2015 v.2 Standard Practice for Standardized Qualification of Whole-House Energy Savings Predictions by Calibration to Energy Use. However, it is not currently a complete implementation of BPI-2400.

Documentation & usage

Full documentation is available at https://NREL.github.io/OpenStudio-HPXML-Calibration

Create a custom config file (based on default_calibration_config.yaml) that is specific to the home being calibrated.

Then run: uv run openstudio-hpxml-calibration calibrate --hpxml-filepath hpxml.xml --config-filepath my_config.yaml

See uv run openstudio-hpxml-calibration calibrate --help or uv run openstudio-hpxml-calibration --help for more options.

Developer installation

  • Clone the repository: git clone https://github.com/NREL/OpenStudio-HPXML-Calibration.git

  • Move into the repository: cd OpenStudio-HPXML-Calibration

  • Install OpenStudio 3.11.0

  • Uv is used to manage the project & dependencies (and may also be used to manage Python if you want). After cloning, ensure you have uv installed, then run uv sync to install the package and all development dependencies.

    • Some Windows developers have reported version conflicts using the default strategy. If this occurs, consider changing the resolution strategy using uv sync --resolution=lowest-direct
  • Download all weather files using uv run openstudio-hpxml-calibration download-weather

  • Developers can then call uv run pytest to confirm all dev dependencies have been installed and everything is working as expected. (If you need to restrict the number of concurrent workers, you can use e.g. uv run pytest -n <NUM>.)

  • Activate pre-commit (only required once, after cloning the repo) with: uv run pre-commit install. On your first commit it will install the pre-commit environments, then run pre-commit hooks at every commit.

  • Before pushing to Github, run pre-commit on all files with uv run pre-commit run -a to highlight any linting/formatting errors that will cause CI to fail.

  • Pycharm users may need to add Ruff as a 3rd-party plugin or install it as an external tool to their IDE to ensure linting & formatting is consistent.

  • Developers can test in-process functionality by prepending uv run to a terminal command. For instance, to see the CLI help menu with local changes not yet committed, run: uv run openstudio-hpxml-calibration --help

Alternative Dev Container Environment

There's a Dev Container configuration in this repo which installs all the necessary dependencies in a docker container and attaches to VSCode to it. To use it:

  • Install VSCode
  • Install the Dev Containers extension.
  • Install Docker Desktop or something compatible.
  • Click the little blue "><" icon in the lower left of VSCode, and select "Reopen in Container". The window will reload. It may take a few minutes the first time.

Testing

Project tests can be run with uv run pytest from the repo root. (If you need to restrict the number of concurrent workers, you can use e.g. uv run pytest -n <NUM>.)

Ruby Measure tests can be run with openstudio src/measures/ModifyXML/tests/modify_xml_test.rb

Developing documentation

During development we can serve docs locally and view updates as they are made.

  1. Start a documentation update branch: git switch -c <branch_name>
  2. uv run mkdocs serve
  3. Point browser to http://127.0.0.1:8000/
  • To deploy, push a commit in the docs folder to the main branch
  • Wait a few minutes, then verify the new documentation on the docs website

License

This project is available under a BSD-3-like license, which is a free, open-source, and permissive license. For more information, check out the license file.

This project is NREL Software Record SWR-25-94

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

openstudio_hpxml_calibration-0.2.0.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

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

openstudio_hpxml_calibration-0.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file openstudio_hpxml_calibration-0.2.0.tar.gz.

File metadata

  • Download URL: openstudio_hpxml_calibration-0.2.0.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for openstudio_hpxml_calibration-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3e37df6652a835136fdfedbc68f10e66cacb6105793f897f37f33097f1635189
MD5 a166e1403dee78421da11bbbd8baad1d
BLAKE2b-256 707962367682f94cd3d827f76734233a5fc6ae314e59cb482ecb2507b340b4e1

See more details on using hashes here.

File details

Details for the file openstudio_hpxml_calibration-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: openstudio_hpxml_calibration-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for openstudio_hpxml_calibration-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad0bed161bb330087e46b057a61c20f0f1bc10825cac1faee13e9e24a6b3d06c
MD5 bda39a00cb805d780a95d21069b78019
BLAKE2b-256 eaf8ba346a3b7e9ca6f879817f2898852013b616609dbc5029e3a6c3944bec0e

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