Module: YPetri::Simulation::TransitionRepresentation::Type_a
- Defined in:
- lib/y_petri/simulation/transition_representation/a.rb
Overview
A mixin for non-assignment transition representations.
Instance Method Summary collapse
-
#A? ⇒ Boolean
(also: #assignment_action?, #assignment?)
Assignment action – false for non-assignment transitions.
-
#a? ⇒ Boolean
Normal (non-assignment) action – true for A transitions.
-
#delta ⇒ Object
Change, for free places, as it would happen if the transition fired.
-
#init ⇒ Object
Initialization subroutine.
Instance Method Details
#A? ⇒ Boolean Also known as: assignment_action?, assignment?
Assignment action – false for non-assignment transitions.
8 9 10 |
# File 'lib/y_petri/simulation/transition_representation/a.rb', line 8 def A? false end |
#a? ⇒ Boolean
Normal (non-assignment) action – true for A transitions
16 17 18 |
# File 'lib/y_petri/simulation/transition_representation/a.rb', line 16 def a? true end |
#delta ⇒ Object
Change, for free places, as it would happen if the transition fired.
27 28 29 |
# File 'lib/y_petri/simulation/transition_representation/a.rb', line 27 def delta Δ.select { |p, v| p.free? } end |
#init ⇒ Object
Initialization subroutine.
22 23 |
# File 'lib/y_petri/simulation/transition_representation/a.rb', line 22 def init end |