SimFunction object
Function-like interface to execute SimBiology models
Description
TheSimFunction
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 aSimFunction
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 thecreateSimFunction
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 calledcreateSimFunction
to construct theSimFunction
objectF
, thenF
has the following syntaxes.
返回一个simdata
= F(phi
,t_stop
,u
,t_output
)SimData object
simdata
after simulating a SimBiology model using the initial conditions or simulation scenarios specified inphi
, simulation stop time,t_stop
, dosing information,u
, and output time,t_output
。
runs simulations using the input argumentssimdata
= F(phi
,t_stop
,u
)phi
,t_stop
, andu
。
If you didnotspecify any dosing information when you calledcreateSimFunction
, thenF
has the following syntaxes:
返回一个simdata
= F(phi
,t_stop
)SimData object
simdata
after simulating the model using initial conditions or simulation scenarios specified inphi
, and simulation stop time,t_stop
。
uses the input argumentssimdata
= F(phi
,t_stop
,[],t_output
)phi
,t_stop
, empty dosed argument[]
, andt_output
。You must specifyu
, the dosing information, as an empty array[]
for this signature. Whent_output
is empty andt_stop
is specified, the simulations report the solver time points untilt_stop
。Whent_output
is specified andt_stop
is empty, only the time points int_output
are reported. When both are specified, the reported time points are the union of solver time points and the time points int_output
。If the lastt_output
is greater than the correspondingt_stop
, then simulation proceeds until the last time point int_output
。
uses the input argumentssimdata
= F(phi
,tbl
)phi
andtbl
。Using this signature only lets you specify output times as one of the variables oftbl
。Any data row intbl
where all dependent variable columns havingNaN
values is ignored.
[
returnsT
,Y
] = F(_)T
, a cell array of numeric vector, andY
, 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
|
|
|
|
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 ithelement of |
Constructor Summary
createSimFunction (model) | Create SimFunction object |
Method Summary
accelerate(SimFunction) | Prepare SimFunction object for accelerated simulations |
isAccelerated(SimFunction) | Determine if SimFunction object is accelerated |
Property Summary
Parameters |
The table contains information about model quantities (species, compartments, or parameters) that define the inputs of a |
||||||||||
Observables |
This table contains information about model quantities (species, compartments, or parameters) that define the output of a |
||||||||||
Dosed |
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 byValue(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