function-凯发k8网页登录
function-like interface to execute simbiology models
description
the simfunction
object provides an interface
that allows you to execute a simbiology® model like a function
and a workflow to perform parameter scans (in parallel if parallel computing toolbox™ is
available), monte carlo simulations, and scans with multiple or vectorized
doses. since a simfunction
object can be executed
like a function handle, you can customize it to integrate simbiology
models with other matlab® products and other custom analyses (such
as visual predictive checks).
use the createsimfunction
method
to construct the simfunction object. simfunction objects are immutable
once created and automatically accelerated at the first function execution.
syntax
if you specified any dosing information when you called createsimfunction
to construct the simfunction
object f
,
then f
has the following syntaxes.
returns a
simdata
= f(phi
,t_stop
,u
,t_output
)simdata
after simulating a simbiology model using the initial
conditions or simulation scenarios specified in phi
, simulation
stop time, t_stop
, dosing information, u
, and
output time, t_output
.
runs
simulations using the input arguments simdata
= f(phi
,t_stop
,u
)phi
, t_stop
,
and u
.
if you did not specify any dosing information
when you called createsimfunction
, then f
has
the following syntaxes:
returns a
simdata
= f(phi
,t_stop
)simdata
after simulating the model using initial conditions or
simulation scenarios specified in phi
, and simulation stop time,
t_stop
.
uses the input arguments simdata
= f(phi
,t_stop
,[],t_output
)phi
, t_stop
, empty
dosed argument []
, and t_output
. you must
specify u
, the dosing information, as an empty
array[]
for this signature. when t_output
is
empty and t_stop
is specified, the simulations report the solver
time points until t_stop
. when t_output
is
specified and t_stop
is empty, only the time points in
t_output
are reported. when both are specified, the reported
time points are the union of solver time points and the time points in
t_output
. if the last t_output
is greater
than the corresponding t_stop
, then simulation proceeds until the
last time point in t_output
.
uses
the input arguments simdata
= f(phi
,tbl
)phi
and tbl
.
using this signature only lets you specify output times as one of
the variables of tbl
. any data row in tbl
where
all dependent variable columns having nan
values
is ignored.
[
returns t
,y
] =
f(_)t
, a cell array of numeric
vector, and y
, a cell array of 2-d numeric matrices,
using any of the input arguments in the preceding syntaxes.
input arguments
|
one of the following:
when when |
|
|
|
if
|
|
|
|
or (statistics and machine learning toolbox) that has time and dosing information
such as group labels, independent variable, dependent variable(s),
amount(s), and rate(s). you must name the variables of the table or
data set as if the if |
output arguments
|
array of simdata objects that contains results from executing
the simfunction |
|
cell array containing a numeric vector of size |
|
cell array of 2-d numeric matrices. the ith element
of |
constructor summary
createsimfunction (model) | create simfunction object |
method summary
prepare simfunction object for accelerated simulations | |
determine if simfunction object is accelerated |
property summary
parameters | with variables named:
the table contains information about model quantities
(species, compartments, or parameters) that define the inputs of a | ||||||||||
observables | with variables named:
this table contains information about model quantities
(species, compartments, or parameters) that define the output of a | ||||||||||
dosed | containing dosing information with variables named:
in addition, the table also contains variables for
each property that is parameterized. for each parameterized
property, two variables are added to this table. the first variable
has the same name as the property name and the value is the name of
the specified parameter. the second variable has the property name
suffixed by value
(propertynamevalue), and the value is the
default value of the parameter. if the
suppose the
| ||||||||||
useparallel | logical. if | ||||||||||
unitconversion | logical. if true:
this property is read only. | ||||||||||
autoaccelerate | logical. when true, the model is accelerated on the first
evaluation of the this property is read only. | ||||||||||
dependentfiles | cell array of character vectors containing the names of files that the model depends on. this property is used for deployment. this property is read only. | ||||||||||
timeunits | character vector that represents the time units. |
examples
references
[1] gillespie, d.t. (1977). exact stochastic simulation of coupled chemical reactions. the journal of physical chemistry. 81(25), 2340–2361.
version history
introduced in r2014a