From 7ee33d24488baeec47e94f091fac8b6a018d52f8 Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Wed, 20 Oct 2021 10:57:29 +0200 Subject: [PATCH] Tuning the force layout for larger graphs Signed-off-by: Florian Dupuy --- src/main/java/com/powsybl/nad/layout/ForcedLayout.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/powsybl/nad/layout/ForcedLayout.java b/src/main/java/com/powsybl/nad/layout/ForcedLayout.java index ca8a5627..639a44d1 100644 --- a/src/main/java/com/powsybl/nad/layout/ForcedLayout.java +++ b/src/main/java/com/powsybl/nad/layout/ForcedLayout.java @@ -22,7 +22,8 @@ public class ForcedLayout implements Layout { @Override public void run(Graph graph, LayoutParameters layoutParameters) { - ForceLayout forceLayout = new ForceLayout<>(graph.toJgrapht()); + ForceLayout forceLayout = new ForceLayout<>(graph.toJgrapht()) + .setMaxSpeed(1e3); forceLayout.execute(); double[] dims = new double[4];