The functions allow users to simulate SBML Models.

Function are:

Takes

- SBMLModel, an SBML Model structure

Returns

- a structure detailing the species and how they are manipulated within the model

*EXAMPLE:*

```
Using the model from toolbox/Test/test-data/algebraicRules.xml
analysis = AnalyseSpecies(m)
analysis =
1x5 struct array with fields:
Name
constant
boundaryCondition
initialValue
hasAmountOnly
isConcentration
compartment
ChangedByReaction
KineticLaw
ChangedByRateRule
RateRule
ChangedByAssignmentRule
AssignmentRule
InAlgebraicRule
AlgebraicRule
ConvertedToAssignRule
ConvertedRule
analysis(1) =
Name: {'S1'}
constant: 0
boundaryCondition: 0
initialValue: 0.0300
hasAmountOnly: 0
isConcentration: 0
compartment: 'compartment'
ChangedByReaction: 1
KineticLaw: {' - (k*S1)'}
ChangedByRateRule: 0
RateRule: ''
ChangedByAssignmentRule: 0
AssignmentRule: ''
InAlgebraicRule: 1
AlgebraicRule: {{1x1 cell}}
ConvertedToAssignRule: 0
ConvertedRule: ''
```

Takes

- SBMLModel, an SBML Model structure

Returns

- a structure detailing any parameters that are not constant and how they are manipulated within the model

*EXAMPLE:*

```
Using the model from toolbox/Test/test-data/algebraicRules.xml
analysis = AnalyseVaryingParameters(m)
analysis =
Name: {'s2'}
initialValue: 4
ChangedByRateRule: 0
RateRule: ''
ChangedByAssignmentRule: 0
AssignmentRule: ''
InAlgebraicRule: 1
AlgebraicRule: {{1x1 cell}}
ConvertedToAssignRule: 1
ConvertedRule: '-(-S2-S3)'
```

Takes

- formula, a string representation of a math expression that contains the MathML piecewise function

Returns

- an array of the three components of the piecewise function

*EXAMPLE:*

```
elements = DealWithPiecewise('piecewise(le(s2,4),1.5,0.05)')
= 'le(s2,4)' '1.5' '0.05'
```

*NOTE:* The function cannot deal with a piecewise statement with more
than three elements.

Takes

- formula, a string representation of a math expression that contains the MathML lambda function

Returns

- an array of the components of the lambda function

*EXAMPLE:*

```
elements = GetArgumentsFromLambdaFunction('lambda(x, x+0.5)')
= 'x' 'x+0.5'
elements = GetArgumentsFromLambdaFunction('lambda(x, y, x + y)')
= 'x' 'y' 'x+y'
```

*NOTE:* This function is deprecated. Use SolveODEFunction instead.

Takes

- a MATLAB_SBML model structure (required argument)
- time limit (default = 10)
- number of time steps (default lets the solver decide)
- a flag to indicate whether to output species values in amount/concentration 1 amount, 0 concentration (default)
- a flag to indicate whether to output the simulation data as a comma separated variable (csv) file 1 output 0 no output (default)
- a filename (this is needed if WriteODEFunction was used with a filename)

Returns

- an array of time values
- an array of the values of variables at each time point; species will be in concentration or amount as specified by input arguments

Outputs

- a file 'name.csv' with the data results (if the flag to output such a file is set to 1.

*NOTE:* the results are generated using ode45 solver (MATLAB) or lsode
(Octave)

Takes

- SBMLModel, an SBML Model structure
- name, a string representing the name of the ode function being used

Outputs

- a file 'name_eventAssign.m' defining a function that assigns values following an event (for use with the event option of MATLABs ode solvers)

*NOTE:* This function is called from WriteODEFunction when a model with
events is encountered.

Takes

- SBMLModel, an SBML Model structure
- name, a string representing the name of the ode function being used

Outputs

- a file 'name_events.m' defining a function that tests whether events have been triggered (for use with the event option of MATLABs ode solvers)

*NOTE:* This function is called from WriteODEFunction when a model with
events is encountered.

Takes

- SBMLModel, an SBML Model structure
- name, an optional string representing the name of the ode function to be used

Outputs

- a file 'name.m' defining a function that defines the ode equations of the model for use with the ode solvers (if no name supplied the model id will be used)