Pathing signals junctions and servicing {two questions}

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Quinch
Engineer
Engineer
Posts: 50
Joined: 15 Mar 2004 10:49

Pathing signals junctions and servicing {two questions}

Post by Quinch »

First question, I've been fiddling with the pathing signals and it seems pretty promising. Are there any good layouts I could use with them in mind? My wikitrawl turned up nothing, station and track throughput management, but no junctions. What I'm looking for is basically something that can handle moderate traffic with depots for traffic from each direction.

Also, regarding servicing, is there a way to force an order that will override the servicing interval? Specifically, I place a depot at the station exit, and I don't want the train to make a beeline for the depot until after it loads/unloads its cargo, but after it leaves the station, I want it to use its own artificial judgment where and when to service, rather than setting up waypoints and conditionals for every section of its route. Any suggestions?
insulfrog
Engineer
Engineer
Posts: 68
Joined: 13 Nov 2007 10:36
Location: Boston, Lincolnshire, England
Contact:

Re: Pathing signals junctions and servicing {two questions}

Post by insulfrog »

For the 1st question: -
--------------------------
For the moment, there isn't much to go on but if you look at the real railways, there are many junctions that you can try to 'emulate' using PBS because it is more possible to do so now. You can still use the junctions as they are in the wiki.

For the 2nd question: -
---------------------------
I think it might be impossible unless it has been sorted recently in the latest OTTD version(s).

If you have a line with a station, then a depot (2-5 square afterwards say), like on a typical ro-ro station and the train is ready for servicing when it reaches the station, the train ALWAYS goes for the depot first WITHOUT stopping at the station. This may result the train getting lost if your not careful. Thats why when I build my ro-ro stations, I always put my depot first, then the station, as trains don't get lost as often.
audigex
Tycoon
Tycoon
Posts: 2017
Joined: 09 Dec 2007 21:28
Contact:

Re: Pathing signals junctions and servicing {two questions}

Post by audigex »

A forced service would work, or just make the train have a timetable shorter than the service interval with a "service at" order somewhere in it.

Personally I like to use conditional orders
go to station x
go to station y
if reliability < (whatever you like) then service at xdepot
go to station z
go to station a

Using this method several times in an order list can also help reduce the load at any individual depot.
Jon
Quinch
Engineer
Engineer
Posts: 50
Joined: 15 Mar 2004 10:49

Re: Pathing signals junctions and servicing {two questions}

Post by Quinch »

re: insulfrog

Well, I can handle the getting lost problem with entry presignals and two-way signals between the depot and the station so the train can get back to the station once it services, but it can still waste a lot of time. I can also put a depot in both the entrance and exit of the station, but it seems inelegant and more of a workaround than a solution.

re: audigex
I might be wrong, but from what I can tell, manually adding servicing instructions seems to disable self-servicing - i.e. saying "service here" has an implicit "and nowhere else, ever" clause. I might be wrong, but this is what I've noticed.
audigex
Tycoon
Tycoon
Posts: 2017
Joined: 09 Dec 2007 21:28
Contact:

Re: Pathing signals junctions and servicing {two questions}

Post by audigex »

It does, but it will allow more than one service order.

It means you can't have both optional and mandatory services - but then most people will play with one or the other anyway.
Jon
Quinch
Engineer
Engineer
Posts: 50
Joined: 15 Mar 2004 10:49

Re: Pathing signals junctions and servicing {two questions}

Post by Quinch »

More about path signals; is there a way to make the train take a different route if the path is blocked? For example, in the image below, the train to the north has an open route through the side tunnel, but it still waits for the train inside the inner junction to leave. Is there a way to send a train through a slightly-longer-but-unobstructed path if the shortest one is not immediately available?
X-Tel Freemovers, 1958-09-19.png
X-Tel Freemovers, 1958-09-19.png (49.06 KiB) Viewed 1046 times
audigex
Tycoon
Tycoon
Posts: 2017
Joined: 09 Dec 2007 21:28
Contact:

Re: Pathing signals junctions and servicing {two questions}

Post by audigex »

That's strange, I would have expected it to take the alternate route there. Obviously the pathfinder sees the tunnel and diagonal tracks as having a higher penalty than the occupied track.

You could adjust the yapf.pbs_cross_penalty value in openttd.cfg. Bump it up a few hundred and it should work.
Jon
User avatar
Taifu
Engineer
Engineer
Posts: 16
Joined: 10 Oct 2007 09:59

Re: Pathing signals junctions and servicing {two questions}

Post by Taifu »

The mixing of Path and Block signals might be the problem there.
Quinch
Engineer
Engineer
Posts: 50
Joined: 15 Mar 2004 10:49

Re: Pathing signals junctions and servicing {two questions}

Post by Quinch »

Taifu, could you explain?
Eddi
Tycoon
Tycoon
Posts: 8276
Joined: 17 Jan 2007 00:14

Re: Pathing signals junctions and servicing {two questions}

Post by Eddi »

the problem is most probably that the pathfinder thinks the straight track is shorter, even though it is blocked.

for this you need to know which penalties are added to which path. for example, the free path has a left curve, two diagonal tiles (~40% longer than one straight tile), a right curve, a downwards slope, an upwards slope, another right curve, another two diagonal tiles and another left curve. the blocked path is straight, so no curve penalties. possibly a penalty for going over some crossings, and the penalty for one reserved tile.

you now have to modify the penalties so the one reserved tile outweighs the overall longer path through the tunnel.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Pathing signals junctions and servicing {two questions}

Post by AndersI »

I would expect the penalty for a blocked path to be infinity, compared to an actual free path?? Isn't that the whole point of PATH based signals?
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Pathing signals junctions and servicing {two questions}

Post by Yexo »

AndersI wrote:I would expect the penalty for a blocked path to be infinity, compared to an actual free path?? Isn't that the whole point of PATH based signals?
This image will show why the penalty isn't infinite. Or do you expect the train in the station to take the (very long) detour?
Attachments
infinite.png
infinite.png (124.4 KiB) Viewed 999 times
Eddi
Tycoon
Tycoon
Posts: 8276
Joined: 17 Jan 2007 00:14

Re: Pathing signals junctions and servicing {two questions}

Post by Eddi »

the point of the penalty is to determine the amount of detour the train will consider. penalties should only be infinite if the path is not expected to clear itself again. otherwise, trains would constantly throw "train is lost" messages each time a reservation fails
User avatar
Taifu
Engineer
Engineer
Posts: 16
Joined: 10 Oct 2007 09:59

Re: Pathing signals junctions and servicing {two questions}

Post by Taifu »

Mixing of Path and Block signals is not the problem.

I thought that using only path signals would allow the train to see the clear route. This is not the case.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Pathing signals junctions and servicing {two questions}

Post by AndersI »

Yexo wrote:This image will show why the penalty isn't infinite. Or do you expect the train in the station to take the (very long) detour?
OK, I get the point. Although, as I'm used to the TTDP PBS, I *would* expect the train to take the detour up to the predefined limits there (64 tiles? X junctions? I don't remember exactly).
audigex
Tycoon
Tycoon
Posts: 2017
Joined: 09 Dec 2007 21:28
Contact:

Re: Pathing signals junctions and servicing {two questions}

Post by audigex »

It will take a detour up to d difference in paths.

Eg the optimal path has a penalty of 2000, and the tolerance is say 200, it will take any path up to 2,200 - otherwise it will wait for a path <= 2,200.

In this case I think it's the slope penalties doing most "damage". Reducing that should help, or increasing the tolerance for non-optimal paths (no idea where that value is though!)
Jon
Quinch
Engineer
Engineer
Posts: 50
Joined: 15 Mar 2004 10:49

Re: Pathing signals junctions and servicing {two questions}

Post by Quinch »

Back on the topic of general path signals... why is the train waiting? It's a clear path, two-way path signal {does the side placement make a difference with those}, no other trains waiting - what's the catch?
X-Tel Freemovers, 1863-07-27.png
X-Tel Freemovers, 1863-07-27.png (41.16 KiB) Viewed 854 times
Forked
Engineer
Engineer
Posts: 43
Joined: 13 Jan 2008 20:36

Re: Pathing signals junctions and servicing {two questions}

Post by Forked »

The train is unable to reserve a path to a safe waiting area (a signal).
Quinch
Engineer
Engineer
Posts: 50
Joined: 15 Mar 2004 10:49

Re: Pathing signals junctions and servicing {two questions}

Post by Quinch »

Yeah, but why? There's nothing blocking it, right?
Forked
Engineer
Engineer
Posts: 43
Joined: 13 Jan 2008 20:36

Re: Pathing signals junctions and servicing {two questions}

Post by Forked »

To leave the depot it needs a place to reserve a path to. There is no signal it can use as it's next safe place to hang out.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 5 guests