Skip to content

Integrate load shedding actions into the interface - #61

Merged
marota merged 4 commits into
mainfrom
claude/load-shedding-integration-HuyuN
Mar 25, 2026
Merged

marota merged 4 commits into
mainfrom
claude/load-shedding-integration-HuyuN

Conversation

@marota

@marota marota commented Mar 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add MIN_LOAD_SHEDDING configuration parameter to backend and frontend settings (recommender tab), with persistence to config.json and session save/restore
  • Compute per-load shedding details (shedded MW = difference between N-1 and action load_p) in both _enrich_actions and simulate_manual_action
  • Display load shedding description "Load shedding of ZZ MWs on load XX at voltage level YY" on action cards, with the voltage level as a clickable link (click to zoom, double-click for SLD)
  • For load shedding actions, show VL badges (green) instead of load name badges, so users can navigate to the voltage level SLD diagram
  • Add get_load_voltage_level / get_load_voltage_levels_bulk to NetworkService for resolving load-to-VL mapping
  • Update standalone_interface.html with equivalent changes

Test plan

  • All 289 existing tests pass (17 test files)
  • TypeScript compiles cleanly (tsc -b --noEmit)
  • 4 new ActionFeed tests: load shedding description rendering, VL badge display, multi-load shedding, VL click handler
  • 3 new sessionUtils tests: min_load_shedding in config, default value, load_shedding_details preservation
  • Manual: verify load shedding action cards show correct MW delta and clickable VL links
  • Manual: verify MIN_LOAD_SHEDDING setting appears in recommender tab and persists

https://claude.ai/code/session_011jK2JYnTeSvHN64eXL8zTP

claude and others added 4 commits March 25, 2026 12:02
- Add MIN_LOAD_SHEDDING configuration parameter across backend (ConfigRequest,
  recommender config) and frontend (settings modal recommender tab, useSettings
  hook, config persistence, session save/restore)
- Compute per-load shedding details (shedded MW, load name, voltage level) by
  comparing load_p between N-1 and action observations in both _enrich_actions
  and simulate_manual_action
- Add LoadSheddingDetail type and load_shedding_details field to ActionDetail
- Display load shedding description "Load shedding of ZZ MWs on load XX at
  voltage level YY" with clickable VL link (click to zoom, double-click for SLD)
- For load shedding actions, show VL badges instead of load name badges
- Add network_service methods for resolving load-to-voltage-level mapping
- Update standalone_interface.html with equivalent changes
- Add tests for load shedding action card rendering and session serialization

https://claude.ai/code/session_011jK2JYnTeSvHN64eXL8zTP
…system-wide ID trimming, and add LS filters to standalone interface
@marota
marota merged commit 5c8f013 into main Mar 25, 2026
2 checks passed
@marota marota mentioned this pull request Mar 27, 2026
5 tasks done
marota pushed a commit that referenced this pull request Apr 30, 2026
Reconciliation of section 2 (0.5.0):
- Drop misattributed PRs that were actually pre-rebrand: save/reload
  (#49/#52), MW Start (#62), interaction-logging (#64), SLD highlights
  (#63), load shedding initial integration (#61). All now properly
  cited in section 1.5–1.6.
- Disambiguate App.tsx refactor history: PR #56 (hooks, 2100 → 800,
  pre-rebrand) vs PR #74 (components, 1000 → 650, 0.5.0) vs PR #75
  (memoization Phase 2, same LoC).
- Add accurate 0.5.0 PRs: #66 (vectorization w/ benchmark table),
  #69/#70/#71 (UI polish), #72 (curtailment), #73 (loads_p/gens_p
  format + configurable MW), #74/#75 (App.tsx decomposition),
  #78 (PST tap re-simulation), #84/#86/#87/#90 (detachable tabs).
- Add a recap table summarizing what's truly new in 0.5.0.

Diagrams added (Mermaid, GitHub-rendered):
- Gantt timeline of all 4 phases (top of doc).
- High-level architecture (frontend / backend / data).
- Two-step analysis sequence diagram (section 1.6).
- App.tsx LoC evolution flow (section 2.4).
- Backend mixin decomposition before/after PR #104/#106 (section 3).
- PyPSA-EUR pipeline flowchart (section 4).

https://claude.ai/code/session_01Pg7fuCUG2edfm5PyHS6SbN
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