OasisLMF / ktools

In-memory simulation kernel for loss modelling.
BSD 3-Clause "New" or "Revised" License
29 stars 18 forks source link

Additional model file validation checks #372

Closed hchagani-oasislmf closed 7 months ago

hchagani-oasislmf commented 7 months ago

Issue Description

Two additional validation checks on the model files have been requested:

  1. In the vulnerability file, damage bins should be in ascending order and contiguous. This would render the check for duplicate damage bin IDs redundant therefore facilitating its removal.
  2. In the damage bin dictionary file, while it is valid to have an interpolation that does not lie in the middle of the lower and upper bin limits, it is not common practice. Users could change bin limits while forgetting to update the interpolation values. The interpolation values would not be flagged during validation checks should they still lie within the new bin limits. As most users want the interpolation to lie at the mid-point of the bin, interpolation values should be checked against this, and a warning should be outputted should the interpolation deviate from this expected value.

Version / Environment information

ktools v3.12.0