pub trait Atomic: PartialAtomic {
// Required methods
fn delta_int(state: &mut Self::State);
fn delta_ext(state: &mut Self::State, e: f64, x: &Self::Input);
fn lambda(state: &Self::State, output: &mut Self::Output);
fn ta(state: &Self::State) -> f64;
// Provided methods
fn start(state: &mut Self::State) { ... }
fn stop(state: &mut Self::State) { ... }
fn delta_conf(state: &mut Self::State, x: &Self::Input) { ... }
}
Expand description
Interface for DEVS atomic models. All DEVS atomic models must implement this trait.
Required Methods§
Sourcefn delta_int(state: &mut Self::State)
fn delta_int(state: &mut Self::State)
Internal transition function. It modifies the state of the model when an internal event happens.
Sourcefn delta_ext(state: &mut Self::State, e: f64, x: &Self::Input)
fn delta_ext(state: &mut Self::State, e: f64, x: &Self::Input)
External transition function. It modifies the state of the model when an external event happens.
The time elapsed since the last state transition is e
.
Provided Methods§
Sourcefn start(state: &mut Self::State)
fn start(state: &mut Self::State)
Method for performing any operation before simulating. By default, it does nothing.
Sourcefn stop(state: &mut Self::State)
fn stop(state: &mut Self::State)
Method for performing any operation after simulating. By default, it does nothing.
Sourcefn delta_conf(state: &mut Self::State, x: &Self::Input)
fn delta_conf(state: &mut Self::State, x: &Self::Input)
Confluent transition function. It modifies the state of the model when an external and an internal event occur simultaneously.
By default, it calls Atomic::delta_int
and Atomic::delta_ext
with e = 0
, in that order.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.