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: bool§missed_trace_correction: bool§max_time_dilation: f64§min_time_dilation: f64§time_dilation_tol: f64§max_trace_miss_iters: u32§trace_miss_speed_mps_tol: f64§trace_miss_time_tol: f64§trace_miss_dist_tol: f64§sim_count_max: usize§newton_gain: f64§newton_max_iter: u32§newton_xtol: f64§energy_audit_error_tol: f64§coast_allow: bool§coast_allow_passing: bool§coast_max_speed_m_per_s: f64§coast_brake_accel_m_per_s2: f64§coast_brake_start_speed_m_per_s: f64§coast_start_speed_m_per_s: f64§coast_time_horizon_for_adjustment_s: f64§idm_allow: bool§idm_v_desired_m_per_s: f64§idm_dt_headway_s: f64§idm_minimum_gap_m: f64§idm_delta: f64§idm_accel_m_per_s2: f64§idm_decel_m_per_s2: f64§idm_v_desired_in_m_per_s_by_distance_m: Option<Vec<(f64, f64)>>§max_epa_adj: f64§orphaned: boolTrait Implementations§
source§impl Clone for RustSimDriveParams
impl Clone for RustSimDriveParams
source§fn clone(&self) -> RustSimDriveParams
fn clone(&self) -> RustSimDriveParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for RustSimDriveParams
impl PartialEq for RustSimDriveParams
source§fn eq(&self, other: &RustSimDriveParams) -> bool
fn eq(&self, other: &RustSimDriveParams) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl SerdeAPI for RustSimDriveParams
impl SerdeAPI for RustSimDriveParams
const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _
const ACCEPTED_STR_FORMATS: &'static [&'static str] = _
const CACHE_FOLDER: &'static str = _
source§fn from_resource<P: AsRef<Path>>(filepath: P) -> Result<Self>
fn from_resource<P: AsRef<Path>>(filepath: P) -> Result<Self>
Read (deserialize) an object from a resource file packaged with the
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<()>
Write (serialize) an object to a file.
Supported file extensions are listed in
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) -> Result<Self>
fn from_file<P: AsRef<Path>>(filepath: P) -> Result<Self>
Read (deserialize) an object from a file.
Supported file extensions are listed in
ACCEPTED_BYTE_FORMATS. Read moresource§fn to_str(&self, format: &str) -> Result<String>
fn to_str(&self, format: &str) -> Result<String>
Write (serialize) an object into a string Read more
source§fn from_str<S: AsRef<str>>(contents: S, format: &str) -> Result<Self>
fn from_str<S: AsRef<str>>(contents: S, format: &str) -> Result<Self>
Read (deserialize) an object from a string Read more
source§fn from_reader<R: Read>(rdr: R, format: &str) -> Result<Self>
fn from_reader<R: Read>(rdr: R, format: &str) -> Result<Self>
Deserialize an object from anything that implements
std::io::Read Read moresource§fn from_json<S: AsRef<str>>(json_str: S) -> Result<Self>
fn from_json<S: AsRef<str>>(json_str: S) -> Result<Self>
Read (deserialize) an object to a JSON string Read more
source§fn from_yaml<S: AsRef<str>>(yaml_str: S) -> Result<Self>
fn from_yaml<S: AsRef<str>>(yaml_str: S) -> Result<Self>
Read (deserialize) an object from a YAML string Read more
source§fn from_bincode(encoded: &[u8]) -> Result<Self>
fn from_bincode(encoded: &[u8]) -> Result<Self>
Read (deserialize) an object from bincode-encoded bytes Read more
source§fn from_url<S: AsRef<str>>(url: S) -> Result<Self>
fn from_url<S: AsRef<str>>(url: S) -> Result<Self>
Instantiates an object from a url. Accepts yaml and json file types Read more
source§fn to_cache<P: AsRef<Path>>(&self, file_path: P) -> Result<()>
fn to_cache<P: AsRef<Path>>(&self, file_path: P) -> Result<()>
Takes an instantiated Rust object and saves it in the FASTSim data directory in
a rust_objects folder.
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
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) -> Result<Self>
fn from_cache<P: AsRef<Path>>(file_path: P) -> Result<Self>
Instantiates a Rust object from the subdirectory within the FASTSim data
directory corresponding to the Rust Object (“vehices” for a RustVehice,
“cycles” for a RustCycle, and the root folder of the data directory for
all other objects). Read more
source§impl Serialize for RustSimDriveParams
impl Serialize for RustSimDriveParams
impl StructuralPartialEq for RustSimDriveParams
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more