|
Dear Mike,
Did you consider the possibility of
1. defining a 'dimensionless' unit, and
2. requiring that _every_ number have a unit attached, even if it is only
'dimensionless'?
We could then set things up with default units so that this doesn't get
too tedious.
-- Upi Bhalla
On Fri, February 9, 2007 7:41 am, Michael Hucka said:
> The SBML editors had an off-line discussion which we
> realized needs to be put on sbml-discuss. It concerns an
> issue that Sarah Keating ran into while implementing unit
> validation in libSBML.
>
> The issue is how the units of pure numbers in MathML should
> be treated. Here's an example, in the case of the 'delay'
> field on Events:
>
> <delay>
> <math xmlns="http://www.w3.org/1998/Math/MathML">
> <cn> 1 </cn>
> </math>
> </delay>
>
> Note the literal "1". What units, if any, should be
> assumed for the number?
>
> One option is to treat literal numbers as always being
> without units. This is a valid viewpoint, but it leads to
> more model validation failures. Although modelers should
> define parameters (which can have defined units) for a lot
> of the cases where they often write numbers directly, the
> practical reality is that many people won't think of doing
> that.
>
> A second option is to take the units to be whatever units
> are defined as the default for the field in question, or if
> there is an associated field definining the units, then
> whatever that field says the units are. (For instance,
> there is a 'timeUnits' field on Events that could apply in
> this example.) The logic behind this idea is that even
> though the user didn't specify the units explicitly, a
> reasonable interpretation of their intention is that the
> units are meant to be whatever the defaults are. In other
> words, the modeler didn't mean "1" without units, they meant
> "1 in the units of time" for this example.
>
> Sounds reasonable? But it gets more complicated. Imagine
> now something like
>
> <math xmlns="http://www.w3.org/1998/Math/MathML">
> <apply>
> <plus/>
> <ci> S </ci>
> <cn> 2 </cn>
> </apply>
> </math>
>
> For the purpose of this second example, the "S" can be
> anything (e.g., a species identifier) and the context can be
> anything, not just the Events example above.
>
> The question is, what should be assumed for the units of "2"?
>
> If we follow the same guideline, i.e., that the literal
> number has whatever units are appropriate for the situation,
> then it creates validation problems. First, it implies a
> unit validator must deduce the expected units somehow, and
> this may sometimes be impossible due to ambiguities in a
> given situation. Second, Stefan Hoops pointed out it opens
> a hole in validation: it effectively means that numbers in
> MathML are assumed to always have the appropriate units, so
> unit checking becomes worthless.
>
> To cope with this, we are tentatively thinking of using the
> following set of guidelines:
>
> 1) If the number is the only thing contained inside a <math>
> (such as the original example involving a delay on
> Events), assume that the units of the number are the
> units defined for that field (so, timeUnits for delays).
>
> 2) In all other cases, assume pure numbers have no units.
>
> This handles the first case, and also addresses the second
> case. (In the second case, there would be a unit validation
> failure because the "2" would not have units and therefore
> the overall expression could not have consistent units.)
>
> The downside is that this "rule" is defined with an
> exception.
>
> What do the rest of you SBMLers think?
>
> Whatever is decided, the next SBML specification will have
> to spell out the guidelines precisely.
>
> MH
>
> ____________________________________________________________
> To manage your sbml-discuss list subscription, visit
> https://utils.its.caltech.edu/mailman/listinfo/sbml-discuss
>
> For a web interface to the sbml-discuss mailing list, visit
> http://sbml.org/forums/
>
> For questions or feedback about the sbml-discuss list,
> contact sbml-team@caltech.edu.
>
____________________________________________________________
To manage your sbml-discuss list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/sbml-discuss
For a web interface to the sbml-discuss mailing list, visit
http://sbml.org/forums/
For questions or feedback about the sbml-discuss list,
contact sbml-team@caltech.edu.
|