Skip to main content

carculator_utils

Shared physics, parameter handling, background systems, inventories and export machinery for the carculator vehicle models.

Installed artifacts PyPI

Developed at the Paul Scherrer Institute. This checkout prepares 1.3.6; see CHANGELOG.md for release status and changes.

Installation

Use Python 3.12 (>=3.12,<3.13) and a fresh environment. The shared runtime requires NumPy >=1.26.4,<2.

python3.12 -m venv .venv
source .venv/bin/activate

On Windows, activate with .venv\Scripts\activate. After publication, install this release from PyPI:

python -m pip install "carculator_utils==1.3.6"

Before publication, use the matching source checkouts as described under development. Core calculations use bundled resources and need no Brightway project, ecoinvent installation or network access. Inventory export has optional dependencies:

python -m pip install "carculator_utils[excel,brightway]==1.3.6"

The Brightway extra supports the legacy stack (bw2io<0.9, bw2data<4, bw2calc<2). Export currently targets ecoinvent 3.9 and 3.10; importing those inventories requires the corresponding background database in the destination tool.

Vehicle packages

Package Prepared version
carculator_utils 1.3.6
carculator 1.9.6
carculator_truck 0.5.1
carculator_bus 0.1.1
carculator_two_wheeler 0.1.1

Quick start

from carculator_utils.background_systems import BackgroundSystemModel

background = BackgroundSystemModel()
print(sorted(background.fuel_specs))

This shared package has no standalone default vehicle. Choose a vehicle package from the family table below for complete model/LCIA runs.

Modelling and validation

The vehicle models include native 2025 parameters and documented temporal extensions. These combine engineering priors and selected calibration evidence; they are not independent measurements for every vehicle configuration.

TtW energy is in kJ/km. For BEVs it is net stored-energy depletion; model.battery_terminal_energy reports terminal DC separately, while electricity consumption is grid electricity in kWh/km. Identify the measurement boundary before comparing energy outputs. Availability-masked zeroes do not represent physically zero consumption.

Supported background scenarios are SSP2-NPi, SSP2-PkBudg1000, SSP2-PkBudg650, and static. ReCiPe supports midpoint/endpoint and EF midpoint. Use fresh model instances for independent cases. inputs.stochastic(n, seed=...) seeds parameter sampling, not every downstream cost adjustment.

See validation and limitations, migration notes and the documentation.

Development and release

Use matching sibling checkouts, especially carculator_utils 1.3.6 or newer:

python -m pip install -e ".[test,docs,excel,brightway]"
python -m pip check
python -m pytest
python -m sphinx -b html docs docs/_build/html

The docs extra includes the extensions used by this repository. See RELEASING.md for artifact verification, release order and publication.

Support and license

Contact carculator@psi.ch or open an issue. Maintained by Romain Sacchi, with contributions from the carculator development team. See contributing. Licensed under BSD-3-Clause.

Metadata

Release files for carculator-utils 1.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for carculator-utils 1.3.6
File Size Uploaded
carculator_utils-1.3.6.tar.gz 11.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for carculator-utils 1.3.6
File Interpreter ABI Platform
carculator_utils-1.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 MB

Release files / carculator_utils-1.3.6.tar.gz

Download URL carculator_utils-1.3.6.tar.gz
Size 11.6 MB
Tags Source
SHA-256 checksum
How to use checksums
07e8a0c9710ed85b6f08dcfc332f5a47dfaa83a48ca86e50de240b303f616885
BLAKE2b-256 checksum
How to use checksums
6390feefdc8c00aa5ece0207b63267b19004746e9321fe7aba81e21e9d36dee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / carculator_utils-1.3.6-py3-none-any.whl

Download URL carculator_utils-1.3.6-py3-none-any.whl
Size 10.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
40c6f2b145aa381af6e4bfffcc061efb6a47d0af8c7a8c99548c3a60d0db3352
BLAKE2b-256 checksum
How to use checksums
0df51ede6348df9dc4c55b986e8aab9558d71410cf6226380671c4f2ba293837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14
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