News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Is there a bug in the routing?

Started by davidh, September 25, 2009, 03:42:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davidh

Hi

I'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?

Regards

David

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

davidh

Hi James

Thanks 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:


jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

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.

helifino

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.

davidh

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.

Cheers

David


jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

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.

davidh

Quote from: prissi on 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.

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.

prissi

Corner penaly of 90° bend is equivalent to 5 tiles ...

helifino

#11
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.