Skip to main content

Routee Powertrain

Overview

RouteE-Powertrain is a Python package that allows users to work with a set of pre-trained mesoscopic vehicle energy prediction models for a varity of vehicle types. Additionally, users can train their own models if "ground truth" energy consumption and driving data are available. RouteE-Powertrain models predict vehicle energy consumption over links in a road network, so the features considered for prediction often include traffic speeds, road grade, turns, etc.

The typical user will utilize RouteE's catalog of pre-trained models. Currently, the catalog consists of light-duty vehicle models, including conventional gasoline, diesel, hybrid electric (HEV), plugin hybrid electric (PHEV) and battery electric (BEV). These models can be applied to link-level driving data (in the form of pandas dataframes) to output energy consumption predictions.

Users that wish to train new RouteE models can do so. The model training function of RouteE enables users to use their own drive-cycle data, powertrain modeling system, and road network data to train custom models.

Quickstart

RouteE Powertrain is available on PyPI and can be installed with pip:

pip install pip --upgrade
pip install routee.powertrain

If pip is unavailable, use pip3:

pip3 install pip --upgrade
pip3 install routee.powertrain

(For more detailed instructions, see here)

Then, you can import the package and use a pre-trained model from the RouteE model catalog:

import pandas as pd
import routee.powertrain as pt

# Query for a specific model
print(pt.query_available_models(make="chevrolet", model="bolt", year=2017))

# Load a pre-trained model
model = pt.load_model("chevrolet/bolt_bev/2017/rf_c3326385/v1")

# Inspect the model to see what it expects for input
print(model)

# Predict energy consumption for a set of road links
links_df = pd.DataFrame(
    {
        "distance": [0.1, 0.2, 0.3], # miles
        "speed_mph": [30, 40, 50], # mph
        "grade_percent": [-5.0, 0.0, 5.0], # percent
    }
)

energy_result = model.predict(links_df)

Upgrading from v1

RouteE Powertrain 2.0 is a breaking release. It was previously published as nrel.routee.powertrain; it is now routee.powertrain, and the import path changed to match:

pip uninstall nrel.routee.powertrain
pip install routee.powertrain
-import nrel.routee.powertrain as pt
+import routee.powertrain as pt

Model names, the model file format, and much of the Model API changed as well. See the migration guide for the full list, and CHANGELOG.md for everything in 2.0.0.

Custom v1 .json models can be converted in place:

routee-powertrain convert-v1 MyModel.json out/ --make toyota --model camry --year 2016

Release files for routee.powertrain 2.0.2

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

Source distribution (sdist)

Source distribution for routee.powertrain 2.0.2
File Size Uploaded
routee_powertrain-2.0.2.tar.gz 838.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for routee.powertrain 2.0.2
File Interpreter ABI Platform
routee_powertrain-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / routee_powertrain-2.0.2.tar.gz

Download URL routee_powertrain-2.0.2.tar.gz
Size 838.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0e140962d03488843cbe5a31f30cdae14dd7a797eac647dd631aaf7f8d078a33
BLAKE2b-256 checksum
How to use checksums
315de2c7a098a42c4f9b350394a040bbe27e0d3ffd51161f67468e23f20dfd2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / routee_powertrain-2.0.2-py3-none-any.whl

Download URL routee_powertrain-2.0.2-py3-none-any.whl
Size 569.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69d3593586f34208ff181de15cda9024e1c86e7499d832c68d6586bd8626c2c3
BLAKE2b-256 checksum
How to use checksums
ed37866dc00755688c1e7505690fb0b61a49e2cdcbf8c1a28687dbfac7a0285b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release 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