Skip to content

Make mapping of unknown occupancy code to Hazus curves optional - #610

Merged
joemoorhouse merged 3 commits into
os-climate:mainfrom
arfima:add-unknown-occ-map-escape
Aug 26, 2026
Merged

Make mapping of unknown occupancy code to Hazus curves optional#610
joemoorhouse merged 3 commits into
os-climate:mainfrom
arfima:add-unknown-occ-map-escape

Conversation

@jroman-ak

@jroman-ak jroman-ak commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

I implement this as an optional runtime flag set by calling OEDHazusImpactFunctionSelector.with_runtime_options(map_unknown_occ) inside VulnerabilityModelsFactory.vulnerability_models(). The default behavior is to not map (False).

I also make the flag use_oed_hazus_curves runtime configurable by removing it from the __init__ of the VulnerabilityModelsFactory and moving it to VulnerabilityModelsFactory.vulnerability_models(). The default is to use hazus curves (True).

To toggle these two options at runtime, I introduce a field vulnerability_curve_mapping in CalcSettings that takes literal values "hazus", "hazus_no_unknown" and "config_only".

  • hazus: sets use_oed_hazus_curves = True and map_unknown_occ = True
  • hazus_no_unknown: sets use_oed_hazus_curves = True and map_unknown_occ = False
  • config_only: sets use_oed_hazus_curves = False

The default is "hazus_no_unknown".

@jroman-ak
jroman-ak marked this pull request as ready for review July 9, 2026 11:16
@jroman-ak
jroman-ak requested a review from joemoorhouse as a code owner July 9, 2026 11:16
@jroman-ak
jroman-ak force-pushed the add-unknown-occ-map-escape branch 4 times, most recently from aa6fc29 to 0fa8155 Compare July 23, 2026 11:08
@jroman-ak
jroman-ak force-pushed the add-unknown-occ-map-escape branch from 0fa8155 to dcb1866 Compare July 24, 2026 07:47
Signed-off-by: Juan Roman <jroman@arfimaconsulting.com>
Signed-off-by: Juan Roman <jroman@arfimaconsulting.com>
…e configurable

Signed-off-by: Juan Roman <jroman@arfimaconsulting.com>
@jroman-ak
jroman-ak force-pushed the add-unknown-occ-map-escape branch from dcb1866 to 74ae68a Compare August 19, 2026 15:11
@joemoorhouse
joemoorhouse merged commit 4c34e01 into os-climate:main Aug 26, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants