Skip to content

refactor(shock): derive shock-paraeter registry from PDL (#14)#20

Open
Hackatro wants to merge 2 commits into
mainfrom
14-derive-shock-parameter-registry-dynamically-from-pdl
Open

refactor(shock): derive shock-paraeter registry from PDL (#14)#20
Hackatro wants to merge 2 commits into
mainfrom
14-derive-shock-parameter-registry-dynamically-from-pdl

Conversation

@Hackatro

@Hackatro Hackatro commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

refactor(shock): derive shock-parameter registry from PDL (#14)

  • add shock_registry.py — single source: (entity,impact)→param BINDING,
  • delete hardcoded fields + static fallback branch;
  • add test_shock_registry.py

@Hackatro Hackatro linked an issue Jun 9, 2026 that may be closed by this pull request
Comment thread src/provider_simenv/environment.py Outdated
Comment thread src/provider_simenv/environment.py Outdated
shock_onset_feed_mill: int = 0
shock_end_feed_mill: int = 365
# --- Supply chain routing ---
santos_share: float = 0.7 # 70% of BRA exports via Santos

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed santos mention

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left fixed on purpose. The PDL doesn't currently express routing splits, so delivering this needs a schema decision. Out of scope for #14, tracked in #19

Comment thread src/provider_simenv/shock_registry.py Outdated
The simulation no longer translates PDL shocks into invented knob names. A shock is stored and served under the (entity, impact_field) pair taken straight from the PDL event's 'target' and impact field. Both are PDL vocab, so a new shock is a PDL edit only.
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.

Derive shock parameter registry dynamically from PDL

2 participants