有人知道 R 中 Gillespie SSA 的语法吗?我发现的代码是:
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
我需要有关此 SSA 或新的简单布局的帮助