• Breaking News

    Monday, October 21, 2019

    Factorio 📈 Maximizing trains with spreadsheets, or how I learned to stop worrying and made my trains 53 wagons long

    Factorio �� Maximizing trains with spreadsheets, or how I learned to stop worrying and made my trains 53 wagons long


    �� Maximizing trains with spreadsheets, or how I learned to stop worrying and made my trains 53 wagons long

    Posted: 20 Oct 2019 07:35 PM PDT

    📈 Maximizing trains with spreadsheets, or how I learned to stop worrying and made my trains 53 wagons long

    https://i.redd.it/cldphif2trt31.gif

    PART 1: TAKE A SEAT (PLEASE READ)

    "Many short trains, or a few long trains, that is the question"

    ― Every Factorio engineer at some point.

    I've recently decided to tackle this important question by taking some time to make a workbook (link at the bottom of this post) simulating trains of different configurations traveling for 40,000 ticks (about 11 minutes), so that I could interpret the results.

    Some caveats you should know about:

    1. I did not account for time spent breaking.
    2. I did not account for time spent at loading stations.
    3. The simulation doesn't work for severely underpowered trains (too few locomotives pulling too many wagons).
    4. The given values are theoretical.

    Post breakdown:

    • Part 1: introduction.
    • Part 2: my process.
    • Part 3: recommended train configurations.
    • Part 4: conclusion.

    You may jump to part 3 if you're only here for the recommended configurations, but it is strongly advised to first complete the exercise in the introductory part in order to fully grasp the concepts discussed.

    Untangling headphones (please read)

    To make sense of this post, you need to understand these 4 crucial concepts: operation, throughput, fuel efficiency and throughput density:

    • A train in a pull operation has front locomotives at one end only; while a train in a top and tail operation (erroneously referred to as a double headed train by some players) has front locomotives at both ends, allowing it to reverse.
    • Throughput is the rate at which items are being moved. If you play Factorio, you know what this means, so I won't insult your intelligence by explaining further. Just make sure to remember that for trains, throughput decreases with distance.
    • Fuel efficiency is the quotient of throughput divided by the number of front locomotives.
    • Throughput density is the quotient of throughput divided by rolling stock; rolling stock being the sum of locomotives and wagons forming the train. Throughput dense configurations allow you to move more stacks with less tracks. In case you're still confused, here's an example (values are fictional):

    1 1-3 train travels for 2 km and reaches a throughput of 80 stacks/min.

    2 1-1 trains travel for 2 km and reaches a throughput of 60 stacks/min.

    The 1-3 configuration has a throughput per rolling stock of 80 / (1 locomotive + 3 wagons) = 20 stacks/min, whereas both 1-1 trains have a throughput per rolling stock of 60 / (1 locomotive + 1 wagon) = 30 stacks/min, making them less fuel efficient but more throughput dense. You can also visually see that 2 1-1 trains will have a combined throughput of 120 stacks/min using the same length of tracks as the 1-3 configuration.

    Answer the following questions correctly (values are fictional):

    A 2-6 train travels 1 km in 2 minutes to move 240 stacks of items.

    A 2-2 train travels 1 km in 1 minute to move 80 stacks of items.

    1. What is the operation of both trains?
      Pull
    2. Which train has the lowest throughput?
      2-2
    3. Which train has the most rolling stock?
      2-6
    4. What is the throughput per front locomotive (stacks/min) of each train?
      60 and 40
    5. What is the throughput per rolling stock (stacks/min) of each train?
      15 and 20
    6. Which train is the most fuel efficient?
      2-6
    7. Which train is the least throughput dense?
      2-6

    PART 2: SO I DID THE MATH...

    For consistency's sake, I'll be exclusively using pull trains in this part, but the principles discussed are the same for top and tail trains.

    Size matters

    I began my examination by simulating a locomotive pulling 1 to 12 wagons.

    Throughput of coal powered trains in a pull operation traveling for 2 km

    Configuration Throughput per front locomotive achieved (stack/min) Throughput per rolling stock achieved (stack/min)
    1-1 69.7 34.8
    1-2 125.6 41.9
    1-3 170.9 42.7
    1-4 207.5 41.5
    1-5 236.8 39.5
    1-6 259.6 37.1
    1-7 276.7 34.6
    1-8 288.4 32.0
    1-9 294.9 29.5
    1-10 296.5 27.0
    1-11 292.9 24.4
    1-12 284.2 21.9

    I found out that something as simple as using a 1-2 configuration instead of 2 1-1 trains nearly doubles fuel efficiency; which continues to rise until the 11 wagons mark, where it finally starts diminishing. However, throughput density peaks very quickly, maxing out at 42.7 for a 1-3 configuration, and plummeting to half that for the last train.

    The takeaway is that fuel efficient configurations will tend to have a higher proportion of wagons than throughput dense ones.

    2 heads are better than 1

    Next, I simulated a range of front locomotives pulling 1 to 100 wagons to find out the optimal configurations for each number of locomotives.

    Throughput of coal powered trains in a pull operation traveling for 2 km (maximizing for fuel efficiency)

    Front locomotive count Highest throughput per front locomotive achieved (stack/min) Optimal configuration Improvement in throughput over the previous configuration (%)
    1 296.5 1-10 NA
    2 366.5 2-20 23.6
    3 391.1 3-30 6.7
    4 403.6 4-40 3.2

    Each front locomotive added increases the fuel efficiency of the optimal configuration, but with smaller and smaller returns per locomotive added.

    Throughput of coal powered trains in a pull operation traveling for 2 km (maximizing for throughput density)

    Front locomotive count Highest throughput per rolling stock achieved (stack/min) Optimal configuration Improvement in throughput over the previous configuration (%)
    1 42.7 1-3 NA
    2 50.6 2-7 18.5
    3 51.9 3-11 2.7
    4 52.4 4-15 1.0

    In accordance to my previous observation, throughput dense configurations have significantly lower ratios of wagons to locomotives than fuel efficient ones. There's also the same decreasing gains in the maximized criterion per locomotive added.

    To sum up, adding front locomotives improves both fuel efficiency and throughput density, but with shrinking increments at each turn. Furthermore, adding a front locomotive increases the optimal proportion of wagons in a pleasantly linear fashion.

    Fueling ludicrousness

    So far, I've only concerned myself with locomotives powered by coal; so what happens when better fuels are used?

    Throughput of solid fuel powered trains in a pull operation traveling for 2 km (maximizing for fuel efficiency)

    Front locomotive count Highest throughput per front locomotive achieved (stack/min) Optimal configuration Improvement in throughput over the previous configuration (%)
    1 391.0 1-12 NA
    2 464.9 2-24 18.9
    3 490.4 3-36 5.5
    4 503.2 4-48 2.6

    Throughput of rocket fuel powered trains in a pull operation traveling for 2 km (maximizing for fuel efficiency)

    Front locomotive count Highest throughput per front locomotive achieved (stack/min) Optimal configuration Improvement in throughput over the previous configuration (%)
    1 684.6 1-18 NA
    2 764.2 2-37 11.6
    3 791.2 3-54 3.5
    4 804.7 4-72 1.7

    Throughput of nuclear fuel powered trains in a pull operation traveling for 2 km (maximizing for fuel efficiency)

    Front locomotive count Highest throughput per front locomotive achieved (stack/min) Optimal configuration Improvement in throughput over the previous configuration (%)
    1 1034.2 1-25 NA
    2 1117.1 2-51 8.0
    3 1145.0 3-76 2.5
    4 1158.7 4-100\) 1.2

    \ Trains with more than 100 wagons aren't simulated, and so the most efficient configuration might use a greater number of wagons; however, the difference would be negligible due to the linear scaling of configurations.)

    When maximizing for fuel efficiency, the already large proportion of wagons of optimal configurations becomes absurdly gigantic; growing by 20 % for solid fuel, 80 % for rocket fuel, and a wacky 150 % for nuclear fuel.

    Throughput of solid fuel powered trains in a pull operation traveling for 2 km (maximizing for throughput density)

    Front locomotive count Highest throughput per rolling stock achieved (stack/min) Optimal configuration Improvement in throughput over the previous configuration (%)
    1 50.4 1-3 NA
    2 55.5 2-8 10.1
    3 56.6 3-12 2.0
    4 57.0 4-16 0.7

    Throughput of rocket fuel powered trains in a pull operation traveling for 2 km (maximizing for throughput density)

    Front locomotive count Highest throughput per rolling stock achieved (stack/min) Optimal configuration Improvement in throughput over the previous configuration (%)
    1 63.6 1-4 NA
    2 66.1 2-10 3.9
    3 66.7 3-15 1.0
    4 67.0 4-19 0.4

    Throughput of nuclear fuel powered trains in a pull operation traveling for 2 km (maximizing for throughput density)

    Front locomotive count Highest throughput per rolling stock achieved (stack/min) Optimal configuration Improvement in throughput over the previous configuration (%)
    1 70.1 1-6 NA
    2 71.4 2-12 1.9
    3 71.8 3-18 0.6
    4 71.9 4-24 0.1

    While the proportion of wagons also increases for throughput density, it does so more reasonably: about 5 % for solid fuel, 35 % for rocket fuel and 70 % for nuclear fuel.

    Across the board, there's an increase in the proportion of wagons the higher the grade of the fuel is.

    The whole 9000 yards

    Something that should be obvious is that distance affects throughput; the more ground a train has to cover, the less its throughput will be. But does distance also affect what the optimal configuration would be in a significant way? To know, I took the optimal configuration for a given number of locomotives, powered by a given fuel, for a given distance; and compared it to 2 other neighboring configurations.

    https://i.redd.it/o02zjb1iwrt31.png

    This first graphic shows us throughput per front locomotive of 3 configurations relative to the highest achievable throughput per front locomotive, depending on distance. All of them have a single coal powered locomotive. Distance does not seem to affect which configuration is optimal.

    https://i.redd.it/hfcs3k4lwrt31.png

    In the second graphic, the number of front locomotives has been bumped to 4. While we do see a change in optimal configurations depending on distance, it doesn't happen until 5 km, and the benefit never exceeds 5 %.

    https://i.redd.it/axfddhsnwrt31.png

    Here, the number of locomotives has been reversed back to 1, but they are now powered with nuclear fuel. Just like before, there is no substantial difference in optimal configuration.

    https://i.redd.it/9eeqb3sqwrt31.png

    For throughput per rolling stock, the story is very different; the optimal configuration at 250 m becomes the worst performing at 2 km; while the 1-9 configuration starts at below 80 % relative throughput to becoming the best configuration after 4 km.

    https://i.redd.it/a85vbdzrwrt31.png

    Increasing the number of front locomotives to 4 gives similar results, with the best performing configuration at 250 m becoming the worst as distance grows, and vice versa.

    In a nutshell, the most fuel efficient configuration for a given fuel and number of front locomotives stays effectively the same no matter the distance; contrary to throughput dense configurations, who's relative throughput is greatly affected, especially for short distances.

    PART 3: ANSWERING THE QUESTION

    Finally.

    Choosing which criterion to maximize

    Before choosing a configuration, you must settle on what to maximize; either fuel efficiency or throughput density. I've thought of some comparable aspects to help you make that decision.

    Pros (+) and cons (-) of fuel efficient and throughput dense configurations

    Aspect + or - Fuel efficient configuration + or - Throughput dense configuration
    Maximized criterion NA Highest throughput per locomotive. NA Highest throughput per rolling stock.
    Number of trains + and - Smaller, with longer trains; easier to manage but less flexible. + and - Greater, with smaller trains; harder to manage but more flexible.
    Optimal configuration + Is almost constant, no matter the distance to travel. - Varies depending on distance, especially for short routes.
    Infrastructure -- Your loading station and intersection blueprints must be adapted to accommodate the very large footprint of a train configuration you've likely never used before. ++ The smaller size of configurations makes all railway infrastructure relatively easier to visualize and plan out.
    Nuclear fuel + Using the highest grade of fuel is more practical due to having less locomotives to refuel overall. - Consumes relatively more fuel; you might not be able to power all your locomotives if you lack uranium.
    Safety + Less trains means you're less likely to be ran over. - More trains means you're more likely to be ran over.
    Performance ++ Less trains means more UPS. -- More trains means less UPS.

    Choosing a configuration

    Once you've chosen your criterion, the next step is to decide how many front locomotives you want.

    I've done much of the lifting here and compiled recommendations based on an average of optimal configurations for both 1 and 2 frontal locomotives, powered by every grade of fuel, for both pull and top and tail operations.

    Recommended fuel efficient configurations (250 m to 8 km)

    Preferred fuel Recommended configuration (pull operation) Recommended configuration (top and tail operation)
    Coal 1-10 or 2-19 1-9-1 or 2-19-2
    Solid fuel 1-12 or 2-25 1-11-1 or 2-23-2
    Rocket fuel 1-18 or 2-37 1-17-1 or 2-37-2
    Nuclear fuel 1-26 or 2-53 1-25-1 or 2-51-2

    Recommended throughput dense configurations (250 m to 1.5 km)

    Preferred fuel Recommended configuration (pull operation) Recommended configuration (top and tail operation)
    Coal 1-2 or 2-5 1-3-1 or 2-7-2
    Solid fuel 1-2 or 2-5 1-3-1 or 2-7-2
    Rocket fuel 1-2 or 2-7 1-3-1 or 2-9-2
    Nuclear fuel 1-4 or 2-7 1-5-1 or 2-11-2

    Recommended throughput dense configurations (2 to 8 km)

    Preferred fuel Recommended configuration (pull operation) Recommended configuration (top and tail operation)
    Coal 1-4 or 2-9 1-5-1 or 2-11-2
    Solid fuel 1-4 or 2-9 1-5-1 or 2-11-2
    Rocket fuel 1-6 or 2-13 1-7-1 or 2-15-2
    Nuclear fuel 1-8 or 2-17 1-9-1 or 2-21-2

    Note that some configurations might have had a wagon added or substituted for the number of rolling stock to be odd; see this post.

    As configurations neighboring the optimal might have very similar values to it, you might want to cut down on complexity and use shorter configurations then those recommended, in which case I heavily encourage you to download the workbook (link at the bottom of this post).

    PART 4: CONGRATULATIONS, YOU MADE IT

    I used to think 1 was prime

    This was a rather involved post, but I wanted to explain in detail my reasoning for choosing the aforementioned recommended configurations; that way, if mistakes were made, someone more knowledgeable could easily point to the issue. If you notice a typo or miscalculation, or if I tackled something from the basis of a flawed premise, be sure to tell me in the comments; I'll try to keep this post updated to reflect all of your pertinent feedback.

    Also, English isn't my first language: I made efforts to be as clear and concise as possible, but if you see something that you could explain better than I did, let me know.

    Thank you for reading!

    Answering feedback

    • Why use fuel efficient (longer) trains?
      If you want to achieve a given throughput with the fewest trains possible.
    • Why use throughput dense (shorter) trains?
      If you want to achieve a given throughput with the smallest railway network possible.
    • I don't think my ore patches are big enough to justify using longer trains.
      The output of your ore patches is irrelevant with buffer chests. Simply have the same train load at multiple outposts once they're full.
    • Won't longer trains break my intersections?
      If you want to use longer trains, you will need to plan all your railway infrastructure in accordance. Keep in mind that using longer trains also means you'll have less trains competing for intersections.
    • Silly OP, do you know how comically large a loading station for a 2-53 train is?
      Yes.

    Links and acknowledgements

    submitted by /u/Escapeware
    [link] [comments]

    12-72 direct-to-train mining with beacons. Fits on Vanilla ore patches

    Posted: 21 Oct 2019 06:53 AM PDT

    Got the game at 8... It's already 4 am

    Posted: 21 Oct 2019 03:45 AM PDT

    Wow. Amazing game. Aannndddd it's 4 am wait what 4am? but it was 10pm like a minute ago, shit I have to wake up in an hour. That was my thought process 44 minutes ago and I'm still growing the factory. I need to stop getting such great games maybe then I'll have a life lol.

    submitted by /u/Everdro1d
    [link] [comments]

    I'm warming up to using cosmetic mods. I actually like going to my oil refinery now ��

    Posted: 20 Oct 2019 11:25 PM PDT

    TIL: Spitters have tiny soulless eyes

    Posted: 20 Oct 2019 11:21 PM PDT

    Yamakara collects 100% achievements in one run - 23:08:11

    Posted: 21 Oct 2019 03:30 AM PDT

    The biters attacked my iron supply and i didn't manage to take it back because they set up a base before i could push back. now my base is in crisis mode and this is my oil processing ;-;

    Posted: 21 Oct 2019 08:29 AM PDT

    I would like constructive criticism on my first base 95 hours in (with an experienced friend who showed me automation hell in a good way)

    Posted: 21 Oct 2019 07:29 AM PDT

    What I learned from a no spoon run

    Posted: 21 Oct 2019 07:47 AM PDT

    So the only two achievements left for me were 8h and 15h respectively, so I decided to prepare and give it a go.

    One thing that surprised me is that I was able to skip the minibase stage completely and just rush a makeshift bus asap, with green circuits production. After that I built a very mini mall, with inserters, assembly machines, miners, belts, undergrounds and splitters, and it was enough for the rest of the game.

    Another thing to note is that electronic circuits are your bottleneck. Later on, Advanced Circuits and Processing Units, but up until then, you should try to get 2 dedicated lines of copper and 2 dedicated lines of iron, to minimize headaches with supply.

    I built no bots, no trains (obviously) and used only wooden poles.

    https://i.imgur.com/6lAPZWf.png

    Bonus point: after the run, I'm exactly at 666 hours played.

    submitted by /u/PulseReaction
    [link] [comments]

    I call it the Eminent Domain Enforcement Division.

    Posted: 20 Oct 2019 12:46 PM PDT

    Finally finish my first Krastorio play through, 141hours later. Well done to the Mod Author its a massive expansion onto vanilla game would recommend and will be playing again. Screenshot of final base all matter convters on the left feeding the belts heading right

    Posted: 20 Oct 2019 05:20 PM PDT

    Surrounded!

    Posted: 21 Oct 2019 12:51 AM PDT

    Surrounded!

    Playing a map with AAI and RSO along with custom terrain generation. Was able to research waterfill to block myself off all around...

    Next plan is to complete rail circuit with light artillery stations and start the killing spree.

    https://i.redd.it/gpzehs8snut31.png

    submitted by /u/superxdude
    [link] [comments]

    Bots should be able to place landfill in order to complete a blueprint

    Posted: 20 Oct 2019 03:32 PM PDT

    Need help with chest logic

    Posted: 21 Oct 2019 09:45 AM PDT

    I was wondering about how to have produced goods (from a factory) put into an active provider chest that feeds storage but keeps a certain amount of its content to itself. Any ideas on how to have such a threshold implemented? I'm sure there is an easier solution than using logical circuits...

    Thank you!

    submitted by /u/Pankonuss
    [link] [comments]

    Raw fish?

    Posted: 21 Oct 2019 05:53 AM PDT

    I accidentaly found an item called "Raw fish". 80 phys. damage, 2/s. Is this such an easter egg?

    submitted by /u/angryvoxel
    [link] [comments]

    First time going nuclear! (Theoretically) 480MW quad core

    Posted: 20 Oct 2019 08:59 PM PDT

    JayzTwoCents planning to do ram speed benchmarks

    Posted: 21 Oct 2019 08:40 AM PDT

    Hey peeps! Jay is planning on doing ram speed testing in one of his next video's, and is looking for games which are particularly ram dependent. Considering how much I am into this game and how curious I am in regards to performance on gigabase maps, I thought it would be cool if we could get him to benchmark Factorio. If you agree, would you please comment on this youtube page here? I would imagine he will also need a map to be provided should he accept. Cheers!

    submitted by /u/Ratiasu
    [link] [comments]

    Penalty Signal

    Posted: 21 Oct 2019 08:34 AM PDT

    A special kind of train signal that can have its pathfinding penalty set via the circuit network. Could also accept negative circuit signals to make a path more enticing for a train.

    What do you think?

    submitted by /u/triggerman602
    [link] [comments]

    Dark side of the railway (a little tutorial on 2-way systems)

    Posted: 20 Oct 2019 10:00 AM PDT

    Dark side of the railway (a little tutorial on 2-way systems)

    Why we need this tutorial?

    Because I'm tired to hear in every thread that 2-way railways are "hard to signal", "often deadlock" and "cannot handle more than 2 trains".

    2-way railway is cheap and simple to build and understand. I always use it for my early-mid game when throughput doesn't matter much. So, this topic deserves some coverage, I think.

    DISCLAIMER: This tutorial explains simple railway for early game. Don't blame me if it doesn't work for your megabase ;)

    Part 1: Simple stations

    https://i.redd.it/6xmsquwa3qt31.jpg

    This picture shows two simple stations. Top station is very compact, but it can handle only 2-headed trains. Bottom station is larger but it can handle any train type (yeah, 2-way railway doesn't imply 2-headed trains).

    Note how signals are used: rail signal on station entry allows train to stay, chain signal on station exit doesn't allow train to leave until it has clear path through the network.

    If you need simple railway, just build some stations as shown on that picture and connect them with rails. For example:

    https://i.redd.it/zkzugq3k3qt31.jpg

    WARNING: This simple setup may deadlock if you share one station for two or more trains. Please read part 3 if you need it.

    WARNING: Two signals at stations are sufficient. Do not add any additional signals without understanding, you may break system.

    Part 2: Improving throughput

    As you may notice, setup from the first part has very low throughput: only one train can move through the network at a time. It's just a giant intersection. Can we improve it?

    Yes, we can add some bypasses on busy tracks:

    https://i.redd.it/ttzswb6u3qt31.jpg

    Bypasses split giant network into smaller sections. Now more trains can move at the same time:

    https://i.redd.it/89bncwcw3qt31.jpg

    Note that both bypass lanes are one-way. It's very important for deadlock-free operation.

    Also, you may want to add some signals at intersections. These signals aren't mandatory, but trains may start to move slightly earlier if you add them. And signaled intersections just look better ;)

    https://i.redd.it/oynj6piz3qt31.jpg

    Note that all signals are chain signals. Don't listen for "chain in, rail out" guys, their advice applies only for 1-way tracks, where train can safely stay after intersection. 2-way system would deadlock if you put rail signals at intersections. So, "chain in, chain out"!

    WARNING: This setup still may deadlock if you share one station for two or more trains. Please read part 3 if you need it.

    Part 3: Station sharing

    What happens if we share one station for two or more trains (i.e. one furnace array with two iron outposts, or just two trains between pair of stations)? Simple stations cannot hold two trains. So, second train must stay somewhere else. The only places where it can stay for now are other stations and bypasses. And waiting for train departure in bypass lane is very bad: we block other trains for unknown time. What if first train would stay at station for a hour or two?

    We can add waiting bays (aka stackers) at station to mitigate this issue. Waiting bays should be able to hold all trains that can visit this station. Here are some examples that can safely handle up to four trains:

    https://i.redd.it/yyiob9p25qt31.jpg

    https://i.redd.it/krxmr6p35qt31.jpg

    And here is a monster that can handle dozen of trains:

    https://i.redd.it/z0tcqqa75qt31.jpg

    Epilogue

    So, basic rules for 2-way railway are:

    • Use rail signals only before stations, bypass lanes and waiting bays.
    • Use one-way bypasses and chain-signaled intersections to improve throughput.
    • Have enough waiting bays at stations (if two or more trains use those stations).

    Hope this guide would be useful. Please comment if you found some mistakes, have some question or just want to argue ;)

    Factory must grow!

    submitted by /u/bormandt
    [link] [comments]

    Second question from me. When is it appropriate to start using Bob's Inserters mod?

    Posted: 21 Oct 2019 10:27 AM PDT

    [LUA] How to disable items?

    Posted: 21 Oct 2019 09:52 AM PDT

    Task: remove logistic drones and belts (splitters and underground too) in scenario (don't use mod like nobeltsvanillagame). Acceptable way: disable placing of all that but allow crafting.

    Solutions tried to implement: https://pastebin.com/m5GQ5yTa https://pastebin.com/yLPBwRET (no idea whats wrong in all two cases)

    Anyone who knows how to do that please reply.

    submitted by /u/MaX39767
    [link] [comments]

    Update Question

    Posted: 21 Oct 2019 09:42 AM PDT

    I updated to the latest stable, when it came out. I also updated all of my mods that had updated available.

    When I loaded a game that had about 30 hours in it, all of the resource patches got deleted. I tried making a new game, and all of the new patches had crazy names. You also have to sort the ores into iron etc.

    Since I don't want to wait forever for the mods to be taken off/put back on, is this change on a mod or is it from the base game?

    submitted by /u/xrangerx777x
    [link] [comments]

    No comments:

    Post a Comment