OpenTTD

Powered by LeaseWeb
Tasklist

FS#2955 - Depots on a YAPP Track won't be visited

Attached to Project: OpenTTD
Opened by xZise (xZise) - Tuesday, 02 June 2009, 22:33 GMT
Last edited by Remko Bijker (Rubidium) - Sunday, 13 December 2009, 10:50 GMT
Type Bug
Category Vehicles → YAPF
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version trunk
Due in Version 1.0.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi all, I have the problem, that the trains doesn't visit the depots by the track so they get easy to a very low status. I tested it with the r16504 and the Nightly from some days before and with the Infrastructure Sharing patch (prekompiled). All three games have this very annoying bug. I created a savegame with the r16504 where you can see that the last check was a year ago (more than 150 days).

Sincerely
xZise
This task depends upon

Closed by  Remko Bijker (Rubidium)
Sunday, 13 December 2009, 10:50 GMT
Reason for closing:  Won't fix
Additional comments about closing:  The distance for going to a depot is governed by the pathfinder penalties. You can, since r18481, configure the maximum yourself. The problem has not much to do with YAPP, only that once a train has made a reservation it doesn't change them anymore. The not going to a depot is completely caused by the pathfinder distance to the depot from the place where it looked for a depot. But as I said you can increase that distance now.
Comment by frosch (frosch) - Wednesday, 03 June 2009, 19:56 GMT
The maximum penalty allowed for automatic servicing is 1600. It seems like the red pbs signal at the end of the trackreservation already gives a penalty of 1000.

First question that comes to mind: Why do red pbs signals give a penalty at all?

(Maybe there are more weird pathfinder costs involved)
Comment by xZise (xZise) - Friday, 05 June 2009, 19:29 GMT
Did you mean "yapf.rail_depot_reverse_penalty"? I set it to 0 and add signals at the northeast depot. But it doesn't change anything :(

Sincerely
xZise
Comment by xZise (xZise) - Sunday, 07 June 2009, 15:08 GMT
Okay I can specify the Bug. When the "entry-" and "exitways" are "long" then they don't use the depot (it doesn't depend on the signals). I attached an example. They use every depot except the southern depot.

Sincerely
xZise
Comment by frosch (frosch) - Sunday, 07 June 2009, 17:46 GMT
That is intentional. Trains do not drive to the other side of the map just to service. Instead there is a limit in the cost to reach a depot. Usually the limit is the cost of 16 straight tiles. But not every tile costs the same. Corners cost more, and also red signals cost more.
For normal signals that is fine, as you do not want to block your mainline, when there is already a train entering the depot.
OTOH PBS signals are basically always red, so there the penalty is not useful. (The cost for crossing a reserved track is used instead to prevent trains from stockpiling in front of depots.)
Comment by Remko Bijker (Rubidium) - Wednesday, 09 December 2009, 21:56 GMT
It looks like the penalty doesn't come from the signals but from the quite big penalty for corners; set the curve45 degree penalty to 0 and in both savegames the trains will go into the depot. Change the signals to 'normal' signals and in neither savegame they will go to the depot. As such I think it's safe to assume that the problems aren't coming from the signals but from the curve penalty, which is 3 tiles.
With a branch and then a corner into a depot you easily have 3 45 degree turns.
For NPF the curve penalty is 1, which basically means 0 and thus it works better with NPF.

So basically this isn't a real bug but more a penalty issue. I suggest making the max-go-automatically-to-depot penalty configurable and maybe reduce the curve penalties for YAPF, increase them some for NPF and determine some sane default for the new variable.

Loading...