pub trait ArrivalBound {
    fn number_arrivals(&self, delta: Duration) -> usize;
    fn clone_with_jitter(&self, jitter: Duration) -> Box<dyn ArrivalBound>;

    fn 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> { ... } }
Expand description

The main interface for models describing arrival processes.

Required Methods

Bound the number of jobs released in any interval of length delta.

Clone the arrival model while accounting for added release jitter. Returns a boxed dyn object because the underlying type may change.

Provided Methods

Yield the sequence of interval lengths (i.e., values of delta in ArrivalBound::number_arrivals) for which the arrival bound “steps”, i.e., where it shows an increase in the number of released jobs.

More precisely, the iterator yields values of delta such that:

self.number_arrivals(delta - 1) < self.number_arrivals(delta).

Defaults to using ArrivalBound::brute_force_steps_iter, which is very slow, so implementors should override this method.

Same semantics as ArrivalBound::steps_iter, but provided by a default implementation in the most naive way possible. Avoid if performance is at all important.

Implementations on Foreign Types

Implementors