-
Notifications
You must be signed in to change notification settings - Fork 6
feat(sld-estim): add measurements and observability parameters #4182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,8 +106,8 @@ export const useSldDiagram = ({ | |
| centerLabel: networkVisuParams?.singleLineDiagramParameters.centerLabel, | ||
| diagonalLabel: networkVisuParams?.singleLineDiagramParameters.diagonalLabel, | ||
| componentLibrary: networkVisuParams?.singleLineDiagramParameters.componentLibrary, | ||
| useStateEstimationVisualisation: | ||
| networkVisuParams?.singleLineDiagramParameters.stateEstimation, | ||
| measurements: networkVisuParams?.singleLineDiagramParameters.measurements, | ||
| observability: networkVisuParams?.singleLineDiagramParameters.observability, | ||
|
Comment on lines
+109
to
+110
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n -C 4 \
'useStateEstimationVisualisation|measurements|observability|STATE_VARIABLE' \
--glob '*.ts' \
--glob '*.tsx' \
--glob '*.json' \
.Repository: gridsuite/gridstudy-app Length of output: 7520 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- use-sld-diagram.ts ---'
cat -n src/components/workspace/diagrams/sld/use-sld-diagram.ts | sed -n '1,225p'
printf '%s\n' '--- SLD request methods and parameter types ---'
rg -n -C 5 \
'getVoltageLevel.*SingleLine|singleLineDiagram|SingleLineDiagramParameters|useStateEstimationVisualisation|measurements|observability' \
src --glob '*.ts' --glob '*.tsx'Repository: gridsuite/gridstudy-app Length of output: 50379 🤖 get_repo_knowledge executed:
Length of output: 4862 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- network URL helpers and types ---'
cat -n src/services/study/network.ts | sed -n '1,95p'
printf '%s\n' '--- network visualization parameter declarations and reducers ---'
rg -n -C 6 \
'networkVisualizationsParameters|singleLineDiagramParameters|useStateEstimationVisualisation|measurements|observability' \
src/redux src/components src/services --glob '*.ts' --glob '*.tsx' \
| head -n 260
printf '%s\n' '--- dependency declarations ---'
rg -n -C 2 \
'"`@powsybl/network-viewer`"|"`@gridsuite/commons-ui`"|"packageManager"' \
package.json package-lock.json yarn.lock pnpm-lock.yaml 2>/dev/null || true
printf '%s\n' '--- targeted diff for the reviewed file ---'
git diff -- src/components/workspace/diagrams/sld/use-sld-diagram.tsRepository: gridsuite/gridstudy-app Length of output: 25572 🌐 Web query:
💡 Result: In the PowSyBl ecosystem, network visualization is managed through a modular architecture that separates diagram generation from rendering. The core components for your query are as follows: 1. Diagram Generation: The Citations:
🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- exact repository references ---'
rg -n \
'useStateEstimationVisualisation|measurements|observability|NetworkVisualizationParameters|SingleLineDiagramParameters' \
. --glob '!package-lock.json' --glob '!node_modules/**' --glob '!dist/**' \
| head -n 220
printf '%s\n' '--- package metadata for `@powsybl/network-viewer` 3.7.0 ---'
curl -fsSL https://registry.npmjs.org/@powsybl%2fnetwork-viewer/3.7.0 \
| jq -r '.dist.tarball, .repository.url, .types, .version'Repository: gridsuite/gridstudy-app Length of output: 4808 🌐 Web query:
💡 Result: In the context of GridSuite, useStateEstimationVisualisation refers to functionality within the study configuration and network visualization framework, particularly related to how state estimation results and parameters are presented in single-line diagrams (SLDs) and other network views [1][2][3]. Recent updates have focused on enhancing state estimation observability and configuration management [3]: Configuration and Parameters: New configuration parameters have been introduced to manage state estimation studies, including boolean flags for specific study configuration activation [1][2][4]. These parameters are handled through services such as the study-config-server, which manage NetworkVisualizationParam entities [1][2][5]. Observability and Visualization: - GridSuite now supports enhanced observability for state estimation, including the ability to manage custom SLD configurations for state estimation studies [2][4]. - Measurements, such as active and reactive power for generators and HVDC VSC converter stations, are exposed within editing forms and dialogs to support state estimation analysis [3]. - Single-line diagrams have been enriched to provide better context, including the display of short-circuit current (ICC) values in legends and improved bus legend information [6][7][3]. - The platform includes a broader observability stack, often utilizing Grafana dashboards and alerting rules to monitor GridSuite services, which supports the overall observability of the power system analysis environment [3]. These features are part of the broader GridSuite ecosystem, which uses PowSyBl libraries to generate SVG-based single-line diagrams and manage network data [8]. Network visualization parameters define how these diagrams are rendered, including options for line paths and other visual elements [5][3]. Citations:
🌐 Web query:
💡 Result: In the context of power grid software systems like GridSuite and PowSyBl, a single line diagram (SLD) is generated as a combination of an SVG file and associated metadata [1]. The SVG file provides the visual representation of the network elements, while the metadata is essential for maintaining the logical links between these graphical elements and the underlying network elements, such as original network IDs, topology, and operational measurements [1]. This architectural approach allows observability measurements—such as active power (P), reactive power (Q), or short-circuit current (ICC)—to be dynamically injected into the diagrams [2][3]. Systems typically follow this workflow: 1. Computation: A dedicated server performs calculations (e.g., short-circuit analysis or load flow) [3][4]. 2. Data Injection: Relevant observability data or measurement results are retrieved and mapped to the existing diagram structure [5][2]. 3. Visualization: The single line diagram server uses this metadata to update the SVG, such as adding or refreshing values in legends or displaying status-specific indicators (e.g., greying out values if a load flow study has not been executed) [5][3][4]. This separation ensures that the graphical layout remains consistent while allowing the observational data layer to be updated asynchronously as system states change [1][3]. Citations:
🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- `@powsybl/network-viewer` 3.7.0 declarations ---'
curl -fsSL https://registry.npmjs.org/@powsybl%2fnetwork-viewer/3.7.0 \
| jq -r '.dist.tarball' \
| xargs -r curl -fsSL \
| tar -tzf - \
| rg '(^|/)(index|.*single.*line.*|.*request.*|.*parameter.*).*\.d\.ts$' \
| head -n 120
printf '%s\n' '--- GridSuite repository metadata ---'
for repo in network-map-server study-server study-config-server; do
curl -fsSL "https://api.github.com/repos/gridsuite/$repo" \
| jq -r '"\(.full_name) default_branch=\(.default_branch)"'
done
printf '%s\n' '--- exact backend-term lookup in public GridSuite repository trees ---'
for repo in network-map-server study-server study-config-server; do
branch=$(curl -fsSL "https://api.github.com/repos/gridsuite/$repo" | jq -r '.default_branch')
curl -fsSL "https://api.github.com/repos/gridsuite/$repo/git/trees/$branch?recursive=1" \
| jq -r --arg repo "$repo" '.tree[]? | select(.type=="blob") | .path' \
| rg -i 'controller|single.*line|diagram|network.*map|visual' \
| while IFS= read -r path; do
url="https://raw.githubusercontent.com/gridsuite/$repo/$branch/$path"
body=$(curl -fsSL "$url" 2>/dev/null || true)
if printf '%s' "$body" | rg -q 'useStateEstimationVisualisation|measurements|observability'; then
printf '%s\n' "--- $repo/$branch/$path ---"
printf '%s' "$body" | rg -n -C 4 'useStateEstimationVisualisation|measurements|observability'
fi
done
doneRepository: gridsuite/gridstudy-app Length of output: 5188 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- diagram notification hook ---'
cat -n src/components/workspace/diagrams/common/use-diagram-notifications.ts
printf '%s\n' '--- visualization parameter update flow ---'
rg -n -C 8 \
'UPDATE_NETWORK_VISUALIZATION_PARAMETERS|setUpdateNetworkVisualizationParameters|NetworkVisualizationParametersUpdated|networkVisualizationsParameters' \
src/components src/services src/redux src/types --glob '*.ts' --glob '*.tsx' --glob '*.jsx' \
| head -n 300Repository: gridsuite/gridstudy-app Length of output: 23712 Refetch SLD diagrams when visualization parameters change
🤖 Prompt for AI Agents |
||
| sldDisplayMode: SLD_DISPLAY_MODE.STATE_VARIABLE, | ||
| topologicalColoring: true, | ||
| language, | ||
|
|
@@ -130,8 +130,8 @@ export const useSldDiagram = ({ | |
| diagonalLabel: networkVisuParams?.singleLineDiagramParameters.diagonalLabel, | ||
| substationLayout: networkVisuParams?.singleLineDiagramParameters.substationLayout, | ||
| componentLibrary: networkVisuParams?.singleLineDiagramParameters.componentLibrary, | ||
| useStateEstimationVisualisation: | ||
| networkVisuParams?.singleLineDiagramParameters.stateEstimation, | ||
| measurements: networkVisuParams?.singleLineDiagramParameters.measurements, | ||
| observability: networkVisuParams?.singleLineDiagramParameters.observability, | ||
| topologicalColoring: true, | ||
| language, | ||
| }), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: gridsuite/gridstudy-app
Length of output: 161
🏁 Script executed:
Repository: gridsuite/gridstudy-app
Length of output: 50380
🤖 get_repo_knowledge executed:
get_repo_knowledge gridsuite/gridstudy-app /tmp/coderabbit-repo-knowledge/gridsuite-gridstudy-app-e9ac4489/learningsLength of output: 4862
🏁 Script executed:
Repository: gridsuite/gridstudy-app
Length of output: 5489
🏁 Script executed:
Repository: gridsuite/gridstudy-app
Length of output: 2780
Provision the local tarball in every install environment.
The CI and release workflows delegate to reusable workflows and show no tarball provisioning. A clean checkout lacks
../commons-ui/gridsuite-commons-ui-0.283.0.tgz, whilepackage-lock.jsonrecords the same local dependency. Provision the tarball or reference the published0.283.0package.🤖 Prompt for AI Agents