pub struct Kinetics {
pub onset_minutes: u32,
pub half_life_minutes: u32,
}Expand description
How a factor-event’s contribution to a system rises to a peak, then clears.
onset_minutes: time from the event to peak contribution (0 = immediate).half_life_minutes: clearance half-life after the peak.0means it does not clear while present (a chronic condition, a standing environmental exposure) — it holds at peak.
Fields§
§onset_minutes: u32§half_life_minutes: u32Implementations§
Source§impl Kinetics
impl Kinetics
Sourcepub fn magnitude_at(
self,
base_milli: u32,
dose_scale_pct: u32,
elapsed_minutes: i64,
) -> u32
pub fn magnitude_at( self, base_milli: u32, dose_scale_pct: u32, elapsed_minutes: i64, ) -> u32
Effective magnitude of a base_milli contribution elapsed_minutes after the event, given a
dose scaler (percent; 100 = as authored). Integer math throughout; result clamped to 0..=1000.
Rise is linear to the peak over onset_minutes; decay halves every half_life_minutes with a
linear interpolation inside each half-life (coarse but monotone and honest).
Trait Implementations§
impl Copy for Kinetics
Source§impl<'de> Deserialize<'de> for Kinetics
impl<'de> Deserialize<'de> for Kinetics
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
impl Eq for Kinetics
impl StructuralPartialEq for Kinetics
Auto Trait Implementations§
impl Freeze for Kinetics
impl RefUnwindSafe for Kinetics
impl Send for Kinetics
impl Sync for Kinetics
impl Unpin for Kinetics
impl UnsafeUnpin for Kinetics
impl UnwindSafe for Kinetics
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