Make a function closure to implement a Poisson time-step (tau-leaping with fixed tau) sampler for a SPN.
Arguments
- S
a stoichiometry
Matrix-classobject- Sout
an optional matrix to track of event firings
- haz
a list of hazard functions
- dt
time-step for tau-leap method
- maxhaz
maximum allowable hazard
Value
function closure for use in sim_trajectory_R or sim_trajectory_CSV
Details
This sampling algorithm is based on representing a SPN as a set of competing
Poisson processes; it thus uses an integer valued state space but approximates
the number of events over dt.
The design of step_PTS is from: Wilkinson, D. J. (2011). Stochastic
modeling for systems biology. CRC press
Elements of the N list come from two places: The stoichiometry matrix
(S) is generated in spn_S and the hazards (h) come
from spn_hazards.