sort output files by ID
in order to diff output files from two identical runs to ensure there are no differences, we need to first sort output files by ID before writing them out.
DaySim also calculates and writes out checksums on the files, which is an easy way to see if they’re different, but may not guarantee that they are identical. (We may be able to improve the calculations to check for identical files – i.e .make sure they use all the output fields.)
Daysim uses MD5 for its checksums. That seems reasonable and is faster than most alternatives: http://crypto.stackexchange.com/questions/12677/strength-of-md5-in-finding-duplicate-files
DaySim outputs files in different orders due to threading which is useful. Therefore, instead instead of changing the output as this issue suggests, I wrote the regression code to handle different line order.
I’m not sure how it is useful to have the files in different orders. If the tests work with files in different order, that is fine for now, but I think at some future point DaySim users would like it if the output files were in sort order by ID.
Mark
Per Mark's comment I will reopen and mark as an enhancement
Note: the change in order means that these files are frequently marked as changed by git which is a pain and makes noticing actual changes more difficult.
Maybe we should implement the sort of outputs sooner rather than later. It would make life easier for testing and for other uses of the outputs.