CellML Discussion List

Text archives Help


[cellml-discussion] how to units make a difference to simulation


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-discussion] how to units make a difference to simulation
  • Date: Tue, 07 Aug 2007 14:07:30 +1200

Alan Garny wrote:
>> As you know we (Catherine, you and I) spent a bit of time this morning
>> trying to understand some models. One of the models that Catherine has
>> been
>> working on had problems with units. My understanding is that PCEnv
>> didn't
>> pick those problems up, while COR did. Correcting the problems,
>> Catherine
>> was able to get the model to "work" (I believe there might still be
>> another
>> problem, but not related to units this time).
>>
>> Anyway, the view we have now taken in Oxford is that models shouldn't
>> have
>> any problem related to units. This means that, dimensional
>> equivalences,
>> which are allowed in the CellML specification, are not "acceptable" to
>> us.
>> We should always have strict equivalences. E.g. A = B+C (with A and B
>> in mV,
>> while C in V) would be seen as being dimensionally equivalent and "OK"
>> in
>> regards to the CellML specification (and therefore COR, since it will
>> only
>> generate a warning). Yet, we would modify the equation so that it now
>> reads:
>> A = B+1000{millivolt_per_millivolt}*C. This may not be a great
>> example, but
>> I think you got the gist of it.
>>
>> The idea is, therefore, to have models that have no unit issues *at
>> all*. I
>> appreciate that this may seem a bit restrictive, but we have had so
>> many
>> issues with units over the years that we believe it will be worth it
>> in the
>> long term.
>>
>> Alternatively, we could have the software doing units conversion for
>> the
>> user... but that's another issue... and I understand that some are
>> against
>> that idea.
>>
>
> I have just realised that though the above might be an "acceptable" approach
> for CellML 1.0 models, it might potentially be somewhat tricky to implement
> for CellML 1.1 models... which makes me wonder whether we shouldn't be more
> strict when it comes to units. At the end of the day, units are a very
> common source of problems in model curation.
>
I'm not sure what you mean by 'the above', are you referring to units
checking or automated units conversion?

I don't follow how there would be any difference between 1.1 and 1.0
models, because in both cases there is an equally clear model for how
connections work (the CeVAS service in the CellML API makes this very
easy to work with, because it ties together variables which are the same
as a result of connections, regardless of whether those connections are
cross-imports or not). It is also very easy to work out from the context
component exactly what units a particular variable should have in a
particular equation - having the CeVAS and CUSES services means that
other services, like the CCGS, which are built on top of them don't have
to worry about CellML 1.1, connections, and so on at all, because they
are built on top of a layer which already handles this.

The technical details of implementation aside, my view is as follows:
1) Model authors should not write models with inconsistent units.
2) CellML must be able to represent models with inconsistent units,
although tools can draw attention to such inconsistencies. This is not a
contradiction with 1, but simply a reflection on the fact that many
models published in journals have units problems, and we still want to
represent such models even if we consider the way they were developed to
be bad practice.
3) Tools should (ideally must, but for historical reasons, we can't
mandate this at least until CellML 1.2) perform unit conversions at the
connection level. For example, if you connect a variable in mm to a
variable in m, the conversion factors should be implicitly inserted by
the tool.
4) Tools should never change the meaning of equations automatically
under any circumstances. They can have features which flag potential
problems and even suggest changes, but if the model has a particular
equation in it, tools should respect this equation and assume that the
model has been tested to work empirically even if the units appear
wrong. In other words, assisted manual changes are a good thing, but
fully automatic silent changes are very bad.

Best regards,
Andrew





Archive powered by MHonArc 2.6.18.

Top of page