Some checks in GDE_check_consistency.py can fail due to rounding of decimal places in output CSV files
Problem noted when comparing the output OQ input files for v002 and version Ind30 of the Attica case study. Residential and commercial exposure were meant to be "the same" in both versions, but a discrepancy in the total number of buildings and size of the OQ input files was observed:
- Res_number_OBM_with_classes: 256,375.03 in Ind30 vs 256,373 in v002.
- Com_number_OBM_with_classes: 7,783.70 in Ind30 vs 7,784 in v002.
This discrepancy arises because the OQ input files are created using 5 decimal places now (v002 was created with str(), i.e. unspecified number of decimal places). This change was introduced in commit 0b89ddaf.
This is a matter of:
- How many decimal places is it reasonable to use for the OQ input files?
- How to check the consistency of outputs when rounding is involved (very small differences per building add up when the total number of buildings is large). Note that checking building by building takes a very long time.