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 nrel.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 nrel.routee.powertrain as pt

# Print the available pre-trained models
print(pt.list_available_models(local=True, external=True))

# [
#   '2016_TOYOTA_Camry_4cyl_2WD',
#   '2017_CHEVROLET_Bolt',
#   '2012_Ford_Focus',
#   ...
# ]

# Load a pre-trained model
model = pt.load_model("2016_TOYOTA_Camry_4cyl_2WD")

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

# ========================================
# Model Summary
# --------------------
# Vehicle description: 2016_TOYOTA_Camry_4cyl_2WD
# Powertrain type: ICE
# Number of estimators: 2
# ========================================
# Estimator Summary
# --------------------
# Feature: speed_mph (mph)
# Distance: miles (miles)
# Target: gge (gallons_gasoline)
# Raw Predicted Consumption: 29.856 (miles/gallons_gasoline)
# Real World Predicted Consumption: 25.606 (miles/gallons_gasoline)
# ========================================
# Estimator Summary
# --------------------
# Feature: speed_mph (mph)
# Feature: grade_dec (decimal)
# Distance: miles (miles)
# Target: gge (gallons_gasoline)
# Raw Predicted Consumption: 29.845 (miles/gallons_gasoline)
# Real World Predicted Consumption: 25.596 (miles/gallons_gasoline)
# ========================================

# Predict energy consumption for a set of road links
links_df = pd.DataFrame(
    {
        "miles": [0.1, 0.2, 0.3], # miles
        "speed_mph": [30, 40, 50], # mph
        "grade_dec": [-0.05, 0, 0.05], # decimal
    }
)

energy_result = model.predict(links_df)

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

nrel.routee.powertrain-1.0.4.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

nrel.routee.powertrain-1.0.4-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file nrel.routee.powertrain-1.0.4.tar.gz.

File metadata

File hashes

Hashes for nrel.routee.powertrain-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d92b6586811de81b752d265d9a955adecdaab0d5614d6227c5c11ebfbe30b2f0
MD5 0381f181885be9bf56c29a76e5ee540f
BLAKE2b-256 0957695b9dc69f2647c7a2d8147327d8bcf6d2ca6e68a0ada55c3c5f3facef26

See more details on using hashes here.

File details

Details for the file nrel.routee.powertrain-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for nrel.routee.powertrain-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 da35ba9cfa0b63b20c7c20b5068d081304320a41cd615ab5ebd6186f889a8f8c
MD5 dbb5f6f28ba0a2c8493ee6e584586092
BLAKE2b-256 2f40b9e1eb0343f66000e7c2773c0e54403594209558c8b19d61369a235ade15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page