pub struct SquareRootLaw { /* private fields */ }Expand description
The Square Root Law for safety stock scaling.
Safety stock scales with the square root of demand, not linearly:
I_safety = z × σ_D × √L
where:
- z: Service level z-score (e.g., 1.96 for 95% service)
σ_D: Standard deviation of demand per period- L: Lead time in periods
This means pooling inventory reduces total safety stock requirements.
Implementations§
Source§impl SquareRootLaw
impl SquareRootLaw
Sourcepub fn pooling_reduction(&self, num_locations: usize) -> f64
pub fn pooling_reduction(&self, num_locations: usize) -> f64
Calculate safety stock reduction from pooling.
When combining n locations with equal demand variance, the total safety stock is reduced by a factor of √n.
Sourcepub fn z_score_for_service_level(service_level: f64) -> f64
pub fn z_score_for_service_level(service_level: f64) -> f64
Common z-scores for service levels.
Trait Implementations§
Source§impl Clone for SquareRootLaw
impl Clone for SquareRootLaw
Source§fn clone(&self) -> SquareRootLaw
fn clone(&self) -> SquareRootLaw
Returns a duplicate 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 SquareRootLaw
impl Debug for SquareRootLaw
Source§impl Default for SquareRootLaw
impl Default for SquareRootLaw
Source§impl GoverningEquation for SquareRootLaw
impl GoverningEquation for SquareRootLaw
Source§fn class(&self) -> EquationClass
fn class(&self) -> EquationClass
Get the equation’s classification.
Source§fn variables(&self) -> Vec<EquationVariable>
fn variables(&self) -> Vec<EquationVariable>
Get all variables in this equation.
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get a human-readable description.
Auto Trait Implementations§
impl Freeze for SquareRootLaw
impl RefUnwindSafe for SquareRootLaw
impl Send for SquareRootLaw
impl Sync for SquareRootLaw
impl Unpin for SquareRootLaw
impl UnsafeUnpin for SquareRootLaw
impl UnwindSafe for SquareRootLaw
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