module YPetri::Simulation::TransitionRepresentation::Type_T
Public Instance Methods
True for timed transitions.
# File lib/y_petri/simulation/transition_representation/T.rb, line 11 def T? true end
Change, for free places, as it would happen if the transition fired for time Δt, returned as hash codomain place names >> change.
# File lib/y_petri/simulation/transition_representation/T.rb, line 61 def d Δt delta( Δt ).with_keys do |p| p.name || p end end
Change, for all places, as it would happen if the transition fired for time Δt, returned as hash codomain place names >> change.
# File lib/y_petri/simulation/transition_representation/T.rb, line 76 def d_all( Δt ) delta( Δt ).with_keys do |p| p.name || p end end
Change, for free places, as it would happen if the transition fired for time Δt, returned as hash codomain places >> change.
# File lib/y_petri/simulation/transition_representation/T.rb, line 54 def delta Δt gradient.with_values { |v| v * Δt } end
Returns the gradient contribution to the free places, as hash place names >> gradient contribution.
# File lib/y_petri/simulation/transition_representation/T.rb, line 40 def g gradient.with_keys do |p| p.name || p end end
Returns the gradient contribution to all the places, as hash place names >> gradient contribution.
# File lib/y_petri/simulation/transition_representation/T.rb, line 47 def g_all ∇.with_keys do |p| p.name || p end end
Gradient contribution of the transition to the free places.
# File lib/y_petri/simulation/transition_representation/T.rb, line 33 def gradient ∇.select { |p, v| p.free? } end
Initialization subroutine.
YPetri::Simulation::TransitionRepresentation::Type_a#init
# File lib/y_petri/simulation/transition_representation/T.rb, line 25 def init simulation.extend YPetri::Simulation::Timed unless simulation.timed? super @function = source.rate_closure end
False for timed transitions.
# File lib/y_petri/simulation/transition_representation/T.rb, line 18 def t? false end
Change, for all places, as it would happen if the transition fired for time Δt, returned as hash codomain places >> change.
# File lib/y_petri/simulation/transition_representation/T.rb, line 68 def Δ( Δt ) gradient.with_values { |v| v * Δt } end