Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Hierarchy crossing edges with multiple layout runs
Hierarchy crossing edges with multiple layout runs [message #1787052] Thu, 17 May 2018 21:40 Go to next message
Mats Wilhelm is currently offline Mats WilhelmFriend
Messages: 2
Registered: January 2018
Junior Member
Hey guys,

i currently try to layout a graph with edges that transcend hierarchy boundaries where each hierarchical node needs to be laid out with a different algorithm.

Here's an example graph:
index.php/fa/32845/0/

The aim is to layout nodes 1,2 and 3 with an algorithm like "org.eclipse.elk.layered" and node 4 and other nodes inside node 3 with e.g. "org.eclipse.elk.mrtree".

I was thinking about different approaches, maybe someone can eliminate or encourage one of those or give a new suggestion :-)

1. Current implementation:
- A Layout run for each hierarchical node. Hierarchy handling set to separate children.
- Result: Ignores edges that cross hierarchy boundaries while everything else works.
2.
- Like 1., but with a final layout run with algorithm "org.eclipse.elk.layered". Then fix every nodes position and only apply edge bend points.
3.
- A Layout run for each hierarchical node. Hierarchy handling set to include children.
- Result: Only the last run's result is visible after layout. Is there a possibility "clearLayout" option can change something here?
4.
- Like 1., but with hierarchy handling set to include children and include the incoming/outgoing edges of nodes in that layer and their corresponding second node too.

Thank you very much for the help!
With kind regards
Mats
  • Attachment: Example.png
    (Size: 4.07KB, Downloaded 74 times)
Re: Hierarchy crossing edges with multiple layout runs [message #1787062 is a reply to message #1787052] Fri, 18 May 2018 08:00 Go to previous message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 80
Registered: September 2015
Member
Hi Mats!

Mats Wilhelm wrote on Thu, 17 May 2018 21:40
I was thinking about different approaches, maybe someone can eliminate or encourage one of those or give a new suggestion :-)


Sure, here we go. ;)

Mats Wilhelm wrote on Thu, 17 May 2018 21:40
1. Current implementation:
- A Layout run for each hierarchical node. Hierarchy handling set to separate children.
- Result: Ignores edges that cross hierarchy boundaries while everything else works.


True hierarchy-crossing edges are only supported by few layout algorithms (only ELK Layered, to be exact), and only if hierarchy handling is configured to include children. This is because the layout algorithm needs to have control over all involved levels of hierarchy to be able to route the edges properly.

Mats Wilhelm wrote on Thu, 17 May 2018 21:40
2.
- Like 1., but with a final layout run with algorithm "org.eclipse.elk.layered". Then fix every nodes position and only apply edge bend points.


It's highly unlikely that this will give proper results. There is currently no way to configure ELK Layered to only compute bend points, and even if you only applied the bend points they would not fit the node positions.

Mats Wilhelm wrote on Thu, 17 May 2018 21:40
3.
- A Layout run for each hierarchical node. Hierarchy handling set to include children.
- Result: Only the last run's result is visible after layout. Is there a possibility "clearLayout" option can change something here?


This will indeed always reset the layout of hierarchical nodes included in other hierarchical nodes. It's not a viable option either.

Mats Wilhelm wrote on Thu, 17 May 2018 21:40
4.
- Like 1., but with hierarchy handling set to include children and include the incoming/outgoing edges of nodes in that layer and their corresponding second node too.


I'm actually not sure what you mean by "include the incoming/outgoing edges of nodes in that layer and their corresponding second node too." ;)

In the long run, an ideal solution would be to simply ignore hierarchical edges, set hierarchy handling to separate children, and to run an edge routing algorithm on the hierarchical edges. Alas, we don't have a dedicated edge routing algorithm yet (it's high on our to do list, but we'll have to find somebody to implement one since that's not exactly a trivial enterprise). So for the time being, one option would be something that we do in these cases in our applications:


  1. Configure hierarchy handling to separate children to have every hierachical node laid out by the intended algorithm. Ignore hierarchical edges for now.
  2. When applying the layout results in your layout connector, look for the hierarchical edges and manually compute their end points such that they directly connect their source to their target.


See this method for an example of how we implemented such a solution.

Hope this helps!

Cheers,
Chris
Previous Topic:Routing independent of layout
Next Topic:[ELK] The port side does not match with the port position value
Goto Forum:
  


Current Time: Sat Nov 17 06:18:25 GMT 2018

Powered by FUDForum. Page generated in 0.02488 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top