RouteE-Powertrain is a tool for predicting energy usage over a set of road links.
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file routee_powertrain-2.0.1.tar.gz.
File metadata
- Download URL: routee_powertrain-2.0.1.tar.gz
- Upload date:
- Size: 836.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2465364b8ca84475efe591f3168abc02ec4b8d2cbaa88ca68e0f14c416f1b3a
|
|
| MD5 |
44f5269ad84d210f7e238724ad17b9e2
|
|
| BLAKE2b-256 |
004c8b4769b7c937fe393f9256e7adac5397fa08276001919a2c5543ad7f3399
|
File details
Details for the file routee_powertrain-2.0.1-py3-none-any.whl.
File metadata
- Download URL: routee_powertrain-2.0.1-py3-none-any.whl
- Upload date:
- Size: 568.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26fbac7c70ba4bc6a2bd3b72a5f1f3628dc4329bc6adf196a19ce1fb2888794
|
|
| MD5 |
d18e4854f1935de978f9a7b89bcc33c6
|
|
| BLAKE2b-256 |
d050d98951a1ad3334cbc73a0e09cb9656221b801bc746350e329e0b08a19f1e
|