CellML Discussion List

Text archives Help


[cellml-discussion] Independent variables, and delay


Chronological Thread 
  • From: david.nickerson at gmail.com (David Nickerson)
  • Subject: [cellml-discussion] Independent variables, and delay
  • Date: Sat, 17 Dec 2011 11:47:47 +1300

Hi Lucian,

On Sat, Dec 17, 2011 at 7:53 AM, Lucian Smith <lpsmith at spod-central.org>
wrote:
> A couple questions. ?One: ?is there a defined way in CellML to find the
> independent variables? ?The spec says (about 'initial_value'):
>
> ?This attribute provides a convenient means for specifying the value of a
> ?scalar real variable when all independent variables in the model have a
> ?value of 0.0. Independent variables are those whose values do not depend
> ?on others.
>
> From that definition, it would seem that if you defined 'pi' in your
> model, the initial value would apply when pi was equal to 0.

This is one of the known problems with using the initial value
attribute to set constants. It is true that setting something like pi
(although there is a mathml constant for pi, btw) using the initial
value attribute is a bit ambiguous. It is therefore now suggested that
numerical constants are set using an equation rather than by the
initial value attribute. See http://models.cellml.org/exposure/d79 for
an example defining fundamental constants in this manner.

> But more generally, if you have a single equation in your model:
>
> u = sin(t)
>
> That's a single equation with two variables--how do you decide that you
> want to vary t and not u? ?Do you just apply heuristics, so if you see
> 'dx/dy' you assume y is the independent variable? ?Is it part of what you
> do *with* a CellML model, that you present the user with t and u as
> possible options, and they pick one?

in this example, it is impossible to determine the independent
variable without further information. Of course, most tools would
probably assume t is the independent variable. Once you have a bound
variable in the model (MathML bvar element), that determines the
independent variable - this is one reason why some tools require at
least one differential equation in order to be able to run a
simulation.

In some of the tissue mechanics modelling we do we use CellML to
describe constitutive relationships which often are a series of
algebraic equations. In this case we need to define in our simulation
tool what the independent variable(s) are and provide the values for
them (i.e., the components of the strain tensor).

> My second question is a bit simpler: ?is there a way to define a delay
> equation in CellML and if so, how do you do it? ?(A delay being
> something like 'x, 2 seconds ago'.)

there is, but its not really used by any real models. The plan is to
make things easier in CellML 1.2, but the focus to date has been on
the use of instantaneous delays in event descriptions. You can see
https://tracker.physiomeproject.org/show_bug.cgi?id=70 and
https://tracker.physiomeproject.org/show_bug.cgi?id=1543 for some
comments along these lines, and hopefully Andrew or Randall will reply
with a better answer for you.


Cheers,
David.




Archive powered by MHonArc 2.6.18.

Top of page