Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » Compound node layout(Difference in layout when using compound node)
Compound node layout [message #1793705] Tue, 14 August 2018 11:27 Go to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
Hi,

I have a graph which consists of several nodes which are connected to another set of nodes, but will never be interconnected between themselves.
A simple example is shown here:
index.php/fa/33632/0/

The three nodes on the left are connected to 1 or more nodes, but can never be connected to eachother.

I wanted to make a clear distinction between these 2 'types' of nodes by adding a parent node around the nodes, as shown here:
index.php/fa/33634/0/

After adding the parent node, the boundary between the nodes was layouted completely different, I assume it has something to do with the routing of hierarchical nodes. Are there options I can set on the graph/edges so a similar layout is generated with or without the parent node?

Best regards,
Christophe

[Updated on: Tue, 14 August 2018 11:30]

Report message to a moderator

Re: Compound node layout [message #1793707 is a reply to message #1793705] Tue, 14 August 2018 11:47 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Hi Christophe!

I'm not sure what you mean by "the boundary between the nodes was layouted completely different", but yes, introducing hierarchy into a diagram fundamentally changes the layout problem and can thus yield vastly different results. Also, hierarchy-crossing edges are not supported without setting additional options.

One thing you may thus want to try though is setting hierarchy handling to INCLUDE_CHILDREN on the outermost node. Usually, our layout algorithm would first layout the content of your hierarchical node and then layout the graph the hierarchical node is contained in. Setting this option makes it layout the whole graph at once, thus also providing support for hierarchy-crossing edges.

Hope this helps!

Cheers,
Chris
Re: Compound node layout [message #1793805 is a reply to message #1793707] Thu, 16 August 2018 06:43 Go to previous messageGo to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
Hi Chris,

Thanks for the quick reply. I was already using INCLUDE_CHILDREN setting on the outermost node. With this, I would expect the layout of the graph to be identical to a flat graph structure (without hierarchical nodes), but this isn't the case. It seems to me the hierarchical edges are given way less priority compared to the other edges.

Best regards,
Christophe
Re: Compound node layout [message #1793807 is a reply to message #1793805] Thu, 16 August 2018 07:38 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Christophe De Loor wrote on Thu, 16 August 2018 06:43
With this, I would expect the layout of the graph to be identical to a flat graph structure

Sadly, that's not how things work. Layout involving hierarchical nodes is a lot more complicated than the layout of a flat graph.

If you show us an example layout as produced by ELK we might be able to suggest different settings.
Re: Compound node layout [message #1793826 is a reply to message #1793807] Thu, 16 August 2018 14:49 Go to previous messageGo to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
Hi Chris,

Attached are 2 images, one where hierarchical layout is used (the parent node is not rendered, so I've added it as a red rectangle), and one with a flat layout.

The boundary between the 4 nodes on the left and the rest of the graph is very different between the 2 cases, ideally I'd like them to be identical.

Maybe some background on why I've added the hierarchical node: I want to show several nodes always on the left side of the graph, using a hierarchical node which contains the rest of the graph realises this.

Best regards,
Christophe
Re: Compound node layout [message #1794092 is a reply to message #1793826] Thu, 23 August 2018 12:12 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
Christophe De Loor wrote on Thu, 16 August 2018 14:49
Maybe some background on why I've added the hierarchical node: I want to show several nodes always on the left side of the graph, using a hierarchical node which contains the rest of the graph realises this.


I was hoping for something like this. :) We have a setting to constrain nodes to the left or right boundary of the graph: the layer constraint. Set it to FIRST on the nodes that should appear on the left side and see if that does what you're trying to accomplish through hierarchy.

Cheers,
Chris
Re: Compound node layout [message #1794141 is a reply to message #1794092] Fri, 24 August 2018 09:44 Go to previous messageGo to next message
Christophe De Loor is currently offline Christophe De LoorFriend
Messages: 9
Registered: May 2018
Junior Member
Thanks for the help.

It does work more or less, but my graph can also contain disjunct graphs, and then the graphs are shown side by side (see this topic I made previously: https://www.eclipse.org/forums/index.php/t/1093514/) .

I was able to solve this issue by adding a stub node which connects all the components I want to show on the left, together with setting shortness priority setting on the edges connected to the stub node. However, with bigger graphs, this doesn't work consistently anymore + the graph was shifted more and more to the right by the amount of edges connected to the stub node.

Christophe
Re: Compound node layout [message #1794142 is a reply to message #1794141] Fri, 24 August 2018 09:50 Go to previous message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 98
Registered: September 2015
Member
You can turn off disconnected graphs processing by setting the separate connected components option to false.

Cheers,
Chris
Previous Topic:NULL pointer when opening sirius diagram firstly
Next Topic:How Customized ELK to fit Sirius application?
Goto Forum:
  


Current Time: Fri Apr 19 13:24:30 GMT 2024

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

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

Back to the top