pwAddA
m = pwAddA(m, lhs, reactants, parameters, signature, type, timePoint, ...
description, ID, name, designerProps, classname, targetType, ...
compartment, valueType)
or: m = pwAddA(m, lhs, rhs, [], [], type)
Adds an algebraic equation to a model, equivalent to a rule in SBML.
Currently, explicit equations (assignments) and start value assignments are supported.
Implicit equations like a+b+c=0 are not yet supported.
Arguments for pwAddA
lhs string Left hand side of the assigned quantity, usually an ID
reactants ID array Used variables either from x or u (or y for start value assignments)
This field is named reactants because the placeholders
r1, r2, etc. are used within the signature in order to
refer to the first, second, etc. variable of the "reactants".
parameters ID array Used parameters either from k or s
signature string The right hand side expression using placeholders
r1, r2, ... and k1, k2, ... for the variables and parameters.
type string 'assignment' or 'startValueAssignment'
timePoint float Time when the start value assignment should be applied.
If not specified, the integration start time is used.
description string
ID string ID of the equation, usually the lhs.
name string
designerProps cell array Layout information internally used in the model designer.
classname string
targetType string 'species', 'parameter', or 'compartment'
compartment string
valueType string 'concentration','amount'. Default: 'concentration'
Description
PottersWheel supports explicit algebraic equations, which are evaluated before
every integration step. The assigned quantities can be used as modifiers or
parameters in the reactions.
Apart from assignments which are fulfilled throughout the integration,
startValueAssignments are applied only once, usually before integration starts.
The list of variables is interpreted similarly as in the reactions paragraph:
r1 in the rule signature corresponds to the first reactant
and k2 to the second parameter. Variables can be dynamic
variables x, driving inputs u and already assigned
quantities a. Parameters can be dynamic parameters k.
The timePoint can be specified to define the exact time when the
assignment should be executed. This is only possible for type 'startValueAssignment'.
If no timePoint is given, the assignment if always executed at integration start
(in most cases 0).
Alternative syntax:
As a shortcut, expressions like
m = pwAddA(m, 'Stat_cyt', 'Stat + pStat + pStatDimer')
are allowed, i.e., the right hand side is specified directly and
not via a list of variables and parameters and a ruleSignature.
However, it is recommended to use the normal syntax.
Important: The shortcut can only be applied if all elements of
the right hand side are already defined. Therefore please put
pwAddA below pwAddU, pwAddK, pwAddK, etc.
Fitting
Since the algebraic rule determines the value of the parameter or modifier,
it is not possible to fit the same quantity.
Difference to SBML
The notation used within PottersWheel is closer to the mathematical
representation of the dynamical system. The SBML notation is closer
to the biochemical representation.
In PottersWheel, a dynamic variable 'x' is always part of the set of differential
equations and a dynamic parameter 'k' is always independent from all other parameters
and can potentially be fitted. Algebraic assignments 'a' are (algebraically)
calculated based on x, k, and other algebraic assignments.
In SBML, a species is either determined by the
differential equations, a rate rule, or an algebraic equation. A parameter is
either free or determined by an algebraic equation.
Compatibility is ensured by specifying the 'targetType' of an algebraic equation
in PottersWheel. If the target type is not specified, it is guessed by the following
approach: If the lhs appears as a dynamic variable x or driving input u, the target
type is set to 'species'. If it appears as a parameter in a reaction, it is a 'parameter'.
It is not allowed to use an assigned quantity as a parameter and a modifier in
the same model. The guessing can only be applied, if all reactions are known
before the assignment is added.
Examples
Example 1: Normal assignment
m = pwAddA(m, 'Stat_cyt', {'Stat','pStat','pStatDimer'}, {}, 'r1+r2+r3');
Example 2: Time dependent equation
It is possible to use t in the signature, e.g. for time dependent compartment
sizes like
m = pwAddA(m, 'NucleusSize', {}, {'InitialNucleusSize', 'GrowthRate'}, 'k1 + k2*t');
The parameters 'InitialNucleusSize' and 'GrowthRate' are
normal parameters and can be fitted.
Example 3: Start value assignment
m = pwAddA(m, 'Stat', {'Stat_obs'}, {'scale_Stat_obs'}, 'r1/k1', 'startValueAssignment');
This sets the value of Stat to Stat_obs/scale_Stat_obs at t=0 and
forces the trajectory through the first measured data point.
See also