Train station groups

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
User avatar
DingoPD
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Thu Jun 13, 2013 1:22 am
Contact:

Train station groups

Post by DingoPD »

TL;DR
Add ability to group together stations of the same name using signal, with the option of affecting the path cost of the train within the group.
factorio_station_group.jpg
factorio_station_group.jpg (1.06 MiB) Viewed 3409 times
Eh ?
Let's face it, single station, no matter how big usually isn't up to the task to keep things fed at a decent rate. Multiple stations with the same name work, to a point. When demand becomes higher than supply, stations with the highest path cost get no love.

Trains are lazy, they always tend to shoot for the closest station, that makes it difficult to keep the supply balanced.

Station grouping could solve this problem.

All stations within specific group would have the same path cost, path algorithm would pick the group as a whole, so even if there is only single train supplying group of 6, the distribution should be even within the group. Round robin could work for that. We could also use the grouping signal to relay station priority within the group.
Why ?
Quality of life improvement.
It would make trains more preferable as form of transport. Each station should get some supplies not just the one that happens to be the nearest one. Without having to resort to combinator black magic at every station.
It could lower the overall cost of path finding by reducing the number of iterations required.
---

PS: I haven't found a thread that would be about the same thing. The Train station grouping thread (from 2015), is not the same thing, this is about what happens when your station naming scheme already includes groups of identical names.
Efficiency is just highly developed form of laziness.

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

Re: Train station groups

Post by Engimage »

Not sure about grouping stations, this seems to be pretty complex to implement into existing game logic.

However I am totally up for circuit controls for a station pathfinding value
Here is my old suggestion on the matter
Train pathfinding on stations with same name

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Train station groups

Post by Zavian »

PacifyerGrey wrote:
Sat Sep 29, 2018 12:27 pm
However I am totally up for circuit controls for a station pathfinding value

Can't you already use circuit controlled signals to achieve a similar effect?

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

Re: Train station groups

Post by Engimage »

Zavian wrote:
Sat Sep 29, 2018 2:14 pm
PacifyerGrey wrote:
Sat Sep 29, 2018 12:27 pm
However I am totally up for circuit controls for a station pathfinding value

Can't you already use circuit controlled signals to achieve a similar effect?
Sadly no. Would be a nice simple feature.

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

Re: Train station groups

Post by Tekky »

A better solution to the problem may be OpenTTD style routing restrictions, which, as far as I know, does not exist in vanilla OpenTTD, but as an optional patch.

Implementing such a system in Factorio has already been discussed a bit in this suggestion thread.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1027
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Train station groups

Post by quyxkh »

PacifyerGrey wrote:
Sat Sep 29, 2018 5:10 pm
Zavian wrote:
Sat Sep 29, 2018 2:14 pm
PacifyerGrey wrote:
Sat Sep 29, 2018 12:27 pm
However I am totally up for circuit controls for a station pathfinding value

Can't you already use circuit controlled signals to achieve a similar effect?
Sadly no. Would be a nice simple feature.
Gut check keeps telling me it's possible but it's sure giving me fits trying to figure it out, my circuit skills aren't near good enough. The two biggest challenges I see are, 1) wired-closed signals don't add the penalty when their protected block is occupied; and 2) I thiink you have to keep enroute trains from repathing at any point where their destination isn't the first stop on every path, so congestion at most intersections has to be prevented by circuit control, chain signals can only be permitted at multi-stop station entry, single-station stacker exit and the like.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Train station groups

Post by zOldBulldog »

I have not yet tried them out, but it is my understanding that the LTN and FARL mods should help you with this. I also noticed that the Devs incorporate the best mods features into the core game. I would be curious to know why they have not yet incorporated at least LTN since it is so quite popular (some flaw? too complex for the average user? Too much work and other things have higher priority?)

Regardless, I think that there are two different main scenarios for stations of the same name and you would want to make sure you don't cripple one when trying to satisfy the other:

- Service the closest one first. This is the current default and it works great for ore deposits. By exhausting the closest deposits first you make more room for construction.

- Service stations of the same name equally. As far as I know this is not supported in vanilla at this time and you have to use different station names and trains dedicated to them. This would work well when supplying factories that consume a given resource. For example, you might want to send sulfuric acid to a number of destinations, or solid/rocket/nuclear fuel to supply the fuel chests for your trains. These uses require little volume and one train could keep them all refilled (even better if it only travels when the chests need at least a few chestfuls of reload).

And as others have or might point out, it is possible to do these things with circuits, and half the fun is to figure out how.

Zaflis
Filter Inserter
Filter Inserter
Posts: 414
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: Train station groups

Post by Zaflis »

DingoPD wrote:
Sat Sep 29, 2018 4:19 am
Let's face it, single station, no matter how big usually isn't up to the task to keep things fed at a decent rate. Multiple stations with the same name work, to a point. When demand becomes higher than supply, stations with the highest path cost get no love.

Trains are lazy, they always tend to shoot for the closest station, that makes it difficult to keep the supply balanced.
Normally you would easily solve that by adding more trains. Set the trains home station be its target and it will just idle there until either 30-60 seconds passed or it's empty. Then it will go get more supplies. No circuits required, but you can also disable stations entirely if they're full or empty so trains will skip them.

Also if we want a round-robin station system, i don't want to be required to pull circuit cables all the way to each of them.

User avatar
DingoPD
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Thu Jun 13, 2013 1:22 am
Contact:

Re: Train station groups

Post by DingoPD »

Stations can only unload so fast, no amount of trains will help you if they all queued behind a single station, everything is pretty much question of scale.

For example, making regular ammo, it takes 4 iron plate per banana, so in order to get 320 bananas per second (8 blue belts worth), you will need 1280 iron plate per second. Single station can't handle it, you need 32 blue belts worth of iron plate, so you need four (1-4) train stations to get 32 compressed belts.

Something like this:
factorio_ammo.jpg
factorio_ammo.jpg (582.25 KiB) Viewed 3289 times
This setup produces 320 bananas per second, and eats 32 belts worth of iron plate when running at full capacity. If all the stations were completely full (2.6 million iron plate), it would take 33 minutes and 20 seconds for them to go completely empty, to keep up with the demand, you need a train delivering plate (32k per train - 2x normal train cargo size) every 25 seconds, or every 100 seconds for each station if you consider only these 4.

With turnaround time between iron forges and the station about 50-60 seconds, that same station will send another request by the time the first train has a chance to come back. And so will the 3 other stations.

That's pretty much it for the scale.

Handling request queue of 7-8 trainloads is no problem, there are 16 trains delivering iron plate at the moment, since the factory is not even third finished, most of production shuts down after the initial rush to fill the outbound stations when i add new segment to the factory.

Problem is that the trains are coming from southeast, so the lower right station is closest to them, they tend to unload there, and unless the station has a train sitting in it unloading when next one arrives in the waiting queue, they won't even consider going to any of the other 3 stations if there is a request for material from the bottom right one.

If it wasn't for the fact that the trains are always targeting the closest enabled station to them, i wouldn't even think about station groups and stuff like that. But i can't really control where the train goes once it starts moving, i can't make it skip a station, and while i could force the trains to follow round robin unload on these 4 stations using combinator black magic, the same solution would be next to impossible to use on segments that use more than just single material. Because i can't see what the train is carrying, i can only tell that there is one there. Unless i want to add yet another station into the loop.
At this base scale (about 21 square kilometers) the situation is quickly getting worse.

Somehow i don't think directing few trains should be so complicated, the train groups could solve it. Even if we can't pick delivery to specific stations within the group, a round robin delivery within the group would be 1000% better than what it is right now.

I think i understand the concern of the devs over feature creep. Doing one thing right is better than doing five things half assed. At the same time, as a player/base builder, i have to consider the same feature creep, making complicated things out of combinators and having to come back weeks later hunting for rogue signal really sucks. I'm not opposed to mods either, i use them right now, but i'm not sure if this could be implemented as a mod.
Efficiency is just highly developed form of laziness.

User avatar
DingoPD
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Thu Jun 13, 2013 1:22 am
Contact:

Re: Train station groups

Post by DingoPD »

PacifyerGrey wrote:
Sat Sep 29, 2018 12:27 pm
Not sure about grouping stations, this seems to be pretty complex to implement into existing game logic.

However I am totally up for circuit controls for a station pathfinding value
Here is my old suggestion on the matter
Train pathfinding on stations with same name
I don't think the groups would be that hard to implement ..

the path finder could check if the station is part of a group, if so, calculate the path cost for that group as if it were single station, then just round robin within the group, I'll settle for that :)

There should probably be some kind of distance limit for the stations, 100 meters? Probably even 50 would be fine as long as it is between two nearest stations and not between the two furthest apart ...

I've read your idea post, if the path penalty was exposed to combinators, i could easily just add the penalty using single arithmetic combinator and solve the whole problem. I'd just have to be careful about not making the penalty high enough the trains would avoid the whole station cluster :)
Efficiency is just highly developed form of laziness.

User avatar
DingoPD
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Thu Jun 13, 2013 1:22 am
Contact:

Re: Train station groups

Post by DingoPD »

zOldBulldog wrote:
Sun Sep 30, 2018 11:48 am
I have not yet tried them out, but it is my understanding that the LTN and FARL mods should help you with this. I also noticed that the Devs incorporate the best mods features into the core game. I would be curious to know why they have not yet incorporated at least LTN since it is so quite popular (some flaw? too complex for the average user? Too much work and other things have higher priority?)
I haven't tried either of them. Well i did FARL long time ago (before blueprints), i don't remember much of it other than you could run around lay tracks ...
zOldBulldog wrote:
Sun Sep 30, 2018 11:48 am
- Service the closest one first. This is the current default and it works great for ore deposits. By exhausting the closest deposits first you make more room for construction.
Yeah, that works great when you pickup in many points and drop off in few, when you pick up in few and deliver to many, it's a pain.
zOldBulldog wrote:
Sun Sep 30, 2018 11:48 am
- Service stations of the same name equally. As far as I know this is not supported in vanilla at this time and you have to use different station names and trains dedicated to them. This would work well when supplying factories that consume a given resource. For example, you might want to send sulfuric acid to a number of destinations, or solid/rocket/nuclear fuel to supply the fuel chests for your trains. These uses require little volume and one train could keep them all refilled (even better if it only travels when the chests need at least a few chestfuls of reload).
Dedicated stations are untenable when you have large rail grid, not to mention really inefficient. My current factory, even if i don't count the train yards (400 stations), there are more than 150 other stations, and 172 trains, if i were to dedicate enough trains to each station pair, i'd be looking at at least 3-4 times that many trains on the same network, probably more. I'd end up pancake every 5 seconds :)
zOldBulldog wrote:
Sun Sep 30, 2018 11:48 am
And as others have or might point out, it is possible to do these things with circuits, and half the fun is to figure out how.
I'm using combinator black magic to handle supply and demand, i can't control exactly where the train goes though, i got around by having all full stations disabled, and only the requesting ones become enabled. That effectively prevents the trains from picking stations that don't really need the material. It is not perfect, if the demand is higher than supply, only the closest ones get any love.
Efficiency is just highly developed form of laziness.

Post Reply

Return to “Ideas and Suggestions”