Make a function closure to implement a Poisson time-step (tau-leaping with fixed tau) sampler for a SPN.

step_PTS(S, Sout, haz, dt = 0.01, maxhaz = 1e+06)

Arguments

S

a stoichiometry Matrix-class object

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.

For other samplers, see: step_CLE, step_DM, step_ODE