module YPetri::Simulation::Transitions::Type_TS

Public Instance Methods

firing_vector(Δt) click to toggle source

Firing vector (rate vector * Δtime).

# File lib/y_petri/simulation/transitions/TS.rb, line 26
def firing_vector Δt
  rate_vector * Δt
end
flux_vector()
Alias for: rate_vector
gradient() click to toggle source

Gradient contribution to free places.

# File lib/y_petri/simulation/transitions/TS.rb, line 32
def gradient
  stoichiometry_matrix * rate_vector
end
gradient_all()
Alias for:
propensity_vector()
Alias for: rate_vector
rate_closure()
Alias for: to_rate_closure
rate_closures() click to toggle source

Rate (flux, propensity) closures.

# File lib/y_petri/simulation/transitions/TS.rb, line 12
def rate_closures
  map &:rate_closure
end
rate_vector() click to toggle source

Rate (flux/propensity) vector.

# File lib/y_petri/simulation/transitions/TS.rb, line 18
def rate_vector
  to_rate_closure.call
end
Also aliased as: flux_vector, propensity_vector
to_rate_closure() click to toggle source

Builds the rate vector closure, that outputs the rate vector based on the system state when called.

# File lib/y_petri/simulation/transitions/TS.rb, line 46
def to_rate_closure
  rc = rate_closures
  -> { rc.map( &:call ).to_column_vector }
end
Also aliased as: rate_closure
() click to toggle source

Gradient contribution to all places.

# File lib/y_petri/simulation/transitions/TS.rb, line 38
def 
  SM() * rate_vector
end
Also aliased as: gradient_all