Skip to main content

Tool for modeling vehicle powertrains

Project description

homepage tests release python documentation github

Description

This is the fastsim-3 version of NREL's FASTSim. It introduces numerous new enhancements and features, including:

  • ~10x faster! -- when setting save_interval to None, which means only the state at the last time step, which includes fuel consumption and/or battery depletion, among other useful cumulative state variables.
  • Roughly ~60% reduction in memory consumption (~160 mb in fastsim-2 v. 60 mb in fastsim-3
  • object-oriented, hierarchical model structure
  • ability to control granularity of time-resolved data -- e.g. save at every time step, save at every _n_th time step, or never save at all (saving only cumulative trip-level results)
  • component-specific vehicle models -- i.e. the conventional vehicle contains only data for the fuel converter and other relevant components but does contain any dummy battery or motor parameters as is the case in fastsim-2
  • file formats that are more robust and more human readable
  • backwards compatibility with fastsim-2
  • flexible data structures to allow for future model types
  • ability to simulate standalone component models
  • flexible model interfacing (e.g. multiple folder/file formats for reading and/or writing data)
  • more accurate interpolation methods

Installation

Python

Set up and activate a python environment (compatible with Python 3.8 - 3.10; we recommend Python 3.10) with the following steps.

Anaconda

  1. Create: conda create -n fastsim python=3.10
  2. Activate: conda activate fastsim

venv

There is some variation based on your Operating System:

  • PowerShell (windows):

    1. Create: python -m venv fastsim-venv -- name is user decision
    2. Activate: fastsim-venv/Scripts/Activate.ps1
  • Bash (i.e. unix/linux/mac):

    1. Create: python -m venv fastsim-venv -- name is user decision
    2. Activate: source fastsim-venv/bin/activate
  • Command Prompt (windows):

    1. Create: python -m venv fastsim-venv -- name is user decision
    2. Activate: fastsim-venv/Scripts/activate.bat

Pixi (recommended for developers)

  1. pixi shell -e dev -- this creates the environment, installs all the dependencies, builds fastsim, and activates the environment

FASTSim-3

Via PyPI

In an active Python environment created above, run pip install fastsim.

Building from Scratch

Developers might want to install the code in place so that FASTSim files can be editable (the -e flag for pip provides this behavior). This option can be handy since FASTSim will be installed in place from the installation location and any updates will be propagated each time FASTSim is freshly imported. To do this, you'll need to have the Rust toolchain installed.

  • Option 1: run sh build_and_test.sh in root folder.
  • Option 2:
    1. Run pip install -e ".[dev]"
      Optional testing steps:
    2. Run cargo test
    3. Run pytest -v python/fastsim/tests/

Contributors

Chad Baker -- Chad.Baker@nrel.gov
Aaron Brooker -- Aaron.Brooker@nrel.gov
Kyle Carow -- Kyle.Carow@nrel.gov
Jeffrey Gonder -- Jeff.Gonder@nrel.gov
Jacob Holden -- Jacob.Holden@nrel.gov
Jinghu Hu -- Jinghu.Hu@nrel.gov
Jason Lustbader -- Jason.Lustbader@nrel.gov
Sean Lopp -- sean@rstudio.com
Matthew Moniot -- Matthew.Moniot@nrel.gov
Grant Payne -- Grant.Payne@nrel.gov
Laurie Ramroth -- lramroth@ford.com
Eric Wood -- Eric.Wood@nrel.gov Robin Steuteville -- Robin.Steuteville@nrel.gov

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fastsim-3.0.6-cp312-cp312-win_amd64.whl (9.8 MB view details)

Uploaded CPython 3.12Windows x86-64

fastsim-3.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fastsim-3.0.6-cp312-cp312-macosx_11_0_arm64.whl (7.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fastsim-3.0.6-cp312-cp312-macosx_10_13_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

fastsim-3.0.6-cp311-cp311-win_amd64.whl (9.8 MB view details)

Uploaded CPython 3.11Windows x86-64

fastsim-3.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fastsim-3.0.6-cp311-cp311-macosx_11_0_arm64.whl (7.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fastsim-3.0.6-cp311-cp311-macosx_10_12_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

fastsim-3.0.6-cp310-cp310-win_amd64.whl (9.8 MB view details)

Uploaded CPython 3.10Windows x86-64

fastsim-3.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

fastsim-3.0.6-cp310-cp310-macosx_11_0_arm64.whl (7.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fastsim-3.0.6-cp310-cp310-macosx_10_12_x86_64.whl (8.4 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file fastsim-3.0.6-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fastsim-3.0.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 9.8 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for fastsim-3.0.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9eacb3f56f98f124a0e3670556c76ac11003d9354b48417b3a8b547b41ec6954
MD5 c282a021f3fda974c4503fc96c3ff90b
BLAKE2b-256 0fbf4146db9aa5e60d36bc69da9b736301b68916a5936d77eca2520d67e2cecb

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc4b5661e9a4f0248e1a5bdb278915f4a00df32a4872eab20ee3b848257ba640
MD5 70ed82669633b9a4b222074ed8a95312
BLAKE2b-256 12f9c8677971c2a4b45908023fded2a976c031830e6fa18d3db0233ac3b97977

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0d324ecfbc7953181a029ceb4158491032eafb5845363669d9d0ce59093d6192
MD5 fb30e391d5f0a24da4755489672c4fa5
BLAKE2b-256 41227a17c51abf86657fd948ce267a6d1c2fd256786ea75012c4727e0aa0abcd

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7321448c817e9e4c633c4520129e0dd223e72089ee2d215d623907c4028a722a
MD5 7c89d901dc57cacbfa288ee95f5283ac
BLAKE2b-256 1ba77ea583dd786703a0fd1a4b2f7eaa2a7ed24bff584ea4598fedfc2a13b831

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: fastsim-3.0.6-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.8 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for fastsim-3.0.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 abb3e53516cc0cb4b00c8425ab5279dbaa03554edbcccba2348f3313482848e2
MD5 6b6ff680a87049e097b6e3a9753b1093
BLAKE2b-256 a6663669b4b12562f64bf143910b99a08ff3d407ceddfccadf4aa8303e252b00

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18dd136a1c2ce7850d2f49a9311e1f08eb63ff3a022e77bb071e28cf061f963b
MD5 16aaf0aead49394e7c84dca1deb50c6f
BLAKE2b-256 377b719e2ac4cd876b9c803451cd14c82b37576a7752f72d59f02a1a7c01383f

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 285c357c3207eabe359e5079458f33986e3538df9b001b75b40f11e01f683a0f
MD5 aa74f676bb5ade0f071201630353f480
BLAKE2b-256 88853d3d65fc0446d38233483fde2ee6d75d8ba3f44bbffd77260fb79dadaf25

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b476011b859475cda27da4ebed7085d4ee022f4f66415e61be5c908b8f391330
MD5 8c88fc28c0e1940ee1c2451ed3b4d2f0
BLAKE2b-256 58130d24ede923c669df157588a9c5cb805c8cb7fe073311003931259d903a5e

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: fastsim-3.0.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 9.8 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for fastsim-3.0.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fe1f0cf98e69d391a46b71c5836bbce8400a1aea0650181cf9f109b6cd79e05f
MD5 3bc92cb3cb6a8068863895e049c3d307
BLAKE2b-256 89d70ca8c972de84dd4dca19f18e281eaa1cbd39dd7da1a7f467cb8b778835a3

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 33791636c8b845d01edbd8ce3c95d34340ee76c178ee4c76a7818aa9e865cc9b
MD5 58cb603aa05d80ec88b5da837dcb217e
BLAKE2b-256 e2deaa905e11b49727aca19cf81a89c9a1070a5fee57370dcc86f450150a66d5

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c509ce8c24bda023a7ac63aa32a14eea52e7781a45d906e8d1a514d3dce424b7
MD5 b53d3b01184f7e500c2fbdbf4986a39c
BLAKE2b-256 715d38f8b732d8a646e9fb9fd72f2f38002526c3f34a0d576b345cce50e6677a

See more details on using hashes here.

File details

Details for the file fastsim-3.0.6-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastsim-3.0.6-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5b58dd18f7034e9a6c865d29904fafc4cbaed6521fdb7b5a0c45203dda8c6d77
MD5 f778a544dac5e007c0ccdc75901d4f74
BLAKE2b-256 ab8a1e03b6dd9084ab5e8cdd02495c2bab850ca2149fd2fb63dfa8acb8bc4886

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