[Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Smart setups of railway stations, intelligent routing, solutions to complex train-routing problems.
Please provide - only if it makes sense of course - a blueprint of your creation.
Sworn
Filter Inserter
Filter Inserter
Posts: 327
Joined: Sun Apr 03, 2016 8:10 pm
Contact:

[Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by Sworn »

Tired of having to copy train configuration for each item, for each group, every new item or station?
This logistic train system will be the only train group you ever need.

Checkout my video about it: https://www.youtube.com/watch?v=Zp6RhK8l6k4

Features:
  • Automatic refueling.
  • Automatic select provider station (just like provider chest)
  • Automatic set requester pickups (just like requester chests)
  • No more train prioritizing the closest station
  • How many trains you want from 1 to N
  • Allow for trains with different capacity size
  • Auto calculate train capacity
Requirements:
  • Loader station (provider) have to have some sort of loading balancer.
  • Uses radar as logistic network in the red wire, so no using radar for other items, green in radar is free for use.
  • All loader station (providers) have to have the same name.
  • All trains have to be the same size.

To be checked:
train limit signal, to allow multiple trains in a single station. Currently it is designed to have multiple providers/requesters over a higher train limit.

Note on the train capacity, it is required that all trains have the same length, however, the wagon capacity can be reduced in game, or if you have mods that add extra-large wagons it will also works. Just read "Wagon Capacity" as how many stacks fits into one wagon; you can have it as minimum as only 1 stack, to any size a mod provides.


Also worth, note that this is made for items, so if you want to have a smart liquid train, you can have the exact same configuration, but your liquid providers have to have a different name then the item providers, and of course you will have to have a separated group for the liquid wagon. The icon you want for the brain is the liquid wild card, since the item wild card will only work for items, full cargo and empty cargo still works, then only difference is that you want fluid count > 0 instead.

Train group:
Make one train group with some name.
On your station schedule, add only one station, that will have the name of your provider station, if you use the bp below, it is called Provider station. That will be the only scheduled station.


On the interrupt, add the first as fueling, as print below:
Fuel station interrupt
Fuel station interrupt
10-25-2024, 18-22-35.png (31.31 KiB) Viewed 28443 times
select your fueling station, make sure it is robust enough to receive loads of trains, or just have multiples spread on the map with the same name.
Make sure you take into account the stack size of your fuel, for instance if you use rocket fuel that don't stack. Each locomotive has only 3 slots for fuel, so for rocket fuel I would use fuel < 2



Next, add another interrupt as your waiting dock:
Docking station
Docking station
10-25-2024, 18-24-37.png (27.57 KiB) Viewed 28443 times
Select whatever station you want as a waiting dock, make sure it is robust enough to receive loads of trains, or just have multiples spread on the map with the same name.



Next, add your interrupt brain:
The brain
The brain
10-25-2024, 18-27-20.png (35.26 KiB) Viewed 28443 times


Your train group should look like this:
Sample group
Sample group
10-25-2024, 18-29-39.png (59.65 KiB) Viewed 28443 times


Blueprints
If you don't have selector combinator unlocked, replace it with a constant combinator, using any signal with your stack quantity for the item and connect with the GREEN cable.

Provider station without balancer, only the station and combinator for wagon customization, use your own balancer:

Feed into A signal the total amount of your loader chests, see next blueprint for sample, simplest way is to just connect all your boxes and have a math combinator with Each+0, output into A

Provider station with basic balancer:


Requester station without balancer, only the station and combinator for wagon customization, use your own balancer:

Just as before, feed into A signal the total amount of your loader chests, see next blueprint for sample, simplest way is to just connect all your boxes and have a math combinator with Each+0, output into A
If you don't want a calculated minimum stock based on your train capacity, just remove the math combinator with division that outputs into M signal, replace it with a constant combinator outputting into M signal the minimum stock you want. Use bp below as example.

Requester station with basic balancer:



Sample provider:
10-25-2024, 18-34-16.png
10-25-2024, 18-34-16.png (4.36 MiB) Viewed 28443 times

Sample requester:
10-25-2024, 18-35-07.png
10-25-2024, 18-35-07.png (4.36 MiB) Viewed 28443 times

Full scale sample:
10-25-2024, 18-37-22.png
10-25-2024, 18-37-22.png (287.02 KiB) Viewed 28443 times

Note that priority on station max at 255, so don't go crazy low on the priority delay, keep it above 5k, having a low value in the priority delay, will result in all station having max priority which will lead to the train only attending to the closest station again.
Last edited by Sworn on Mon Oct 28, 2024 7:26 pm, edited 3 times in total.
FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

Thanks for you work. I played it a little over for more compact size, didn't change any numbers and wires.

Image



But there a still some kind of bug even in original. I've got two requesters for ore, two providers. One of them enables station pretty rarely. If I get rid of him, the second one doesnt enable station at all, even being full of ore.

Image
Sworn
Filter Inserter
Filter Inserter
Posts: 327
Joined: Sun Apr 03, 2016 8:10 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by Sworn »

blueprint you sent works just fine; both enables with no problem.
10-27-2024, 17-25-00.png
10-27-2024, 17-25-00.png (4.73 MiB) Viewed 27949 times
Dont forget that the station won't open/enable if there is no request for it. If only 1 station is being used, it just means that you are not consuming it fast enough to need two providers.

The requester will always alternate due the priority, providers get closed, so priority get reset as it doesn't mean anything for the provider unless you actually have two or more requests open at the same time, so if you are not using enough, only 1 provider will suffice, and the other will remain closed.
FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

Well yeah, I guess now it work pretty fine. Don't know what was the problem at creation mode. Now my full factory of city blocks works only on these stations and trains, thanks a lot :D

Image

I've created this book with ready from box solution for three wagons system for solids and fluids, presetted trains are included. Credits to you!

Image

FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

Interesting observation. If you set a station name with a green “*” as the product type, all types of cargo will be unloaded there indiscriminately.

The issue is that in a live save, with identical setups, all trains automatically head to that station, even when there’s a steel request station with a higher priority.

In creative mode, however, the opposite happens: even if the “*” priority is higher, trains prefer to drop copper ore at the specialized drop-off point. Only if that drop is disabled do they then choose the alternative marked with “*”

In my current factory, due to this inconsistency, I’m only using this feature when I need to offload all stuffed trains into the hub using active providers. But if I can figure out why it works in such opposite ways and what exactly affects it, I might be able to create a universal dumping station for items without, or lacking, a specific requester.

Image
FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

Nah, I got it. It's not a feature. There were just only one station in game that actually called "Item Parameter (solid item icon) Drop". When I changed it's name to "Anything (*) Drop" it just rewrote interrupt of Drop, and changed it's station's name same way. Same effect can be if you just take Drop interrupt and change it's target station to any of yours. Shame :cry:
Cjen1
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Nov 01, 2024 12:48 am
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by Cjen1 »

Hi, this is excellent thanks! I was looking at the overprovisioning issue that this solution still has issues with.
(If multiple providers exist and a single requester is enabled, then multiple trains are dispatched in the single tick before the providers disable themselves)

It can be fixed with randomisation. So if every depot takes a selector combinator which randomly picks an item to generate an interrupt for, then the chance that two trains choose the same provider should be greatly reduced. This also addresses the starvation issue by ensuring that every item gets delivered not just nearest first.


Here is the corresponding blueprint book, it pushes a lot of the combinators into the parameterisation of the blueprints making each station smaller and simpler.

FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

Great work! You've tackled the exact problem I ran into while scaling up — when there are too many providers, trains rush to all of them at once just because of a single requester, and they all overload together. Unfortunately, I couldn’t quite understand the setup just from the blueprint, especially without a radar. Could you possibly share a save file that demonstrates how it works?
FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

I've got idea. Let there be two minimal limits of stacks per requester station. Green one is, for example, 240 stacks. It says "Ok, we could have more of it, I'll turn station on, if there are some loaded trains near, come here". Red one is 120 stacks: "We're really low, and now trains are coming, send request signal on a radar." It will drain existing trains first, and only if there's none of them and noone is coming, seng request signal to activate provider stations. My number of copper ore trains at least decreasing and not increasing :)

Galefury
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Nov 03, 2024 8:23 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by Galefury »

Cjen1 wrote: Fri Nov 01, 2024 12:54 am Hi, this is excellent thanks! I was looking at the overprovisioning issue that this solution still has issues with.
(If multiple providers exist and a single requester is enabled, then multiple trains are dispatched in the single tick before the providers disable themselves)

It can be fixed with randomisation. So if every depot takes a selector combinator which randomly picks an item to generate an interrupt for, then the chance that two trains choose the same provider should be greatly reduced. This also addresses the starvation issue by ensuring that every item gets delivered not just nearest first.


Here is the corresponding blueprint book, it pushes a lot of the combinators into the parameterisation of the blueprints making each station smaller and simpler.

I don't quite get how it works either, even though the combinator setup is much simpler than the original one. The provider seems to always output iron plate onto the shared network, shouldn't that be the item parameter from the blueprint?

Also I don't understand the role of the depot. Is that a waiting station? Or does it have something to do with loading/unloading?

Regarding the question about no radar: it uses a Large Power Pole instead of radar. You have to manually connect it to the power poles running red/green wire along all of your rails. Or you can replace it with a radar, which works without manual connection (and with rails that don't have red/green wire along their power poles), but eats some power and takes up a radar channel.
Galefury
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Nov 03, 2024 8:23 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by Galefury »

I think I understand it better now, the depot is the waiting station. It cycles the waiting train through all resources. Now you're a coal train, now you're a rocket fuel train, and so on. Only if the (temporary) coal train finds an available coal provider, it leaves. That way, not all trains look at all resources all the time, and it's unlikely that multiple trains will go for the same resource at the same time. It will become increasingly likely with more trains, but in that case it is also more likely that multiple requests are open at the same time.

I do think that this can be improved further, but I don't know enough about trains and combinators yet to figure it out. One thing I saw in another smart train setup was different station groups for different train sizes. Another nice thing would be having dynamic train limits depending on how much resource is available/needed to help in high throughput situations. Both are from the same source (https://factorioprints.com/view/-MFIYLSH60wmZ-pNvcL_), but that one seems to work on a station by station basis, just enabling providers and requesters independently of each other by adjusting the train limit, so no logistic network, which should lead to problems when supply is greater than demand. It should be possible to combine both approaches by simply adding an enable/disable with a logic similar to the one used by Cjen1. Maybe I can work it out somehow...
FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

I already set everything up and have been playing on my main factory for a few days now, with many blocks and even more mining outposts. It works perfectly. When there’s demand for resources, the first trains to go are the ones carrying surplus resources collected from the mines (when these mines activate, I allow them to offload the entire stock at once rather than one train at a time). If those trains aren’t enough to meet the demand, the mines activate again — and more trains fill up and head to the 'Wait' stations. (I'm not very fluent in English, so 'Wait' is just a station where trains simply stand by until needed, while 'Depot' is where they unload or load important resources for the hub via drones.)

Check out this save file; it showcases all the blueprints in action.

Image

If a Load station is red, it means there isn’t enough cargo available, or the cargo isn't in demand. If a Drop station is red, it means it’s fully loaded and doesn’t require anything. The water tanks are in a half-empty state, so they’re in an intermediate condition — they can take another wagon of water, but they don’t need it urgently enough to activate the water request signal. If you click and manually drain water from them, you’ll see the trains with tanks moving to refill and top it up.

Also, the Drop station deactivates its request signal as soon as it detects that the required number of trains is already on its way. This way, there’s no need to worry about the entire fleet (or whatever it's called for trains) being overloaded with resources while waiting for Drop to reach the required level and turn off the signal.

schorsch_76
Inserter
Inserter
Posts: 38
Joined: Mon Oct 28, 2024 3:57 am
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by schorsch_76 »

In the full scale example you merge the two lanes for the stations. How do you make sure that a train just leave on the right lane? (if you have a right line drive direction)
FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

Strange question. It’s just like on a highway. With right-hand traffic, you always park only on the right side. At intersections, you enter on the right side and exit on the right side. If you need to turn around, you either find a place to make a U-turn (in our case, a loop) or go around the block.
Flame1869
Burner Inserter
Burner Inserter
Posts: 13
Joined: Tue Oct 24, 2017 6:21 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by Flame1869 »

im using the blueprints provided in the first post, and set the interupts exactly as instructed; but there seems to be something weird;
after doing to the provider station, they keep complaining there is no path and go to the depot; in the depot they keep looping into the timeout saying there is no path to the unloader.
yet if i manually just sent them there, there is a parth; so i dont have a clue why in the blueprint logic there seems to be something going wrong? did i forgget to setup something in the logic?
FGenious
Inserter
Inserter
Posts: 22
Joined: Sun Oct 27, 2024 12:42 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by FGenious »

Just try mine, there are stations, trains and interrupts ready out of the box.
OmiCron
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Nov 21, 2024 12:22 am
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by OmiCron »

FGenious wrote: Sat Nov 09, 2024 5:00 pm Just try mine, there are stations, trains and interrupts ready out of the box.
It works okay when you have efficient providers, but it does not work great at the early stage because the nearest requesters always get the trains. We probably need to increase the priority of the requesters over time and reset it when it receives a load.
Jojo11
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Feb 16, 2025 12:33 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by Jojo11 »

Hey Sworn,
I have used your blueprint. (without changing it)
In an existing savegame. I have the error that a provider is not switched off when the corresponding requester station is full (and switched off).

In the existing savegame, robots are also on the move and therefore all materials are available in the logistics network.
Unfortunately, there seems to be no delimitation because of this. This is why many trains are filled with iron plates, for example, without there being a requester. And these trains are then full in the depot
alliephante
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Mar 27, 2025 8:01 pm
Contact:

Re: [Space age] Logistic train without mods, pure vanilla - One train group to rule them all

Post by alliephante »

Cjen1 wrote: Fri Nov 01, 2024 12:54 am Hi, this is excellent thanks! I was looking at the overprovisioning issue that this solution still has issues with.
(If multiple providers exist and a single requester is enabled, then multiple trains are dispatched in the single tick before the providers disable themselves)

It can be fixed with randomisation. So if every depot takes a selector combinator which randomly picks an item to generate an interrupt for, then the chance that two trains choose the same provider should be greatly reduced. This also addresses the starvation issue by ensuring that every item gets delivered not just nearest first.


Here is the corresponding blueprint book, it pushes a lot of the combinators into the parameterisation of the blueprints making each station smaller and simpler.

This is a pretty clever implementation, but I have run into a few issues with it.
The first one is that the provider blueprint wasn't quite set up right in this, where it doesn't seem to replace the parameter properly. The fix was pretty easy, just make a copy and go to parametrisation option, and then at the bottom replace the iron plate with parameter 0 and resave and then it works.

There is an issue I have with depots however that I'd love to hear how you solved. When a train is waiting at the depot and gets passed the random signal, it very frequently will generate "No path" notifications. If it gets assigned a random item that has no open stations / requests, this happens. In practice, this means if your network is generally pretty satisfied, or you have a lot of items in that combinator, you are just absolutely spammed with this notification constantly.

My current, untested (until I get home from work haha), idea is instead of that constant combinator feeding the selected, if it's fed from the network that requests (radar in my case), then the selector is either not sending signals, or only ever sending signals that do have an outstanding request.

One thing I haven't figured out is how to separate item and liquid requests better with this, as with this idea it means fluid requests might get dispatched to item trains and vice versa. Right now I've pretty much made a second train group with slightly different interrupts to handle the fluid stations, and made a second depot ("Fluid Depot") which is fed from a constant combinator set to the fluid group, but if it's being feed from the same radar channel it would try to pick up items. I was trying to still maintain using one radar channel, but it might require both...

I set up my trains mostly the same as in OPs post, but added an interrupt of
Condition: circuit signal parameter > 0
Targets
[red square][signal parameter] full cargo inventory
so that trains can pull in that signal you are sending.

One thing I do like is your modified requester stations send the signal to the train, so if that station still needs loading the train can go right back to fetching more of that resource instead of having to go back to the depot again, which was a problem I often had in LTN (you could change a setting for this behaviour, but I never did because this sometimes caused partially unloaded trains or whatever).
Post Reply

Return to “Railway Setups”