Crate altrios_core
source ·Expand description
Crate containing models for second-by-second fuel and energy consumption of simulation of locomotive consists comprising collections of individual locomotives, which comprise various powertrain components (engine, generator/alternator, battery, and electric drivetrain) – all connected to a detailed train model.
§Helpful Tips
Every struct in this crate implements methods for serializing/deserializing itself to/from a handful of standard data formats as strings or file read/write operations using traits::SerdeAPI.
§Features:
- pyo3: enable this feature to expose ALTRIOS structs, methods, and functions to Python
Modules§
- Module containing submodules for consists, locomotives, and powertrain models
- Meet-pass
- 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)
- Module providing unit constants (e.g. 1 kg) for an assortment of dimensional quantities.
Macros§
- Generates a String similar to output of
dbg
but without printing - Implements
get_eta_max
,set_eta_max
,get_eta_min
, andset_eta_min
methods - 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
.