elk icon indicating copy to clipboard operation
elk copied to clipboard

Collected issues when using interactive layout constraint

Open soerendomroes opened this issue 3 years ago • 0 comments

/* Demonstrates port merging on a flat graph.
 */

de.cau.cs.kieler.algorithm: layered
de.cau.cs.kieler.klay.layered.mergeEdges: true
de.cau.cs.kieler.kgraphsynthesis.defaults: true
org.eclipse.elk.interactiveLayout: true
org.eclipse.elk.layered.nodePlacement.strategy: BRANDES_KOEPF
org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment: BALANCED
org.eclipse.elk.layered.considerModelOrder.strategy: PREFER_EDGES

node n1 {
	crossingMinimization.inLayerPredOf: n5
} edge n1 -> n4
node n2 {
	crossingMinimization.positionChoiceConstraint: 0
	layering.layerChoiceConstraint: 5
} edge n2 -> n4
node n3 {
	crossingMinimization.inLayerSuccOf: n7
} edge n3 -> n4

node n4
edge n4 -> n5
edge n4 -> n6
edge n4 -> n7

node n5 {
	crossingMinimization.positionChoiceConstraint: 1
	layering.layerChoiceConstraint: 4
} node n6 node n7 {
	crossingMinimization.positionChoiceConstraint: 0
	layering.layerChoiceConstraint: 3
}

flat When moving n7 on the position under n3 (absolute constraint) an exception occurs.

java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 4\     at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)\     at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)\     at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)\     at java.base/java.util.Objects.checkIndex(Objects.java:372)\     at java.base/java.util.ArrayList.get(ArrayList.java:459)\     at org.eclipse.elk.alg.layered.InteractiveLayeredGraphVisitor.shiftOtherNodes(InteractiveLayeredGraphVisitor.java:360)\     at org.eclipse.elk.alg.layered.InteractiveLayeredGraphVisitor.assignLayersToNodesWithRC(InteractiveLayeredGraphVisitor.java:299)\     at org.eclipse.elk.alg.layered.InteractiveLayeredGraphVisitor.calcLayer

Use this issue to track similar problems with the interactive mode.

soerendomroes avatar Nov 07 '22 16:11 soerendomroes