powsybl / powsybl-diagram

SVG diagrams generation: single-line substation diagrams and network graph diagrams
Mozilla Public License 2.0
72 stars 13 forks source link

Fix one leg intern cells #595

Closed flo-dup closed 5 months ago

flo-dup commented 5 months ago

Please check if the PR fulfills these requirements

Does this PR already have an issue describing the problem? No

What kind of change does this PR introduce? Bug fix

What is the current behavior? One-leg intern cells, which are intern cells which are displayed as a single vertical line, forces the corresponding busbars to be parallel, which used to lead to unexpected behaviour (mixing components on one of the two bars). Since PR #573, an exception is thrown.

Example of one-leg intern cell from unit tests: one-leg

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

Note that when splitting in two parts the subBlocks of the internCell, we favour the splitting based on LegBusSets as they can deal with complex subsections which contain more than one sectionIndex (e.g., two parallel busbars with different lengths).

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

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
94.8% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud