module YPetri::Simulation::Transitions::Type_A

Public Class Methods

new() click to toggle source
# File lib/y_petri/simulation/transitions/A.rb, line 7
def initialize
end

Public Instance Methods

act() click to toggle source

Returns the assignments to all places, as they would happen if A transition could change their values.

# File lib/y_petri/simulation/transitions/A.rb, line 32
def act
  each_with_object Hash.new do |t, hsh| hsh.update( t.act ) end
end
action() click to toggle source

Combined assignment action, as it would occur if these A transitions fired in order, as hash place >> action.

# File lib/y_petri/simulation/transitions/A.rb, line 25
def action
  each_with_object Hash.new do |t, hsh| hsh.update( t.action ) end
end
assignment_closure()
assignment_closures() click to toggle source

Assignment closures.

# File lib/y_petri/simulation/transitions/A.rb, line 12
def assignment_closures
  map &:assignment_closure
end
direct_assignment_closure()
direct_assignment_closures() click to toggle source

Assignment closures that directly affect the marking when called.

# File lib/y_petri/simulation/transitions/A.rb, line 18
def direct_assignment_closures
  map &:direct_assignment_closure
end
to_assignment_closure() click to toggle source

Builds a joint assignment closure.

# File lib/y_petri/simulation/transitions/A.rb, line 38
def to_assignment_closure
  closures = assignment_closures
  -> { closures.each &:call }
end
Also aliased as: assignment_closure
to_direct_assignment_closure() click to toggle source

Builds a joint direct assignment closure, directly bound to the marking vector and changing its values when called.

# File lib/y_petri/simulation/transitions/A.rb, line 47
def to_direct_assignment_closure
  closures = direct_assignment_closures
  -> { closures.each &:call }
end
Also aliased as: direct_assignment_closure