module YPetri::Core::Timeless::Basic

The basic simulation method in YPetri is simple Petri net (PN) execution. While in principle applicable to any PN type, it can be made slightly more efficient if it is known in advance that no no timed transitions will be in the net.

Public Instance Methods

step!() click to toggle source

Peforms a single step of the basic method.

# File lib/y_petri/core/timeless/basic.rb, line 10
def step!
  # Compute the sum of the contribution of ts and tS transitions, and
  # increment the free marking vector by it.
  increment_free_vector by: Δ
  # Fire all the assignment transitions in their order.
  fire_all_assignment_transitions!
  # before: assignment_transitions_all_fire!
  # Alert the recorder(s) that the system has changed.
  alert!
end