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

pub trait Model {
    fn as_any(&self) -> &dyn Any;
fn id(&self) -> String;
fn status(&self) -> String;
fn events_ext(
        &mut self,
        uniform_rng: &mut UniformRNG,
        incoming_message: ModelMessage
    ) -> Result<Vec<ModelMessage>, SimulationError>;
fn events_int(
        &mut self,
        uniform_rng: &mut UniformRNG
    ) -> Result<Vec<ModelMessage>, SimulationError>;
fn time_advance(&mut self, time_delta: f64);
fn until_next_event(&self) -> f64; }

The Model trait defines everything required for a model to operate within the discrete event simulation. These requirements are based largely on the Discrete Event System Specification (DEVS), but with a small amount of plumbing (as_any and id) and a dedicated status reporting method status.

Required methods

fn as_any(&self) -> &dyn Any[src]

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

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

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

fn events_int(
    &mut self,
    uniform_rng: &mut UniformRNG
) -> 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 Model for ExclusiveGateway[src]

impl Model for Gate[src]

impl Model for Generator[src]

impl Model for LoadBalancer[src]

impl Model for ParallelGateway[src]

impl Model for Processor[src]

impl Model for StochasticGate[src]

impl Model for Storage[src]

Loading content...