The International Simutrans Forum

Development => Bug Reports => Topic started by: Václav on November 05, 2012, 08:21:29 PM

Title: Strange route searching
Post by: Václav on November 05, 2012, 08:21:29 PM
I found that mostly trains (but it may be issue of also other vehicles - but with trains it is most visible) search routes by quite strange way.

I found that trains ignore end of choose signal.

When I found that trains don't wait for free way - and search where to go to station by else way - to get any free platform, I placed end of choose signals - and found that trains ignore thïs signal.

Trains passed through this signal, entered to way behind this signal - and arrived to station from other side. And it is something what should not be. I think that trains should at first wait for free way to station - and then, if it will be free, to choose free platform.
Title: Re: Strange route searching
Post by: Ters on November 05, 2012, 09:08:25 PM
I don't quite follow your description of the situation. In any case, trains will search for any possible route unless the length exceeds the limit set in simuconf.tab (1000000 something is default, probably tiles), but choose the shortest possible.
Title: Re: Strange route searching
Post by: Václav on November 09, 2012, 08:32:23 AM
I don't know what number I set (but may it be I let default number) - but I looked that in log window, game calls:

Warning: wegbauer_t::intern_calc_route(): Too many steps (1>= 1000000) in route (too long/complex).

So I would like to know how this may happen. Because term 1>= 1000000 is quite strange (illogical) for me.
Title: Re: Strange route searching
Post by: Dwachs on November 09, 2012, 08:54:55 AM
Quote from: VaclavMacurek on November 09, 2012, 08:32:23 AM
Warning: wegbauer_t::intern_calc_route(): Too many steps (1>= 1000000) in route (too long/complex).
It has nothing to do with trains, it a debug message for way building, most likely rivers or intercity roads.
Title: Re: Strange route searching
Post by: Václav on November 09, 2012, 10:24:31 AM
Thanks.
Title: Re: Strange route searching
Post by: uhennig on December 17, 2012, 09:32:53 AM
I have a similar case. Let me attach a screenshot.
The train tooks a strange route. Just before the station it doesn't choose the straight forward way.

There is no problem with the electrification or other problems, since this way will be used by other trains.

The stopping point is at the front end of the station.
By the way, if I choose the rear end, the train somtimes chooses somtimes to arrive from other side.
(http://dl.dropbox.com/u/77059131/simutrans.jpg)


Title: Re: Strange route searching
Post by: prissi on December 17, 2012, 10:40:24 AM
The first bow does not count, since the choose signal is too close to the switch. This the branch gets internally counted as a 90 bend, which is worse then two 45° bends in the image. Put the choose signal one tile to the back will solve this.

The rear end could happen, if the tracks are all reserved from departing trains and there is a signal on the platform (the search ends as soon as there is a platform reached, and then the whole platform is added, if long enough). Or did you play with your routing weights?

But without seeing this in action (i.e. a savegame) it is very hard to guess what is wrong.
Title: Re: Strange route searching
Post by: uhennig on December 17, 2012, 10:52:37 AM
Hi prissi, this bug is reproducible.
Trains within the same route uses the straight forward way, but sometimes not.


(http://dl.dropbox.com/u/77059131/simutrans-bug2.jpg)
Title: Re: Strange route searching
Post by: prissi on December 17, 2012, 12:26:35 PM
The a savegame is really needed for debugging.
Title: Re: Strange route searching
Post by: ӔO on December 17, 2012, 01:52:05 PM
that happens when a train leaving the station is blocking the straight path and the choose signal routes around it.
Title: Re: Strange route searching
Post by: prissi on December 17, 2012, 02:50:16 PM
But in this case of the second image there is no way a train could be stuck there. THere might however a train entering just before.
Title: Re: Strange route searching
Post by: uhennig on January 10, 2013, 06:02:58 PM
I have tested it with newest version 112.1 and with newest pack128 and didn't see it again.
It might be fixed with this version.