YAPF - Testers needed!
Moderator: OpenTTD Developers
There is a problem with relocating waypoints:
1. Two parallel tracks. One with a waypoint.
2. Now remove the waypoint, and place it on the other track, so it takes over the sign.
3. All trains that were heading to the waypoint now still head towards the tile, where the waypoint was before. When they pass through the tile they skip to the next order. (Attachment 1)
4. But if you remove the track (Attachment 2) the train gets lost. It will continue searching the waypoint even if it directly passed through it.
5. You can even rebuild the removed track, and the train will again go through the old waypoint tile, and go to the next order.
6. The train works correctly again, if you skip the waypoint order. Next time in the loop it will choose the correct way.
Note: This problems applies both to YAPF and NPF, but not for the original pathfinder. So I think this is a YAPF problem. The problem was reported before in http://www.tt-forums.net/viewtopic.php?t=19212, but I think it was not understood.
1. Two parallel tracks. One with a waypoint.
2. Now remove the waypoint, and place it on the other track, so it takes over the sign.
3. All trains that were heading to the waypoint now still head towards the tile, where the waypoint was before. When they pass through the tile they skip to the next order. (Attachment 1)
4. But if you remove the track (Attachment 2) the train gets lost. It will continue searching the waypoint even if it directly passed through it.
5. You can even rebuild the removed track, and the train will again go through the old waypoint tile, and go to the next order.
6. The train works correctly again, if you skip the waypoint order. Next time in the loop it will choose the correct way.
Note: This problems applies both to YAPF and NPF, but not for the original pathfinder. So I think this is a YAPF problem. The problem was reported before in http://www.tt-forums.net/viewtopic.php?t=19212, but I think it was not understood.
- Attachments
-
- The train passes through the new waypoint without recognising it
- waypoint_after2.png (174.6 KiB) Viewed 1919 times
-
- The train chooses the path to the old tile of the removed waypoint
- waypoint_after1.png (182.12 KiB) Viewed 1941 times
I think ths project is great, it really helps the load on my older computers and works fine 99% of the time, good work!
I also found some settings that are better suited to realistic acceleration off if anyone is interested:
I also found some settings that are better suited to realistic acceleration off if anyone is interested:
Code: Select all
rail_slope_penalty = 600
rail_curve45_penalty = 100
rail_curve90_penalty = 200
╔═════════════════╗
║░ГЯΔИ$PØЯГ Г¥¢ØØИ!░║
║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║
║▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓║
║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║
║░░░░░░░░░░░░░░░░░║
╚═════════════════╝
║░ГЯΔИ$PØЯГ Г¥¢ØØИ!░║
║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║
║▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓║
║▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒║
║░░░░░░░░░░░░░░░░░║
╚═════════════════╝
-
- Engineer
- Posts: 5
- Joined: 18 May 2004 23:47
- Skype: Ertai_Wizard_Adept
- Location: Ceska Trebova (CZE) or Madison (USA)
- Contact:
Train not going to depot
I'm not sure if this is a YAPF problem, but I think it is. Or maybe YAPF works differently, in which case I'm probably gonna have to go read some docs to see how to make this work the right way.
I have a train that was last serviced more than a year ago (not_going_to_depot2.png). It is approaching a side line that has a depot on it and then joins the main line (for the purpose of not slowing down the main line, but that's off topic). But the train, even though it should be serviced cause the 120-day servicing interval has long expired, zooms past this side line and keeps going on the main line (not_going_to_depot3.png).
This doesn't happen if I turn off YAPF for trains. You can try it in the attached savegame. The train has number 44.
So, is this a YAPF problem or is YAPF working differently and my strategy with depots on sidelines isn't gonna work?
I have a train that was last serviced more than a year ago (not_going_to_depot2.png). It is approaching a side line that has a depot on it and then joins the main line (for the purpose of not slowing down the main line, but that's off topic). But the train, even though it should be serviced cause the 120-day servicing interval has long expired, zooms past this side line and keeps going on the main line (not_going_to_depot3.png).
This doesn't happen if I turn off YAPF for trains. You can try it in the attached savegame. The train has number 44.
So, is this a YAPF problem or is YAPF working differently and my strategy with depots on sidelines isn't gonna work?
- Attachments
-
- After
- not_going_to_depot3.png (203.75 KiB) Viewed 1836 times
-
- Before
- not_going_to_depot2.png (199.54 KiB) Viewed 1858 times
-
- Not Finding Depot.sav
- The savegame
- (397.24 KiB) Downloaded 496 times
-
- Engineer
- Posts: 5
- Joined: 18 May 2004 23:47
- Skype: Ertai_Wizard_Adept
- Location: Ceska Trebova (CZE) or Madison (USA)
- Contact:
Tried that and it fixed the problem for that case. I think it was 17 tiles. I knew about the 16-tile lookahead, but wasn't sure how much diagonal tracks were, whether one tile or half-tile. Anyway, here's another save (train 33 this time) where the same thing happened. The distance is definitely <16 tiles here. The train is about 60 days overdue for service.
[Edit]Darkvater: deleted attachment.
[Edit]Darkvater: deleted attachment.
Last edited by Ertai_Wizard_Adept on 10 Jan 2007 22:59, edited 1 time in total.
-
- Engineer
- Posts: 5
- Joined: 18 May 2004 23:47
- Skype: Ertai_Wizard_Adept
- Location: Ceska Trebova (CZE) or Madison (USA)
- Contact:
Tried that and it fixed the problem for that case. I think it was 17 tiles. I knew about the 16-tile lookahead, but wasn't sure how much diagonal tracks were, whether one tile or half-tile. Anyway, here's another save (train 31 this time) where the same thing happened. The distance is definitely <16 tiles here. The train is about 60 days overdue for service. And again, if I turn off YAPF, the train goes to the depot. With YAPF it doesn't.
I should probably mention I'm using RC3. Forgot to say that in the previous post.
I should probably mention I'm using RC3. Forgot to say that in the previous post.
- Attachments
-
- No depot 2 maybe.sav
- The save. Train 31 this time.
- (400.71 KiB) Downloaded 374 times
same problem. Shorter than 16 if you count only tiles. But you must add 6 tile penalty for 2 uphill tiles. And remember that train tries to locate the nearest depot once per day. So if it is too far away one day it can miss the choice because of this period. Probably i will need to make this distance longer for you 
Or maybe different servicing algorithm (try it on choices instead of every day..)

Or maybe different servicing algorithm (try it on choices instead of every day..)
-
- Engineer
- Posts: 5
- Joined: 18 May 2004 23:47
- Skype: Ertai_Wizard_Adept
- Location: Ceska Trebova (CZE) or Madison (USA)
- Contact:
Alright, so an uphill tile really counts as 4 (1 for tile and 3 for penalty). Then the sideline leading to the depot has length 17, grrrsame problem. Shorter than 16 if you count only tiles. But you must add 6 tile penalty for 2 uphill tiles. And remember that train tries to locate the nearest depot once per day. So if it is too far away one day it can miss the choice because of this period. Probably i will need to make this distance longer for you


I think 16 is alright. If you make it more, trains might start leaving ro-ro stations to get serviced. That would be very annoying.
As for checking once a day, I didn't take that into consideration. I made a couple tests though. A maglev train at full speed travels 13 or 14 tiles a day with the slowest maglev engine (so multiply by 1.5 for the fastest one). If this is uphill, the probability that a depot on a hilltop is missed is about 2/3 even if it's right next to the main line. See attached savegame. The train is on its way to the station on the hilltop, is due for service and will miss the depot.
I'm not sure what you mean by that. Is this some config setting I can change?Or maybe different servicing algorithm (try it on choices instead of every day..)
- Attachments
-
- Depot_YAPF_Test.sav
- (11.53 KiB) Downloaded 341 times
I've had some strange behaviour when using YAPF in the attached savegame. When the game is loaded, a train comes down the main line from the north-west (Train 59). It's supposed to turn off and go to the station but instead it just continues along the mainline.
I think it may be caused by the train that exits the station just as it reaches the main line junction.
You can follow the route it takes after it misses the station...it goes half way round the map just so it can approach the station from one of the other entrances.
The problem doesn't occur if YAPF is turned off. The bug is in 0.5.0 but I also tried it with r8927 and it's still there.
I think it may be caused by the train that exits the station just as it reaches the main line junction.
You can follow the route it takes after it misses the station...it goes half way round the map just so it can approach the station from one of the other entrances.
The problem doesn't occur if YAPF is turned off. The bug is in 0.5.0 but I also tried it with r8927 and it's still there.
- Attachments
-
- YAPF Bug.sav
- (589.58 KiB) Downloaded 331 times
Bot_40: thanks for the report.
I noticed this problem in the past. But then i wasn't able to reproduce it. Sometimes it makes wrong decision just for the first time. When you stop/reverse the train just after it makes this mistake and move it back, the next time it makes correct decision. I was unable to find yet. There is probably some mysterious problem inside YAPF (maybe i used more of my magic power than my knowledge). I will need to deal with it somehow.
I noticed this problem in the past. But then i wasn't able to reproduce it. Sometimes it makes wrong decision just for the first time. When you stop/reverse the train just after it makes this mistake and move it back, the next time it makes correct decision. I was unable to find yet. There is probably some mysterious problem inside YAPF (maybe i used more of my magic power than my knowledge). I will need to deal with it somehow.
Who is online
Users browsing this forum: No registered users and 16 guests