pub struct Simulator { /* private fields */ }Expand description
The simulator for one scenario.
Implementations§
Source§impl Simulator
impl Simulator
Sourcepub fn new(seed: u64, faults: Vec<Fault>) -> Self
pub fn new(seed: u64, faults: Vec<Fault>) -> Self
A simulator with a seed and the scenario’s faults.
Sourcepub fn dispatch(&mut self, asset: AssetId, schedule: Dispatch)
pub fn dispatch(&mut self, asset: AssetId, schedule: Dispatch)
Lets asset follow schedule over the units it covers (a released, filled day-ahead
schedule, 010). Adding the same schedule twice changes nothing.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Simulator
impl Freeze for Simulator
impl Move for Simulator
impl RefUnwindSafe for Simulator
impl Send for Simulator
impl Sync for Simulator
impl Unpin for Simulator
impl UnsafeUnpin for Simulatorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Fault>: UnsafeUnpin,
*const LeafNode<AssetId, Vec<Dispatch>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(AssetId, Vec<Dispatch>)>>: UnsafeUnpin,
impl UnwindSafe for Simulator
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