Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Routing causes more than necessary lines for short distances (Read 3842 times)
Kim Lillås
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Aug 18th, 2016
Routing causes more than necessary lines for short distances
Nov 9th, 2016 at 11:39am
Print Post  
Hi,

Even with high values for the RoutingOptions.TurnCost, it creates an unnecessary turn for the simple example I attached.

If I move the left hand node one step further away, the routing is "correct" in the sense that it avoids the unnecessary extra turn.

Any idea what might be causing this behaviour for short distance links routings?

Note: The little black rectangle in the middle of the picture is a node, and there is a total of two links in the picture. It is the left hand link routing which is "wrong".
  

temp_002.png ( 5 KB | 127 Downloads )
temp_002.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Routing causes more than necessary lines for short distances
Reply #1 - Nov 10th, 2016 at 10:44am
Print Post  
Hi,

End points are selected before the actual evaluation of costs. I think it decides to move the link to the bottom of small rectangle because it's more in vertical direction than horizontal one in first image (dx < dy). If link segments adjacent to the small node should be always horizontal, try assigning anchor points to its left and right sides.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kim Lillås
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Aug 18th, 2016
Re: Routing causes more than necessary lines for short distances
Reply #2 - Nov 10th, 2016 at 11:05am
Print Post  
Hi,

Thanks for the answer. No, they do not have to be horizontal. The main thing is that it minimizes the amount of lines to reach its target.

I guess I could programmatically evaluate different anchor points and choose the one with the lowest routing cost. Is the routing cost publicly available?

//Kim
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Routing causes more than necessary lines for short distances
Reply #3 - Nov 10th, 2016 at 11:57am
Print Post  
Hi,

What are you using that node for? If it's just to force the link path through a specific location of the diagram, we could instead add some API to the LinkRouter classes for that.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kim Lillås
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Aug 18th, 2016
Re: Routing causes more than necessary lines for short distances
Reply #4 - Nov 10th, 2016 at 12:23pm
Print Post  
Hallo,

Right now it is a visualization of our "Connectivity Node", which is primarily used to connect 2 - n nodes together.

You can see an example in the picture where the connectivity node is used to connect 4 other nodes together.

I am free to manually move the connectivity node after it has been initially created.
  

temp_004.png ( 1 KB | 125 Downloads )
temp_004.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Routing causes more than necessary lines for short distances
Reply #5 - Nov 11th, 2016 at 12:14pm
Print Post  
Our developer will add some option to evaluate different end points for better costs. We should have an update next week.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Routing causes more than necessary lines for short distances
Reply #6 - Nov 16th, 2016 at 10:55am
Print Post  
Hi,

Try the RoutingOptions.EvaluateFarPoints option from this build -
https://mindfusion.eu/_beta/wpfdiag342.zip

It makes GridRouter evaluate points from all sides of link's nodes and select the route with lowest cost. Routing becomes much slower though; we'll try to optimize for official release.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint