* David Nickerson <david.nicker...@gmail.com> [2011-12-16 22:48] writes: > Hi Lucian, > > On Sat, Dec 17, 2011 at 7:53 AM, Lucian Smith <lpsm...@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.

That's not *quite* what I was getting at--I meant that if you had 'pi' in your model somewhere (or some other constant), it would be 'a variable whose value did not depend on others', and therefore would be classified as 'an independent variable'. So for all other variables, if the 'intial_value' only applied when all independent variables were equal to 0.0, it would have to wait for pi to equal zero, too ;-) (OK, so I didn't *really* think that was the correct interpretation, but I did wonder what exactly an 'independent variable' was if you couldn't denote it as such in CellML. Perhaps this would be something for 1.2?) > > 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. So, I guess it's impossible to write models with a dependent variable as a bvar? x initial_value=0; z initial_value=0; dx/dy = 3; dz/dx = 4; > 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). Would it be helpful to encode this information into the model itself, or semantically, do you want to keep them distinct? I suppose it's edging into the SEDML territory of 'what you do with a model' instead of 'what the model is'--I can imagine models where you vary the components of the strain tensor in one simulation to determine some other value, and in your second simulation you vary the other value to determine 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. What about tool support? Is there support in any/some tools for delays? I ask from the perspective of a translator, converting models with delays from other systems to CellML. -Lucian _______________________________________________ cellml-discussion mailing list cellml-discussion@cellml.org http://lists.cellml.org/mailman/listinfo/cellml-discussion