Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » compartment positions and smarter edge routing
compartment positions and smarter edge routing [message #1772547] Tue, 12 September 2017 09:15 Go to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
Hello,

i've currently implemented a graph which needs nodes with 2 different compartments which contain childs.

Is it possible to define a specific node placing or an orientation of the nodes? Is it possible to shorten long edges?

My layouting result is attached.
- Red lines are my opinion of shortened edge routing
- Blue lines with text are showing the two compartments

The two compartments are layouted horizontally, but i need them in vertical order. The small compartment (Compartment 1) in the right side should be above the other compartment (Compartment 2).

There is also a problem with the edge routing. In this example graph i've discovered 3 easy edges, which could be routed shorter. (3 red lines)

I'm using the layered layouting algorithm with the following properties (only regarding my problem):
LayeredMetaDataProvider.LAYERING_STRATEGY = LayeringStrategy.NETWORK_SIMPLEX

CoreOptions.EDGE_ROUTING = EdgeRouting.ORTHOGONAL
LayeredMetaDataProvider.MERGE_EDGES = true
LayeredMetaDataProvider.MERGE_HIERARCHY_EDGES = true

Thank you in advance.
  • Attachment: layoutRes.png
    (Size: 37.52KB, Downloaded 191 times)

[Updated on: Tue, 12 September 2017 09:19]

Report message to a moderator

Re: compartment positions and smarter edge routing [message #1772557 is a reply to message #1772547] Tue, 12 September 2017 11:23 Go to previous messageGo to next message
Miro Spönemann is currently offline Miro SpönemannFriend
Messages: 78
Registered: March 2015
Location: Kiel, Germany
Member

Could the results of Alan's Master Thesis improve the situation here?

http://rtsys.informatik.uni-kiel.de/%7Ebiblio/downloads/theses/alan-mt.pdf
Re: compartment positions and smarter edge routing [message #1772558 is a reply to message #1772557] Tue, 12 September 2017 11:37 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
i will check it, thank you.
Re: compartment positions and smarter edge routing [message #1772628 is a reply to message #1772558] Wed, 13 September 2017 08:50 Go to previous messageGo to next message
Ulf Rueegg is currently offline Ulf RueeggFriend
Messages: 26
Registered: February 2010
Junior Member
If I understand your problem correctly, it is not related to crossing minimization as suggested by Miro.

You could set a DOWN layout direction on the node containing the two compartments, although I'm not sure if that's what you want.

Regarding the red lines: Whenever an edge crosses the boundary of a node, internally a port is introduced. Layout is performed bottom-up. Thus, when Compartment 1 is laid out, for instance, the introduced ports have to fixed somehow. The default behavior is that for a left-to-right layout direction ports for "incoming edges" are placed on the WEST side, for "outgoing edges" on the EAST side. That's the reason why the edges take the long detours.

I'm not sure how well your use case can be solved by setting proper layout options. If you can share an elkg or elkt file with your graph's structure, I could give it a try.
Re: compartment positions and smarter edge routing [message #1772683 is a reply to message #1772547] Wed, 13 September 2017 20:00 Go to previous messageGo to next message
Mehmet Karaman is currently offline Mehmet KaramanFriend
Messages: 63
Registered: November 2012
Location: Berlin
Member
Thank you for your help. Setting the direction explicitly to "down" worked. I've exported the Elk Graph model and attached it. The problem regarding edge routing still remains.
  • Attachment: Graph.kgraph
    (Size: 92.65KB, Downloaded 247 times)
Re: compartment positions and smarter edge routing [message #1773000 is a reply to message #1772683] Wed, 20 September 2017 06:12 Go to previous message
Ulf Rueegg is currently offline Ulf RueeggFriend
Messages: 26
Registered: February 2010
Junior Member
This is quite a hard problem.

First of all,
my suggestion regarding the layout direction
is only partly a solution.
You require hierarchical layout (hierarchyHandlung: INCLUDE_CHILDREN)
as you have edges that cross multiple hierarchies.
In that case, only a single (global) layout direction is supported,
i.e. if you set it to RIGHT at the root node, the whole graph will be laid out rightwards.


The issue with the edges originates
from the fact that
edges are routed somewhat simultaneously
to the placement of nodes.

Horizontal red line:
This is an unfortunate
outcome originating
from the interplay
between crossing minimization (phase 3)
and node placement (phase 4).
The crossing minimization
decides the vertical order of the edge segments,
and cannot know about 'edge length',
since the subsequent node placement
phase decides which edge to draw straight

Vertical red lines:
Edges that cross the boundary of a
hierarchical node
are split using dummy ports.
The default behavior to position
these dummy ports is
to place ports
through which edges are "incoming" on the west side,
and "outgoing" ports on the east side.
This results in the elongated 'back-and-forth' edges.

We encountered both points before;
they surely are something that should be improved.
However, I'm not sure that we'll have the
time to look into these issues in the near future.
Previous Topic:Two-step undo for Sirius
Next Topic: Eclipse ELK vs GEF
Goto Forum:
  


Current Time: Thu Apr 25 15:45:32 GMT 2024

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

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

Back to the top