Skip to content

Conversation

etiennehomer
Copy link
Contributor

No description provided.

ghazwarhili and others added 29 commits September 15, 2025 13:16
Signed-off-by: Etienne Homer <[email protected]>
Signed-off-by: Etienne Homer <[email protected]>
Signed-off-by: Etienne Homer <[email protected]>
# Conflicts:
#	src/main/java/org/gridsuite/network/map/dto/definition/extension/BusbarSectionFinderTraverser.java
Signed-off-by: Etienne Homer <[email protected]>
Signed-off-by: Etienne Homer <[email protected]>
Signed-off-by: Etienne Homer <[email protected]>
@etiennehomer etiennehomer changed the title [WIP] [POC] Save paths throw one traverse Enhance busbar sections retrieval – rework BusbarSectionFinderTraverser Oct 6, 2025

private Network network;

public static void createSwitch(VoltageLevel vl, String id, SwitchKind kind, boolean open, int node1, int node2) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

make public createSwitch() from NetworkMapControllerTest and use it

Copy link
Contributor

Choose a reason for hiding this comment

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

done

*/

@SpringBootTest
public class BusbarSectionFinderTraverserTest {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can remove ConnectablePosition and BusbarSectionPosition from all the equipments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok no. The SLD is dirty without the position. Let's keep it

Copy link
Contributor

Choose a reason for hiding this comment

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

ConnectablePosition removed

}

@Test
void testWithClosedSwitch() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
void testWithClosedSwitch() {
void testWithClosedLastSwitch() {

Copy link
Contributor

Choose a reason for hiding this comment

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

done

network.getSwitch("DISC_BUS1_1").setOpen(false);
Line line11 = network.getLine("LINE_1_1");
Line line21 = network.getLine("LINE_2_1");
BusbarSectionFinderTraverser.BusbarSectionResult result11 = BusbarSectionFinderTraverser.getBusbarSectionResult(line11.getTerminal1());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove this traverse ? it's AllClosedSwitch and it's almost the same as the traverse below

Copy link
Contributor

Choose a reason for hiding this comment

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

done

}

@Test
void testWithOpenSwitch() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
void testWithOpenSwitch() {
void testWithOpenLastSwitch() {

Copy link

sonarqubecloud bot commented Oct 6, 2025

@ghazwarhili ghazwarhili merged commit c043004 into main Oct 6, 2025
4 checks passed
@ghazwarhili ghazwarhili deleted the save_Traverser branch October 6, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants