Train wanting to go to depot stops at green signal

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
Sanchimaru
Tycoon
Tycoon
Posts: 1542
Joined: 05 Feb 2004 22:39
Location: Kobe, Japan
Contact:

Train wanting to go to depot stops at green signal

Post by Sanchimaru »

Hello, I have been quite a while away from the forums...
But lately I decided to start a new TT game. I found the following problem, and since it's been a long time, I can't recall how everything works. Sorry if this is a basic question, but I could find no documentation about it anywhere.

I use this kind of entrance for terminal stations:

Code: Select all

=/=\=
with a depot on the peak. There are 2 way signals at the station end, and pbs signals before the first track junction, as seen in the picture below.
So the train enters the junction heading to the station, but just inside the junction, it decides to go to depot. So it follows the path it reserved, but then stops at the green 2way signal, never reversing, advancing or changing orders.

What am I doing wrong? Since this is a very simple configuration, I have no idea what isn't working.

Thanks in advance
Attachments
signal.png
signal.png (154.16 KiB) Viewed 4534 times
User avatar
aahz77
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 16 Aug 2006 10:15
Location: Hamburg, Germany

Re: Train wanting to go to depot stops at green signal

Post by aahz77 »

I can reproduce the problem with r2075. Haven't tested older versions or Beta9 yet. Doesn't occur with regular entry/exit (non-PBS) signals.

EDIT: Sanchimaru, you don't do anything wrong. It's a commonly used setup, and the behaviour must be a bug.
One after one, by the star-dogged Moon,
Too quick for groan or sigh,
Each turned his face with a ghastly pang,
And cursed me with his eye.

-- Samuel T. Coleridge, The Rime of the Ancient Mariner
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Train wanting to go to depot stops at green signal

Post by DaleStan »

To prevent that behaviour, use Go To depot/Service At depot orders.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
aahz77
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 16 Aug 2006 10:15
Location: Hamburg, Germany

Re: Train wanting to go to depot stops at green signal

Post by aahz77 »

DaleStan wrote:To prevent that behaviour, use Go To depot/Service At depot orders.
Hmm... why isn't it possible for the train to pass the green signal, and then turn around in the station to re-enter the pbs block towards the depot, just as it would do in a non-pbs-block??
One after one, by the star-dogged Moon,
Too quick for groan or sigh,
Each turned his face with a ghastly pang,
And cursed me with his eye.

-- Samuel T. Coleridge, The Rime of the Ancient Mariner
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Train wanting to go to depot stops at green signal

Post by DaleStan »

Because a train that cannot find a route cannot pass a PBS signal. With a normal signal, it passes the signal anyway and just hopes, but to pass a PBS signal, the pathfinder must determine what tracks are to be reserved.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
aahz77
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 16 Aug 2006 10:15
Location: Hamburg, Germany

Re: Train wanting to go to depot stops at green signal

Post by aahz77 »

DaleStan wrote:Because a train that cannot find a route cannot pass a PBS signal. With a normal signal, it passes the signal anyway and just hopes, but to pass a PBS signal, the pathfinder must determine what tracks are to be reserved.
I cannot pass a signal that is leading OUT of the block? I understand that it's a two-way signal, so the track behind it which consists only of the station tiles, is technically also a PBS block (or isn't it?). As I understand it, the train should reserve the complete block consisting of all the platform tiles, pass the signal into the "platform" block, reverse at the end, and re-enter the junction block. It works for the normal situation in which the station is the destination and I don't get where the difference is.
One after one, by the star-dogged Moon,
Too quick for groan or sigh,
Each turned his face with a ghastly pang,
And cursed me with his eye.

-- Samuel T. Coleridge, The Rime of the Ancient Mariner
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Train wanting to go to depot stops at green signal

Post by DaleStan »

aahz77 wrote:I understand that it's a two-way signal, so the track behind it which consists only of the station tiles, is technically also a PBS block
Correct. And that's why the train can't pass it. Not because it can't leave the PBS block it's currently occupying, but because it can't enter the next PBS block
aahz77 wrote:As I understand it, the train should reserve the complete block consisting of all the platform tiles,
But that's not a path to or toward the depot.
The pathfinder does not consider the possibility of U-turns, and the PBS engine would probably break horribly if it did.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Train wanting to go to depot stops at green signal

Post by michael blunck »

Dumb question, but isn´t it this bug?
JGR wrote:Correct routefinding issue with station platforms terminated by non-track tiles within the current PBS block caused by erroneous perception of said non-track tiles as the station platform end instead of the preceding tile.

http://svn.ttdpatch.net/trac/changeset/2082
If yes, try r2082 or newer.

regards
Michael
Image
User avatar
aahz77
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 16 Aug 2006 10:15
Location: Hamburg, Germany

Re: Train wanting to go to depot stops at green signal

Post by aahz77 »

DaleStan wrote:
aahz77 wrote:I understand that it's a two-way signal, so the track behind it which consists only of the station tiles, is technically also a PBS block
Correct. And that's why the train can't pass it. Not because it can't leave the PBS block it's currently occupying, but because it can't enter the next PBS block
... which is the station block. But why? Oh, another sentence 8) excuse me if I'm slow-thinking, but it's late for me....
DaleStan wrote:
aahz77 wrote:As I understand it, the train should reserve the complete block consisting of all the platform tiles,
But that's not a path to or toward the depot.
The pathfinder does not consider the possibility of U-turns (...)
I didn't know that. And if its destination is the station, it finds a path (because no U-turn is needed) and reserves the path. Then turns after visiting the station, etc etc. All fine. I get it.
DaleStan wrote:(...), and the PBS engine would probably break horribly if it did.
OK, please leave it as it is ;-) I don't play with services anyway. Just wanted to be sure that I have a correct understanding of what's going on and why.
mb wrote:If yes, try r2082 or newer.
I reproduced the problem (in r2075) with a regular station without any non-track tiles. Will check back tomorrow.
One after one, by the star-dogged Moon,
Too quick for groan or sigh,
Each turned his face with a ghastly pang,
And cursed me with his eye.

-- Samuel T. Coleridge, The Rime of the Ancient Mariner
User avatar
Sanchimaru
Tycoon
Tycoon
Posts: 1542
Joined: 05 Feb 2004 22:39
Location: Kobe, Japan
Contact:

Re: Train wanting to go to depot stops at green signal

Post by Sanchimaru »

Thanks for the replies:

I downloaded r2082 and loaded the same game. Not only the problem persists, I think it's even worst, look at this new problem:

The train is just routing through a station a few tiles away, on its way to a far away terminal station on a one-way track.
Attachments
signal2.png
signal2.png (104.14 KiB) Viewed 4426 times
User avatar
aahz77
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 16 Aug 2006 10:15
Location: Hamburg, Germany

Re: Train wanting to go to depot stops at green signal

Post by aahz77 »

Sanchimaru wrote:Not only the problem persists
+1 here
Sanchimaru wrote:a far away terminal station on a one-way track.
This seems to be a normal situation:
TTDPatch Manual wrote:The paths through the junction must be shorter than 64 tiles and cross 7 or fewer junction tiles. A train will never find a path that crosses more than 7 junction tiles.
(From the PBS Wiki entry)
A junction in this context may also be a PBS block consisting only of straight track, without any junction tiles, and then the 64 tile restriction applies.
One after one, by the star-dogged Moon,
Too quick for groan or sigh,
Each turned his face with a ghastly pang,
And cursed me with his eye.

-- Samuel T. Coleridge, The Rime of the Ancient Mariner
User avatar
Sanchimaru
Tycoon
Tycoon
Posts: 1542
Joined: 05 Feb 2004 22:39
Location: Kobe, Japan
Contact:

Re: Train wanting to go to depot stops at green signal

Post by Sanchimaru »

The problem also persists in a newly started game.
aahz77 wrote:This seems to be a normal situation:
Are you sure? I mean, look at the screenshot, the current order station is at sight, only 11 tiles away from the train's position. Also, there is nothing in the track, and the junction is just 2 tiles wide.
That behavior happens a lot when you try to send a train directly to a very far away station. But usually, just adding a waypoint helps, since the train is not travelling the whole distance, but only the distance from the junction to the waypoint. That is the basic purpose of waypoints, as even before the patch, buoys existed to help boats finding their way through long distances.
That was indeed the case here, the train got confused since the station was too far away, so I built a waypoint. Then, the "train xx seems to be lost" notice came shortly after.
If a train can't find its way from 11 tiles away of straight single line there must be a problem.
User avatar
aahz77
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 16 Aug 2006 10:15
Location: Hamburg, Germany

Re: Train wanting to go to depot stops at green signal

Post by aahz77 »

Sanchimaru wrote:
aahz77 wrote:This seems to be a normal situation:
Are you sure? I mean, look at the screenshot, the current order station is at sight, only 11 tiles away from the train's position. Also, there is nothing in the track, and the junction is just 2 tiles wide.
That behavior happens a lot when you try to send a train directly to a very far away station. But usually, just adding a waypoint helps, since the train is not travelling the whole distance, but only the distance from the junction to the waypoint. That is the basic purpose of waypoints, as even before the patch, buoys existed to help boats finding their way through long distances.
That was indeed the case here, the train got confused since the station was too far away, so I built a waypoint. Then, the "train xx seems to be lost" notice came shortly after.
If a train can't find its way from 11 tiles away of straight single line there must be a problem.
Building a station (or waypoint) inside a PBS block is never a good idea, as the train has to reserve a path towards an exit of the block, not just up to its destination. If the station is occupied, it might reserve another path through the block that doesn't lead through the station. Admittedly, if the block doesn't contain any junction tiles (as in your case), that shouldn't be much of a problem (terminus station platforms are an example of stations inside pbs blocks, and they work because it's the simplest possible case and the train doesn't have to reserve any track beyond the station).

However, in your case the train doesn't enter the block because it tries to reserve a path through the entire block, no matter how near its destination (your waypoint) is. And if the block is longer than 64 tiles, it won't find a route, thus not reserving a path.

The solution is to place more signals along the route, so that no block is longer than 64 tiles. I know that this makes it impossible to serve the station with more than one train, but then again, that would also be difficult with your current setup (so I assume you only have one train for such a branch line anyway).
One after one, by the star-dogged Moon,
Too quick for groan or sigh,
Each turned his face with a ghastly pang,
And cursed me with his eye.

-- Samuel T. Coleridge, The Rime of the Ancient Mariner
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Train wanting to go to depot stops at green signal

Post by DaleStan »

aahz77 wrote:However, in your case the train doesn't enter the block because it tries to reserve a path through the entire block, no matter how near its destination (your waypoint) is. And if the block is longer than 64 tiles, it won't find a route, thus not reserving a path.
Exactly. "Location of current order" and "end of PBS block" are two separate concepts. They usually happen to coincide, but they don't always. When they don't, it's "end of PBS block" that determines whether a train can enter, not "location of current order".
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Sanchimaru
Tycoon
Tycoon
Posts: 1542
Joined: 05 Feb 2004 22:39
Location: Kobe, Japan
Contact:

Re: Train wanting to go to depot stops at green signal

Post by Sanchimaru »

Understood, thanks for the information! it's not quite intuitive, but that's how it works :D

So, as for the depot issue, an advanced use of the train orders is required, including always a "service at depot" order for all trains going to that station, or eveng passing the junction. Trains won't even go to the depot if don't need to, running the basic schedule.

And about the second issue, I fixed it making a double track at the exit where the train was stuck. Just long enough to have 1-way signals.
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 19 guests