Skip to content

Improve condition readability (loadflow-validation)#3830

Draft
samirromdhani wants to merge 4 commits intomainfrom
refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation
Draft

Improve condition readability (loadflow-validation)#3830
samirromdhani wants to merge 4 commits intomainfrom
refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation

Conversation

@samirromdhani
Copy link
Copy Markdown
Contributor

@samirromdhani samirromdhani commented Mar 18, 2026

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 #246

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:

Done 🆗
  • Added rule by rule unit test
  • Improved Buses validation rules
  • Fixed gaps between code and doc for Shunt, SVC, Generator
  • Improved Generator validation rules
  • Improved SVC validation rules
  • Improved ShuntCompensator validation rules
  • Improve Flow validation rules (Branch Data :Line, TieLine and TWT)
Notes 🆗
  • Improve TWT validation rules => confused ! déja vu in FlowsValidation class ! but in TransformersValidation there is others diferent rules -> to clarify
    • It appear that FLOWS and Transformers both include rules for TWT, but they validate different concerns,
      • FLOWS takes TWT as a branch model like Line and Tieline, so rules applied on TWT terminals to checks consistency (P and Q vs computed P and Q).
      • TWTS focus on regulation of the TWT RatioTapChanger (WIP)
  • Improve 3WT validation rules => no doc exist to align with the code (issue created)
Related tasks ⏭️
  • Sonar issues planned here 3837
  • Refactoring started in (PR 3683)
  • Complete doc for 3WT planned here 3858

@samirromdhani samirromdhani force-pushed the refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation branch 5 times, most recently from 95bed9a to 6091103 Compare March 20, 2026 14:12
@samirromdhani samirromdhani force-pushed the refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation branch 18 times, most recently from bf3f14a to e7d56fd Compare March 24, 2026 12:33
@samirromdhani samirromdhani self-assigned this Mar 24, 2026
@samirromdhani samirromdhani force-pushed the refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation branch 5 times, most recently from 5e70480 to 98e0014 Compare March 24, 2026 14:17
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>

review conditions in ShuntCompensators validation WIP

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

refactor(loadflow-validation): remove duplicated code

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

ShuntCompensator validation review, prepare actions

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

ShuntCompensator validation review, prepare example

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

ShuntCompensator validation review, prepare example

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

SVC validation review

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

SVC validation review, prepare actions

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

Generators validation review

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

Buses validation review

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

notes Flows, TWT and 2W TWT validation

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

improve ShuntCompensator validation rules

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

improve SVC validation rules wip

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

note

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

improve SVC validation rules wip

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

fix gaps between current code and current doc for Shunt and SVC

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

fix gaps between current code and current doc (Shunt Compensator)

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

improve SVC validation rules

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

improve Generator validation rules

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

resume SVC rules for valid results

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

resume Generator rules for valid results

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

improve Buses validation rules, update doc

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

Note branch data, twt & review grid feature doc

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

Note branch data, twt & review grid feature doc

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

review grid feature related loadflow validation rules

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

review SVC tool rule within grid feature rule

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

review Buses tool rule within grid feature rule

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

refactor, reuse common util methods

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

add isOutsideOrAtTolerance test

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

review flows valisation ~ branch ...

Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani force-pushed the refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation branch from de7f7a5 to c5047bd Compare April 1, 2026 08:18
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani force-pushed the refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation branch 8 times, most recently from 39f65ca to 3411181 Compare April 2, 2026 08:35
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>

test(loadflow-validation): add rule by rule unit test Flow validation Line case

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

test(loadflow-validation): add rule by rule unit test Flow add TieLIne and Transformer

Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani force-pushed the refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation branch from 3411181 to 5adb8ac Compare April 2, 2026 14:48
Comment thread docs/grid_features/loadflow_validation.md
Comment thread docs/user/itools/loadflow-validation.md
@samirromdhani samirromdhani marked this pull request as ready for review April 2, 2026 15:00
@samirromdhani samirromdhani requested review from olperr1 and rolnico April 2, 2026 15:00
@samirromdhani samirromdhani marked this pull request as draft April 15, 2026 15:36
@samirromdhani
Copy link
Copy Markdown
Contributor Author

Clarification about TWT checks

It appear that FLOWS and Transformers both include rules for TWT, but they validate different concerns,

  • FLOWS takes TWT as a branch model like Line and Tieline, so rules applied on TWT terminals to checks consistency (P and Q vs computed P and Q).
  • TWTS focus on regulation of the TWT RatioTapChanger (WIP)

@samirromdhani samirromdhani force-pushed the refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation branch 5 times, most recently from 3994c34 to 27d34b0 Compare April 17, 2026 14:48
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>

WIP

WIP

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

wording

Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani force-pushed the refactor/246-enhance-the-readability-of-the-conditions-in-loadflow-validation branch from 27d34b0 to 966fb90 Compare April 17, 2026 14:50
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance the readability of the conditions in loadflow-validation

1 participant