Module: YPetri::Simulation::Transitions::Type_TS
Instance Method Summary collapse
-
#firing_vector(Δt) ⇒ Object
Firing vector (rate vector * Δtime).
-
#gradient ⇒ Object
Gradient contribution to free places.
-
#rate_closures ⇒ Object
Rate (flux, propensity) closures.
-
#rate_vector ⇒ Object
(also: #flux_vector, #propensity_vector)
Rate (flux/propensity) vector.
-
#to_rate_closure ⇒ Object
(also: #rate_closure)
Builds the rate vector closure, that outputs the rate vector based on the system state when called.
-
#∇ ⇒ Object
(also: #gradient_all)
Gradient contribution to all places.
Methods included from Type_S
Methods included from Type_T
#delta, #gradient_closures, #Δ
Instance Method Details
#firing_vector(Δt) ⇒ Object
Firing vector (rate vector * Δtime).
26 27 28 |
# File 'lib/y_petri/simulation/transitions/TS.rb', line 26 def firing_vector Δt rate_vector * Δt end |
#gradient ⇒ Object
Gradient contribution to free places.
32 33 34 |
# File 'lib/y_petri/simulation/transitions/TS.rb', line 32 def gradient stoichiometry_matrix * rate_vector end |
#rate_closures ⇒ Object
Rate (flux, propensity) closures.
12 13 14 |
# File 'lib/y_petri/simulation/transitions/TS.rb', line 12 def rate_closures map &:rate_closure end |
#rate_vector ⇒ Object Also known as: flux_vector, propensity_vector
Rate (flux/propensity) vector.
18 19 20 |
# File 'lib/y_petri/simulation/transitions/TS.rb', line 18 def rate_vector to_rate_closure.call end |
#to_rate_closure ⇒ Object Also known as: rate_closure
Builds the rate vector closure, that outputs the rate vector based on the system state when called.
46 47 48 49 |
# File 'lib/y_petri/simulation/transitions/TS.rb', line 46 def to_rate_closure rc = rate_closures -> { rc.map( &:call ).to_column_vector } end |
#∇ ⇒ Object Also known as: gradient_all
Gradient contribution to all places.
38 39 40 |
# File 'lib/y_petri/simulation/transitions/TS.rb', line 38 def ∇ SM() * rate_vector end |