StepPTS(smfsb)
StepPTS()所属R语言包:smfsb
Create a function for advancing the state of an SPN by using a simple approximate Poisson time stepping method
通过使用简单的近似泊松时间步方法来创建一个函数,为推进国家的SPN
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function creates a function for advancing the state of an SPN model using a simple approximate Poisson time stepping method. The resulting function (closure) can be used in conjunction with other functions (such as simTs) for simulating realisations of SPN models.
这个函数创建一个使用简单的近似泊松时间步方法,为推进国家的SPN模型的功能。由此产生的功能(闭合),可以与其它功能一起使用(如simTs)模拟变现SPN的模型。
用法----------Usage----------
StepPTS(N,dt=0.01)
参数----------Arguments----------
参数:N
An R list with named components representing a stochastic Petri net. Should contain N$Pre, a matrix representing the LHS stoichiometries, N$Post, a matrix representing the RHS stoichiometries, and N$h, a function representing the rates of the reaction processes. N$h should have first argument x, a vector representing the current state of the system, second argument t, a scalar representing the current simulation time (in the typical time-homogeneous case, N$h will ignore this argument). N$h may posses additional arguments, representing reaction rates, for example. N does not need to contain an initial marking, N$M. N$M will be ignored by most functions which use the resulting function closure.
一个R代表一个随机Petri网的命名组件列表。应包含N$Pre,代表了LHS化学计量矩阵,N$Post,代表RHS化学计量矩阵,和N$h,反应过程的速率的功能。 N$h应该有第一个参数x,一个向量,表示系统的当前状态,第二个参数t,一个标量,表示当前的仿真时间(典型的时齐的情况下, N$h将忽略此参数)。 N$h可能拥有额外的参数,代表反应速率,例如。 N并不需要包含一个初始标记,N$M。 N$M将被忽略的大部分功能,使用功能关闭。
参数:dt
Time step to be used by the Poisson time stepping integration method. Defaults to 0.01.
要使用泊松时间步积分法的时间步长。默认值为0.01。
值----------Value----------
参见----------See Also----------
StepGillespie, StepCLE, simTs, simSample
StepGillespie,StepCLE,simTs,simSample
实例----------Examples----------
# load up the LV model[加载了LV模型]
data(spnModels)
# create a stepping function[创建一个步进功能]
stepLV=StepPTS(LV)
# step the function[加强功能]
print(stepLV(c(x1=50,x2=100),0,1))
# integrate the process and plot it[整合的过程,并绘制]
out = simTs(c(x1=50,x2=100),0,20,0.1,stepLV)
plot(out)
plot(out,plot.type="single",lty=1:2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|