Expand description
Core crate for performing FASTSim simulations.
§Crate Specific Coding Practices
#[non_exhaustive]
macro is invoked to force any downstream crate to use theInit
trait to initialize structs that implement this macro#[fastsim_api]
– used to expose the struct to python and provides assorted other features related to usability Crate containing models for second-by-second fuel and energy consumption of simulation of vehicles
§Feature Flags
pyo3
— Enablespyo3
to provide fastsim-3 structs, methods, and functions to Pythonresources
(enabled by default) — Compiles external resources (e.g. vehicle files or cycle files) to be available in the binaryweb
— Enables internet-querying dependenciesserde-default
(enabled by default) — Enables several text file formats for serialization and deserializationcsv
(enabled by default) — Enables csv serialization and deserializationjson
(enabled by default) — Enables json serialization and deserializationtoml
(enabled by default) — Enables toml serialization and deserializationyaml
(enabled by default) — Enables yaml serialization and deserializationmsgpack
(enabled by default) — Enables message pack serialization and deserialization viarmp-serde
Modules§
- drive_
cycle - error
- Custom error types
- gas_
properties - imports
- Module for crate-local imports to reduce boilerplate in submodules
- macros
- prelude
- Convenience module for exposing commonly used structs
- resources
- si
- Import uom si system and add unit constants Zero values should be created using standard uom syntax ($Quantity::ZERO) after adding “use crate::imports::*” Non-zero values should be created using standard uom syntax ($Quantity::new::<$unit>($value)) or multiplication syntax ($value * $UNIT_CONSTANT)
- simdrive
- traits
- uc
- Module providing unit constants (e.g. 1 kg) for an assortment of dimensional quantities.
- utils
- vehicle
- Module containing submodules for vehicle and powertrain models
Macros§
- eff_
test_ body - format_
dbg - Generates a String similar to output of
dbg
but without printing - init_
opt_ default - Makes it so that optional parameters get set in the
Init::init
call - make_
uom_ cmp_ fn
Functions§
- enabled_
features - List enabled features