Add Barnes-Hut optimization to Atlas2 NAD layout#733
Merged
Conversation
This was used to push nodes away from the center of the edge between other nodes. The goal of this was to reduce edge crossing, but it just pushes edge crossings to the the side, instead of the middle of edges (not removing the edge at all). This is usually less readable because edge crossings are closer to actual nodes, and it also makes calculations longer. Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Also change Vector2D to a record to simplify the code 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>
Make a class for each way to calculate the force instead, store the artifacts needed for that in the class directly 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>
…to define SpringyAlgorithm Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
…r each time 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>
There is no optimization or post-processing yet, that will come later 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: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
…e not NO_CHILDREN Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Note: this creates a bit of code duplication Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
…list Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
The TODO was mentionned in the stoppingCriteria interface issue Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
flo-dup
requested changes
Mar 10, 2026
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
… construction Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
8 tasks
Signed-off-by: Nathan Dissoubray <nathan.dissoubray@rte-france.com>
…Barycenter) Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
Signed-off-by: NathanDissoubray <nathan.dissoubray@rte-france.com>
|
flo-dup
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
Closes #693
Waiting for the merge of #721
What kind of change does this PR introduce?
This PR adds a faster calculation of the repulsion force (known as Barnes-Hut) for Atlas2 in the NAD, which allows the bigger network like an 8k nodes to be done in less than 100s. Networks of less than 1000 nodes are done in less than 1s.
Those numbers do not include any potential post-processing (such as an overlap prevention, which might add 1 or 2 seconds of calculation on top of that).
What is the current behavior?
Networks of 8k nodes take about 2k-3k seconds, networks of 1k nodes take about 8s
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information: