pub struct SimpleTimingModel<P: Prefix> { /* private fields */ }Available on crate feature
rand_queue only.Expand description
Simple timing model based on a beta distribution.
The processing delay depends on a single beta distribution (see ModelParams) with parameters
that can be tuned for each pair of routers.
Implementations§
Source§impl<P: Prefix> SimpleTimingModel<P>
impl<P: Prefix> SimpleTimingModel<P>
Sourcepub fn new(default_params: ModelParams) -> Self
pub fn new(default_params: ModelParams) -> Self
Create a new, empty model queue with given default parameters
Sourcepub fn set_parameters(
&mut self,
src: RouterId,
dst: RouterId,
params: ModelParams,
)
pub fn set_parameters( &mut self, src: RouterId, dst: RouterId, params: ModelParams, )
Set the parameters of a specific router pair.
Trait Implementations§
Source§impl<P: Clone + Prefix> Clone for SimpleTimingModel<P>
impl<P: Clone + Prefix> Clone for SimpleTimingModel<P>
Source§fn clone(&self) -> SimpleTimingModel<P>
fn clone(&self) -> SimpleTimingModel<P>
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<'de, P> Deserialize<'de> for SimpleTimingModel<P>where
P: for<'a> Deserialize<'a> + Prefix,
impl<'de, P> Deserialize<'de> for SimpleTimingModel<P>where
P: for<'a> Deserialize<'a> + Prefix,
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
Source§impl<P: Prefix> EventQueue<P> for SimpleTimingModel<P>
impl<P: Prefix> EventQueue<P> for SimpleTimingModel<P>
Source§fn push<Ospf: OspfProcess>(
&mut self,
event: Event<P, Self::Priority>,
_routers: &BTreeMap<RouterId, Router<P, Ospf>>,
_net: &PhysicalNetwork,
)
fn push<Ospf: OspfProcess>( &mut self, event: Event<P, Self::Priority>, _routers: &BTreeMap<RouterId, Router<P, Ospf>>, _net: &PhysicalNetwork, )
Enqueue a new event.
Source§fn update_params<Ospf: OspfProcess>(
&mut self,
_: &BTreeMap<RouterId, Router<P, Ospf>>,
_: &PhysicalNetwork,
)
fn update_params<Ospf: OspfProcess>( &mut self, _: &BTreeMap<RouterId, Router<P, Ospf>>, _: &PhysicalNetwork, )
Update the model parameters. This function will always be called after some externally
triggered event occurs. It will still happen, even if the network was set to manual
simulation.
Source§unsafe fn clone_events(&self, conquered: Self) -> Self
unsafe fn clone_events(&self, conquered: Self) -> Self
Clone all events from self into conquered. Read more
Source§impl<P: Prefix> PartialEq for SimpleTimingModel<P>
impl<P: Prefix> PartialEq for SimpleTimingModel<P>
Auto Trait Implementations§
impl<P> Freeze for SimpleTimingModel<P>
impl<P> RefUnwindSafe for SimpleTimingModel<P>where
P: RefUnwindSafe,
impl<P> Send for SimpleTimingModel<P>
impl<P> Sync for SimpleTimingModel<P>
impl<P> Unpin for SimpleTimingModel<P>where
P: Unpin,
impl<P> UnwindSafe for SimpleTimingModel<P>where
P: UnwindSafe,
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
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>
Converts
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>
Converts
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