Can I make trains wait if a similar train is already in the station

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

Moderator: OpenTTD Developers

Post Reply
numbat
Engineer
Engineer
Posts: 16
Joined: 30 Mar 2023 20:52

Can I make trains wait if a similar train is already in the station

Post by numbat »

Hi all,

I have a refinery producing petrol, chemicals and plastic. These are being transported a fair distance to their respective destinations. I have a 3 platform station at the refinery for these trains to pickup their loads.

The trouble I have is that I need about 4 trains of each produce type (a total of 12 trains) to service the output from the refinery. However, if all 4 trains of one type, say petrol, arrive at the same time, they occupy all 3 platforms, meaning that other produce trains are delayed. I know I can solve this by having multiple lines into the stations with waypoints so that I allocate specific platforms to specify produce, but this gets messy and I need very long lead-in lines.

So I'm wondering, is there some way of setting up conditional orders so that trains wait in a siding (or better yet a depot) IF there is already a train of the same produce in the station? This way I would only ever need 3 platforms to service an unlimited number of trains of each produce type.

Cheers,
Chris.
skc
Traffic Manager
Traffic Manager
Posts: 177
Joined: 17 Sep 2022 02:02

Re: Can I make trains wait if a similar train is already in the station

Post by skc »

Not within "vanilla" OpenTTD, AFAIK.
Conditional orders apply only to a characteristic of the vehicle, so they can't be used to sense the occupancy (or not) of a station.
I know JGRPP (JGR's PatchPack) has a lot of extra functionality, but I've no idea if it includes this.
User avatar
odisseus
Director
Director
Posts: 568
Joined: 01 Nov 2017 21:19

Re: Can I make trains wait if a similar train is already in the station

Post by odisseus »

Build an overflow depot in front of the station entrance. There is a multitude of designs with varying throughput, complexity and footprint size.
Attachments
overflow-with-split.png
overflow-with-split.png (40.97 KiB) Viewed 1923 times
Last edited by odisseus on 18 Jul 2023 16:05, edited 1 time in total.
User avatar
Chrill
Moderator
Moderator
Posts: 15980
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Re: Can I make trains wait if a similar train is already in the station

Post by Chrill »

odisseus wrote: 18 Jul 2023 14:27 Build an overflow depot in front of the station entrance. There is a multitude of designs with varying throughput, complexity and footprint size.
This can also be achieved through waypoints, although taking up more space and being limited in the number of waiting trains. It is more realistic, at least if you build it more nicely than I did in this 3-minute craft. :mrgreen:

The train waiting is scheduled to visit "Cargo 1" so it cannot proceed. Trains going to Cargo 2 and Cargo 3 can go past just fine. The issue here, of course, is if my holding area has too few lanes but just account for the number of trains in your design.

EDIT: Actually you don't even need the waypoint, just make sure there's a dedicated platform for your drops.
Attachments
waypoint_holding_area.png
waypoint_holding_area.png (393.78 KiB) Viewed 1957 times
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
User avatar
kamnet
Moderator
Moderator
Posts: 8594
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Can I make trains wait if a similar train is already in the station

Post by kamnet »

Overflow depot + waypoint is probably the most compact method. Time tabling your trains so that they're all not running at the same time to the station can also be beneficial, but it takes some work to make it all work out. But a well-regulated network literally running like clockwork is a beautiful thing to behold.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Can I make trains wait if a similar train is already in the station

Post by Eddi »

what i would probably do with that requirement description is a 3 track station with 1 platform designated for each cargo type, at the entrance a holding area for 1 additional train of each cargo type (this is also where the waypoints are), and to the entrance of that holding area an overflow depot.

Code: Select all

   D /-----W1->-P1->-\
->-^-------W2->-P2->------>-
     \-----W3->-P3->-/
(not included in the drawing: the additional tracks for the overflow depot logic)
numbat
Engineer
Engineer
Posts: 16
Joined: 30 Mar 2023 20:52

Re: Can I make trains wait if a similar train is already in the station

Post by numbat »

Hi All,

thanks for the responses. Looks like waypoints is the way to go.

So, how do I (or can I):
a) allocate a cargo type to a specific platform, or
b) allocate a train(s) to a specific platform?

Is this just with separate lines into the station? or is there some way of allocating them at the station / train level?

I am playing with jgr's patch version.

Cheers,
Chris.
skc
Traffic Manager
Traffic Manager
Posts: 177
Joined: 17 Sep 2022 02:02

Re: Can I make trains wait if a similar train is already in the station

Post by skc »

numbat wrote: 18 Jul 2023 22:18 Hi All,

thanks for the responses. Looks like waypoints is the way to go.

So, how do I (or can I):
a) allocate a cargo type to a specific platform, or
b) allocate a train(s) to a specific platform?

Is this just with separate lines into the station? or is there some way of allocating them at the station / train level?

I am playing with jgr's patch version.

Cheers,
Chris.
What those designs actually show is 3 separate stations placed next to each other.
The quickest way to do this, is to create 1 station, then hold down the Ctrl key while placing each of the 2nd and 3rd stations. An extra window will pop up when you release the mouse button, which will give you the option to build it as a separate station or join it to an existing one.
User avatar
odisseus
Director
Director
Posts: 568
Joined: 01 Nov 2017 21:19

Re: Can I make trains wait if a similar train is already in the station

Post by odisseus »

skc wrote: 18 Jul 2023 23:35 What those designs actually show is 3 separate stations placed next to each other.
No, not exactly, although it is true that the loading platforms for each cargo type must be logically separated. This can be achieved by placing waypoints in front of platform entrances. You can build separate waypoints adjacent to each other by pressing Ctrl, just like with the stations.
blackeagle
Engineer
Engineer
Posts: 7
Joined: 23 Aug 2022 06:10

Re: Can I make trains wait if a similar train is already in the station

Post by blackeagle »

numbat wrote: 18 Jul 2023 22:18

I am playing with jgr's patch version.

Cheers,
Chris.
Probably use slots then. Build the holding area and then use programmable signals to push trains into it if they can't acquire the required slot to load some cargo. Using JGR's patch there are other ways to do it, such as slots with conditional orders, but the holding area (so a large fiddle yard/sidings) that can hold all the extra trains is the easiest to set up.
numbat
Engineer
Engineer
Posts: 16
Joined: 30 Mar 2023 20:52

Re: Can I make trains wait if a similar train is already in the station

Post by numbat »

Hi All,

thanks for the responses. I have currently done it with some long lead tracks and waypoints, but might start building some overflow depots soon.

Found this interesting video on how to use slots with the jgr patch so might try this as well. https://www.youtube.com/watch?v=HW_JTb4HyCI

Cheers,
Chris.
blackeagle
Engineer
Engineer
Posts: 7
Joined: 23 Aug 2022 06:10

Re: Can I make trains wait if a similar train is already in the station

Post by blackeagle »

From a current game I'm playing (this is with jgrpp-0.53.3)

The yellow train (overflow food #168) will wait in the sidings until the conditional order (highlighted in yellow) is met. To ensure a smooth wait, the train is timetabled to wait for 1 minute at the waypoint. Once the condition is met, the train then approaches the signal in front of it where it attempts to acquire the "Conwy Horse Mkt" slot. This slot has a maximum occupancy of 1 so if two trains (there are three overflow food trains in total) are waiting in the sidings, only one will be dispatched to the station.

Finally, the slot is released when the train leaves the station after picking up a full load.

Just for clarification the overflow food trains can carry 298 tons and the conditional order waits until there are at least 299 tons waiting at the station. As other trains service the station (the red train currently in the station brings in livestock and takes away food), the station builds up a stock of food until it goes over 299 tons when the overflow train(s) are triggered. This example uses slots, programmable signals and conditional orders and works extremely well in practice.
Brown & Co., 16th Jan 1978.png
(1.92 MiB) Not downloaded yet
There are many options for conditional orders and programmable signals using jgr's patch pack so it's relatively easy to push trains where you want them, when you want them. EG, you can use a programmable signal in front of a platform to add a penalty if a train doesn't (or does) carry a certain cargo. Means a train will prefer a different platform if it carries eg grain, but can still use that platform if the others are full. Honestly, there is a lot of flexibility for building networks that work much like the real thing.
accipiter2000
Traffic Manager
Traffic Manager
Posts: 181
Joined: 19 May 2006 08:23

Re: Can I make trains wait if a similar train is already in the station

Post by accipiter2000 »

In my experience, if you arrange your stations and trains reasonably, you don't need to build any redundant infrastructure to handle congestion at these platforms.
Firstly, examine if there are excessive trains carrying each type of cargo.
Secondly, check if the number of platforms is sufficient. Generally, the number of platforms should be greater than the number of cargo types.
If the supply of goods is explosive rather than continuous, consider using mixed loading for trains.
My most satisfying game session.
viewtopic.php?p=1267789
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 19 guests