pub struct QualitySource {
pub node: usize,
pub kind: SourceType,
pub base_value: f64,
pub pattern: Option<String>,
}Expand description
A quality source attached to a node (§2.7).
Fields§
§node: usize1-based node index.
kind: SourceTypeInjection type (concentration, mass, setpoint, or flow-paced).
base_value: f64Base injection value before pattern scaling.
pattern: Option<String>Optional pattern ID modulating injection over time.
Implementations§
Source§impl QualitySource
impl QualitySource
Sourcepub fn effective_value(
&self,
t: f64,
opts: &SimulationOptions,
patterns: &[Pattern],
pattern_index: &HashMap<String, usize>,
) -> f64
pub fn effective_value( &self, t: f64, opts: &SimulationOptions, patterns: &[Pattern], pattern_index: &HashMap<String, usize>, ) -> f64
Effective injection value at time t (§2.7).
= base_value × $F_{\text{pattern}}(t)$, or base_value if no pattern.
Trait Implementations§
Source§impl Clone for QualitySource
impl Clone for QualitySource
Source§fn clone(&self) -> QualitySource
fn clone(&self) -> QualitySource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for QualitySource
impl RefUnwindSafe for QualitySource
impl Send for QualitySource
impl Sync for QualitySource
impl Unpin for QualitySource
impl UnsafeUnpin for QualitySource
impl UnwindSafe for QualitySource
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