AbstractVulnerabilityFunction¶
abstract_vulnerability_function
¶
Classes¶
AbstractVulnerabilityFunction
¶
Bases: ABC
Functions¶
calculate_vulnerability
abstractmethod
¶
Calculate vulnerability percentages for buildings.
This is the main method that should be implemented by concrete classes. It should populate damage percentage fields in the buildings data.
Source code in packages/core/src/sphere/core/schemas/abstract_vulnerability_function.py
apply_damage_percentages
abstractmethod
¶
Apply damage percentages to buildings based on calculated vulnerability.
This method should be called after calculate_vulnerability() to populate the final damage percentage fields.