ElementarySimulation

Struct ElementarySimulation 

Source
pub struct ElementarySimulation { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Debug for ElementarySimulation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Simulation for ElementarySimulation

Source§

type Place = SimplePlace

Source§

type Transition = SimpleTransition

Source§

type Arc = SimpleArc

Source§

type Net = ElementaryNet

Source§

type Tokens = Dot

Source§

type Marking = SimpleMarking

Source§

fn net(&self) -> Rc<Self::Net>

Return a reference to the net that is being executed.
Source§

fn current_marking(&self) -> &Self::Marking

Return a reference to the current marking of the net. If the simulation has not been advanced by calling step or steps this is the initial marking.
Source§

fn current_step(&self) -> Step

Return the current step in the simulation. If the simulation has not been advanced by calling step or steps this is Step::ZERO.
Source§

fn step(&mut self) -> Result<(), Error>

Advance the simulation by one step returning the marking after the step has been taken.
Source§

fn steps(&mut self, steps: Duration) -> Result<(), Error>

Advance the simulation by steps returning the marking after all steps were taken.
Source§

fn enabled(&self) -> Vec<NodeId>

Return a list of node identifiers corresponding to all the enabled transitions at this step.
Source§

fn is_enabled(&self, transition: &Self::Transition) -> bool

Return true if transition is enabled at this step, else false.
Source§

fn is_complete(&self) -> Option<bool>

Not all nets can determine termination, if it is possible to determine termination return Some(...), else None.
Source§

impl TraceableSimulation for ElementarySimulation

Source§

fn add_tracer<Tracer>(&mut self, tracer: Rc<Tracer>)
where Tracer: SimulationTracer<Place = SimplePlace, Transition = Self::Transition, Arc = Self::Arc, Net = Self::Net, Tokens = Self::Tokens, Marking = Self::Marking, Simulation = Self> + 'static,

Add a tracer to this simulation.
Source§

fn remove_tracer(&mut self)

Remove any tracer associated with this simulation. If no tracer is associated this method does nothing.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V