Trait sim::models::model::AsModel[][src]

pub trait AsModel {
    fn status(&self) -> String;
fn events_ext(
        &mut self,
        incoming_message: ModelMessage,
        services: &mut Services
    ) -> Result<Vec<ModelMessage>, SimulationError>;
fn events_int(
        &mut self,
        services: &mut Services
    ) -> Result<Vec<ModelMessage>, SimulationError>;
fn time_advance(&mut self, time_delta: f64);
fn until_next_event(&self) -> f64; }

The AsModel trait defines everything required for a model to operate within the discrete event simulation. The simulator formalism (Discrete Event System Specification) requires events_ext, events_int, time_advance, and until_next_event. The additional status is for facilitation of simulation reasoning, reporting, and debugging.

Required methods

fn status(&self) -> String[src]

fn events_ext(
    &mut self,
    incoming_message: ModelMessage,
    services: &mut Services
) -> Result<Vec<ModelMessage>, SimulationError>
[src]

fn events_int(
    &mut self,
    services: &mut Services
) -> Result<Vec<ModelMessage>, SimulationError>
[src]

fn time_advance(&mut self, time_delta: f64)[src]

fn until_next_event(&self) -> f64[src]

Loading content...

Implementors

impl AsModel for ModelType[src]

impl AsModel for ExclusiveGateway[src]

impl AsModel for Gate[src]

impl AsModel for Generator[src]

impl AsModel for LoadBalancer[src]

impl AsModel for Model[src]

impl AsModel for ParallelGateway[src]

impl AsModel for Processor[src]

impl AsModel for StochasticGate[src]

impl AsModel for Storage[src]

Loading content...