pub struct ApproximatedPoisson { /* private fields */ }
Expand description
A finite approximation of a Poisson process with bounded probability of under-approximation.
A Poisson arrival process as modeled by Poisson cannot comply with the the ArrivalBound interface as there is a diminishing, but non-zero probability for an arbitrary large number of arrivals to occur in any interval. The ApproximatedPoisson process implements the ArrivalBound interface with a configurable residual probability of excessive arrivals.
The bound number_arrivals
ensures that the claimed number of job arrivals are not exceeded
with probability at least 1 - epsilon
.
Note: the implementation is intended to be simple, but not necessarily fast, so it’s best to convert it into an arrival curve before use if performance is of interest.
Implementations§
Trait Implementations§
Source§impl ArrivalBound for ApproximatedPoisson
impl ArrivalBound for ApproximatedPoisson
Source§fn number_arrivals(&self, delta: Duration) -> usize
fn number_arrivals(&self, delta: Duration) -> usize
Bound the number of jobs released in any interval of length delta
with probability 1 - epsilon
.
Source§fn clone_with_jitter(&self, jitter: Duration) -> Box<dyn ArrivalBound>
fn clone_with_jitter(&self, jitter: Duration) -> Box<dyn ArrivalBound>
dyn
object because the underlying
type may change.Source§fn steps_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Duration> + 'a>
fn steps_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Duration> + 'a>
delta
in
ArrivalBound::number_arrivals) for which the arrival bound
“steps”, i.e., where it shows an increase in the number of
released jobs. Read moreSource§fn brute_force_steps_iter<'a>(
&'a self,
) -> Box<dyn Iterator<Item = Duration> + 'a>
fn brute_force_steps_iter<'a>( &'a self, ) -> Box<dyn Iterator<Item = Duration> + 'a>
Source§impl Clone for ApproximatedPoisson
impl Clone for ApproximatedPoisson
Source§fn clone(&self) -> ApproximatedPoisson
fn clone(&self) -> ApproximatedPoisson
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ApproximatedPoisson
impl Debug for ApproximatedPoisson
impl Copy for ApproximatedPoisson
Auto Trait Implementations§
impl Freeze for ApproximatedPoisson
impl RefUnwindSafe for ApproximatedPoisson
impl Send for ApproximatedPoisson
impl Sync for ApproximatedPoisson
impl Unpin for ApproximatedPoisson
impl UnwindSafe for ApproximatedPoisson
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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