Module: YPetri::Core::Timeless::Basic
- Defined in:
- lib/y_petri/core/timeless/basic.rb
Overview
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.
Instance Method Summary collapse
-
#step! ⇒ Object
Peforms a single step of the basic method.
Instance Method Details
#step! ⇒ Object
Peforms a single step of the basic method.
10 11 12 13 14 15 16 17 18 19 |
# 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 |