Module: YPetri::Simulation::TransitionRepresentation::Type_a

Included in:
Type_S, Type_T, Type_s, Type_t
Defined in:
lib/y_petri/simulation/transition_representation/a.rb

Overview

A mixin for non-assignment transition representations.

Instance Method Summary collapse

Instance Method Details

#A?Boolean Also known as: assignment_action?, assignment?

Assignment action – false for non-assignment transitions.

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


16
17
18
# File 'lib/y_petri/simulation/transition_representation/a.rb', line 16

def a?
  true
end

#deltaObject

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

#initObject

Initialization subroutine.



22
23
# File 'lib/y_petri/simulation/transition_representation/a.rb', line 22

def init
end