Add PiWindConditional coverage-dependency toy model - #41
Open
sstruzik wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
genuinely varies — vanilla PiWind's deterministic footprint gives dependency nothing to bite on.
conditional_vulnerability.csv(a
P(contents bin | building bin)matrix).model_settings.jsondeclarescoverage_dependency_settings: [{source: 1, dependent: 3}].num_damage_bins(6) >num_intensity_bins(4) on purpose — the conditional matrix is sized bydamage 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_2— uninsured zero-TIV building still driving insured contents, with ILoutput 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