Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update what_is_routee.md #7

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed docs/images/routee_workflow.jpg
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pip install nrel.routee.powertrain
To install the package from source, you can clone the repository and install the package using `pip`:

```bash
git clone https://github.nrel.gov/MBAP/routee-powertrain.git
git clone https://github.com/NREL/routee-powertrain.git
cd routee-powertrain
pip install .
```
Expand Down Expand Up @@ -49,7 +49,7 @@ Then, you'll have to build the python rust extension for powertrain:
```bash
pip install maturin

git clone https://github.nrel.gov/MBAP/routee-powertrain.git
git clone https://github.com/NREL/routee-powertrain.git
cd routee-powertrain/rust
maturin develop --release
```
Expand Down
4 changes: 1 addition & 3 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# RouteE Powertrain

> TODO: Add a better description of the project here.

RouteE Powertrain is a Python package that allows users to work with a set of pre-trained 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 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.

## Quickstart

Expand Down
146 changes: 146 additions & 0 deletions docs/what_is_routee.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# What is RouteE?\n",
"\n",
"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. Common applications of RouteE-Powertrain are energy-aware (\"eco\") routing, energy accounting in mesoscopic simulations, and range estimation (especially for EVs). The diagrams below illustrate the logic and data flows for training custom RouteE-Powertrain models and performing prediction with previously trained models.\n",
"\n",
"## Training\n",
"![image](https://github.com/NREL/routee-powertrain/assets/4818940/f5a89f64-241b-494b-9fe6-e13a34595da0)\n",
"\n",
"Training new RouteE-Powertrain models requires a set of link aggregate driving data with energy consumption on each link in the road network. Often this data comes from high-frequency GPS or telematics data collected by dedicated loggers or from connected vehicles that are always streaming telematics data. The energy consumption can either be vehicle reported/measured or simulated using a powertrain simulation software like [NREL's FASTSim](https://github.com/NREL/fastsim).\n",
"\n",
"## Prediction\n",
"![image](https://github.com/NREL/routee-powertrain/assets/4818940/b3a1d1af-5060-4bf4-a576-b0b11ffc9424)\n",
"\n",
"In application, trained RouteE-Powertrain models expect link features as inputs and return predicted energy consumption for a particular vehicle over a link with the particular feature set. The RouteE developers maintain a separate repository for previously trained RouteE-Powertrain models, available for prediction \"off the shelf\". To see which models are available you can use the `pt.list_available_models()` function.\n",
"\n",
"A couple of models are distributed with the package itself and you can list those like:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['2016_TOYOTA_Camry_4cyl_2WD', '2017_CHEVROLET_Bolt']"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import nrel.routee.powertrain as pt\n",
"\n",
"pt.list_available_models(external=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In addition, a larger number of models are available for download and can be listed like:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['2012_Ford_Focus',\n",
" '2012_Ford_Fusion',\n",
" '2016_AUDI_A3_4cyl_2WD',\n",
" '2016_BMW_328d_4cyl_2WD',\n",
" '2016_CHEVROLET_Malibu_4cyl_2WD',\n",
" '2016_CHEVROLET_Spark_EV',\n",
" '2016_FORD_C-MAX_HEV',\n",
" '2016_FORD_Escape_4cyl_2WD',\n",
" '2016_FORD_Explorer_4cyl_2WD',\n",
" '2016_HYUNDAI_Elantra_4cyl_2WD',\n",
" '2016_Hyundai_Tucson_Fuel_Cell',\n",
" '2016_KIA_Optima_Hybrid',\n",
" '2016_Leaf_24_kWh',\n",
" '2016_MITSUBISHI_i-MiEV',\n",
" '2016_Nissan_Leaf_30_kWh',\n",
" '2016_TESLA_Model_S60_2WD',\n",
" '2016_TOYOTA_Camry_4cyl_2WD',\n",
" '2016_TOYOTA_Corolla_4cyl_2WD',\n",
" '2016_TOYOTA_Highlander_Hybrid',\n",
" '2016_Toyota_Prius_Two_FWD',\n",
" '2017_CHEVROLET_Bolt',\n",
" '2017_Maruti_Dzire_VDI',\n",
" '2017_Toyota_Highlander_3',\n",
" '2020_Chevrolet_Colorado_2WD_Diesel',\n",
" '2020_VW_Golf_1',\n",
" '2020_VW_Golf_2',\n",
" '2021_Fiat_Panda_Mild_Hybrid',\n",
" '2021_Peugot_3008',\n",
" '2022_Ford_F-150_Lightning_4WD',\n",
" '2022_Renault_Zoe_ZE50_R135',\n",
" '2022_Tesla_Model_3_RWD',\n",
" '2022_Tesla_Model_Y_RWD',\n",
" '2022_Toyota_Yaris_Hybrid_Mid',\n",
" '2022_Volvo_XC40_Recharge_twin',\n",
" '2023_Mitsubishi_Pajero_Sport']"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.list_available_models(local=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To predict with any of these models you can use the `pt.load_model()` function. Here's an example of loading both a local model and an external model."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"camry = pt.load_model('2016_TOYOTA_Camry_4cyl_2WD')\n",
"tesla = pt.load_model('2022_Tesla_Model_Y_RWD')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
7 changes: 0 additions & 7 deletions docs/what_is_routee.md

This file was deleted.

1 change: 0 additions & 1 deletion nrel/routee/powertrain/io/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def list_available_models(local: bool = True, external: bool = True) -> List[str
Args:
local: include local models?
external: include external models?
print: should we print the results too?

Returns: a list of model keys
"""
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "RouteE-Powertrain is a tool for predicting energy usage over a set of road links."
readme = "README.md"
authors = [{ name = "National Renewable Energy Laboratory" }]
license = { text = "BSD 3-Clause License Copyright (c) 2022, Alliance for Sustainable Energy, LLC" }
license = { text = "BSD 3-Clause License Copyright (c) 2023, Alliance for Sustainable Energy, LLC" }
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
Expand Down Expand Up @@ -42,7 +42,7 @@ dev = [
]

[project.urls]
Homepage = "https://github.nrel.gov/MBAP/routee-powertrain"
Homepage = "https://github.com/NREL/routee-powertrain"

[tool.setuptools.packages.find]
where = ["."] # list of folders that contain the packages (["."] by default)
Expand Down