Sha256: 0d04210ab5db7ec6a31f9afe4ce5cb69fcf008f206caa799fae4aa9090e38253

Contents?: true

Size: 773 Bytes

Versions: 6

Compression:

Stored size: 773 Bytes

Contents

# encoding: utf-8

# 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.
#
module YPetri::Core::Timeless::Basic
  # Peforms a single step of the basic method.
  # 
  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
end # module YPetri::Core::Timeless::Basic

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
y_petri-2.4.9 lib/y_petri/core/timeless/basic.rb
y_petri-2.4.8 lib/y_petri/core/timeless/basic.rb
y_petri-2.4.6 lib/y_petri/core/timeless/basic.rb
y_petri-2.4.4 lib/y_petri/core/timeless/basic.rb
y_petri-2.4.3 lib/y_petri/core/timeless/basic.rb
y_petri-2.4.2 lib/y_petri/core/timeless/basic.rb