RESGreedyWithDynamicBuffers

Struct RESGreedyWithDynamicBuffers 

Source
#[non_exhaustive]
pub struct RESGreedyWithDynamicBuffers {
Show 15 fields pub speed_soc_disch_buffer: Option<Velocity>, pub speed_soc_disch_buffer_coeff: Option<Ratio>, pub speed_soc_fc_on_buffer: Option<Velocity>, pub speed_soc_fc_on_buffer_coeff: Option<Ratio>, pub speed_soc_regen_buffer: Option<Velocity>, pub speed_soc_regen_buffer_coeff: Option<Ratio>, pub fc_min_time_on: Option<Time>, pub speed_fc_forced_on: Option<Velocity>, pub frac_pwr_demand_fc_forced_on: Option<Ratio>, pub frac_of_most_eff_pwr_to_run_fc: Option<Ratio>, pub save_interval: Option<usize>, pub temp_fc_forced_on: Option<Temperature>, pub temp_fc_allowed_off: Option<Temperature>, pub state: RGWDBState, pub history: RGWDBStateHistoryVec,
}
Expand description

Greedily uses ReversibleEnergyStorage with buffers that derate charge and discharge power inside of static min and max SOC range. Also, includes buffer for forcing FuelConverter to be active/on. See Self::init for default values.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§speed_soc_disch_buffer: Option<Velocity>

RES energy delta from minimum SOC corresponding to kinetic energy of vehicle at this speed that triggers ramp down in RES discharge.

§speed_soc_disch_buffer_coeff: Option<Ratio>

Coefficient for modifying amount of accel buffer

§speed_soc_fc_on_buffer: Option<Velocity>

RES energy delta from minimum SOC corresponding to kinetic energy of vehicle at this speed that triggers FC to be forced on.

§speed_soc_fc_on_buffer_coeff: Option<Ratio>

Coefficient for modifying amount of Self::speed_soc_fc_on_buffer

§speed_soc_regen_buffer: Option<Velocity>

RES energy delta from maximum SOC corresponding to kinetic energy of vehicle at current speed minus kinetic energy of vehicle at this speed triggers ramp down in RES discharge

§speed_soc_regen_buffer_coeff: Option<Ratio>

Coefficient for modifying amount of regen buffer

§fc_min_time_on: Option<Time>

Minimum time engine must remain on if it was on during the previous simulation time step.

§speed_fc_forced_on: Option<Velocity>

Speed at which FuelConverter is forced on.

§frac_pwr_demand_fc_forced_on: Option<Ratio>

Fraction of total aux and powertrain rated power at which FuelConverter is forced on.

§frac_of_most_eff_pwr_to_run_fc: Option<Ratio>

Force engine, if on, to run at this fraction of power at which peak efficiency occurs or the required power, whichever is greater. If SOC is below min buffer or engine is otherwise forced on and battery has room to receive charge, engine will run at this level and charge.

§save_interval: Option<usize>

Fraction of available charging capacity to use toward running the engine efficiently. Time step interval between saves. 1 is a good option. If None, no saving occurs.

§temp_fc_forced_on: Option<Temperature>

temperature at which engine is forced on to warm up

§temp_fc_allowed_off: Option<Temperature>

temperature at which engine is allowed to turn off due to being sufficiently warm

§state: RGWDBState

current state of control variables

§history: RGWDBStateHistoryVec

history of current state

Trait Implementations§

Source§

impl Clone for RESGreedyWithDynamicBuffers

Source§

fn clone(&self) -> RESGreedyWithDynamicBuffers

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RESGreedyWithDynamicBuffers

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RESGreedyWithDynamicBuffers

Source§

fn default() -> RESGreedyWithDynamicBuffers

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RESGreedyWithDynamicBuffers

Source§

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 HistoryMethods for RESGreedyWithDynamicBuffers

Source§

fn set_save_interval(&mut self, save_interval: Option<usize>) -> Result<()>

Recursively sets save interval Read more
Source§

fn save_interval(&self) -> Result<Option<usize>>

Returns save interval for self but does not guarantee recursive consistency in nested objects
Source§

fn clear(&mut self)

Remove all history
Source§

impl Init for RESGreedyWithDynamicBuffers

Source§

fn init(&mut self) -> Result<(), Error>

Specialized code to execute upon initialization. For any struct with fields that implement Init, this should propagate down the hierarchy.
Source§

impl PartialEq for RESGreedyWithDynamicBuffers

Source§

fn eq(&self, other: &RESGreedyWithDynamicBuffers) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SaveState for RESGreedyWithDynamicBuffers

Source§

fn save_state<F: Fn() -> String>(&mut self, loc: F) -> Result<()>

Implementation for structs with save_interval

Source§

impl SerdeAPI for RESGreedyWithDynamicBuffers

Source§

const ACCEPTED_BYTE_FORMATS: &'static [&'static str] = _

Source§

const ACCEPTED_STR_FORMATS: &'static [&'static str] = _

Source§

const RESOURCES_DIR: &'static Dir<'_> = _

Source§

const RESOURCES_SUBDIR: &'static str = ""

Source§

fn from_resource<P: AsRef<Path>>( filepath: P, skip_init: bool, ) -> Result<Self, Error>

Read (deserialize) an object from a resource file packaged with the fastsim-core crate Read more
Source§

fn list_resources() -> Result<Vec<PathBuf>, Error>

List the available resources in the resources directory Read more
Source§

fn to_file<P: AsRef<Path>>(&self, filepath: P) -> Result<(), Error>

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 more
Source§

fn from_file<P: AsRef<Path>>( filepath: P, skip_init: bool, ) -> Result<Self, Error>

Read (deserialize) an object from a file. Supported file extensions are listed in ACCEPTED_BYTE_FORMATS. Read more
Source§

fn to_writer<W: Write>(&self, wtr: W, format: &str) -> Result<(), Error>

Write (serialize) an object into anything that implements std::io::Write Read more
Source§

fn from_reader<R: Read>( rdr: &mut R, format: &str, skip_init: bool, ) -> Result<Self, Error>

Deserialize an object from anything that implements std::io::Read Read more
Source§

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>

Read (deserialize) an object from a string Read more
Source§

fn to_json(&self) -> Result<String>

Write (serialize) an object to a JSON string
Source§

fn from_json<S: AsRef<str>>(json_str: S, skip_init: bool) -> Result<Self>

Read (deserialize) an object from a JSON string Read more
Source§

fn to_msg_pack(&self) -> Result<Vec<u8>>

Write (serialize) an object to a message pack
Source§

fn from_msg_pack(msg_pack: &[u8], skip_init: bool) -> Result<Self>

Read (deserialize) an object from a message pack Read more
Source§

fn to_toml(&self) -> Result<String>

Write (serialize) an object to a TOML string
Source§

fn from_toml<S: AsRef<str>>(toml_str: S, skip_init: bool) -> Result<Self>

Read (deserialize) an object from a TOML string Read more
Source§

fn to_yaml(&self) -> Result<String>

Write (serialize) an object to a YAML string
Source§

fn from_yaml<S: AsRef<str>>(yaml_str: S, skip_init: bool) -> Result<Self>

Read (deserialize) an object from a YAML string Read more
Source§

impl Serialize for RESGreedyWithDynamicBuffers

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SetCumulative for RESGreedyWithDynamicBuffers

Source§

fn set_cumulative<F: Fn() -> String>(&mut self, dt: Time, loc: F) -> Result<()>

Sets cumulative values based on rate values
Source§

fn reset_cumulative<F: Fn() -> String>(&mut self, loc: F) -> Result<()>

Resets cumulative and corresponding rate values to zero
Source§

impl Step for RESGreedyWithDynamicBuffers

Source§

fn step<F: Fn() -> String>(&mut self, loc: F) -> Result<()>

Increments i field of this and all contained structs, recursively Read more
Source§

fn reset_step<F: Fn() -> String>(&mut self, loc: F) -> Result<()>

Resets i field of this and all contained structs, recursively Read more
Source§

impl TrackedStateMethods for RESGreedyWithDynamicBuffers

Source§

fn check_and_reset<F: Fn() -> String>(&mut self, loc: F) -> Result<()>

Ensure [State::Fresh] and reset to [State::Stale] Read more
Source§

fn mark_fresh<F: Fn() -> String>(&mut self, loc: F) -> Result<()>

Mark states as [State::Fresh] Read more
Source§

impl TryFrom<HEVPowertrainControls> for Box<RESGreedyWithDynamicBuffers>

Source§

type Error = TryIntoError<HEVPowertrainControls>

The type returned in the event of a conversion error.
Source§

fn try_from(value: HEVPowertrainControls) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StateMethods for RESGreedyWithDynamicBuffers

Source§

impl StructuralPartialEq for RESGreedyWithDynamicBuffers

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> EqDefault for T
where T: Default + PartialEq,

Source§

fn eq_default(&self) -> bool

If self is default, returns true
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DeserializeOwnedAlias for T

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> SendAlias for T

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,

Source§

impl<T> SerializeAlias for T
where T: Serialize,

Source§

impl<T> SyncAlias for T

Source§

impl<T> Ungil for T
where T: Send,