# Forums

 SBML Discussions » sbml-discuss » units in sbml l2v3Show: Today's Posts  :: Message Navigator| Subscribe to topic
AuthorTopic

Posts: 82
Registered:
September 2003
 Re: units in sbml l2v3 01 Jun '07 16:36 Hello Michael, hello all, On Friday 01 June 2007 23:07:29 Michael Hucka wrote: > RG> Lets assume you want to multiply 2.0 * 10^-3 m^2 with > RG> 3.0 * 10^-5 m^3. The result should be 6.0 * 10^-8 > RG> m^5. > > I don't understand which is the unit and which is the > quantity. E.g., In the case of the "2.0 * 10^-3 m^2", are > you trying trying to define a single unit equal to "two > square millimetres"? (10^-3 m^2 would be square > millimetres, I think?) Yes, I think Ralph was only talking about units, no values involved. Actually the units Ralph used as an example are quite arbitrary and would not reallistically be used. 2*10^-3 m^2 is not 2 square mm but rather 0.002 sqare meters. Your example about square feet is valid: I you want to express square feet with meter as base unit, the new way is more intuitive. On the other side, if you want to express gallons with meter as base unit, the old way was more intuitive. Ralph´s point (as I understand it) is that with the old unit definition the multiplication of two units is almost trivial. (Multiplication of units is an operation that occurs frequently when checking/converting/handling units). With the new unit definition (from the errata) multiplication of units is more complicated, less efficient, and probably looses more accuracy. As far as I can see, in principle both ways to handle units can do everything that is needed. I just cannot see why the old way was wrong, and I agree with Ralph that the old way is probably easier to handle. To illustrate: Multiplication of two unit definitions (base on the same base unit) in the old schema: (a * 10^b *u^c) * (d * 10^e * u^f) = (a*d) * 10^(b+e) * u^(c+f) In the new schema the solution would be: (a * 10^b *u)^c * (d * 10^e * u)^f = [ (a^c*d^f)^(1/(c+f)) * 10^((b*c+e*f)/(c+f)) * u ]^(c+f), and this is not yet normalized (the scale part needs to be integer), so another step is needed. In some cases this will not be a problem. a and d will often be 1.0, and ((b*c+e*f)/(c+f)) will quite often be an integer, in which case evrything is fine. In the general case, however, we may have to use floating point operations for exponents, which looses accuracy and makes the exact comparison of units difficult, or, we should use exact rational numbers as exponents, which is much more complicated from a developers point of view. > If you do indeed mean to use strange multipliers, I think > here again you would pull out the part that's the actual > unit of measurement from the part that's the fraction of the > measurement, and use the unit-composition trick to define > the fraction separately from the unit of measurement, as in > the following: > > unitDefinition id="funky_new_unit" > unit kind="dimensionless" multiplier=".002" > unit kind="metre" exponent="2" > > or something along those lines. But I think I'm not > understand the intended units in that example. OK. I see. Using this trick you can force to more or less use the old way of handling units. I didn´t think of this. Sven -- Sven Sahle Bioquant, Universität Heidelberg ____________________________________________________________ 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
units in sbml l2v3 Ralph Gauges30 May '07 06:21
Re: units in sbml l2v3 Mike Hucka01 Jun '07 14:07
Re: units in sbml l2v3  Sven Sahle01 Jun '07 16:36
Re: units in sbml l2v3 Mike Hucka03 Jun '07 11:46
Re: units in sbml l2v3 Sven Sahle04 Jun '07 08:36
Re: units in sbml l2v3 Stefan.Hoops04 Jun '07 11:28
Re: units in sbml l2v3 Sven Sahle04 Jun '07 13:06
Re: units in sbml l2v3 Ralph.Gauges04 Jun '07 13:27
Re: units in sbml l2v3 Nicolas Le Novere04 Jun '07 13:58
Re: units in sbml l2v3 Nicolas Le Novere04 Jun '07 14:42
Re: units in sbml l2v3 Sven Sahle04 Jun '07 15:38
Re: units in sbml l2v3 Nicolas Le Novere05 Jun '07 00:47
Re: units in sbml l2v3 Sven Sahle05 Jun '07 03:59
Re: units in sbml l2v3 Mike Hucka06 Jun '07 23:19
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: SBML Discussions    sbml-discuss    sbml-interoperability    sbml-announce    libsbml-development    jsbml-development