pub struct SimDriveHot {
pub sd: RustSimDrive,
pub vehthrm: VehicleThermal,
pub state: ThermalState,
pub history: ThermalStateHistoryVec,
pub hvac_model_history: HVACModelHistoryVec,
/* private fields */
}Fields§
§sd: RustSimDrive§vehthrm: VehicleThermal§state: ThermalState§history: ThermalStateHistoryVec§hvac_model_history: HVACModelHistoryVecImplementations§
Source§impl SimDriveHot
impl SimDriveHot
pub fn new( cyc: RustCycle, veh: RustVehicle, vehthrm: VehicleThermal, init_state: Option<ThermalState>, amb_te_deg_c: Option<Array1<f64>>, ) -> Self
pub fn gap_to_lead_vehicle_m(&self) -> Array1<f64>
pub fn sim_drive( &mut self, init_soc: Option<f64>, aux_in_kw_override: Option<Array1<f64>>, ) -> Result<()>
pub fn walk(&mut self, init_soc: f64, aux_in_kw_override: Option<Array1<f64>>)
pub fn init_for_step( &mut self, init_soc: f64, aux_in_kw_override: Option<Array1<f64>>, )
pub fn set_speed_for_target_gap_using_idm(&mut self, i: usize)
pub fn set_speed_for_target_gap(&mut self, i: usize)
pub fn step(&mut self) -> Result<()>
pub fn solve_step(&mut self, i: usize) -> Result<()>
pub fn set_thermal_calcs(&mut self, i: usize) -> Result<()>
Sourcepub fn set_fc_thermal_calcs(&mut self, i: usize) -> Result<()>
pub fn set_fc_thermal_calcs(&mut self, i: usize) -> Result<()>
Solve fuel converter thermal behavior assuming convection parameters of sphere.
Sourcepub fn set_cab_thermal_calcs(&mut self, i: usize) -> Result<()>
pub fn set_cab_thermal_calcs(&mut self, i: usize) -> Result<()>
Solve cabin thermal behavior.
Sourcepub fn set_exhport_thermal_calcs(&mut self, i: usize) -> Result<()>
pub fn set_exhport_thermal_calcs(&mut self, i: usize) -> Result<()>
Solve exhport thermal behavior.
pub fn thermal_soak_walk(&mut self) -> Result<()>
Sourcepub fn set_cat_thermal_calcs(&mut self, i: usize) -> Result<()>
pub fn set_cat_thermal_calcs(&mut self, i: usize) -> Result<()>
Solve catalyst thermal behavior.
pub fn set_misc_calcs(&mut self, i: usize)
pub fn set_comp_lims(&mut self, i: usize) -> Result<()>
pub fn set_power_calcs(&mut self, i: usize) -> Result<()>
pub fn set_ach_speed(&mut self, i: usize) -> Result<()>
pub fn set_hybrid_cont_calcs(&mut self, i: usize) -> Result<()>
pub fn set_fc_forced_state_rust(&mut self, i: usize) -> Result<()>
pub fn set_hybrid_cont_decisions(&mut self, i: usize) -> Result<()>
pub fn set_fc_power(&mut self, i: usize) -> Result<()>
pub fn set_time_dilation(&mut self, i: usize) -> Result<()>
pub fn set_post_scalars(&mut self) -> Result<()>
Trait Implementations§
Source§impl Clone for SimDriveHot
impl Clone for SimDriveHot
Source§fn clone(&self) -> SimDriveHot
fn clone(&self) -> SimDriveHot
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 SimDriveHot
impl Debug for SimDriveHot
Source§impl<'de> Deserialize<'de> for SimDriveHot
impl<'de> Deserialize<'de> for SimDriveHot
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 SimDriveHot
impl PartialEq for SimDriveHot
Source§impl SerdeAPI for SimDriveHot
impl SerdeAPI for SimDriveHot
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>
List available (compiled) resources (stored in the rust binary) Read more
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>
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, skip_init: bool) -> Result<Self>
fn from_file<P: AsRef<Path>>(filepath: P, skip_init: bool) -> 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,
skip_init: bool,
) -> Result<Self>
fn from_str<S: AsRef<str>>( contents: S, format: &str, skip_init: bool, ) -> Result<Self>
Read (deserialize) an object from a string Read more
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>
Deserialize an object from anything that implements
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>
Read (deserialize) an object to a JSON string Read more
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>
Read (deserialize) an object from a YAML string Read more
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>
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, skip_init: bool) -> Result<Self>
fn from_cache<P: AsRef<Path>>(file_path: P, skip_init: bool) -> 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 SimDriveHot
impl Serialize for SimDriveHot
impl StructuralPartialEq for SimDriveHot
Auto Trait Implementations§
impl Freeze for SimDriveHot
impl RefUnwindSafe for SimDriveHot
impl Send for SimDriveHot
impl Sync for SimDriveHot
impl Unpin for SimDriveHot
impl UnwindSafe for SimDriveHot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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