The HEC-FDA stage-damage compute: a structure inventory, occupancy-type depth-damage
functions, per-frequency hydraulic stage profiles, and a graphical stage-frequency curve go
in; stage-damage curves (one per damage category and asset category) come out. Wraps the
ported ImpactAreaStageDamage.Compute, validated against the upstream
TractableStageDamageTests.
Usage
stage_damage(
structures,
occupancy_types,
hydraulics,
stage_frequency,
stages,
impact_area_id = 1L,
deterministic = TRUE
)Arguments
- structures
data frame:
fid(character),first_floor_elevation,value_structure,damage_category,occupancy_type,ground_elevation, and optionalvalue_content,value_vehicle,value_other(default 0).- occupancy_types
list of occupancy-type specs; see Details.
- hydraulics
list(probabilities, wses):wsesis a list of numeric vectors, one water surface elevation profile per probability, each of lengthnrow(structures).- stage_frequency
list(probabilities, stages, erl): a graphical stage-frequency curve with its equivalent record length.- stages
numeric vector of stages at which to evaluate the resulting curves.
- impact_area_id
integer impact area label.
- deterministic
when
TRUE, distributions collapse to their means (the oracle path).
Details
The deterministic path (deterministic = TRUE, the default) collapses every uncertainty
distribution to its mean and matches the upstream oracle values. Occupancy types support
structure and content depth-percent-damage curves plus content-to-structure value ratio,
first-floor-elevation, and structure-value uncertainty.
An occupancy-type spec is list(name, damage_category, structure_curve, content_curve, content_to_structure_value_ratio, first_floor_elevation, structure_value).
Curves are list(x = depths, dist, params) (ead_simulation()'s curve spec).
content_to_structure_value_ratio is list(central = 50) for a fixed percent or
list(dist, std_or_min, central, max) with uncertainty; first_floor_elevation and
structure_value are optional list(dist, std_or_min, max).
Scope note: the deterministic path is the oracle-validated one (upstream
TractableStageDamageTests); occupancy types support structure and content curves plus
CSVR/FFE/structure-value uncertainty (the subset the existing bindings marshal); the
flow-frequency + discharge-stage input path stays internal (C++-validated only).