NREL's Drive Cycle Analysis Tool Plus
Project description
DriveCAT+ - Drive Cycle Analysis Tool Plus
DriveCAT+ is a drivecycle analysis python package that takes in vehicle time, speed, and elevation profiles, processes them, and outputs several useful statistical metrics that help quantify a drivecycle.
Overview
DriveCAT+ contains a class Cycle
used for taking a drivecycle as an input. The DriveStats
class initializes various categories of drivestats like DistanceStats
, TotalSpeedStats
, TimeStats
, etc as subclasses and facilitates the calculation of relevant statical metrics within their constructor methods.
Installation
First, clone the repository from GitHub:
git clone https://github.com/NREL/drivecatplus.git drivecatplus
DriveCAT+ depends on python versions >=3.8 and <=3.11. One way to satisfy this is to use conda:
conda create -n dcp python=3.10
conda activate dcp
After creating the environment, navigate to the parent directory containing the DriveCAT+ repository e.g. cd github/drivecatplus/
and run:
pip install -e .
from within the dcp python 3.10 environment you created.
This will install DriveCAT+ with minimal dependencies such that the code files can be edited. Developers will find the -e
option handy since DriveCAT+ will be installed in place from the installation location, and any updates will be propagated each time DriveCAT+ is freshly imported.
Demo
This repo is provided with a sample drivecycle input file to test out in a basic demo. From the parent directory:
cd src/demos/
python demo_drivestats_basic.py
or, use VS Code's Interactive Window to run the demo code blocks.
Run DriveCAT+ for multiple drivecycles
The run_dcp.py module can be used to analyze multiple drivecycles and export the results as a single CSV. --input-path accepts path of a single CSV file input or the path to a directory. When a directory path is provided, the module searches all subdirectories for .CSV files and runs DriveCAT+ for each of them.
cd src/drivecatplus/
python run_dcp.py --input-path=/path/to/file-or-folder
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
File details
Details for the file drivecatplus-0.2.0.tar.gz
.
File metadata
- Download URL: drivecatplus-0.2.0.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d153fcba3bb60ce99edec9fdf1c12c64e0212cfd39bcd241e27d22eb3d17fa03 |
|
MD5 | ace7c3ab30253f94956b1e67678bec82 |
|
BLAKE2b-256 | 65f4b9f118d2a877b418bcc41b5a1999b7ebd5575b96b6b7a77839014fb4e36a |
File details
Details for the file drivecatplus-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: drivecatplus-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0b95ce5086236f01bc7fe4fc093ef31b0f6e9eeeffca372daa23abb84b17df0 |
|
MD5 | 8bd930e028a04a280025bb63b0da336d |
|
BLAKE2b-256 | c6da249d30555bcbdaae55a860f65e3dbab138dea516e7ee18c29bc7d760c1f3 |