Does anyone know the syntax for Gillespie SSA in R? The codes i found were these:
input n=#iterations,r=#reactions,h=step size (dt)
input x(0) =initial conditions,v=state shift matrix
t←0
for i= 1 to n
for j= 1 to r
p←uniform random number in [0,1]
If
p < a(x)h then x(t+h)←x(t)+vj
end
t←t+h
end
I need help with this or new simple layout for the SSA