Closed uruuru closed 4 years ago
I just tried reproducing this, but it works for me, both when I test this manually and when I push it through the BasicCycleBreakerTest
. Is there anything I have to configure for it to reproduce the issue?
I can't get my Eclipse setup working but the build still complains after a rebase (although that may be a different issue):
2020-06-18T11:28:24.1708891Z testIsAcyclic (21766)(org.eclipse.elk.alg.layered.p1cycles.BasicCycleBreakerTest) Time elapsed: 0 s
2020-06-18T11:28:24.1709559Z algorithm(org.eclipse.elk.layered) defaults(nodes, ports, edges) layoutConfigurator(depthFirstConfigurator) graphFile(/home/runner/work/elk/elk/elk-models/realworld/ptolemy/hierarchical/tdl_activerearsteeringct_ActiveRearSteeringCT.elkg) Time elapsed: 0.02 s <<< FAILURE!
2020-06-18T11:28:24.1709719Z java.lang.AssertionError
The model I posted above does, in fact, work for me as well by now. Were your changes to the layer constraint processor in the meantime and may have altered the behavior?
EDIT: the tests only fails for CycleBreakingStrategy.DEPTH_FIRST
, as does the small example above for me.
I boiled down the graph to this, which reproduces the error in my installation:
node N1 {
cycleBreaking.strategy: DEPTH_FIRST
port P1_1
node N2 {
port P2_1
port P2_2
}
node N3 {
port P3_1
port P3_2
}
node N4 {
port P4_1
}
node N5 {
port P5_1
port P5_2
}
edge N2.P2_2 -> P1_1
edge N3.P3_2 -> N2.P2_1
edge N4.P4_1 -> P1_1
edge N4.P4_1 -> N5.P5_1
edge N5.P5_2 -> N3.P3_1
}
For some reason, the cycle breaker decides to reverse the edge from N2.P2_2
to the external port. Thus, the external port has an outgoing edge, which triggers the assertion. It remains to be checked why that happens.
Issue occurred during hierarchical tests.
I was able to reduce the problematic graph to the following. The issue is that a last separate node has an outgoing edge. Maybe it's a problematic combination of external port dummy and inverted port dummy.