Skip to content

Improve snakeline path in multi-substation SLD#730

Open
NathanDissoubray wants to merge 26 commits intomainfrom
betterSLDPath
Open

Improve snakeline path in multi-substation SLD#730
NathanDissoubray wants to merge 26 commits intomainfrom
betterSLDPath

Conversation

@NathanDissoubray
Copy link
Copy Markdown
Contributor

@NathanDissoubray NathanDissoubray commented Sep 16, 2025

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?

What kind of change does this PR introduce?

Improve the algorithm that draws the snakeline between stations.

What is the current behavior?

The snakelines tend to twist and turn without reason, or overlap which makes it less readable.

What is the new behavior (if this is a feature change)?
There is no more overlap. Snakelines turn only if there is actually an obstacle.

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)

com.powsybl.sld.layout.pathfinding.DijkstraPathFinder has been removed. Replace with com.powsybl.sld.layout.pathfinding.AStarPathFinder

Other information:

This gives better results but sadly it is also much slower (40~45s to run all SLD tests now). I'm working on a faster version, so we can merge this first or wait for the faster version and merge that directly. The branch with the faster version is on faster_a_star

Here are some visual comparison between the previous path finding algorithm and the one implemented here:
Old:
image

New:
image

I also added a class AvailabilityGridImageDisplayed to help debug this kind of algorithm using a grid. It is not strictly necessary, but it can be helpful (and it helped me debug actually). We can keep it for future use or remove it.

Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
…eas are available

Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
… state

Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
83.1% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
83.1% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

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

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

3 participants