Module: YPetri::Simulation::Transitions::Type_tS
Instance Method Summary collapse
-
#delta ⇒ Object
Delta contribution to free places.
-
#firing ⇒ Object
Firing vector for these tS transitions, returned as array.
-
#firing_closures ⇒ Object
tS transitions have firing closures.
-
#firing_vector ⇒ Object
Firing vector (to be multiplied by the stoichiometry to get deltas).
-
#to_firing_closure ⇒ Object
(also: #firing_closure)
Builds the firing vector closure, that outputs the firing vector based on the system state when called.
-
#Δ ⇒ Object
(also: #delta_all)
Delta contribution to all places.
Methods included from Type_S
Instance Method Details
#delta ⇒ Object
Delta contribution to free places.
30 31 32 |
# File 'lib/y_petri/simulation/transitions/tS.rb', line 30 def delta stoichiometry_matrix * firing_vector end |
#firing ⇒ Object
Firing vector for these tS transitions, returned as array.
24 25 26 |
# File 'lib/y_petri/simulation/transitions/tS.rb', line 24 def firing firing_closures.map &:call end |
#firing_closures ⇒ Object
tS transitions have firing closures.
12 13 14 |
# File 'lib/y_petri/simulation/transitions/tS.rb', line 12 def firing_closures map &:firing_closure end |
#firing_vector ⇒ Object
Firing vector (to be multiplied by the stoichiometry to get deltas)
18 19 20 |
# File 'lib/y_petri/simulation/transitions/tS.rb', line 18 def firing_vector firing_closure.call end |
#to_firing_closure ⇒ Object Also known as: firing_closure
Builds the firing vector closure, that outputs the firing vector based on the system state when called.
44 45 46 47 |
# File 'lib/y_petri/simulation/transitions/tS.rb', line 44 def to_firing_closure closures = firing_closures -> { closures.map( &:call ).to_column_vector } end |
#Δ ⇒ Object Also known as: delta_all
Delta contribution to all places
36 37 38 |
# File 'lib/y_petri/simulation/transitions/tS.rb', line 36 def Δ SM() * firing_vector end |