Struct fastsim_core::simdrive::RustSimDriveParams
source · pub struct RustSimDriveParams {Show 31 fields
pub favor_grade_accuracy: bool,
pub missed_trace_correction: bool,
pub max_time_dilation: f64,
pub min_time_dilation: f64,
pub time_dilation_tol: f64,
pub max_trace_miss_iters: u32,
pub trace_miss_speed_mps_tol: f64,
pub trace_miss_time_tol: f64,
pub trace_miss_dist_tol: f64,
pub sim_count_max: usize,
pub newton_gain: f64,
pub newton_max_iter: u32,
pub newton_xtol: f64,
pub energy_audit_error_tol: f64,
pub coast_allow: bool,
pub coast_allow_passing: bool,
pub coast_max_speed_m_per_s: f64,
pub coast_brake_accel_m_per_s2: f64,
pub coast_brake_start_speed_m_per_s: f64,
pub coast_start_speed_m_per_s: f64,
pub coast_time_horizon_for_adjustment_s: f64,
pub idm_allow: bool,
pub idm_v_desired_m_per_s: f64,
pub idm_dt_headway_s: f64,
pub idm_minimum_gap_m: f64,
pub idm_delta: f64,
pub idm_accel_m_per_s2: f64,
pub idm_decel_m_per_s2: f64,
pub idm_v_desired_in_m_per_s_by_distance_m: Option<Vec<(f64, f64)>>,
pub max_epa_adj: f64,
pub orphaned: bool,
}Expand description
Struct containing time trace data
Fields§
§favor_grade_accuracy: boolif true, accuracy will be favored over performance for grade per step estimates Specifically, for performance, grade for a step will be assumed to be the grade looked up at step start distance. For accuracy, the actual elevations will be used. This distinciton only makes a difference for CAV maneuvers.
missed_trace_correction: boolif true, missed trace correction is active, default = False. If missed trace correction is active, time step will be “dilated” to be long enough for vehicle to “catch up” with trace.
max_time_dilation: f64maximum time dilation factor to “catch up” with trace – e.g. 1.0 means 100% increase in step size
min_time_dilation: f64minimum time dilation margin to let trace “catch up” – e.g. -0.5 means 50% reduction in step size
time_dilation_tol: f64convergence criteria for time dilation in iterating on time step size to achieve distance parity
max_trace_miss_iters: u32number of iterations to achieve time dilation correction
trace_miss_speed_mps_tol: f64threshold for triggering warning log message if vehicle speed deficit [m/s] relative to prescribed speed exceeds this amount
trace_miss_time_tol: f64threshold for triggering warning log message if achieved elapsed time relative to prescribed elapsed time exceeds this fractional amount
trace_miss_dist_tol: f64threshold for triggering warning log message if achieved distance relative to prescribed distance exceeds this fractional amount
sim_count_max: usizemax allowable number of HEV SOC iterations
newton_gain: f64newton solver gain
newton_max_iter: u32newton solver max iterations
newton_xtol: f64newton solver tolerance
energy_audit_error_tol: f64tolerance for energy audit error warning, i.e. 0.1%
coast_allow: boolif true, coasting to stops are allowed
coast_allow_passing: boolif true, coasting vehicle can eclipse the shadow trace (i.e., reference vehicle in front)
coast_max_speed_m_per_s: f64maximum allowable speed under coast (m/s)
coast_brake_accel_m_per_s2: f64acceleration assumed during braking for coast maneuvers (m/s2). note: should be negative
coast_brake_start_speed_m_per_s: f64speed when friction braking will initiate during coasting maneuvers (m/s)
coast_start_speed_m_per_s: f64initiates coast when vehicle hits this speed if > 0; this is mainly for forceing coasting to initiate for testing. (m/s)
coast_time_horizon_for_adjustment_s: f64“look-ahead” time for speed changes to be considered to feature coasting to hit a given stopping distance mark (s)
idm_allow: boolif true, initiates the IDM - Intelligent Driver Model, Adaptive Cruise Control version
idm_v_desired_m_per_s: f64IDM algorithm: desired speed (m/s)
idm_dt_headway_s: f64IDM algorithm: headway time desired to vehicle in front (s)
idm_minimum_gap_m: f64IDM algorithm: minimum desired gap between vehicle and lead vehicle (m)
idm_delta: f64IDM algorithm: delta parameter
idm_accel_m_per_s2: f64IDM algorithm: acceleration parameter
idm_decel_m_per_s2: f64IDM algorithm: deceleration parameter
idm_v_desired_in_m_per_s_by_distance_m: Option<Vec<(f64, f64)>>IDM algorithm: a way to specify desired speed by course distance traveled. Can simulate changing speed limits over a driving cycle optional list of (distance (m), desired speed (m/s))
max_epa_adj: f64EPA fuel economy adjustment parameters; maximum EPA adjustment factor
orphaned: boolTrait Implementations§
source§impl Clone for RustSimDriveParams
impl Clone for RustSimDriveParams
source§fn clone(&self) -> RustSimDriveParams
fn clone(&self) -> RustSimDriveParams
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RustSimDriveParams
impl Debug for RustSimDriveParams
source§impl Default for RustSimDriveParams
impl Default for RustSimDriveParams
source§impl<'de> Deserialize<'de> for RustSimDriveParams
impl<'de> Deserialize<'de> for RustSimDriveParams
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for RustSimDriveParams
impl PartialEq for RustSimDriveParams
source§impl SerdeAPI for RustSimDriveParams
impl SerdeAPI for RustSimDriveParams
const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _
const ACCEPTED_STR_FORMATS: &'static [&'static str] = _
const RESOURCE_PREFIX: &'static str = ""
const CACHE_FOLDER: &'static str = ""
source§fn list_resources() -> Vec<String>
fn list_resources() -> Vec<String>
source§fn from_resource<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>
fn from_resource<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>
fastsim-core crate Read moresource§fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<()>
fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<()>
ACCEPTED_BYTE_FORMATS.
Creates a new file if it does not already exist, otherwise truncates the existing file. Read morefn to_writer<W: Write>(&self, wtr: W, format: &str) -> Result<()>
source§fn from_file<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>
fn from_file<P: AsRef<Path>>(filepath: P, skip_init: bool) -> Result<Self>
ACCEPTED_BYTE_FORMATS. Read moresource§fn to_str(&self, format: &str) -> Result<String>
fn to_str(&self, format: &str) -> Result<String>
source§fn from_str<S: AsRef<str>>(
contents: S,
format: &str,
skip_init: bool,
) -> Result<Self>
fn from_str<S: AsRef<str>>( contents: S, format: &str, skip_init: bool, ) -> Result<Self>
source§fn from_reader<R: Read>(rdr: R, format: &str, skip_init: bool) -> Result<Self>
fn from_reader<R: Read>(rdr: R, format: &str, skip_init: bool) -> Result<Self>
std::io::Read Read moresource§fn from_json<S: AsRef<str>>(json_str: S, skip_init: bool) -> Result<Self>
fn from_json<S: AsRef<str>>(json_str: S, skip_init: bool) -> Result<Self>
source§fn from_yaml<S: AsRef<str>>(yaml_str: S, skip_init: bool) -> Result<Self>
fn from_yaml<S: AsRef<str>>(yaml_str: S, skip_init: bool) -> Result<Self>
fn to_toml(&self) -> Result<String>
fn from_toml<S: AsRef<str>>(toml_str: S, skip_init: bool) -> Result<Self>
source§fn from_url<S: AsRef<str>>(url: S, skip_init: bool) -> Result<Self>
fn from_url<S: AsRef<str>>(url: S, skip_init: bool) -> Result<Self>
source§fn to_cache<P: AsRef<Path>>(&self, file_path: P) -> Result<()>
fn to_cache<P: AsRef<Path>>(&self, file_path: P) -> Result<()>
WARNING: If there is a file already in the data subdirectory with the same name, it will be replaced by the new file. Read more
source§fn from_cache<P: AsRef<Path>>(file_path: P, skip_init: bool) -> Result<Self>
fn from_cache<P: AsRef<Path>>(file_path: P, skip_init: bool) -> Result<Self>
source§impl Serialize for RustSimDriveParams
impl Serialize for RustSimDriveParams
impl StructuralPartialEq for RustSimDriveParams
Auto Trait Implementations§
impl Freeze for RustSimDriveParams
impl RefUnwindSafe for RustSimDriveParams
impl Send for RustSimDriveParams
impl Sync for RustSimDriveParams
impl Unpin for RustSimDriveParams
impl UnwindSafe for RustSimDriveParams
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more