pub struct HybridKernel { /* private fields */ }Expand description
Hybrid simulation kernel combining tick-by-tick and event-driven processing.
Implementations§
Source§impl HybridKernel
impl HybridKernel
Sourcepub fn new(config: HybridKernelConfig) -> Self
pub fn new(config: HybridKernelConfig) -> Self
Create a new hybrid kernel.
Sourcepub fn run<S, F>(
&self,
data: &DataTable,
initial_state: S,
event_queue: EventQueue,
tick_strategy: F,
event_handler: EventHandlerFn<S>,
) -> Result<HybridKernelResult<S>>
pub fn run<S, F>( &self, data: &DataTable, initial_state: S, event_queue: EventQueue, tick_strategy: F, event_handler: EventHandlerFn<S>, ) -> Result<HybridKernelResult<S>>
Run hybrid simulation on a DataTable with tick strategy and event handler.
Each tick: call tick_strategy, then process any due events via event_handler.
Auto Trait Implementations§
impl Freeze for HybridKernel
impl RefUnwindSafe for HybridKernel
impl Send for HybridKernel
impl Sync for HybridKernel
impl Unpin for HybridKernel
impl UnsafeUnpin for HybridKernel
impl UnwindSafe for HybridKernel
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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