Skip to main content

OpenUtility

OpenUtility is an alpha-stage Python package for Pyomo-based utility-system optimization. It focuses on investment selection, dispatch, thermal and electric balances, operating-cost reporting, and solver orchestration for industrial utility systems.

The package is intended to sit beside process-integration and thermodynamic tools rather than replace them. OpenPinch, TESPy workflows, manufacturer data, or other upstream tools can generate plain input data; OpenUtility consumes that data without importing those packages at runtime.

Package Scope

OpenUtility currently includes:

  • typed input data classes for utility-system candidates, costs, thermal nodes, operating periods, and HPR performance maps;
  • Pyomo MILP model construction for utility investment and dispatch decisions;
  • HiGHS solving through Pyomo SolverFactory("appsi_highs") and the required highspy package;
  • HPR investment and dispatch modeling, where HPR means heat pump and refrigeration;
  • generic reporting helpers for model results, benchmarks, operating costs, and fuel consumption;
  • generic bilevel decomposition bookkeeping, no-good cut helpers, and utility-system decomposition wrappers;
  • thermal interval helpers for stream-like plain Python objects.

OpenUtility does not currently include:

  • OpenPinch or TESPy as runtime dependencies;
  • HPR thermodynamic cycle design, refrigerant screening, or performance-map generation;
  • continuous HPR sizing; first-release HPR sizing is represented by selecting among fixed-capacity candidates;
  • global interpolation across unrelated HPR temperature points;
  • a full public case-study replication package in the distributed wheel;
  • a public API named BEELINE, although generic bilevel decomposition utilities are included.

OpenUtility/ is the reusable public package. Private replication workflows and large study-specific artifacts are intentionally outside the package boundary and are not included in release tests or built wheels.

OpenUtility targets Python >=3.14.2.

Academic Basis

OpenUtility began as a Python/Pyomo implementation of utility-system optimization methods developed by Julia Jimenez Romero, Adisa Azapagic, and Robin Smith:

  • Julia Jimenez Romero, "Reduction of Industrial Energy Demand through Sustainable Integration of Distributed Energy Hubs," PhD thesis, The University of Manchester, 2022.
  • Jimenez Romero, J., Azapagic, A., and Smith, R., Computers and Chemical Engineering, 170, Article 108060, 2023. https://doi.org/10.1016/j.compchemeng.2022.108060
  • Jimenez Romero, J., Azapagic, A., and Smith, R., "BEELINE: BilevEl dEcomposition aLgorithm for synthesis of Industrial eNergy systEms," Computers and Chemical Engineering, 180, Article 108406, 2024. https://doi.org/10.1016/j.compchemeng.2023.108406

The package has since been generalized beyond the original replication workflows and extended with HPR optimization. In OpenUtility, HPR means heat pump and refrigeration: fixed-capacity HPR candidates can be selected and dispatched against multi-period thermal-node balances using alpha versioned plain performance maps. HPR electricity is currently handled by a period-indexed overlay, while the original non-HPR electricity balance remains static. The HPR implementation is an optimization-layer model; thermodynamic map generation remains outside OpenUtility.

Install

From PyPI (Python >=3.14.2):

python -m pip install OpenUtility

For development from a checkout:

python -m pip install -e ".[dev,docs,release]"

To install a local checkout:

python -m pip install .

Quick Start

For guided, executable tutorials, start with the six Jupyter examples and the Read the Docs example guide. They cover first solve, equipment selection, scenario analysis, heat pumps, multi-period refrigeration, and binary-selection decomposition. Each uses synthetic data and includes checked results, tables, and plots.

python -m pip install "OpenUtility[notebook]>=0.1.2"
python -m jupyterlab

Download any notebook, select the installed environment's Python kernel, and restart the kernel and run all cells. No checkout or private data is required.

from OpenUtility import (
    SteamLevelCandidate,
    UtilitySystemModelData,
    build_utility_system_model,
    pyomo_utility_system_solver,
)

data = UtilitySystemModelData(
    steam_mains=("MP",),
    steam_levels=(
        SteamLevelCandidate(
            name="MP_100",
            steam_main="MP",
            temperature=100.0,
            source_heat_available=5.0,
            sink_heat_demand=5.0,
            generation_enthalpy_delta=1.0,
            use_enthalpy_delta=1.0,
            source_heat_upper_bound=5.0,
            sink_heat_upper_bound=5.0,
        ),
    ),
    power_demand=0.0,
    grid_import_limit=0.0,
    grid_export_limit=0.0,
)
model = build_utility_system_model(data)
status = pyomo_utility_system_solver("appsi_highs")(model)

Verification

Run the full release gate:

python tools/release_check.py

The gate runs linting, formatting, type checking, tests with coverage, Sphinx, source/wheel build, wheel inspection, twine check, dependency audit, and a fresh wheel-install smoke test.

For offline local triage only:

python tools/release_check.py --skip-audit --skip-smoke-install

Documentation

Read the online documentation.

Build docs locally:

python -m sphinx -W -b html docs /tmp/openutility-docs-html

OpenUtility is alpha-stage software. Public reusable APIs are exposed through OpenUtility.__all__ and OpenUtility.utility_system.__all__.

Download files

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

Source Distribution

openutility-0.1.3.tar.gz (371.8 kB view details)

Uploaded Source

Built Distribution

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

openutility-0.1.3-py3-none-any.whl (68.8 kB view details)

Uploaded Python 3

File details

Details for the file openutility-0.1.3.tar.gz.

File metadata

  • Download URL: openutility-0.1.3.tar.gz
  • Upload date:
  • Size: 371.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openutility-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c5dd46d18a8c550aff0b3c285ee55f68ef4756844c55c598a86cff8ec6caa37e
MD5 5db7436a5c250acaaeb3ebd532c7eca8
BLAKE2b-256 a72cfa934d1681bf54ae810e5ad2a36b5a03e8dddf49dd819bf28f383c532f40

See more details on using hashes here.

Provenance

The following attestation bundles were made for openutility-0.1.3.tar.gz:

Publisher: release.yml on waikato-ahuora-smart-energy-systems/OpenUtility

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openutility-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: openutility-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 68.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openutility-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd34c1e5cf4e60387a7ec6a588f7f1604193fd926b9aaa6afbc1ca7f206be9c
MD5 1d80b41009aebe089748282d97a18a94
BLAKE2b-256 33da6d039d4b0b3ebf1929fd7ca1942e165f1e0e25ab2b0f7d7c3133a2b1fd3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openutility-0.1.3-py3-none-any.whl:

Publisher: release.yml on waikato-ahuora-smart-energy-systems/OpenUtility

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.4

2 files

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page