Repository navigation
feat(context-map): consignations and the 400/225 kV network outline, as Carte-Front - #229
Merged
Merged
Conversation
…as Carte-Front Two Carte-Front layers on the Context tab: - Consignations: the extra-high-voltage circuits (400/225 kV lines and two-winding transformers) a situation takes out, by Carte-Front's rule on a situation (maintenance.detect_consignations_via_I) ported to the parsed network: no current at either end (I NaN or < 0.5 A) AND isolated at both voltage levels (alone on its node, or only with the substation's wiring and other consigned circuits), the TOPO read per candidate voltage level from get_node_breaker_topology; a bus-breaker end is isolated when its circuit is disconnected; a file without any flow gives none. Detected in capture_snapshot (+0.25 s on the 7 000-node French grid), carried in the /api/context-map payload, drawn with a casing per voltage (400 kV red and solid, 225 kV green and dashed), on by default. - Network outline (liseré): a pastel 400/225 kV trace built from the network's lines, parallel circuits melted, off by default, served by the new GET /api/context-map/network the first time a legend box is ticked. Backend: services/context_map/consignations.py, network_layers.py; snapshot, builder, service and the route; OpenAPI snapshot regenerated. Frontend: ContextMapLayers / ContextMapView (legend toggles, hover card), useContextMap.requestNetwork, tokens, types, api. Docs: context-tab.md § Network layers, CHANGELOG, CLAUDE.md guides. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Antoine Marot <amarot91@gmail.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.
Summary
Two Carte-Front layers on the Context tab:
maintenance.detect_consignations_via_I), ported to the parsed network:IisNaNor < 0.5 A; a line energised from one end keeps its charging current and is not consigned), andTOPOsense — alone on its node, or sharing it only with the substation's own wiring (busbar sections,fict_…) and other consigned circuits (an antenna).TOPOis read per candidate voltage level fromget_node_breaker_topology(~0.35 ms each); a bus-breaker end is isolated when its circuit is disconnected.GET /api/context-map/network(50–80 kB), read once the first time a box is ticked.Detection runs in
capture_snapshot(inside the existing network lock) and the consignations ride in the/api/context-mappayload.Numbers
Test plan
pytest— 39 new tests (test_context_map_consignations.py: the rule, snapshot, payload, outline, route); suite 1 441 passedcheck_openapi_contract.py(snapshot regenerated for the new route),check_code_quality.pytsc -b, ESLint (0 errors)Known, unrelated:
test_combined_actions_scenario::test_independent_actions_simulationandtest_stream_pdf_integration::test_stream_pdf_integrationfail onmaintoo.Docs:
docs/features/context-tab.md§ Network layers, CHANGELOG, CLAUDE.md guides.🤖 Generated with Claude Code