Is there a bug in the routing? September 25, 2009, 03:42:43 pm HiI'm wondering if there's a bug in the route calculations or is this done by design?I've a transport that travels loaded from A to B and then back again empty. When it's empty it travels by the shortest route; but when it's full it takes a roue that must be twice as long as the shortest route.Here's a screen shot. The outbound route (loaded) is marked in red, the return route is marked in green.Any idea why it's doing this?RegardsDavid Quote Selected
Re: Is there a bug in the routing? Reply #1 – September 25, 2009, 03:58:17 pm Your screenshot has not been attached. I suspect, however, that this is caused by the weight limits: a convoy will always avoid a route for which it is too heavy, and it may well be the case that the shortest route is one for which it is too heavy only when it is loaded. Quote Selected
Re: Is there a bug in the routing? Reply #2 – September 25, 2009, 05:40:58 pm Hi JamesThanks for your reply. However the roiute the convoy takes when loaded covers poorer quality dirt road than the return journey which is all on coblestome road. I think that both these two have the same weight limit of 80tonne?What happened to that screen shot I linked too? Let's try that again: Quote Selected
Re: Is there a bug in the routing? Reply #3 – September 25, 2009, 10:06:55 pm That does seem somewhat odd. However, apart from weight limits, there has been no change to the code for the routing of vehicles in Simutrans-Experimental. Are you sure that you don't have a waypoint set? If this is a bug, it might well be in Simutrans-Standard, too. Quote Selected
Re: Is there a bug in the routing? Reply #4 – September 25, 2009, 10:15:51 pm Depends also on the weights for slopes: The red one has two extra slopes but two 90° curves less. That should only be effective when slopes cost less than curves. Quote Selected
Re: Is there a bug in the routing? Reply #5 – September 26, 2009, 03:29:13 am Quote from: jamespetts – on September 25, 2009, 10:06:55 pmIf this is a bug, it might well be in Simutrans-Standard, too.I've noticed it in my Standard games, too. Quote Selected
Re: Is there a bug in the routing? Reply #6 – September 26, 2009, 07:56:52 am So it's to do with the number of curves then for the looks of things. Seems like an awful long way round just to avoid a bend or two.`It has to be the curves because there's the same number of up slopes on each route, red and green. It's not possible to see them all on that screen shot.OK, I can set a way point for the outbound journey so that the convoy follows the green route both loaded and unloaded.CheersDavid Quote Selected
Re: Is there a bug in the routing? Reply #7 – September 26, 2009, 10:05:15 am I have moved this topic to the general development and bug reports section because it appears that this issue is not specific to Simutrans-Experimental. Quote Selected
Re: Is there a bug in the routing? Reply #8 – September 26, 2009, 01:48:27 pm The number of curves is two more; and the total distance is also not very different. The only thing I do not understand why loaded/unloaded should play a role. Quote Selected
Re: Is there a bug in the routing? Reply #9 – September 26, 2009, 02:42:30 pm Quote from: prissi – on September 26, 2009, 01:48:27 pmThe number of curves is two more; and the total distance is also not very different. The only thing I do not understand why loaded/unloaded should play a role.The red route (outbound) is exactly 40 tiles whereas the return green route is only 27 tiles. Whilst the total tiles isn't that different the red route is more than 25% longer than the green route. Quote Selected
Re: Is there a bug in the routing? Reply #10 – September 26, 2009, 05:12:45 pm Corner penaly of 90° bend is equivalent to 5 tiles ... Quote Selected
Re: Is there a bug in the routing? Reply #11 – September 27, 2009, 03:49:51 am in my case, distance and # of corners is the same, but one way is mostly city (55km/h) where the other mostly highway (130km/h). Also, the bus is often fully loaded in both directions.*edit* Actually, the city road portion is four tiles longer. Quote Selected Last Edit: September 27, 2009, 03:54:06 am by helifino