YAPF rewrite

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

2457
Engineer
Engineer
Posts: 126
Joined: 06 Dec 2009 21:57

Re: YAPF rewrite

Post by 2457 »

The exiting to wrong way from a depot stuff can be reproduced WITH!!!!! ease.
If a train has orders to go to a station, but has to get a service while on the way, it will enter the nearest depot.
That seems pretty clever, but it ain't. If the way to the depot is one way, and if from the exit of the depot no route can be found to the original destination of the train, then it will get out from the depot, go to the wrong way, hit the signal, turn back, and stay in the depot, and then do this again and again all over.

Natural, if you wait long enough many trains will be stakced in front of this depot.
If your trains are able to enter a depot, but from there can not find a way to original destination, you get a traffic jam.

Your trains can acces the depot in question, its just a mather of simple probability when they will, and since they get lockt there, they will be lost trains.

Under no way can you create a proper rail network where trains get lost.
The pathfinder -when entering nearest depot- should check IF there is a route from that depot to the original destination, or not. And only choose that depot if there is one.

If you make your networks in a fashion where from any station/depot can be reached from any other station/depot, this problem will vanish.

Still it could be a nice feature for pathfinder to check if the nearest depot -when entering it to get service- is one from where the train can follow its orders onward, and if not, search for a nother depot.
The Prophet -thx Pikka-
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: YAPF rewrite

Post by planetmaker »

As you describe yourself, the problem vanishes, if a proper network design is chosen.

So basically the question is: where do you consider network design the cause of 'strange' or unwanted train behaviour and where would need the path finders improvement. Point is: however you design the path finder(s), you'll always find situations where the train does not do what you like to do, as the path finder rules are different. But by re-designing your network you'll always be able to get your trains to where they shall go. The question is: where to draw the line.
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: YAPF rewrite

Post by DJ Nekkid »

I heavent read the whole thread, but I think that most openttdcoop games are a proof that YAPF is uber, compared to for example the original pathfinder.
Member of the
ImageImage
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest