Skip to main content

RouteE-Powertrain is a tool for predicting energy usage over a set of road links.

Project description

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

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

routee_powertrain-2.0.0.tar.gz (821.3 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.0-py3-none-any.whl (565.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for routee_powertrain-2.0.0.tar.gz
Algorithm Hash digest
SHA256 5476c3be28a34efc9337728ca9f0c57c27c6d73c6def5513eaa9c0e322eba166
MD5 24d4f6de9f75c67f4a1b0ae8fab93278
BLAKE2b-256 e4611bea0d56f4d31b613f1ccdde16c0c938c37a3e65843284c2eaca180e6da0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for routee_powertrain-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f6b177a1c3b1efe0c031a00e33765f9975e63a43f5375283aa8b3df63d11ad2
MD5 e925e31a89d74b40aa1f047aa2a3bd61
BLAKE2b-256 45f31f223ee445118875b20e2b9463fe09dfcc468ca1e12c0d283e6061bf1b94

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