Functionlike interface to execute SimBiology models
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.
If you specified any dosing information when you called createSimFunction
to construct the SimFunction
object F
,
then F
has these syntaxes.
returns
a simdata
= F(phi
,t_stop
,u
,t_output
)SimData object
simdata
after
simulating a SimBiology model using phi
, a matrix
of parameter values, t_stop
, simulation stop
time, u
, dosing information, and t_output
,
output time.
uses
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 these signatures:
returns a simdata
= F(phi
,t_stop
)SimData object
simdata
using phi
and 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.
Note:
When 
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
.
[
returns T
,Y
] =
F(_)T
, a cell array of numeric
vector, and Y
, a cell array of 2D numeric matrices,
using any of the input arguments in the preceding syntaxes.

Matrix of size SbyP, where S is the number of simulations
to perform and P is the number of parameters specified in the When For example, if  

 

 

 

If the If 

Array of SimData objects that contains results from executing
the SimFunction 

Cell array containing a numeric vector of size 

Cell array of 2D numeric matrices. The i^{th} element
of 
createSimFunction (model)  Create SimFunction object 
accelerate(SimFunction)  Prepare SimFunction object for accelerated simulations 
isaccelerated(SimFunction)  Determine if SimFunction object is accelerated 
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 
Variables related to the lag and duration parameters
are included only when 
UseParallel  Logical. If 
UnitConversion  Logical. If true:

DependentFiles  Cell array of strings containing the names of files that the model depends on. This property is used for deployment. This property is read only. 
[1] Gillespie, D.T. (1977). Exact Stochastic Simulation of Coupled Chemical Reactions. The Journal of Physical Chemistry. 81(25), 2340–2361.