Skip to content

Add PiWindConditional coverage-dependency toy model - #41

Open
sstruzik wants to merge 1 commit into
mainfrom
feature/piwind-conditional-coverage-dependency
Open

Add PiWindConditional coverage-dependency toy model#41
sstruzik wants to merge 1 commit into
mainfrom
feature/piwind-conditional-coverage-dependency

Conversation

@sstruzik

Copy link
Copy Markdown
Contributor

PiWindConditional — coverage-dependency toy model

A minimal PiWind variation demonstrating the new gulmc coverage dependency feature
(OasisLMF#2063). At each location Contents (type 3) is a dependent of Building (type 1):
the contents' damage is driven by the building's sampled damage bin through a conditional
(damage-transition) vulnerability
rather than an independent draw.

What makes it exercise the feature

  • Non-deterministic footprint (4 intensity bins with probabilities) so the building's damage
    genuinely varies — vanilla PiWind's deterministic footprint gives dependency nothing to bite on.
  • Building uses a normal hazard-indexed vulnerability; Contents uses conditional_vulnerability.csv
    (a P(contents bin | building bin) matrix).
  • model_settings.json declares coverage_dependency_settings: [{source: 1, dependent: 3}].
  • num_damage_bins (6) > num_intensity_bins (4) on purpose — the conditional matrix is sized by
    damage bins, independent of the footprint's intensity resolution.

Test cases

  • tests/test_1 — insured building driving insured contents (GUL). corr(building, contents) ≈ 0.96.
  • tests/test_2uninsured zero-TIV building still driving insured contents, with IL
    output enabled
    . The uninsured source is retained purely to drive its dependent and flows as an
    ordinary zero-TIV, zero-loss coverage — a regression guard for the IL/FM path.

Both run end-to-end and log coverage dependency: switched ON (2 dependent coverages).

🤖 Generated with Claude Code

A PiWind variation demonstrating gulmc coverage dependency: at each location
Contents (type 3) is a dependent of Building (type 1), driven by the building's
sampled damage bin through a conditional (damage-transition) vulnerability.
Non-deterministic footprint (4 intensity bins) so the dependency has something
to bite on; num_damage_bins (6) > num_intensity_bins (4) on purpose.

Two test cases:
- tests/test_1: insured building driving insured contents (GUL).
- tests/test_2: uninsured zero-TIV building still driving insured contents,
  with IL output enabled — regression guard for the IL/FM path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants