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
§Installation
Currently, the Rust backend is only available through a Python API.
§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§
- Module containing models for air properties.
- Module containing drive cycle struct and related functions.
- Module containing FASTSim parameters.
- Module containing vehicle struct and related functions.
- Module containing classes and methods for calculating label fuel economy.
- Module for simulating thermal behavior of powertrains
- Module containing miscellaneous utility functions.
- Module containing vehicle struct and related functions.
- Module for utility functions that support the vehicle struct.
Macros§
- Generates a String similar to output of
dbg
but without printing - Given pairs of arbitrary keys and values, prints “key: value” to python intepreter.
Given str, prints str.
Using this will breakcargo test
but work withmaturin develop
.