Peter-Knoppers / OTSim

Open Traffic Simulator
2 stars 2 forks source link

Ordering of some objects in XML is unpredictable #18

Open Peter-Knoppers opened 11 years ago

Peter-Knoppers commented 11 years ago

Usually, similar objects in an XML file can be written in any order without affecting the meaning of the XML file. OTSim writes some XML objects in semi-random order. Although the data structures are correctly restored on read, this randomization makes comparing XML files unnecessary hard.

The proposal is to make sure that OTSim writes XML objects in an order that is fully predictable.

One way to reproduce this problem is to read in any non-trivial model file (.otsn file) and (without changing it) write it to a new file. Then use a text file compare to to compare the original file with the new file.