[ODE] ODE GUI Editor #2...

Steve Baker sjbaker1 at airmail.net
Fri Feb 27 19:32:31 MST 2004


Megan Fox wrote:
> I'm unclear why such would be the case, as it has nothing to do with how you
> group your data.

Consider the number 0.1 - this is a nice round number that you can represent
exactly in an ASCII file.  However, in binary it's .00011001100110011 ...a
repeating bit pattern that never terminates (like the number 1/3 in decimal).

Hence there won't be an exact correspondance between the floating point numbers
that were in the editor and the numbers you might see when you get them into
your application.

However, the same thing can happen with binary files if the machine the file
was written out on is not identical to the one that it's being read into - or
if the floating point rounding modes are different in the two software packages
(a problem that's endemic to MS Windows systems where the rounding mode gets
changed around by all sorts of ikky mechanisms).  Heck - the result may well
be different between one compiler optimisation level and another - so if your
application is built with full optimisation and the modeller is built under
debug conditions then the numbers will come out subtly different.

This is clearly important if you are using files to save replay data because
the 'butterfly effect' applies.  One little single bit error will sometimes
result in a very different result coming out of the replay than happened in
the original run.

So if you are RELYING on things being unchanged BETWEEN THE EDITOR AND THE
APPLICATION then I think you should re-think what you are doing.

If you are merely relying on a model being unchanged after being written out
of an application and read back into the same application again on the same
run on the same computer then I think you should create your own binary format.
Saving the entire ODE tree isn't "The Right Thing" IMHO.

The thing with replay is that you need to store the INTERNAL state of ODE
for every node.  Our ODE file format should only save the EXTERNALLY VISIBLE
state because storing the internal state would seriously screw up any
efforts to keep the file format usable from one revision of ODE to the next.

Perfect replay from initial conditions is a very hard problem - and not
one that I think should be involved in the ODE file format.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net>    WorkEmail: <sjbaker at link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
            http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----




More information about the ODE mailing list