## I made a calculator for all you OCD planners out there

Calculate optimal ratios for feeding recipes, search through the research-tree, specialized tools to view game-information.
SilentSam
Inserter
Posts: 21
Joined: Wed Jun 25, 2014 7:00 pm
Contact:

### I made a calculator for all you OCD planners out there

Who am I kidding, if you're playing this game you're going to be an OCD planner...

The calculator runs entirely in your browser and can be found here:

http://rubyruy.github.io/factorio-calc

Please note that this is the very very first release and it's still very rough around the edges.

Through the magic of lua.vm.js, it uses the actual lua game files* for its data so it's never wrong at least as far as the raw numbers go.

What it does is you punch in the thing you want to produce, and at what rate (in items per second). E.g. I want to build an assembly line for science-pack-2s at a rate of 2 i/s (i.e. one science pack 2 every 0.5 seconds).

The calculator will then tell you how many level 3 assemblers you need to reach that production goal. It will also estimate how many assemblers you can stick on the same (blue/level 3) conveyor belt before the belt can't take the output away fast enough for the farthest-down inserter to be able to put anything down (we've all run into this with copper cables and such, I'm sure). This assumes no possibility of back-up down the line though - i.e. no corner slowdowns or merging contentions - so consider the numbers given an optimistic estimate. Corners will reduce the amount by ~30% FYI. Also if you are near capacity the last few inserters will still have trouble putting down outputs at full speed, so for maximum efficiency you definitely want shorter lines than the numbers given. Anyway, so based on that theoretical output throughput capacity, you are also given the estimated number of parallel assembly lines you'll need to meet your production goals.

In addition to the above, each input for your requested production goal is calculated as well (recursively all the way to primary inputs - i.e. ore) with the same info given (items/s, assemblers, max-throughput etc). In theory this should allow for factories where you don't have, e.g. green CPUs sucking out all the copper leaving the rest of your factory starved - you could have multiple ore distribution/unloading points for different production lines. It should also make for very material-efficient factories as you'll few if any idle equipment this way. At least in theory - I've yet to actually put any of this to use.

Also a note on "primary" inputs:
Refinery products (petroleum-gas etc) are treated as a primary input. I think this is fine. Liquid networks distribute their content (more or less) evenly anyway and it's very difficult to actually fill a pipe to capacity with oil being as scarce as it is. So there isn't really any reason to have separate gas networks for each production line.

(roughly in order of priority)
Moved to GitHub Issues: https://github.com/rubyruy/factorio-calc/issues
Feel free to submit new requests there!

The code is open and available on github, feedback and patches are of course welcome. This was my excuse to play around with React.js so if you notice I'm using it in a dumb way, I'd be much obliged if you pointed it out to me!

Footnote:
* Dear developers, it's entirely possible that including the the actual recipe lua files (recipes/*.lua, as well as dataloader.lua) may run afoul of your copyright claims or EULAS. Please let me know if this is an issue and if so how I might go about using the recipe data in an acceptable manner.
Last edited by SilentSam on Sat Jun 28, 2014 10:42 pm, edited 4 times in total.

SpaceMushroom
Burner Inserter
Posts: 5
Joined: Wed May 21, 2014 8:05 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

Awesome, thanks!

MtNak
Long Handed Inserter
Posts: 56
Joined: Fri May 16, 2014 4:03 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

This is awesome! Thanks!

MisterSpock
Fast Inserter
Posts: 102
Joined: Mon Jun 16, 2014 8:11 am
Contact:

### Re: I made a calculator for all you OCD planners out there

Omg, i was calculating with paper and pen, for a while.

Bleda
Long Handed Inserter
Posts: 98
Joined: Sun Feb 02, 2014 6:58 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

absolutely great! i've been doing this on paper too. this will be much faster.

a few suggestions:

1. enable horizontal scrolling. on my laptop. the recipe names don't have enough space.
2. have a button that allows to automatically set the production rate, so that you get one assembly for the final product. that would be very useful, since normally you want to have one assembly running at 100% capacity and want to know, how many ingredients you need for that.
3. highlight the number of assemblies required (imo the most important information)

hoho
Filter Inserter
Posts: 673
Joined: Sat Jan 18, 2014 11:23 am
Contact:

### Re: I made a calculator for all you OCD planners out there

It would be nice if we could say what kind of modules we want to use in our assemblers.

Erendir
Burner Inserter
Posts: 6
Joined: Thu Jun 26, 2014 6:16 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

This is absolutely amazing! Regrettably I'm feeling really stupid, but I can't figure out what some of the numbers mean.
I'm trying to build a perfect factorio from the very beginning, so i'm asking myself (being a noob), what is the best efficient way to produce green circuits. At rate of 4 i/s I would need only integer number of assemblers -- that's what I'm looking for. But then, there is that iron-ore line, saying

Code: Select all

``iron-ore@4.00items/s (or 0.25s/item) on 3.55 assembly lines``
do I really need 4 blue conveyor belt lines with ore filling 14 smelters?

PS Just noticed: this number for ores behaves wrong: it goes up when i/s goes down. Or I really misinterpret it.

C_J_Koala
Manual Inserter
Posts: 4
Joined: Thu May 22, 2014 7:07 am
Contact:

### Re: I made a calculator for all you OCD planners out there

This tool seems awesome, but I'm confused by the output. I'm going to use an example to ask my questions.

- I want to produce 1 Electronic Circuit per second.
- First, 1.5 copper ore/sec on 9.47 assembly lines.
Q's: What is meant by "assembly lines"? L3 Blue transport belts? If so, is this saying I need enough copper ore production to fill 10 (since you can't place down 0.47 belts) belts?
- Second, 1.5 copper plates/sec requires 5.25 assemblers on 0.11 assembly lines
Q's: Is this saying I need 6 assemblers? And what is meant by "on X assembly lines?" Are those 6 assemblers getting their input from 0.11 lines or outputting to 0.11 lines?

Finally, I don't understand the output in parentheses at all. Again using copper plates as the example: ( 49.70 max assemblers per line - cycles every 3.50s @ 0.29 i/s )

What does that bit of output translate to in terms of what I actually build in-game? How could you fit 49.70 (50?) assemblers on the map without several more "lines" (belts?)

Please forgive me if these are "dumb" questions whose answers are right in front of me. I did read your original post and I know you're talking about Level 3 assemblers, Level 3 conveyor belts, and steel smelter or electric furnaces. I'm just not understanding the output and terminology you used.

In any case, thanks for the tool and your time and effort!

SilentSam
Inserter
Posts: 21
Joined: Wed Jun 25, 2014 7:00 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

Thanks everyone

I moved the to-do list tracking to github - feel free to add stuff directly there: https://github.com/rubyruy/factorio-calc/issues
Erendir wrote:This is absolutely amazing! Regrettably I'm feeling really stupid, but I can't figure out what some of the numbers mean.
I'm trying to build a perfect factorio from the very beginning, so i'm asking myself (being a noob), what is the best efficient way to produce green circuits. At rate of 4 i/s I would need only integer number of assemblers -- that's what I'm looking for. But then, there is that iron-ore line, saying

Code: Select all

``iron-ore@4.00items/s (or 0.25s/item) on 3.55 assembly lines``
do I really need 4 blue conveyor belt lines with ore filling 14 smelters?

PS Just noticed: this number for ores behaves wrong: it goes up when i/s goes down. Or I really misinterpret it.
The "assembly line" count for primary inputs should not be there at all actually (I filed it as a bug).

So no you don't need 3.55 (or 4) blue conveyor belts - the only useful number on that line is the 4.00item/s which just means you'll consume 4 iron ore per second in the smelters.

The line above it:

Code: Select all

``iron-plate @4.00items/s (or0.25s/item)requires14.00assemblerson0.29assembly lines(49.70max assemblers per line-cycles every3.50s@0.29i/s)``
... does indeed tell you you need 14 smelters yes - though I just noticed I accidentally committed the smelting time for basic furnace smelters ("cycles every 3.50s" is what gives it away). Steel or electric smelters smelt at double the speed (cycles every 1.75s) - so if you have those you only need 7.

You can have non-integer assembler numbers if that's just how the math works out and it's up to you to decide which way you want to round. E.g if you just want 1 electronic circuit per second it says you need 3.5 smelters. Well you can either build 3 and produce slightly below 1 i/s or 4 and have a few smelters sitting idle.

C_J_Koala
Manual Inserter
Posts: 4
Joined: Thu May 22, 2014 7:07 am
Contact:

### Re: I made a calculator for all you OCD planners out there

Were my questions so bad they're just going to be ignored? lol

SilentSam
Inserter
Posts: 21
Joined: Wed Jun 25, 2014 7:00 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

Nope, I'm just at work and responding while waiting for some indexes to rebuild.
C_J_Koala wrote: Q's: What is meant by "assembly lines"?
Nothing! It's a bug - ignore it for now Primary inputs shouldn't have assembler counts (the assumption is that you always extract everything you can as fast as you can regardless of your production need. Not to mention extractors exhaust over time so you can't really plan for them having a specific production figure anyway.)
- Second, 1.5 copper plates/sec requires 5.25 assemblers on 0.11 assembly lines
Q's: Is this saying I need 6 assemblers? And what is meant by "on X assembly lines?" Are those 6 assemblers getting their input from 0.11 lines or outputting to 0.11 lines?
Well 6 stone furnaces (or 3 steel/electric furnaces) to be exact, but yes. The 0.11 figure just has to do with maxing out blue-belt carrying capacity (the numbers in the brackets):
Finally, I don't understand the output in parentheses at all. Again using copper plates as the example: ( 49.70 max assemblers per line - cycles every 3.50s @ 0.29 i/s )
What does that bit of output translate to in terms of what I actually build in-game? How could you fit 49.70 (50?) assemblers on the map without several more "lines" (belts?)
So what this means is you can put up to ~50 stone furnaces on the same blue belt before the furnaces furthest down the belt no longer find room to put their outputs down. The 0.11 figure from before means you're using 11% of that maximum theoretical capacity. This isn't very useful information until you start exceeding that capacity - i.e. if you want 20 circuits per second you need "2.14 assembly lines" - i.e. you will need to run at least 3 (2.14 rounded up) parallel blue belts , to handle that massive load. (And those 3 belts will have to split up further into 5 belts for the copper cable assemblers which max out out very quickly at only 4 L3 assemblers per belt!)
Please forgive me if these are "dumb" questions whose answers are right in front of me. I did read your original post and I know you're talking about Level 3 assemblers, Level 3 conveyor belts, and steel smelter or electric furnaces. I'm just not understanding the output and terminology you used.
Nah the UI is awful and un-intuitive and nothing is explained and it turns out I lied about the furnace levels to boot. Next build should make a lot more sense.

C_J_Koala
Manual Inserter
Posts: 4
Joined: Thu May 22, 2014 7:07 am
Contact:

### Re: I made a calculator for all you OCD planners out there

Nope, I'm just at work and responding while waiting for some indexes to rebuild.
Hah, I see! Well thanks for the timely and thorough response. Despite some of the early bumps, it's definitely a nifty tool. Thanks again for the time you've put into it and doing some Q&A afterwards

SilentSam
Inserter
Posts: 21
Joined: Wed Jun 25, 2014 7:00 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

Now now, you assume I'll actually get around to fixing the QA issues

ssilk
Global Moderator
Posts: 10680
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

Some words to the assembly lines: Using the express belt for calculations like that isn't a good idea, cause an express belt can have very different speeds, depending, on how you optimize the curves. I would prefer to calculate that on basic belts, because everyone can easy calculate in his head: Ok, for express belt it is about factor 3, but I calculate better with factor 2.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Ranakastrasz
Smart Inserter
Posts: 2041
Joined: Thu Jun 12, 2014 3:05 am
Contact:

### Re: I made a calculator for all you OCD planners out there

Suggest not updating the data until you use a confirm button for the "per second", to avoid massive delay.
Also suggest a second entry for seconds, rather than you having to put fractions in.

Also the indent occationally overlaps with the other information, making it less readable.

My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

SilentSam
Inserter
Posts: 21
Joined: Wed Jun 25, 2014 7:00 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

^^ That's all already on the to-do list.
ssilk wrote:Some words to the assembly lines: Using the express belt for calculations like that isn't a good idea, cause an express belt can have very different speeds, depending, on how you optimize the curves. I would prefer to calculate that on basic belts, because everyone can easy calculate in his head: Ok, for express belt it is about factor 3, but I calculate better with factor 2.
Well right now my plan is to let you choose any of the belt types, both with and without "full-speed" corners. Those really are the only possible speeds (ignoring contention from external inputs/outputs).

The actual effective throughput of belts is actually not that straightforward - blues are only 2.5 times faster than yellow for example (there's a write up on the wiki about this somewhere - something to do with the game "physics").

ssilk
Global Moderator
Posts: 10680
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

Yeah, I wrote it and it is now nearly a year old. Not that the values are not useable, but I think the game changed a bit since then. The inserter mechanic and some belt mechanic changed since then.

What I wanted to say is, that I would calculate with a minimum and a maximum throughput for a belt type and display both to force the user to think about it, why it is a range. And to reduce the numbers a bit, to keep the results on the safe side.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

SilentSam
Inserter
Posts: 21
Joined: Wed Jun 25, 2014 7:00 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

ssilk wrote:Yeah, I wrote it and it is now nearly a year old. Not that the values are not useable, but I think the game changed a bit since then. The inserter mechanic and some belt mechanic changed since then.

What I wanted to say is, that I would calculate with a minimum and a maximum throughput for a belt type and display both to force the user to think about it, why it is a range. And to reduce the numbers a bit, to keep the results on the safe side.
Ah that explains why I ended up lowering the number a bit for throughput math (I did test it a little bit). But yes when I get around the UI pass I'll try to emphasize that all of these estimates are definitely on the optimistic side.

I added the data for 0.10.1 and 0.10.2 - should be live in the next few minutes.

Probably won't get around any of the issues for a while since this is the first chance I've had in days to actually sit down to play the damn game, as fun as theorycrafting is.

SilentSam
Inserter
Posts: 21
Joined: Wed Jun 25, 2014 7:00 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

Pushed out an update:
• Got rid of (wrong) assembler line count for primary inputs
• Added subtotals below recipe tree (sums up total use of each recipe type)
• Added option to set assembler level
• Added option to set smelter level
• Added option to set belt speed
• Assembler count is now highlighted

Erendir
Burner Inserter
Posts: 6
Joined: Thu Jun 26, 2014 6:16 pm
Contact:

### Re: I made a calculator for all you OCD planners out there

small bug: chemical plant production is affected by assembler level setting.

### Who is online

Users browsing this forum: No registered users