Has anyone computed the throughput of trains?

Post all other topics which do not belong to any other category.
Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Has anyone computed the throughput of trains?

Post by mrvn »

It's easy to see the maximum throughput of an inserter or a belt and if you are filling it Harder to do with trains.

Has anyone calculated or measured the maximum throughput of trains considering all the factors involved? Off the top of my head I would thing the following a factors:

1) type of inserter and level of inserter bonus
2) number of infill/exfill tiles
3) type of chest to buffer
4) number of locomotives and cars in train
5) distance between and number of stations (e.g. you collect iron ore from 3 mining outposts)
6) number of trains in loop
7) how many parallel stops on a single train line (trains go in a circle)

Probably nobody has done all the combinations unless they made a program for it? But has anyone done some?

Maybe assume we have stack inserters and steel chests but no bonuses yet. Then what's the distance between 2 trains stops so a single car train can keep a yellow/red/blue belt filled? 2 Trains? At what distance will more than 4 trains be needed so one is always waiting to load/unload next? Or how many cars/trains do I need at what distance?

How much does the loading/unloading speed up with all the inserter bonuses?

Also:
How many trains can you load/unload in parallel before a single train line loop is congested?

User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 513
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

Re: Has anyone computed the throughput of trains?

Post by Mylon »

One train car is about equal to a steel chest.

Trains feel inferior to upgraded conveyor belts.

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

Re: Has anyone computed the throughput of trains?

Post by ssilk »

In my experience this cannot be calculated or experimented, cause it depends on so many factors:
- train length
- length of track
- how many tracks go into that track and out of that track
- how many signals are on the track

and a doozen more of such things, that really can change everything! It really makes no sense to measure that, cause every measuring would be different.

What eventually can be calculated is the theoretical maximum throughput: That only dependend on speed of the train - cause with the speed we have also the breaking distance between tracks.
So at maximum speed the throughput is

Code: Select all

                                                                         train speed
   time for one train to pass one piece of rail =  ------------------------------------------------
                                                  length of train + breaking distance in front of train
With the time you can calculate the number of trains that can pass per minute and with that you have the capacity per minute.
Can someone calc/measure the breaking distance at full speed?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Has anyone computed the throughput of trains?

Post by Frightning »

The practical upper bound for train throughput is actually the 12 inserters/wagon throughput at the unloading station(s), this is because, under theoretically optimal conditions, you would have you unloading station 'saturated' and thus always unloading trains...realistically, there is going to be non-trivial down time between one train finishing unloading and next train that is waiting to unload getting into the station and actually beginning to be unloaded. Ignoring that number however, it is easy to calculate the theoretical (unloading) throughput of a single wagon. 12x(stack inserter speed)x(stack inserter stack size). Stack inserter speed is 2.220 items/sec (or thereabouts, idk how accurate those measurements from the wiki are in the current stable release), maximum stack size with all research is 12 items, so we get 12x2.220x12=14x2.220=319.68 items/sec...that is about 8 fully saturated blue belts worth of throughput. (!) A single wagon full of ore (2000 items can be unloaded in 6.(256)... secs, plates, double that time, Electronic Circuits and other 200/stack items, 4x the ore number; and filled barrels?... 1.(251) secs, which is an oil throughput of 7,992 crude oil/sec....insane!

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Has anyone computed the throughput of trains?

Post by DaveMcW »

A well-designed track can handle 1 wagon per second. Multiply that by how many items fit in a wagon.

Loading can be a bottleneck, but just parallelize it until it is not a problem anymore.

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

Re: Has anyone computed the throughput of trains?

Post by ssilk »

I would like to ask how did you come to 1 wagon per second? (I think, yes could be, but I don't know why)
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
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Has anyone computed the throughput of trains?

Post by DaveMcW »

I built one. I don't say that is the maximum, just that it is possible.

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

Re: Has anyone computed the throughput of trains?

Post by mrvn »

Frightning wrote:The practical upper bound for train throughput is actually the 12 inserters/wagon throughput at the unloading station(s), this is because, under theoretically optimal conditions, you would have you unloading station 'saturated' and thus always unloading trains...realistically, there is going to be non-trivial down time between one train finishing unloading and next train that is waiting to unload getting into the station and actually beginning to be unloaded.
Yes, the time between trains is actually my problem. At the moment I have 6 stack inserters unloading into chests and 6 stack inserters further putting that on red belts that get merged into one. 4 stack inserters are just below the belt capacity so with 6 items back up a bit. But the chests run empty before the next train arrives. If I up it to 12 inserters to unload that half the unloading time. But the time to switch trains remains. And the longer the train is the longer it takes to switch. Also the trains get slower.

I haven't thought it through yet but my feeling is there must be a sweet spot for the number of cars to give maximum throughput. Shorter and each train doesn't carry enough. Longer and trains become too slow and switching trains takes too long.


Overall I feel that trains are awfully inadequate for high throughput shipping (ore and plates). You basically need a dedicated rail line going full circle from source to destination or you get too many issues with trains waiting on signals and the flow stops. And that means you could place 4 belts instead of the rails. OR I am doing it wrong. :) Has anyone gotten more throughput from a train than 4 blue belts worth? Maybe I need to think bigger. Longer trains, more stations in parallel. I don't think I'm limited by the rail line itself, only by the stops.

They do seem to be great for building a base though. Just send it off to fetch 400 belts, 50 undergound belts, 50 splitters, 100 furnaces and watch it fly. Or be prepared and go exploring with a train full of all the usual stuff one needs. Now if only we could put some furnaces and assembler on a train. Load up on iron ore at one stop and unload iron plates at the other. :)

vanatteveldt
Filter Inserter
Filter Inserter
Posts: 946
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: Has anyone computed the throughput of trains?

Post by vanatteveldt »

If Dave's estimate of 1 train per second is correct, and assuming he uses L-CC trains (from the screenshots), this means that each "section" of rail line can transport 2x50x100=10k plates (or 5k ore) per second. 2 wagons feed 24 inserters which saturate 6 blue belts = 240 plates per second. So, your rail system can saturate around 40 blue belts of material, requiring 6.5 stations constantly unloading so probably 10+ stations in total because of time between trains.

You can create multiple sections that don't cross, i.e. a separate rail and unloading system for the east and west side of the map, and further increase this number if 40 blue belts is not good enough for you :). I would also guess that with LL-CCCC trains you would have more than 0.5 trains per second, so that could increase throughput.

The theoretical maximum 'bandwidth' of a track is also easy to compute, namely wagon capacity / time for a wagon to cross a section of track. A train seems to go 66 tiles per second, so it takes 1/11 seconds for the full wagon to cross a point. So, maxium theoretical throughput of a train is 550 stacks per second, or 55k plates per second. Of course, this assumes an infinitely long train bringing goods over an infintie distance (i.e. no gaps between wagons, no acceleration time etc), so practical limits are much lower.

Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Has anyone computed the throughput of trains?

Post by Hannu »

mrvn wrote:Overall I feel that trains are awfully inadequate for high throughput shipping (ore and plates). You basically need a dedicated rail line going full circle from source to destination or you get too many issues with trains waiting on signals and the flow stops. And that means you could place 4 belts instead of the rails. OR I am doing it wrong. :) Has anyone gotten more throughput from a train than 4 blue belts worth? Maybe I need to think bigger. Longer trains, more stations in parallel. I don't think I'm limited by the rail line itself, only by the stops.
I do not know what you think with "high throughput shipping". I have no problems to transport 1.1M/h iron (average over 1 hour) with trains (and respective amounts of other stuff). I have tried to make realistic looking train network instead of Factorio optimal. I have 2 locomotives and 8 cars in high throughput trains. I know that much larger bases exist, but in any case throughput optimized train system can handle quite extreme amounts of stuff.

viewtopic.php?f=204&t=33768#p212345

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Has anyone computed the throughput of trains?

Post by Frightning »

mrvn wrote:
Frightning wrote:The practical upper bound for train throughput is actually the 12 inserters/wagon throughput at the unloading station(s), this is because, under theoretically optimal conditions, you would have you unloading station 'saturated' and thus always unloading trains...realistically, there is going to be non-trivial down time between one train finishing unloading and next train that is waiting to unload getting into the station and actually beginning to be unloaded.
Yes, the time between trains is actually my problem. At the moment I have 6 stack inserters unloading into chests and 6 stack inserters further putting that on red belts that get merged into one. 4 stack inserters are just below the belt capacity so with 6 items back up a bit. But the chests run empty before the next train arrives. If I up it to 12 inserters to unload that half the unloading time. But the time to switch trains remains. And the longer the train is the longer it takes to switch. Also the trains get slower.

I haven't thought it through yet but my feeling is there must be a sweet spot for the number of cars to give maximum throughput. Shorter and each train doesn't carry enough. Longer and trains become too slow and switching trains takes too long.


Overall I feel that trains are awfully inadequate for high throughput shipping (ore and plates). You basically need a dedicated rail line going full circle from source to destination or you get too many issues with trains waiting on signals and the flow stops. And that means you could place 4 belts instead of the rails. OR I am doing it wrong. :) Has anyone gotten more throughput from a train than 4 blue belts worth? Maybe I need to think bigger. Longer trains, more stations in parallel. I don't think I'm limited by the rail line itself, only by the stops.

They do seem to be great for building a base though. Just send it off to fetch 400 belts, 50 undergound belts, 50 splitters, 100 furnaces and watch it fly. Or be prepared and go exploring with a train full of all the usual stuff one needs. Now if only we could put some furnaces and assembler on a train. Load up on iron ore at one stop and unload iron plates at the other. :)
While the trains do become slower, they will also be able to an extent to follow one another more closely (provided blocks are small enough), and you can always parallelize unloading multiple trains. You can fix the train speed partially by having more locos in too, so you have a 2-4-0 train and it's just as fast as a 1-2-0 train and carries twice the cargo (it does take a bit longer to get into and out of the unloading bay, but said bay has 2x as many 12-stack inserter unloading spots, so double the throughput. In fact, easiest way to increase rail system throughput is to increase length of trains because at some point too much train traffic starts to cause considerable inefficiencies (and every rail network has a practical limit to how many trains can run on it deadlock free).

ribsngibs
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Mon Mar 28, 2016 5:42 am
Contact:

Re: Has anyone computed the throughput of trains?

Post by ribsngibs »

mrvn wrote: Yes, the time between trains is actually my problem. At the moment I have 6 stack inserters unloading into chests and 6 stack inserters further putting that on red belts that get merged into one. 4 stack inserters are just below the belt capacity so with 6 items back up a bit. But the chests run empty before the next train arrives.
That seems wrong... what items are you transporting? Something with a very small stack size, like barrels? Even with Iron Ore (pretty bad stack size of only 50, much worse than most things which are at 100), I am still able to keep a steady 10 stack inserters going, with the next train arrive just as the chests run out, so this is about 124 iron ore per second throughput from a single wagon (496 for the entire train) with a 1-4-1 train. This is slightly more than 3 fully compressed blue belts per wagon sustained.
unloader.jpg
unloader.jpg (924.49 KiB) Viewed 13690 times
I haven't tested this with plates or circuits (don't need that much throughput), but they would be able to support faster throughput (from lower percentage of time devoted to switching trains).
Frightning wrote:While the trains do become slower, they will also be able to an extent to follow one another more closely (provided blocks are small enough), and you can always parallelize unloading multiple trains. You can fix the train speed partially by having more locos in too, so you have a 2-4-0 train and it's just as fast as a 1-2-0 train and carries twice the cargo (it does take a bit longer to get into and out of the unloading bay, but said bay has 2x as many 12-stack inserter unloading spots, so double the throughput. In fact, easiest way to increase rail system throughput is to increase length of trains because at some point too much train traffic starts to cause considerable inefficiencies (and every rail network has a practical limit to how many trains can run on it deadlock free).
Personally I'd rather just have more trains on a loop than add more locomotives to make it faster.

I'm not sure I believe that making longer trains is better for throughput rather than simply adding more. In my opinion, the longer the train the longer exit blocks you need from all intersections to avoid deadlock. Even 1-4-1 trains require a significant amount of space. I feel like a 2-8-2 train system would have a ton of "unnecessary" waiting for chain signals to clear at intersections. "Unneccesary" meaning waiting due to correctly placed safe rail signals, but unnecessary in terms of "if the trains were smarter they could have passed earlier."

It's true here's a limit to how many trains a network can support, but that is correlated with the number of blocks, and if you increase train length, you have to increase block length which decreases the number of blocks, so they should cancel out.

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Has anyone computed the throughput of trains?

Post by Frightning »

Large numbers of short trains can become very inefficient with pathing (e.g. the open-bay problem at rail stations that's been much talked about on these boards), and while it's true that your minimum block size must be increased, the real issue is that some point, all of those goods being transported by train have to be unloaded somewhere, and more trains needing to unload=need more unloading bays=more traffic issues at the unloading sites. The solution to this problem is to use short trains to gather resources into local 'hubs' and from those hubs run long trains to your central main base (this is how you feed a gigantic gigafactory with trains), the numbers that matter are number of wagons per train times number of unloading bays. (With a larger penalty for time to switch trains; this throughput curve is, ultimately, asymptotic, and the question being asked in this thread is basically what is that asymptote?)

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Has anyone computed the throughput of trains?

Post by Frightning »

..and to add to my previous post. Block size isn't actually what's important to resource density moving across a train network, at least if the blocks are small enough. This is because trains reserve blocks as soon as their braking distance would imply that they can't stop before entering that block, and that is controlled by speed and the power-to-weight ratio of the train. But (top) speed is also determined by power-to-weight, hence that is the only number that is important. Now, if a train is not moving, it occupies space equal to its length. As it gains speed, you start adding braking distance to the space it will reserve.

The result is that a system with few long trains can achieve greater wagon density with far less traffic issues, hence why long trains are important to feeding truly enormous gigafactories.

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

Re: Has anyone computed the throughput of trains?

Post by mrvn »

vanatteveldt wrote:The theoretical maximum 'bandwidth' of a track is also easy to compute, namely wagon capacity / time for a wagon to cross a section of track. A train seems to go 66 tiles per second, so it takes 1/11 seconds for the full wagon to cross a point. So, maxium theoretical throughput of a train is 550 stacks per second, or 55k plates per second. Of course, this assumes an infinitely long train bringing goods over an infintie distance (i.e. no gaps between wagons, no acceleration time etc), so practical limits are much lower.
Except that needs an infinite number of locomotives. You have to include them also crossing the tile. Think of the train as LCCLCCLCCLCCLCC for example.Does that still go 66 tiles a second? That would be 2/33 seconds for the full wagon to cross a point.

The problem with this direction is that you assume the train never stops and you only have one train. And the loading unloading are a major concern. Ignoring them makes the throughput pointless. If you have multiple trains you end up with gaps between them because signals enforce a minimum separation between trains. For one the minimum distance between signals (and who would want to place them that dense all over?), for another the distance lost while the next train is acellerating when it gets a green light. And you need multiple trains to parallelise loading and unloading. So the infinite train is a verry bad approximation.

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

Re: Has anyone computed the throughput of trains?

Post by mrvn »

ribsngibs wrote:
mrvn wrote: Yes, the time between trains is actually my problem. At the moment I have 6 stack inserters unloading into chests and 6 stack inserters further putting that on red belts that get merged into one. 4 stack inserters are just below the belt capacity so with 6 items back up a bit. But the chests run empty before the next train arrives.
That seems wrong... what items are you transporting? Something with a very small stack size, like barrels? Even with Iron Ore (pretty bad stack size of only 50, much worse than most things which are at 100), I am still able to keep a steady 10 stack inserters going, with the next train arrive just as the chests run out, so this is about 124 iron ore per second throughput from a single wagon (496 for the entire train) with a 1-4-1 train. This is slightly more than 3 fully compressed blue belts per wagon sustained.
It depends a lot on the inserter and bonuses. Try it with fast inserters without any bonuses and despair.

On the nice side though that means you trains become more efficient without rebuilding as you research more inserter bonuses and at the start you don' need that much throughput mostly.

Frightning
Filter Inserter
Filter Inserter
Posts: 807
Joined: Fri Apr 29, 2016 5:27 pm
Contact:

Re: Has anyone computed the throughput of trains?

Post by Frightning »

mrvn wrote:
ribsngibs wrote:
mrvn wrote: Yes, the time between trains is actually my problem. At the moment I have 6 stack inserters unloading into chests and 6 stack inserters further putting that on red belts that get merged into one. 4 stack inserters are just below the belt capacity so with 6 items back up a bit. But the chests run empty before the next train arrives.
That seems wrong... what items are you transporting? Something with a very small stack size, like barrels? Even with Iron Ore (pretty bad stack size of only 50, much worse than most things which are at 100), I am still able to keep a steady 10 stack inserters going, with the next train arrive just as the chests run out, so this is about 124 iron ore per second throughput from a single wagon (496 for the entire train) with a 1-4-1 train. This is slightly more than 3 fully compressed blue belts per wagon sustained.
It depends a lot on the inserter and bonuses. Try it with fast inserters without any bonuses and despair.

On the nice side though that means you trains become more efficient without rebuilding as you research more inserter bonuses and at the start you don' need that much throughput mostly.
Gotta 2nd this, train my experiences with trains have shown this to be true, inserter stack size upgrades (especially w/ new stack inserters instead of just fast inserters) makes a BIG difference.

Post Reply

Return to “General discussion”