Skip to content
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

Add parameter to disable/enable internal 2wt #594

Merged
merged 6 commits into from Mar 15, 2024

Conversation

flo-dup
Copy link
Contributor

@flo-dup flo-dup commented Mar 13, 2024

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)

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

What kind of change does this PR introduce?
Bug fix / feature

What is the current behavior?
Internal two-winding transformers and phase-shift transformers are added in VoltageLevelGraph as EquipmentNodes, hence are withing an InternCell or ExternCell.

What is the new behavior (if this is a feature change)?
Internal two-winding transformers and phase-shift transformers are added in VoltageLevelGraph as FeederNodes, but can be later replaced by EquipmentNodes with VoltageLevelLayoutFactoryParameter::setSubstituteInternalMiddle2wtByEquipmentNodes`. This parameter is true by default.

Other information:
NetworkGraphBuilder::handleConnectedComponents (together with child method NetworkGraphBuilder::ensureOneBusInConnectedComponent) needed to move to GraphRefiner in order not to interfere with this feature

Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
So-Fras and others added 2 commits March 14, 2024 13:23
Signed-off-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com>
// Run layout with specific parameters and compare subsequent SVG with reference
PositionVoltageLevelLayoutFactoryParameters pvllfParameters = new PositionVoltageLevelLayoutFactoryParameters()
.setSubstituteInternalMiddle2wtByEquipmentNodes(false);
new PositionVoltageLevelLayoutFactory(new PositionFromExtension(), pvllfParameters).create(g).run(this.layoutParameters);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
new PositionVoltageLevelLayoutFactory(new PositionFromExtension(), pvllfParameters).create(g).run(this.layoutParameters);
new PositionVoltageLevelLayoutFactory(pvllfParameters).create(g).run(this.layoutParameters);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer to put this explicitly, as this default choice does not seem clear to me. And I'd like to remove one day that constructor which assumes that it should be a PositionFromExtension by default (without any javadoc specifying it!)

…/powsybl/sld/iidm/TestInternalBranchesNodeBreaker.java

Co-authored-by: Sophie Frasnedo <93923177+So-Fras@users.noreply.github.com>
Signed-off-by: Florian Dupuy <66690739+flo-dup@users.noreply.github.com>
Copy link

sonarcloud bot commented Mar 15, 2024

@So-Fras So-Fras merged commit 820c459 into main Mar 15, 2024
6 checks passed
@So-Fras So-Fras deleted the disable_internal_2wt_parameter branch March 15, 2024 12:15
@So-Fras So-Fras moved this from In progress to Done in 4.3.0 Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
4.3.0
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants