damage bin IDs are contiguous and start at bin index 1, according to the documentation, and the implementation of validatevulnerability.
However, it seems this strict checking rule is not necessary, since in getmodel.cpp, the codes to read related data (line 139~149) does not use this rule/feature.
And the calculation of ground up loss for item and coverage will not be influenced, either.
while (fread(&vulnerability, sizeof(vulnerability), 1, fin) != 0) {
if (v.find(vulnerability.vulnerability_id) !=
v.end()) { // only process those vulnerabilities that are in the item
// file
assignProbabilities(vulnerability.vulnerability_id,
current_vulnerability_id,
vulnerability.intensity_bin_id,
vulnerability.damage_bin_id,
vulnerability.probability);
}
}
Steps to Reproduce (Bugs only)
For example, the damage bin IDs does not start at bin index 1, in the vulnerability file of the following url, but it works.
Issue Description
damage bin IDs are contiguous and start at bin index 1
, according to the documentation, and the implementation ofvalidatevulnerability
.However, it seems this strict checking rule is not necessary, since in getmodel.cpp, the codes to read related data (line 139~149) does not use this rule/feature.
And the calculation of ground up loss for item and coverage will not be influenced, either.
Steps to Reproduce (Bugs only)
For example, the damage bin IDs does not start at bin index 1, in the vulnerability file of the following url, but it works.
https://github.com/OasisLMF/OasisLMF/tree/main/tests/assets/test_model_1
Version / Environment information
ktool. Release v3.12.4