Crate fastsim_core

Source
Expand description

Documentation for the Rust backend of the Future Automotive Systems Technology Simulator (FASTSim).

§Overview

FASTSim provides a simple way to compare powertrains and estimate the impact of technology improvements on light-, medium-, and heavy-duty vehicle efficiency, performance, cost, and battery life.
More information here: https://www.nrel.gov/transportation/fastsim.html

§Crate features

  • full - When enabled (which is default), include additional capabilities that require additional dependencies
  • resources - When enabled (which is triggered by enabling full (thus default) or enabling this feature directly), compiles commonly used resources (e.g. standard drive cycles) for faster access.

§Python Examples

import fastsim

## Load drive cycle by name
cyc_py = fastsim.cycle.Cycle.from_file("udds")
cyc_rust = cyc_py.to_rust()

## Load vehicle using database vehicle ID number
vnum = 1  
veh_py = fastsim.vehicle.Vehicle.from_vehdb(vnum)
veh_rust = veh_py.to_rust()

## Simulate
sd = fastsim.RustSimDrive(cyc_rust, veh_rust)
sd.sim_drive()

Re-exports§

pub use simdrive::simdrive_impl;
pub use fastsim_proc_macros as proc_macros;

Modules§

air
Module containing models for air properties.
cycle
Module containing drive cycle struct and related functions.
imports
macros
params
Module containing FASTSim parameters.
simdrive
Module containing vehicle struct and related functions.
simdrivelabel
Module containing classes and methods for calculating label fuel economy.
thermal
Module for simulating thermal behavior of powertrains
traits
utils
Module containing miscellaneous utility functions.
vehicle
Module containing vehicle struct and related functions.
vehicle_import
vehicle_thermal
vehicle_utils
Module for utility functions that support the vehicle struct.

Macros§

check_orphaned_and_set
format_dbg
Generates a String similar to output of dbg but without printing

Functions§

enabled_features