Train stops and schedule improvements

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
evilbrain
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Oct 31, 2016 7:09 pm
Contact:

Train stops and schedule improvements

Post by evilbrain »

TL;DR
1. Allow players to control maximum number of trains scheduled to arrive to a station.
2. Add "do not skip if stop is disabled" checkbox to train schedule.
What ?
1. When a train stop is enabled via circuit network all trains that have that stop next in their schedule will start moving there at the same time. By setting a limit players can make the game choose a number of trains that are allowed to start moving to this train stop. Trains that are over the limit will treat this train stop as if it was disabled. Setting a limit via circuit network and reading a number of scheduled trains would be nice.
2. When a train stop is disabled via circuit network trains with unskippable station in their schedule will wait for the station to open instead of going to the next station. Another option would be a wait condition "train stop N is enabled".
Why ?
1. In many cases this problem can be easily solved by controlling rail signals. For example if you have 10 trains parked waiting for a train stop to open and you only need 2 trains to arrive put rail signals in front of them and enable only 2.
However if you have multiple arrival stations with the same name there is no way to control how many trains will go to each station. Before 0.15 there was no point in keeping stops with the same name far from each other, but now when train stops can be enabled and disabled having generic station names ("Iron Drop" instead of "Electronic Circuits - Iron", "Gears - Iron", etc) is very useful, but this introduces race conditions that can't be solved.

Example:
You have multiple iron mines. The simplest way to deliver iron ore to smelters would be having a train assigned to each mine and a train stacker near a smelting area. But this has it's downsides. Your stacker needs to be big enough to fit all your trains because even if you're not backed up on iron there is a chance of all your trains arriving at the same time. And as your ore patches deplete you have a needlessly big empty stacker and a bunch of trains on mining outposts waiting longer and longer.

With new train stops there is another way. Name all your ore pickup stops "Iron Ore", enable them only when you have enough to load a full train, make a big enough train (8-12 cargo wagons). Now you have one train moving all your ore. No downtime, no need to expand the stacker every time you set up new mining outposts, no need to set up a new train every time. Just hook a couple of deciders to a train stop, rename it to "Iron Ore" and you're done. But at some point this train will not be able to keep up with mining and you'll need another one.

And now to the meat of the problem: you can control how many trains you let out from a station, but you can't control where they go. If there are 3 mining outposts open and you release 3 trains they will all go to the nearest one if other outpost are far enough. Best case scenario - when one train will occupy an outpost 2 other trains will reschedule to the next closest stop. Worst case (if the next stop is far enough) - they will wait for their spot and when the first train leaves (assuming it even can leave, there are 2 giant trains causing a traffic jam on the main line) station will close and only then they will reschedule. It's even worse if the outposts are on different branches of train tracks. This almost eliminates usefulness of the second and third trains because the more trains you have the longer they will travel. Second train will travel from dropoff to outpost 1, then to outpost 2, then back to dropoff. Third - dropoff-1-2-3-dropoff.

Currently there is no way around it. You can have only one train in transit or loading. You can only send the next train when the previous train is done loading and it's outpost is closed. Otherwise they will schedule to the same train stop. Presenting a train stop as disabled to other trains when it's over the limit will eliminate all race conditions.


2. This is just a quality of life change. Right now this is how trains with only 2 stops in their schedule behave. But if there are 3 or more stations this behavior changes.

Example: an outpost supply train picks up ammo, repair packs and fuel at different locations, goes to a parking stop and unloads items at outposts when needed. If there are no dropoff stations enabled it will just run in circles between pickup stations and parking.

This is not a big problem and can easily be solved by setting a wait condition on the parking stop and sending a signal from an outpost when it lacks some items or just by having a pickup train and a dropoff train. But this behavior of 2-stop trains seems very useful.

Mr. Mechanic
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sun Jan 10, 2016 1:53 pm
Contact:

Re: Train stops and schedule improvements

Post by Mr. Mechanic »

+1 to this. #2 can be worked around with a bit of circuit network logic, but #1 is a problem. I was thinking about trains being able to reserve a station, but being able to set a reservation count is even better. In addition to trains ignoring stations that are 'capped', it'd be nice if stations that aren't capped yet but do have some reservations would be penalized accordingly, so trains will prefer stations that are immediately available (if they're not too far away) over ones that are already serving a train.

Engimage
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Train stops and schedule improvements

Post by Engimage »

I have made a suggestion pretty long ago
viewtopic.php?f=6&t=47695
Long story short
PacifyerGrey wrote:I've been thinking on smart train systems and came up with several ideas on how to improve train behaviour when you got several stations with same name.

1. Add a circuit controlled pathfinding penalty to stations. This will help balancing stations based on their cargo. Would be cool for both outpost (provider) sides and unloading (consumer) sides.
2. Add a counter for currently incoming trains to the station and add a pathfinding penalty as a configurable (relatively large) multiplier of that. Currently the station seams to be prioritized lower only if it currently has a train directly on it but it does not account trains that are en route / waiting for it in the stacker.
Point 2 is a direct solution to your task.

Rensiur
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Sat May 17, 2014 2:41 pm
Contact:

Re: Train stops and schedule improvements

Post by Rensiur »

+1 - on large networks without Mods this is a must have.

Vals Loeder
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed May 24, 2017 11:58 am
Contact:

Re: Train stops and schedule improvements

Post by Vals Loeder »

+1

moronsrus
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Apr 29, 2016 5:14 am
Contact:

Re: Train stops and schedule improvements

Post by moronsrus »

+1

#2 would be very useful for me.
I have a setup where all of my trains just go between loading/unloading stations, and some circuit network stuff to control which station is enabled.
To try and spread the load evenly, when an unloading station receives a train it will stay disabled until the rest of the unloading stations have received a train.
That way they all take turns instead of the nearest unloading stations taking all the stuff.
If all the loading stations become disabled, then sometimes a train at an unloading station will path to another unloading station.
This takes up that unloading stations turn without dropping off any items.
The empty train will also block the unloading station, while full trains go and service other stations.

If trains didn't skip disabled stations, the whole setup would just work.

Post Reply

Return to “Ideas and Suggestions”