Dynamic train schedule

Post your ideas and suggestions how to improve the game.
AntiBlueQuirk
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Wed May 03, 2017 2:57 pm
Contact:

Re: Dynamic train schedule

Post by AntiBlueQuirk » Tue Mar 05, 2019 11:41 pm

It's a little ugly, but I made a mod for this with the new API. :)

https://mods.factorio.com/mod/smart-waypoints

boggis2
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri May 05, 2017 10:14 pm
Contact:

Train ui/logic 0.17

Post by boggis2 » Sun Mar 24, 2019 12:45 am

I love the new train ui and how train stops are listed, but if i have a player transport train the stop list tends to get quite long, it doesn't help that add new wait condition and await circuit signal takes up 2 slots, so i wish i would be able to select in the train to not show it at all in the list.

Conditional train stops, i would love to set up a train stop in the train that uses circuit logic to decide where the train goes next. for instance if i give the the train signal Iron Ore 5 it will go to the station i have programed the train to go to when it received that signal instead of turning the train stops on and off.

Tekky
Smart Inserter
Smart Inserter
Posts: 1027
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Train ui/logic 0.17

Post by Tekky » Sun Mar 24, 2019 1:34 am

boggis2 wrote:
Sun Mar 24, 2019 12:45 am
Conditional train stops
This has already been suggested many times, most recently in the following thread:

viewtopic.php?f=6&t=64362 Dynamic train schedule
EDIT: This link now points to the current thread, because the threads have now been merged.

That thread also contains links to older threads.

As I have already stated in the thread mentioned above, I agree with the suggestion.
Last edited by Tekky on Tue Mar 26, 2019 12:04 am, edited 1 time in total.

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

Re: Dynamic train schedule

Post by Koub » Mon Mar 25, 2019 11:00 pm

[Koub] Merged into older topic with similar suggestion.
Koub - Please consider English is not my native language.

FuryoftheStars
Filter Inserter
Filter Inserter
Posts: 389
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Dynamic train schedule

Post by FuryoftheStars » Sun Apr 21, 2019 9:40 pm

Something like this would be nice to see implemented.

zinefer
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Jun 16, 2019 9:20 pm
Contact:

Low fuel condition for trains

Post by zinefer » Sun Jun 16, 2019 9:32 pm

TL;DR
Add a low fuel condition (or let me specify items and amounts of fuel conditions) for the scheduler.

What ?
Allow me to specify an item in the train schedule that allows me to set a stop for a low fuel condition.

Why ?
I love modular rail based setups and I want to have all trains go to a central location for refueling and I think this would be a clean solution. There are other solutions to this problem (such as turning a station on and off for all trains every x minutes) but I really feel there should be a more efficient solution. I feel these concerns are well served by the scheduler as I could have very fine, per route control for refueling.

Tekky
Smart Inserter
Smart Inserter
Posts: 1027
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Low fuel condition for trains

Post by Tekky » Sun Jun 16, 2019 10:24 pm

What you are basically asking for are conditional train orders. This has already been discussed in numerous threads, for example this one:

viewtopic.php?f=6&t=64362 Dynamic train schedule
EDIT: Meanwhile, the threads have been merged. Therefore, my link above now points to the current thread.

That threads contains links to further threads.
Last edited by Tekky on Mon Jun 17, 2019 5:47 pm, edited 1 time in total.

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

Re: Low fuel condition for trains

Post by Koub » Mon Jun 17, 2019 4:22 pm

[Koub] Merged into the older, more general topic.
Koub - Please consider English is not my native language.

Roxor128
Fast Inserter
Fast Inserter
Posts: 142
Joined: Sun Oct 02, 2016 9:48 am
Contact:

Re: Dynamic train schedule

Post by Roxor128 » Fri Jun 21, 2019 7:08 am

For a newbie-friendly way of skipping stations, I'd suggest just adding a "Skip If" section to the train schedule editor which can use all the same conditions as the "Wait Until" section. I would expect the Skip If section would be evaluated when the train meets the Wait Until condition for the previous station in the schedule.

I know we can approximate this by enabling and disabling stations with the circuit network, but that really only works if you have a particular group of trains that all visit a common set of stops. It's not going to work for keeping trains from visiting the refuelling station when they don't need it, for instance.

Uses for a "Skip If" section:

"Skip If Fuel > 25%" on a refuelling station.
"Skip If Cargo Empty" on stations that need something delivered.
"Skip If Cargo Full" on mines.

Rumsfield
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Nov 13, 2019 2:11 am
Contact:

Re: Dynamic train schedule

Post by Rumsfield » Wed Nov 13, 2019 4:19 am

I started to build my first attempt at a rail cell based megabase, and I've come to the conclusion that adding this kind of skip condition per-station in the train schedule would make automating trains a whole lot easier.

The case I have is shown below, where I have a cell for dropping off iron ore (_Sink Iron Ore), a cell for stacking trains (_Stack3) and an external iron deposit for filling up on iron ore (Iron Field 2). I'd like for an arbitrary number of trains to be programmed with the same schedule, and wait in the stack (_Stack3) until any station named _Sink Iron Ore becomes enabled and available. Now, if multiple trains are waiting for an available _Sink Iron Ore, they will all depart the stack and race for the opening. When the station becomes occupied, and there are no other open _Sink Iron Ore stations, they will continue to the Iron Field 2 station to fill up on ore when the train is already full. I'd like for the train to know that it is already full, and have that as a condition to skip the Iron Field 2 station and return back to the stack instead to wait for the next available _Sink Iron Ore station.

Image

Here is what the current train schedule looks like. And below that, I made a mock-up of what the skip conditions could look like, directly under the station name and slightly indented less.

Image

In this mock-up, the train would check the skip condition before pathing to the Iron Field 2 station. If its cargo was already full, it would skip the station and try to find another _Sink Iron Ore, or just return to the stack and wait there.
Image

This is a feature that I believe would not alter train mechanics if players chose not to use it, but would greatly improve the automate-ability of train schedules.

draslin
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Nov 14, 2019 2:27 am
Contact:

Re: Dynamic train schedule

Post by draslin » Thu Nov 14, 2019 2:53 am

You know as much as I'd like to see conditional scheduling, I can't imagine how complex it would be to implement in a truly programmatic way. I'd settle for something simpler. The ability to group stations in the GUI and a Condition that waits for the next station or group to be enabled before moving to the next station/group station entry in the schedule.

The group enabled state would handled it's members via an and/or toggle If the group is set to OR, any enabled station marks the group as enabled. Set it to AND and all stations have to be enabled for the group to show enabled. Barring a toggle, I'd prefer OR to AND behavior.

That would give me a lot of control without (I'd like to think) adding a lot of coding for conditions specific only to the train gui or somehow setting up messaging between stations or even more remotely figuring out how to correlate a given station name with a particular condition. This is about where I can go rather than where I should go. So not quite the same thing as a dynamic train schedule, or at least, just one half of it.

I rig my stations to shut them selves off via vanilla circuits if there is enough product stored locally to meet local demand for unloading stations, and for loading stations they turn on when there is enough product cached locally for a full train load. The main frustration I have, is that I also have fueling stations that never shut off, and a home station where the journey starts by waiting for the train to be full or empty first, so I end up looping when all the intermediary stations are disabled.

If I could group all the self regulating stations into a group, and have a condition option for waiting for the next stop (or group of stops) then I'd have quite a lot of control over what a train does next, by controlling whether or not the destination stations are enabled AND how I group them.

mrvn
Smart Inserter
Smart Inserter
Posts: 3856
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Dynamic train schedule

Post by mrvn » Thu Nov 14, 2019 11:26 am

Tekky wrote:
Thu Jan 10, 2019 1:05 pm
I agree that train entry/skipping conditions would be an important feature.

However, OpenTTD style conditional jump orders may be better, since they allow you to jump to any order in the train's schedule, thereby allowing you to skip several orders at once, instead of only one order per entry/skip condition.
Bugger wrote:
Thu Jan 10, 2019 12:07 pm
Next anticipation: "the decision should be made at the station and not in the train". I read this several times in the older threads and I think it just doesn't make sense. I can develop further on this in the next posts if someone asks, but I believe the argument is invalid.
I agree that there certainly are situations for when the condition for entering a station should be determined by a train condition and not by a station condition. One such example would be a refueling station.
You run into problems there with stations that are unreachable. A double headed train can only turn around at a station. If mid travel it decides to skip the station and go somewhere else that requires the train to turn around then it is stuck.

For refueling set the skip condition large enough so that the train can always reach the next station and then go refuel.

mrvn
Smart Inserter
Smart Inserter
Posts: 3856
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Dynamic train schedule

Post by mrvn » Thu Nov 14, 2019 11:37 am

Rumsfield wrote:
Wed Nov 13, 2019 4:19 am
I started to build my first attempt at a rail cell based megabase, and I've come to the conclusion that adding this kind of skip condition per-station in the train schedule would make automating trains a whole lot easier.

The case I have is shown below, where I have a cell for dropping off iron ore (_Sink Iron Ore), a cell for stacking trains (_Stack3) and an external iron deposit for filling up on iron ore (Iron Field 2). I'd like for an arbitrary number of trains to be programmed with the same schedule, and wait in the stack (_Stack3) until any station named _Sink Iron Ore becomes enabled and available. Now, if multiple trains are waiting for an available _Sink Iron Ore, they will all depart the stack and race for the opening. When the station becomes occupied, and there are no other open _Sink Iron Ore stations, they will continue to the Iron Field 2 station to fill up on ore when the train is already full. I'd like for the train to know that it is already full, and have that as a condition to skip the Iron Field 2 station and return back to the stack instead to wait for the next available _Sink Iron Ore station.

Image

Here is what the current train schedule looks like. And below that, I made a mock-up of what the skip conditions could look like, directly under the station name and slightly indented less.

Image

In this mock-up, the train would check the skip condition before pathing to the Iron Field 2 station. If its cargo was already full, it would skip the station and try to find another _Sink Iron Ore, or just return to the stack and wait there.
Image

This is a feature that I believe would not alter train mechanics if players chose not to use it, but would greatly improve the automate-ability of train schedules.
From there it would be only one small step further to a fully programmable schedule. In the "Skip condition" the first entry could be the number of entries to skip showing for example for Iron Field 2: "+2: _Sink Iron Ore". And then allow multiple skip conditions. Maybe call it "conditional Destination".

Note: +2 denotes that it jumps 2 entries down. The name of the station is added for readability. Since a station can appear multiple times in the schedule the name isn't unique enough to be used. The field could have a "+" and "-" button to modify the target.

Post Reply

Return to “Ideas and Suggestions”

Who is online

Users browsing this forum: No registered users