Skip to content

[SLD] Represent nodes/buses fictitious injections#794

Merged
rolnico merged 7 commits intomainfrom
feat/741-represent-nodesbuses-fictitious-injections-in-sld
Mar 26, 2026
Merged

[SLD] Represent nodes/buses fictitious injections#794
rolnico merged 7 commits intomainfrom
feat/741-represent-nodesbuses-fictitious-injections-in-sld

Conversation

@samirromdhani
Copy link
Copy Markdown
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?

Fixes #741

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

@samirromdhani samirromdhani force-pushed the feat/741-represent-nodesbuses-fictitious-injections-in-sld branch 5 times, most recently from ff1d577 to d71e8c2 Compare March 10, 2026 14:42
@samirromdhani samirromdhani marked this pull request as ready for review March 10, 2026 14:51
@samirromdhani samirromdhani requested a review from rolnico March 10, 2026 14:52
@samirromdhani samirromdhani force-pushed the feat/741-represent-nodesbuses-fictitious-injections-in-sld branch from d71e8c2 to dbde9dd Compare March 10, 2026 15:12
Comment thread diagram-test/src/main/java/com/powsybl/diagram/test/Networks.java Outdated
@samirromdhani samirromdhani requested a review from rolnico March 13, 2026 15:40
@samirromdhani samirromdhani force-pushed the feat/741-represent-nodesbuses-fictitious-injections-in-sld branch 2 times, most recently from fac6c88 to c5a66e3 Compare March 25, 2026 15:33
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>

test remove debugSvgFiles

Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>

review sonar

Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani force-pushed the feat/741-represent-nodesbuses-fictitious-injections-in-sld branch from c5a66e3 to 12faf78 Compare March 26, 2026 08:57
@samirromdhani samirromdhani requested a review from rolnico March 26, 2026 08:58
@samirromdhani samirromdhani self-assigned this Mar 26, 2026
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani force-pushed the feat/741-represent-nodesbuses-fictitious-injections-in-sld branch from adbbb54 to b253fa5 Compare March 26, 2026 10:39
@samirromdhani samirromdhani requested a review from rolnico March 26, 2026 12:12
Comment on lines +62 to +68
.map(bus -> new BusLegendInfo(bus.getId(), List.of(
new BusLegendInfo.Caption(valueFormatter.formatVoltage(bus.getV(), "kV"), "v"),
new BusLegendInfo.Caption(valueFormatter.formatAngleInDegrees(bus.getAngle()), "angle"),
new BusLegendInfo.Caption(valueFormatter.formatPower(bus.getFictitiousP0(), withDefaultUnit(svgParameters.getActivePowerUnit(), "MW")), "fictitiousP0"),
new BusLegendInfo.Caption(valueFormatter.formatPower(bus.getFictitiousQ0(), withDefaultUnit(svgParameters.getReactivePowerUnit(), "MVar")), "fictitiousQ0")
)))
.toList();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
.map(bus -> new BusLegendInfo(bus.getId(), List.of(
new BusLegendInfo.Caption(valueFormatter.formatVoltage(bus.getV(), "kV"), "v"),
new BusLegendInfo.Caption(valueFormatter.formatAngleInDegrees(bus.getAngle()), "angle"),
new BusLegendInfo.Caption(valueFormatter.formatPower(bus.getFictitiousP0(), withDefaultUnit(svgParameters.getActivePowerUnit(), "MW")), "fictitiousP0"),
new BusLegendInfo.Caption(valueFormatter.formatPower(bus.getFictitiousQ0(), withDefaultUnit(svgParameters.getReactivePowerUnit(), "MVar")), "fictitiousQ0")
)))
.toList();
.map(bus -> new BusLegendInfo(bus.getId(), List.of(
new BusLegendInfo.Caption(valueFormatter.formatVoltage(bus.getV(), "kV"), "v"),
new BusLegendInfo.Caption(valueFormatter.formatAngleInDegrees(bus.getAngle()), "angle"),
new BusLegendInfo.Caption(valueFormatter.formatPower(bus.getFictitiousP0(),
withDefaultUnit(svgParameters.getActivePowerUnit(), "MW")), "fictitiousP0"),
new BusLegendInfo.Caption(valueFormatter.formatPower(bus.getFictitiousQ0(),
withDefaultUnit(svgParameters.getReactivePowerUnit(), "MVar")), "fictitiousQ0")
)))
.toList();

Copy link
Copy Markdown
Contributor Author

@samirromdhani samirromdhani Mar 26, 2026

Choose a reason for hiding this comment

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

Actually formatted with IntelliJ (using the default configuration), i had to add .editorconfig locally to adjust indentation to 4 as you suggested.
Even with the new checkstyle version (powsybl/powsybl-parent#90) the indentation i set still work, maybe we should align on a common style with an operational checkstyle rule ?

suggestion applied 🆗

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The idea is also to keep the code formatting consistent, so to not change the code that does not need to be changed.

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.

I agree, but code formatting can be changed mostly in cases like refactoring, in this case we can't detect easily if the formatting kept consistent or not if there is no common style, also define such common style can prevent conflicts during code reviews.

Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani requested a review from rolnico March 26, 2026 13:57
@sonarqubecloud
Copy link
Copy Markdown

@rolnico rolnico merged commit 699a7ea into main Mar 26, 2026
8 checks passed
@rolnico rolnico deleted the feat/741-represent-nodesbuses-fictitious-injections-in-sld branch March 26, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Represent nodes/buses fictitious injections in SLD

2 participants