Page 1 of 1

New train schedule setting: Skippable train stop

Posted: Fri Oct 15, 2021 5:24 pm
by UkcsAlias
TL;DR
An option at a train that allows it to skip a train stop and instantly path to the next one (it wont try to pass the train stop at all).
What ?
Normaly when you set a schedule, you want to describe the stops it can go to. When using limits on train stops. Trains might often not be able to go to the destination. This means you often need to make a park where the trains can wait for a free spot to deliver resources.

However, there can be several cases in which most trains are already empty, and a train was recently full. Being able to instantly drive to the destination can save some time there (and potentialy fuel). As normaly it would path to the park first before it instantly drives further to the destination.

This skipping is decided as soon as it starts driving, at which point it can already reserve its spot at the train stop. Which on that should also be relatively easy to calculate.

It is combinable with a resource count in the train, where if the checks do not pass, it can not skip the station (or in the case of it being an OR check, it can). This means if a resource wasnt depleted enough out of a train, the train station might not go to a station that wants to top it off.
Why ?
I think its going to help at the train network by making trains not always have to ride to a train park, before going to the destination that is requesting a certain train. And especialy on larger maps, having a train arrive faster might reduce the number of active trains. While due to its use being optional, it does not disrupt those who want more accurate control.

Re: New train schedule setting: Skippable train stop

Posted: Sat Oct 16, 2021 3:09 am
by mrvn
There are already multiple suggestion open for this feature and there are mods for this.

But your description seems to be a bit contradictory.
UkcsAlias wrote: Fri Oct 15, 2021 5:24 pm When using limits on train stops. Trains might often not be able to go to the destination. This means you often need to make a park where the trains can wait for a free spot to deliver resources.
If they can't go to the destionation then they will remain at their last stop. That already is their park position. That's the benefit of using train limits.

Use a small stacker right before each train stop, maybe as small as just one train, and set the train limit to 1 + size of stacker. Don't use an extra parking stop. And never have more trains than the sum of the train limits for all loading stops. Then you get no problems. That way trains will idle at the loading stops, already fully loaded, waiting for a station to open up for delivery.
UkcsAlias wrote: Fri Oct 15, 2021 5:24 pm However, there can be several cases in which most trains are already empty, and a train was recently full. Being able to instantly drive to the destination can save some time there (and potentialy fuel). As normaly it would path to the park first before it instantly drives further to the destination.
What has the inventory of the train got to do with using or skipping a parking stop? You would want to skip the parking stop if the final train stop has open space, not when the train is full or empty. You want to skip unloading stations when the train is empty or loading stations when the train is full. I'm afraid you are mixing ideas here.

Re: New train schedule setting: Skippable train stop

Posted: Sat Oct 16, 2021 8:05 am
by ssilk
As mrvn already said, there is a bunch of similar suggestions around skipping stops. Can’t merge them, cause all are different.

viewtopic.php?f=6&t=64362 Dynamic train schedule
viewtopic.php?f=6&t=89618 Trains need to skip unload stations when empty
viewtopic.php?f=6&t=100019 Please add option to skip stations when destination is full
viewtopic.php?f=6&t=95106 Skippable stops in Trainschedules

Re: New train schedule setting: Skippable train stop

Posted: Sat Oct 16, 2021 4:49 pm
by UkcsAlias
mrvn wrote: Sat Oct 16, 2021 3:09 am
UkcsAlias wrote: Fri Oct 15, 2021 5:24 pm When using limits on train stops. Trains might often not be able to go to the destination. This means you often need to make a park where the trains can wait for a free spot to deliver resources.
If they can't go to the destionation then they will remain at their last stop. That already is their park position. That's the benefit of using train limits.
The last stop indeed would be the parking spot which you normaly design to have it stay. But the thing is (on larger maps). That distances can become quite large for trains. And before heading to the intended destination, it always has to pass that other stop before it can continue.

The idea of me was to make it possible for the train schedule to just skip that train station if the next is already available. This means that a train that is coming from an ore node can directly drive towards the delivery point, without having to pass the other train station.

And this should not conflict with train limits. If the station has a train limit, and you set it to being skippable, when that station is full, it just continues to the next station.

Sure, you can use the other way with inserters and have some logic that way. But on that i think its cleaner if the train schedule itself contains that logic.

----

Note that i also want it to be possible to have them combined with other conditions, as those conditions can often still matter. And 2 of ssilks links can be resolved by having the train contents, and the skippable flag both set under a stop using an AND.

But ofcourse, other methods can also be useful, and on that viewtopic.php?f=6&t=95106 seems to be the best method to handle my situation aswel, and on that also has the advantage that it can react on fuel values and not run empty on the train tracks. This thread should be able to solve those 2 threads aswel.

I would say this thread can be closed because that solution to me seems to be the better one. But maybe this idea can give some idea on how that other one can be improved. As i think that its nicer to have that 'only if' as a seperate check, as with a skippable flag, that column can be used for just OR and AND again which allow more flexibility.

Re: New train schedule setting: Skippable train stop

Posted: Sun Oct 17, 2021 1:37 pm
by disentius

Re: New train schedule setting: Skippable train stop

Posted: Sun Oct 17, 2021 9:00 pm
by mrvn
If you just want (all) trains to skip a stop you can disable it. The problem comes when you want only some trains to skip a stop.

But I think there is a solution to your "long distance" problem that is simple to build in vanilla. Instead of having the trains going from A to B all over the map add another station with 2 stops Xa/Xb in the middle. Have one train to A to Xa. And have another train go Xb to B. At Xa you unload trains and at Xb you load them. You can do that with long inserters or with stack inserters on diagonals. Or with buffer chests between train stops.

So when B needs items again they will come from Xb which is much nearer.

And if you are clever you will do some processing at X, like smelt ore into plates. Or produce green circuit boards. That really makes that design fly.

Re: New train schedule setting: Skippable train stop

Posted: Mon Oct 18, 2021 6:06 am
by ssilk
That really makes that design fly.
You’re just splitting the problem into two. 8-)