Skip to main content

LittlesLaw

Struct LittlesLaw 

Source
pub struct LittlesLaw { /* private fields */ }
Expand description

Little’s Law: The fundamental equation relating WIP, throughput, and cycle time.

L = λW where:

  • L: Average number of items in the system (WIP)
  • λ: Average arrival rate (throughput at steady state)
  • W: Average time an item spends in the system (cycle time)

This law holds for ANY stable queueing system regardless of arrival distribution, service distribution, or queue discipline. It is one of the most fundamental results in queueing theory.

Implementations§

Source§

impl LittlesLaw

Source

pub fn new() -> Self

Create a new Little’s Law equation.

Source

pub fn evaluate(&self, lambda: f64, w: f64) -> f64

Evaluate L = λW given arrival rate and wait time.

Source

pub fn validate( &self, l: f64, lambda: f64, w: f64, tolerance: f64, ) -> Result<(), String>

Validate that observed values satisfy Little’s Law within tolerance.

§Arguments
  • l: Observed average WIP
  • lambda: Observed throughput/arrival rate
  • w: Observed average cycle time
  • tolerance: Relative tolerance for validation
§Errors

Returns error message if |L - λW| / L >= tolerance.

Source

pub fn solve_l(&self, lambda: f64, w: f64) -> f64

Solve for L given λ and W.

Source

pub fn solve_lambda(&self, l: f64, w: f64) -> f64

Solve for λ given L and W.

Source

pub fn solve_w(&self, l: f64, lambda: f64) -> f64

Solve for W given L and λ.

Trait Implementations§

Source§

impl Clone for LittlesLaw

Source§

fn clone(&self) -> LittlesLaw

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 LittlesLaw

Source§

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

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

impl Default for LittlesLaw

Source§

fn default() -> Self

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

impl GoverningEquation for LittlesLaw

Source§

fn latex(&self) -> &str

Get the LaTeX representation of the equation.
Source§

fn class(&self) -> EquationClass

Get the equation’s classification.
Source§

fn citation(&self) -> Citation

Get the primary citation for this equation.
Source§

fn variables(&self) -> Vec<EquationVariable>

Get all variables in this equation.
Source§

fn description(&self) -> &str

Get a human-readable description.
Source§

fn name(&self) -> &'static str

Get the equation name.
Source§

fn validate_consistency( &self, values: &[(&str, f64)], tolerance: f64, ) -> Result<(), String>

Validate that a set of values satisfies the equation within tolerance. Read more

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