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

Download files

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

Source Distribution

routee_powertrain-2.0.2.tar.gz (838.0 kB view details)

Uploaded Source

Built Distribution

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

routee_powertrain-2.0.2-py3-none-any.whl (569.8 kB view details)

Uploaded Python 3

File details

Details for the file routee_powertrain-2.0.2.tar.gz.

File metadata

  • Download URL: routee_powertrain-2.0.2.tar.gz
  • Upload date:
  • Size: 838.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for routee_powertrain-2.0.2.tar.gz
Algorithm Hash digest
SHA256 0e140962d03488843cbe5a31f30cdae14dd7a797eac647dd631aaf7f8d078a33
MD5 c629effe62246e532a584de42beefe0e
BLAKE2b-256 315de2c7a098a42c4f9b350394a040bbe27e0d3ffd51161f67468e23f20dfd2f

See more details on using hashes here.

File details

Details for the file routee_powertrain-2.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for routee_powertrain-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 69d3593586f34208ff181de15cda9024e1c86e7499d832c68d6586bd8626c2c3
MD5 4a9c385544fe3ddd6bd1e31fcb754112
BLAKE2b-256 ed37866dc00755688c1e7505690fb0b61a49e2cdcbf8c1a28687dbfac7a0285b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 files

2.0.1

2 files

2.0.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