Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Eclipse Layout Kernel » [ELK] SOUTH ports and NORTH ports are overlapped
[ELK] SOUTH ports and NORTH ports are overlapped [message #1790601] Wed, 13 June 2018 12:15 Go to next message
lee lucky is currently offline lee luckyFriend
Messages: 22
Registered: October 2017
Junior Member
Hi,
In my diagram, I have a compound node container which has several children, including its ports and children node containers. When my parent node container has SOUTH or NORTH ports, which are unconnected and have no edges, these SOUTH and NORTH ports are overlapped.
I have no idea about when these SOUTH and NORTH ports ' position are fixed. Can you give me some hints or tell me how to fix this issue?
I use this property: HierarchyHandling.INCLUDE_CHILDREN

Thanks and hope for your reply.
Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790754 is a reply to message #1790601] Fri, 15 June 2018 15:50 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 79
Registered: September 2015
Member
Hi there,

could you illustrate with a screenshot? Also, which version of ELK are you running?

Cheers,
Chris
Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790846 is a reply to message #1790754] Tue, 19 June 2018 03:16 Go to previous messageGo to next message
Nicholas Kong is currently offline Nicholas KongFriend
Messages: 54
Registered: July 2016
Location: China
Member
Hi Daniel,
Thanks for your replay.

I attach the screenshot and our ELK version is V0.2.2.
index.php/fa/33160/0/

More information as lee lucky said.

Thanks,
Nicholas Kong

[Updated on: Tue, 19 June 2018 03:17]

Report message to a moderator

Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790889 is a reply to message #1790846] Tue, 19 June 2018 17:04 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 79
Registered: September 2015
Member
Nicholas,

thanks for providing more details. I've tried to reproduce your graph as follows:

hierarchyHandling: INCLUDE_CHILDREN

node parent {
	portConstraints: FIXED_SIDE
	
	port W1 { ^port.side: WEST }
	port S1 { ^port.side: SOUTH }
	port S2 { ^port.side: SOUTH }
	
	node child {
		port P
		
		node innermost
	}
	
	edge W1 -> child.P
}


With the current version of ELK (0.4.0), this graph is laid out like this:

index.php/fa/33170/0/

Either I have missed some particular configuration that leads to the problem you observe, or it is due to a bug in 0.2.2 that we have since fixed.

Cheers,
Chris
Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790918 is a reply to message #1790889] Wed, 20 June 2018 09:03 Go to previous messageGo to next message
lee lucky is currently offline lee luckyFriend
Messages: 22
Registered: October 2017
Junior Member
Hi,
Thanks for your reply. I tried it in ELK 0.4.0, the south and north ports are not overlapped, but they are overlapped in ELK 0.2.2, it is a bug in 0.2.2, and 0.4.0 has already fixed it. Sorry about that.
Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790921 is a reply to message #1790918] Wed, 20 June 2018 09:07 Go to previous messageGo to next message
Christoph Daniel Schulze is currently offline Christoph Daniel SchulzeFriend
Messages: 79
Registered: September 2015
Member
No worries, glad it works for you. :)
Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790925 is a reply to message #1790889] Wed, 20 June 2018 09:33 Go to previous messageGo to next message
lee lucky is currently offline lee luckyFriend
Messages: 22
Registered: October 2017
Junior Member
Hi,
I use ELK 0.4.0 with the following properties to layout my diagram, I met an exception:
Properties:
.setProperty(CoreOptions.ALGORITHM, "org.eclipse.elk.alg.layered")
.setProperty(CoreOptions.DIRECTION, Direction.RIGHT)
.setProperty(CoreOptions.PORT_LABELS_PLACEMENT, PortLabelPlacement.INSIDE)
.setProperty(LayeredOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE)
.setProperty(CoreOptions.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.MINIMUM_SIZE_ACCOUNTS_FOR_PADDING))
.setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, EnumSet.allOf(SizeConstraint.class))
.setProperty(CoreOptions.NODE_LABELS_PLACEMENT, NodeLabelPlacement.insideTopCenter())
.setProperty(LayeredOptions.MERGE_EDGES, true).setProperty(LayeredOptions.MERGE_HIERARCHY_EDGES, true)
.setProperty(CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN);

Exception:
java.lang.NullPointerException
	at org.eclipse.elk.alg.layered.p3order.AbstractBarycenterPortDistributor.updateNodePositions(AbstractBarycenterPortDistributor.java:325)
	at org.eclipse.elk.alg.layered.p3order.AbstractBarycenterPortDistributor.distributePortsWhileSweeping(AbstractBarycenterPortDistributor.java:85)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepReducingCrossings(LayerSweepCrossingMinimizer.java:248)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepInHierarchicalNode(LayerSweepCrossingMinimizer.java:287)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepInHierarchicalNodes(LayerSweepCrossingMinimizer.java:266)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepReducingCrossings(LayerSweepCrossingMinimizer.java:250)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.minimizeCrossingsWithCounter(LayerSweepCrossingMinimizer.java:200)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.compareDifferentRandomizedLayouts(LayerSweepCrossingMinimizer.java:185)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.lambda$1(LayerSweepCrossingMinimizer.java:131)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.minimizeCrossings(LayerSweepCrossingMinimizer.java:143)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.process(LayerSweepCrossingMinimizer.java:121)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.process(LayerSweepCrossingMinimizer.java:1)
	at org.eclipse.elk.alg.layered.ElkLayered.hierarchicalLayout(ElkLayered.java:241)
	at org.eclipse.elk.alg.layered.ElkLayered.doCompoundLayout(ElkLayered.java:182)
	at org.eclipse.elk.alg.layered.LayeredLayoutProvider.layout(LayeredLayoutProvider.java:58)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.executeAlgorithm(RecursiveGraphLayoutEngine.java:222)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layoutRecursively(RecursiveGraphLayoutEngine.java:197)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layout(RecursiveGraphLayoutEngine.java:76)
	at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:718)
	at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:650)
	at org.eclipse.elk.core.service.DiagramLayoutEngine$1.execute(DiagramLayoutEngine.java:400)
	at org.eclipse.elk.core.service.util.MonitoredOperation$1.run(MonitoredOperation.java:236)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)


In my source codes, I just customized my port side according to my semantic model information, and I did not changed the source codes of ELK 0.4.0.
I have found that if "LayeredOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE" and "CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN" both exist, the exception will occur, Do you met this kind of problem? Did I have something wrong with my configuration or it is a bug? Please give me some suggestions.
Thanks and hope for your reply.

[Updated on: Wed, 20 June 2018 09:35]

Report message to a moderator

Re: [ELK] SOUTH ports and NORTH ports are overlapped [message #1790928 is a reply to message #1790921] Wed, 20 June 2018 09:53 Go to previous message
lee lucky is currently offline lee luckyFriend
Messages: 22
Registered: October 2017
Junior Member
Hi,
I use ELK 0.4.0 with the following properties to layout my diagram, I met an exception:
Properties:
.setProperty(CoreOptions.ALGORITHM, "org.eclipse.elk.alg.layered")
.setProperty(CoreOptions.DIRECTION, Direction.RIGHT)
.setProperty(CoreOptions.PORT_LABELS_PLACEMENT, PortLabelPlacement.INSIDE)
.setProperty(LayeredOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE)
.setProperty(CoreOptions.NODE_SIZE_OPTIONS, EnumSet.of(SizeOptions.MINIMUM_SIZE_ACCOUNTS_FOR_PADDING))
.setProperty(CoreOptions.NODE_SIZE_CONSTRAINTS, EnumSet.allOf(SizeConstraint.class))
.setProperty(CoreOptions.NODE_LABELS_PLACEMENT, NodeLabelPlacement.insideTopCenter())
.setProperty(LayeredOptions.MERGE_EDGES, true).setProperty(LayeredOptions.MERGE_HIERARCHY_EDGES, true)
.setProperty(CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN);

Exception:
java.lang.NullPointerException
	at org.eclipse.elk.alg.layered.p3order.AbstractBarycenterPortDistributor.updateNodePositions(AbstractBarycenterPortDistributor.java:325)
	at org.eclipse.elk.alg.layered.p3order.AbstractBarycenterPortDistributor.distributePortsWhileSweeping(AbstractBarycenterPortDistributor.java:85)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepReducingCrossings(LayerSweepCrossingMinimizer.java:248)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepInHierarchicalNode(LayerSweepCrossingMinimizer.java:287)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepInHierarchicalNodes(LayerSweepCrossingMinimizer.java:266)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.sweepReducingCrossings(LayerSweepCrossingMinimizer.java:250)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.minimizeCrossingsWithCounter(LayerSweepCrossingMinimizer.java:200)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.compareDifferentRandomizedLayouts(LayerSweepCrossingMinimizer.java:185)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.lambda$1(LayerSweepCrossingMinimizer.java:131)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.minimizeCrossings(LayerSweepCrossingMinimizer.java:143)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.process(LayerSweepCrossingMinimizer.java:121)
	at org.eclipse.elk.alg.layered.p3order.LayerSweepCrossingMinimizer.process(LayerSweepCrossingMinimizer.java:1)
	at org.eclipse.elk.alg.layered.ElkLayered.hierarchicalLayout(ElkLayered.java:241)
	at org.eclipse.elk.alg.layered.ElkLayered.doCompoundLayout(ElkLayered.java:182)
	at org.eclipse.elk.alg.layered.LayeredLayoutProvider.layout(LayeredLayoutProvider.java:58)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.executeAlgorithm(RecursiveGraphLayoutEngine.java:222)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layoutRecursively(RecursiveGraphLayoutEngine.java:197)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layout(RecursiveGraphLayoutEngine.java:76)
	at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:718)
	at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:650)
	at org.eclipse.elk.core.service.DiagramLayoutEngine$1.execute(DiagramLayoutEngine.java:400)
	at org.eclipse.elk.core.service.util.MonitoredOperation$1.run(MonitoredOperation.java:236)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)


In my source codes, I just customized my port side according to my semantic model information, and I did not changed the source codes of ELK 0.4.0.
I have found that if "LayeredOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE" and "CoreOptions.HIERARCHY_HANDLING, HierarchyHandling.INCLUDE_CHILDREN" both exist, the exception will occur, Do you met this kind of problem? Did I have something wrong with my configuration or it is a bug? Please give me some suggestions.
Thanks and hope for your reply.
Previous Topic:Sub nodes inside container are overlapping
Next Topic:[ELK] NPE exception in ELK 0.4.0
Goto Forum:
  


Current Time: Tue Sep 25 11:08:42 GMT 2018

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

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

Back to the top