eclipse / elk

Eclipse Layout Kernel - Automatic layout for Java applications.
https://www.eclipse.org/elk/
Other
258 stars 86 forks source link

[Question]: Configure Edge to Edge Spacing for Libavoid #1056

Open maxmrzk opened 3 months ago

maxmrzk commented 3 months ago

Im Routing connections with the libavoid layout algortihm. When doing so, sometimes Routes overlap instead of taking a different Path, even though there is enough space for the routes to be laid out. I'm looking for a configuration like CoreOptions.EdgeSpacing to set a fixed spacing distance for edges. The libavoid layout provider does not seem to take this option into account as it is not part of the algorithms routing parameters.

My current configuration, applied to parents, looks like this: this.configurator.configure(ElkNode.class) .setProperty(LibavoidOptions.CROSSING_PENALTY, PATH_CROSSING_PENALTY) .setProperty(LibavoidOptions.FIXED_SHARED_PATH_PENALTY, SHARED_PATH_PENALTY) .setProperty(LibavoidOptions.IDEAL_NUDGING_DISTANCE, IDEAL_NUDGING_DISTANCE); I also tried playing around with the other configuration options (also just increasing the penalty values) for libavoid mentioned in Reference, but none of them fully prevented this corner case behavior.

I know that this seems to be a very specific problem, and i am definetly not asking you to fix my code, but maybe there is an obvious fix for this, that im just missing. Should the libavoid process normally take edge to edge Spacing from the core options into account ?

Expected behavior Routes always have enough spacing between them, so they are viusally distinct. (Given that there is enough Routing Space)

Screenshots Sometimes: routesOnTop Expected: routeSeperate

Additional context Resulting BendingPoints of the two overlapping Routes in the picture: Edge(1): Start: (5101.91,184.417) BP: (5118.41,184.417) BP: (5118.41,79.4167) BP: (4373.91,79.4167) BP: (4373.91,776.321) BP: (228.41,776.321) BP: (228.41,142.321) End: (286.91,142.321) Edge(2): Start: (5101.91,190.417) BP: (5148.41,190.417) BP: (5148.41,79.4167) BP: (4346.91,79.4167) BP: (4346.91,372.417) BP: (3588.91,372.417) BP: (3588.91,79.4167) BP: (2097.41,79.4167) BP: (2097.41,190.417) End: (2113.91,190.417)

Eddykasp commented 3 months ago

I'm not sure what could be causing this issue. Do you have an example graph that reproduces this problem that we could use to look into this?

maxmrzk commented 3 months ago

Hi, thanks for the quick reply. Here is a test graph, this is the smallest one on which I was able to reproduce this problem. It would be enough for me to know, if there is an intended configuration to enforce spacing between two edges, when using the libavoid routing algorithm. samplegraph.json