找回密码
 注册
查看: 333|回复: 0

R语言 smfsb包 StepGillespie()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 10:25:13 | 显示全部楼层 |阅读模式
StepGillespie(smfsb)
StepGillespie()所属R语言包:smfsb

                                        Create a function for advancing the state of an SPN by using the Gillespie algorithm
                                         创建一个函数来推进的SPN的状态的使用Gillespie算法

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function creates a function for advancing the state of an SPN model using the Gillespie algorithm. The resulting function (closure) can be used in conjunction with other functions (such as simTs) for simulating realisations of SPN models.
这个函数创建一个功能,推动国家使用Gillespie算法的SPN模型。由此产生的功能(闭合),可以与其它功能一起使用(如simTs)模拟变现SPN的模型。


用法----------Usage----------


StepGillespie(N)



参数----------Arguments----------

参数:N
An R list with named components representing a stochastic Petri net (SPN). 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, and 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 possess 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网(SPN)的命名的组件。应包含N$Pre,代表了LHS化学计量矩阵,N$Post,代表RHS化学计量矩阵,和N$h,反应过程的速率的功能。 N$h应该有第一个参数x,一个向量,表示该系统的当前状态,和第二个参数t,一个标量,表示当前的仿真时间(在典型的时间均匀的情况下, N$h将忽略此参数)。 N$h可能拥有额外的参数,反应速率,例如。 N并不需要包含一个初始标记,N$M。 N$M将被忽略的大部分功能,使用功能关闭。


值----------Value----------


参见----------See Also----------

StepEulerSPN, gillespied, simTs, simTimes, simSample, StepFRM,
StepEulerSPN,gillespied,simTs,simTimes,simSample,StepFRM,


实例----------Examples----------


# load up the Lotka-Volterra (LV) model[加载的Lotka-Volterra模型(LV)]
data(spnModels)
LV
# create a stepping function[创建一个步进功能]
stepLV = StepGillespie(LV)
# step the function[加强功能]
print(stepLV(c(x1=50,x2=100),0,1))
# simulate a realisation of the process and plot it[模拟的过程,并画出它的实现]
out = simTs(c(x1=50,x2=100),0,100,0.1,stepLV)
plot(out)
plot(out,plot.type="single",lty=1:2)
# simulate a realisation using simTimes[一个使用simTimes模拟实现]
times = seq(0,100,by=0.1)
plot(ts(simTimes(c(x1=50,x2=100),0,times,stepLV),start=0,deltat=0.1),plot.type="single",lty=1:2)
# simulate a realisation at irregular times[在不规则的时间模拟实现]
times = c(0,10,20,50,100)
out2 = simTimes(c(x1=50,x2=100),0,times,stepLV)
print(out2)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-29 07:30 , Processed in 0.041313 second(s), 25 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表