Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » sbml-discuss » units in sbml l2v3
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Ralph.Gauges


Posts: 92
Registered:
May 2004
Re: units in sbml l2v3 04 Jun '07 13:27 Go to previous messageGo to previous message

Hi,

I think Sven has made the points I wanted to make a lot clearer with his last two mails.
But just to summarize again:

a) I think that the new unit interpretation is less intuitive to me
b) it involves lots of unnecessary calculations when doing unit consistency checks.

I actually just wanted to know why the interpretation of the units had to be changed at all when the old way was perfectly OK and in may eyes even superior to the new definition?!


Let us now define a unit liter (Note, not litre as this is a base unit)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="dm" multiplier="1" scale="0" exponent="3" />
</listOfUnits>
</unitDefinition>


This unit definition is actually wrong if I read the spec correctly because at least the draft of the L2V3 spec explicitely says that the kind attribute may not refer to a user defined unit and that the construction of hierarchical unit definitions is not allowed (Section 4.4.2 last paragraph).

So we are back to

<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="1" scale="-1" exponent="3" />
</listOfUnits>
</unitDefinition>

or

<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="0.1" scale="0" exponent="3" />
</listOfUnits>
</unitDefinition>

or any of the other combination of multiplier and scale.

This would now be equivalent to

<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="0.1" scale="0" exponent="1" />
<unit kind="metre" multiplier="0.1" scale="0" exponent="1" />
<unit kind="metre" multiplier="0.1" scale="0" exponent="1" />
</litOfUnits>
</unitDefinition>

So I would now find it intuitive if I could just multiply those multipliers and add the exponents which would give me

<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="0.001" scale="0" exponent="3" />
</litOfUnits>
</unitDefinition>


But as we have seen above this is incorrect since it would have to be

<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="0.1" scale="0" exponent="3" />
</litOfUnits>
</unitDefinition>


I am sorry but in for brain the exponent belongs to the unit and not to the combination of scale, multiplier and unit.
Actually I would also read them as being the same, but my brain tells me that the unit definitions define a unit that it equal to 100 liters not one liter.


A)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="0.1" scale="0" exponent="3" />
</listOfUnits>
</unitDefinition>
or B)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="1.0" scale="-1" exponent="3" />
</listOfUnits>
</unitDefinition>


I am sorry that my brain seems to work differently, I just had the impression from discussions with Sven that this might be a more general problem and not just me. Maybe I was wrong.

Also in the last example Stefan is defining a unit in term of another user defined unit which is not possible according to the draft.
Maybe I am just not getting the point, but I don't see why the old interpretation of the unit definition would treat the multiplier and the scale inconsistently.

Maybe I to thick and we have postpone this discussion to thursday. Maybe someone can explain it to me then why this new interpretation of the unit definition is supposed to be more intuitive and more consistent. (-;

Cheers

Ralph


-----Original Message-----
From: sbml-discuss-bounces@caltech.edu on behalf of Stefan Hoops
Sent: Mon 6/4/2007 8:28 PM
To: sbml-discuss@caltech.edu
Subject: Re: [sbml-discuss] units in sbml l2v3

Hello All,

I would like to make an attempt to look at his problem more from an XML
standpoint and hopefully reduce the confusion. Let us look at two
equivalent and valid definitions of the unit dezimetre:
A)
<unitDefinition id="dm" name="dezimetre">
<listOfUnits>
<unit kind="metre" multiplier="0.1" scale="0" exponent="1" />
</listOfUnits>
</unitDefinition>
or B)
<unitDefinition id="dm" name="dezimetre">
<listOfUnits>
<unit kind="metre" multiplier="1.0" scale="-1" exponent="1" />
</listOfUnits>
</unitDefinition>

Let us now define a unit liter (Note, not litre as this is a base unit)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="dm" multiplier="1" scale="0" exponent="3" />
</listOfUnits>
</unitDefinition>




Up to this point I think everyone agrees. Please note that the exponent
3 in the above definition of liter can be replaced by the following
equivalent definition:
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="dm" multiplier="1" scale="0" exponent="1" />
<unit kind="dm" multiplier="1" scale="0" exponent="1" />
<unit kind="dm" multiplier="1" scale="0" exponent="1" />
</listOfUnits>
</unitDefinition>

Replacing in this last definition dm with its definition leads
A)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="0.1" scale="0" exponent="1" />
<unit kind="metre" multiplier="0.1" scale="0" exponent="1" />
<unit kind="metre" multiplier="0.1" scale="0" exponent="1" />
</listOfUnits>
</unitDefinition>
or B)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="1.0" scale="-1" exponent="1" />
<unit kind="metre" multiplier="1.0" scale="-1" exponent="1" />
<unit kind="metre" multiplier="1.0" scale="-1" exponent="1" />
</listOfUnits>
</unitDefinition>

Now we are coming to the problem which is the root of this discussion.
Let us make an attempt to reintroduce the exponent 3. I naively (not
looking at the SBML specifications) would have written:
A)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="0.1" scale="0" exponent="3" />
</listOfUnits>
</unitDefinition>
or B)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="1.0" scale="-1" exponent="3" />
</listOfUnits>
</unitDefinition>

This makes obvious that scale and multiplier should be treated equally.
There is also another more abstract way to look at it. The whole scheme
works perfectly fine without the scale attribute since the multiplier is
a double and thus treating them differently would create an obvious
inconsistency.

Another confusion stems from the interpretation. Above I have defined
liter in terms of metre. If I want to define it in terms of cubic meters
I again have two choices:
A)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="m3" multiplier="0.001" scale="0" exponent="1" />
</listOfUnits>
</unitDefinition>
or B)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="m3" multiplier="1.0" scale="-3" exponent="1" />
</listOfUnits>
</unitDefinition>

With the definition of cubic meters being:
<unitDefinition id="m3" name="cubic meter">
<listOfUnits>
<unit kind="metre" multiplier="1.0" scale="0" exponent="3" />
</listOfUnits>
</unitDefinition>

Note here I am not able to apply the simple replace mechanism used
before. The reason for this is that m3 is metre to the power 3. This
becomes more clear if I rewrite the definition of cubic meter in the
following way:
<unitDefinition id="m3" name="cubic meter">
<listOfUnits>
<unit kind="metre" multiplier="1.0" scale="0" exponent="1" />
<unit kind="metre" multiplier="1.0" scale="0" exponent="1" />
<unit kind="metre" multiplier="1.0" scale="0" exponent="1" />
</listOfUnits>
</unitDefinition>

Thus to rewrite liter in metre^3 I have to take the 3rd root of either
the scale or the multiplier yielding:
A)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="0.1" scale="0" exponent="3" />
</listOfUnits>
</unitDefinition>
or B)
<unitDefinition id="l" name="liter">
<listOfUnits>
<unit kind="metre" multiplier="1.0" scale="-1" exponent="3" />
</listOfUnits>
</unitDefinition>

My conclusion from the above examples is that the current
interpretation and rules given in the specification are correct. They
are simple and straight forward. I do not see the possibility to treat
multiplier and scale differently especially because of the reason that
every scale can be rewritten as a multiplier thus leading to a different
result.


Thanks,
Stefan


--
Stefan Hoops, Ph.D.
Senior Project Associate
Virginia Bioinformatics Institute - 0477
Virginia Tech
Bioinformatics Facility I
Blacksburg, Va 24061, USA

Phone: (540) 231-1799
Fax: (540) 231-2606
Email: shoops@vbi.vt.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.


      

SubjectPosterDate
Read Message   units in sbml l2v3 Ralph Gauges30 May '07 06:21
Read Message   Re: units in sbml l2v3 Mike Hucka01 Jun '07 14:07
Read Message   Re: units in sbml l2v3 Sven Sahle01 Jun '07 16:36
Read Message   Re: units in sbml l2v3 Mike Hucka03 Jun '07 11:46
Read Message   Re: units in sbml l2v3 Sven Sahle04 Jun '07 08:36
Read Message   Re: units in sbml l2v3 Stefan.Hoops04 Jun '07 11:28
Read Message   Re: units in sbml l2v3 Sven Sahle04 Jun '07 13:06
Read Message   Re: units in sbml l2v3  Ralph.Gauges04 Jun '07 13:27
Read Message   Re: units in sbml l2v3 Nicolas Le Novere04 Jun '07 13:58
Read Message   Re: units in sbml l2v3 Nicolas Le Novere04 Jun '07 14:42
Read Message   Re: units in sbml l2v3 Sven Sahle04 Jun '07 15:38
Read Message   Re: units in sbml l2v3 Nicolas Le Novere05 Jun '07 00:47
Read Message   Re: units in sbml l2v3 Sven Sahle05 Jun '07 03:59
Read Message   Re: units in sbml l2v3 Mike Hucka06 Jun '07 23:19
Read Message   Re: units in sbml l2v3 Mike Hucka06 Jun '07 23:42
Previous Topic:DSMTS for SBML L2v3
Next Topic:Re: [Biomodels] Eight release of BioModels Database
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.