Dynamic train schedule

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Dynamic train schedule

Post by ssilk »

merged into this topic --ssilk
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Sopel
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Mon Sep 24, 2018 8:30 pm
Contact:

Conditional stations in train schedule

Post by Sopel »

TL;DR
Each station in train schedule has "arrival" conditions complenting the currently existing "departure" conditions.
What ?
Each station in train schedule right now has "departure" conditions. The proposition is to natually extend this to have optional "arrival" conditions that determine whether a schedule entry is to be respected or omitted. The "arrival" conditions are specified in the same form as "departure" conditions currently in the game. The "arrival" conditions are checked just before trying to path to the scheduled station, if not fulfilled then next item is considered immediately. By default the "arrival" condition on each schedule item should be "true" which means it should be respected.
Why ?
Trains require fuel. Fueling trains has always been troublesome. Not counting mods 3 main ways of fueling trains that I can think of.
1. Always add a fuel station to the schedule - increases traffic and increases latency.
2. Fuel trains at each loading station, fuel distributed by trains - requires bringing fuel to each outpost, ends up buffering a lot of fuel, slightly increases traffic, increases number of stations.
3. Fuel trains at each loading station, fuel distributed by bots - only viable for bases with extensive roboport networks which have many problems on their own.
This feature would allow easy creation of refueling stations that are only used whenever needed.
Last edited by Sopel on Fri Oct 16, 2020 10:11 pm, edited 1 time in total.

MassiveDynamic
Filter Inserter
Filter Inserter
Posts: 261
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Conditional stations in train schedule

Post by MassiveDynamic »

Pretty sure this will be fixed in the next update according to last weeks FFF.

conn11
Filter Inserter
Filter Inserter
Posts: 387
Joined: Wed Sep 14, 2016 5:02 pm
Contact:

Re: Conditional stations in train schedule

Post by conn11 »

Furthermore, refuelling should be the least problem, given 3 slots for nuclear fuel per locomotive.

Sopel
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Mon Sep 24, 2018 8:30 pm
Contact:

Re: Conditional stations in train schedule

Post by Sopel »

MassiveDynamic wrote:
Fri Oct 16, 2020 9:12 pm
Pretty sure this will be fixed in the next update according to last weeks FFF.
how so?
conn11 wrote:
Fri Oct 16, 2020 9:22 pm
Furthermore, refuelling should be the least problem, given 3 slots for nuclear fuel per locomotive.
3 nuclear fuel is a finite amount

MassiveDynamic
Filter Inserter
Filter Inserter
Posts: 261
Joined: Sun Sep 16, 2018 10:44 pm
Contact:

Re: Conditional stations in train schedule

Post by MassiveDynamic »

Sopel wrote:
Fri Oct 16, 2020 10:12 pm
MassiveDynamic wrote:
Fri Oct 16, 2020 9:12 pm
Pretty sure this will be fixed in the next update according to last weeks FFF.
how so?
As described in FFF the train station limit would allow a fuel train to have a schedule that includes all the stations but it would only actually deliver if there is room in the station allowing the fuel train to “loiter” around the base without causing backups.
Also there is a fourth option that you did not consider in your post. Each train could contain a fuel wagon which refills each stop as it makes its normal circuit. Fuel wagon chests can be limited so as to avoid too much overstock. It’s a pretty simple solution to the “problem” you present.

SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Conditional stations in train schedule

Post by SoShootMe »

Sopel wrote:
Fri Oct 16, 2020 9:06 pm
TL;DR
Each station in train schedule has "arrival" conditions complenting the currently existing "departure" conditions.
I have a feeling this (or similar) has been suggested before, but I can't find it; I think expressed as a way to say "Skip this stop if ...".
Sopel wrote:
Fri Oct 16, 2020 9:06 pm
Why ?
Trains require fuel. Fueling trains has always been troublesome. Not counting mods 3 main ways of fueling trains that I can think of.
1. Always add a fuel station to the schedule - increases traffic and increases latency.
2. Fuel trains at each loading station, fuel distributed by trains - requires bringing fuel to each outpost, ends up buffering a lot of fuel, slightly increases traffic, increases number of stations.
3. Fuel trains at each loading station, fuel distributed by bots - only viable for bases with extensive roboport networks which have many problems on their own.
TL;DR: there may be good reasons for the suggestion but I don't think this is one.

Firstly, to be able to use "arrival conditions" for train fueling, you would also need to be able to set a condition based on fuel. I think that is not as simple as it may first appear due to multiple locomotives (which may be facing different directions) and fuel types.

Secondly, I've never considered fueling trains troublesome. In the early game, I see it as a similar logistics problem to, but lower volume than, fueling stone/steel furnaces. At first, I may have a few trains delivering raw materials to a common location, so they are simply refueled as they unload there. With the stops close together this can be done using belt, but if stops are distributed around a base, manually filled chests is also viable.

By the time I have multiple locations where trains unload, a few extra stops and some buffered fuel are not a concern (I think this is likely to be true for any kind of "modular" factory). So those downsides of #2 don't apply and I do something like that: one extra stop at each of those locations, enabled when its buffer is low, that fuel is delivered to and distributed to the nearby stops by belt/bot. As above, trains are refueled as they unload, avoiding the diversion and delay that #1 would introduce (though your suggestion would make this infrequent). The buffer means one train is sufficient to supply many stations and the extra rail traffic of transporting fuel (another downside of #2 you mentioned) is negligible.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Conditional stations in train schedule

Post by ssilk »

SoShootMe wrote:
Sat Oct 17, 2020 6:20 am
I have a feeling this (or similar) has been suggested before, but I can't find it; I think expressed as a way to say "Skip this stop if ...".
Maybe this one:

viewtopic.php?f=6&t=64362 Dynamic train schedule

But the number of suggestions that want to extend the train schedules is high...
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Conditional stations in train schedule

Post by Sad_Brother »

SoShootMe wrote:
Sat Oct 17, 2020 6:20 am
Firstly, to be able to use "arrival conditions" for train fueling, you would also need to be able to set a condition based on fuel. I think that is not as simple as it may first appear due to multiple locomotives (which may be facing different directions) and fuel types.
Like "Fuel in any locomotive less than N%" ?

I can add another condition: "No other destination". So trains, loosing destination (due to stations off, limited, destroyed etc) can reroute to depot.

Koub
Global Moderator
Global Moderator
Posts: 7736
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Dynamic train schedule

Post by Koub »

[Koub] Merged into older thread with same suggestion.

[Edit]
ssilk wrote:
Sat Oct 17, 2020 7:27 am
SoShootMe wrote:
Sat Oct 17, 2020 6:20 am
I have a feeling this (or similar) has been suggested before, but I can't find it; I think expressed as a way to say "Skip this stop if ...".
Maybe this one:

viewtopic.php?f=6&t=64362 Dynamic train schedule

But the number of suggestions that want to extend the train schedules is high...
Well yes :)
Koub - Please consider English is not my native language.

SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Conditional stations in train schedule

Post by SoShootMe »

Sad_Brother wrote:
Sat Oct 17, 2020 7:29 am
SoShootMe wrote:
Sat Oct 17, 2020 6:20 am
Firstly, to be able to use "arrival conditions" for train fueling, you would also need to be able to set a condition based on fuel. I think that is not as simple as it may first appear due to multiple locomotives (which may be facing different directions) and fuel types.
Like "Fuel in any locomotive less than N%" ?
I think that, or close to it, is the only sensible option but I disregarded it because it's so specific to the "refuel stop" approach, and being so specific feels somehow wrong. But now I think about it, the only real reason I can see to read fuel is to use that approach.

The point remains that to allow an efficient "refuel stop" approach (which does not seem necessary to me, but each to their own), you need both the "skip if..." feature and a "fuel condition" feature.

TheNut
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Oct 26, 2016 4:27 am
Contact:

Re: Dynamic train schedule

Post by TheNut »

Just wanted to give my suggestion for an addition to factorio train stations and trains. This would allow for a train station to request a train.

Station functionality:
New mode of operation "Request train"
- The request could be triggered by a network condition just like the "Enable/disable" option.
- When a request is raised, a filter can be added to the request signal to allow trains to accept or ignore a request depending on if they have a matching filter.
- When a train accepts the request, it sets the "Assigned" flag in the station to "checked". This prevents the "Request train" signal from being sent again. This can be cleared manually by the player.
- When a train accepts the request, it sets a temporary schedule to the station with the wait conditions defined in the station. These wait conditions are exactly the same as can be set in the locomotive since they will be assigned to the locomotive. This includes an additional "Get train request" wait condition.
- After the train enters the station AND then leaves the station, the "Assigned" flag is cleared. This allows the station to raise another "Request train" request


Locomotive functionality:
- New wait condition available "Get train request". This flags that the locomotive is able to get requests for new stations from the network.
- The Get train request can have filters applied to it. If a filter is applied, then it will only accept station train requests that have a filter that matches the one applied in the locomotive. If no filter is applied, then all requests are accepted.
- When a "Request train request" is accepted, a new station is added as a temporary schedule to the locomotive's list just after the current station where the locomotive is sitting. The new temporary schedule will copy the wait conditions from the station that is requesting the train.
- Accepting of the request will also satisfy the wait condition.


Image

Thoughts?

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Dynamic train schedule

Post by ssilk »

TheNut wrote:
Tue Nov 24, 2020 4:11 am
Thoughts?
It sounds much more complex than LTN-mod. And that is already complex. Sorry.

I recommend you to play with other train schedule mods first (LTN, TSM, smarter Trains, ... not in this order).
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

WHEN / IF conditions on train schedule

Post by ptx0 »

A lot of requests around trains involve 'have train go to station only if certain condition is true'. Some of them involve train conditions, like fuel level.

Proposal is to have a WHEN and IF condition option in the button alongside "OR" and "AND", these will be evaluated by the train BEFORE it decides to path.

WHEN example:

- go to Fuel Station WHEN 'train fuel signal' is under a constant level

IF example:

- go to Iron Mine IF train is not full

other AND / OR conditions would be used as they are now, evaluated when the train is in the station.

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1237
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: WHEN / IF conditions on train schedule

Post by valneq »

Who prevents you from doing all that logic externally via combinators and then only send a "checkmark" = 1 signal to the train?

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: WHEN / IF conditions on train schedule

Post by ptx0 »

valneq wrote:
Mon Nov 30, 2020 5:22 pm
Who prevents you from doing all that logic externally via combinators and then only send a "checkmark" = 1 signal to the train?
you can't control the train schedule in a particular train, you can only disable every station.

unless you can tell me how to have one train avoid going to a miner because it's full, before it leaves - and without affecting any other train that's trying to arrive/path at the miner because it DOES need supplies. I'm all ears.

you definitely can't tell when a train's fuel is low.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: WHEN / IF conditions on train schedule

Post by ptx0 »

example problem i'm trying to solve:

1. train goes to miner
2. waits until full
3. goes to waiting bay until destination slot free
4. travel to destination
5. destination is already full, but train schedule has a timeout condition so that it heads back to mine after 90 seconds of inactivity, which helps avoiding use of bots, belt balancers, and circuited unloaders - sometimes a wagon empties fully and remote train is waiting for one wagon to finish loading, and the whole thing gets stuck.
6. sometimes the train doesn't have anything to unload, the receiving side is idle. if it heads back to mine when it's full, i'd like for it to bypass the mine fill-up and go straight into its waiting bay.

it's not a huge deal to have it wait for the fill-up but occasionally a full train gets stuck waiting behind a partially-loaded train, waiting for it to finish loading, so it can pull into the stop, briefly, before going to its waiting bay.

another example would be a train that we want to make multiple trips to different receivers on an inactivity condition but, not head back to the mine until the train has less than a threshold of items.

1. train goes to fill up on whatever
2. train goes to receiver A, inactivity 30 seconds OR station buffer is satisfied (and station disabled)
3. receiver B, inactivity 30 seconds OR station buffer is satisfied (and station disabled)
4. back to fill-up if we've reduced the capacity beyond a certain threshold or wait at one of the receivers until destination available

doing this with multiple trains all sharing the same supplier stop names isn't so easy to do from the station circuit condition side of things.

Koub
Global Moderator
Global Moderator
Posts: 7736
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Dynamic train schedule

Post by Koub »

[Koub] Merged into older thread with same or very similar suggestion.
Koub - Please consider English is not my native language.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Dynamic train schedule

Post by ptx0 »

Koub wrote:
Mon Nov 30, 2020 8:37 pm
[Koub] Merged into older thread with same or very similar suggestion.
mine was specific, and rather different from the rest of these. feels shitty man.

Koub
Global Moderator
Global Moderator
Posts: 7736
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: WHEN / IF conditions on train schedule

Post by Koub »

ptx0 wrote:
Mon Nov 30, 2020 5:20 pm
Proposal is to have a WHEN and IF condition option in the button alongside "OR" and "AND", these will be evaluated by the train BEFORE it decides to path.
This is pretty much OP's request, said in a more straightforward and concise way :
RubeGoldbug wrote:
Thu Jan 10, 2019 12:07 pm
The suggestion is to add a way for the player to have a more complete way to schedule trains, while keeping it simple and very close to the already existing system. As in the listed topics below, I think the most simple/efficient/powerful solution is to add train entry, or (equivalently) station-skipping conditions. For the moment, when a train is at a station, it checks for a set of condition to know when to leave. The suggestion is to add at this precise moment a set of conditions to know if the next station in the schedule can be skipped.
OP wants a way to control if a train will have to path to the next station in its schedule in addition to the existing means we have to control for how long a train stays at a station.
I fail to see in what they are different.
Koub - Please consider English is not my native language.

Post Reply

Return to “Ideas and Suggestions”