What exactly is the formula for productivity modules?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
tester2314
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Mar 13, 2017 6:26 am
Contact:

What exactly is the formula for productivity modules?

Post by tester2314 »

This is such a simple question that it may be obvious to everyone, but to me it isn't.

the productivity module 1 gives the following:
speed -15%
productivity bonus 4%

What EXACTLY is the formula that determines production here?


Assume we're making copper cable in an assembly 2 machine:
Assembly 2 has speed 0.75
2 copper cables cost 1 copper plate, and take 0.5 secs.
This means that WITHOUT productivity, an assembly 2
- consumes (0.75 / 0.5) * 1 = 1.5 copper plates per sec
- produces (0.75 / 0.5) * 2 = 3 copper cables per sec

If I understand productivity modules correctly, it means that WITH productivity 1 module, the same assembly 2
- consumes ((0.75 * (1 - 0.15) ) / 0.5) * 1 = 1.275 copper plates per sec
- produces ((0.75 * (1 - 0.15) ) / 0.5) * 2 * 1.04 = 2.652 copper cables per sec

in other words, the general formula would be:
Output = Standard-output * (1 + prod-bonus) * (1 - speed penalty) per second
Input = Standard-input * (1 - speed-penalty) per second
Is this formula correct?

But it could also be:
Output = Standard-output * (1 - speed penalty)
Input = Standard-input * (1 - speed-penalty) / (1 + prod-bonus)

The way the gui of a machine with productivity module looks, definitely suggests the first formula, but it could be that the speed penalty is "calculated into" the extra output. I'm not sure.

Secondly:
I am assuming that these percentages are additive, rather than multiplicative. If I add 2 modules, it multiplies the speed by a factor of (1 - 0.15 - 0.15) = 0.7, rather than by a factor of (1 - 0.15)(1-0.15) = 0.7225?

In any case, I have read that "speed modules and productivity modules complement eachother". Can someone show the math behind this?
Why is it better to use 1 speed module and 1 productivity module, rather than 2 of either? (i.e. what is the math behind this?)
Last edited by tester2314 on Mon Mar 13, 2017 7:23 am, edited 1 time in total.

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

Re: What exactly is the formula for productivity modules?

Post by DaveMcW »

Yes the first formula is correct and it's additive.
tester2314 wrote:In any case, I have read that "speed modules and productivity modules complement eachother". Can someone show the math behind this?
Why is it better to use 1 speed module and 1 productivity module, rather than 2 of either? (i.e. what is the math behind this?)
If you want free resources, use as many productivity modules as you can get. But you will quickly find that the speed penalty is crippling and you need twice as many machines (and twice as many productivity modules!) to get back to your original production.

3 productivity to 1 speed is a good ratio to minimize the total modules needed. If you really want to max out your free resources, use full productivity modules and add beacons with speed modules.
Last edited by DaveMcW on Mon Mar 13, 2017 7:23 am, edited 1 time in total.

tester2314
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Mar 13, 2017 6:26 am
Contact:

Re: What exactly is the formula for productivity modules?

Post by tester2314 »

DaveMcW wrote:Yes the first formula is correct and it's additive.
tester2314 wrote:In any case, I have read that "speed modules and productivity modules complement eachother". Can someone show the math behind this?
Why is it better to use 1 speed module and 1 productivity module, rather than 2 of either? (i.e. what is the math behind this?)
If you want free resources, use as many productivity modules as you can get. But you will quickly find that the speed penalty is crippling and you need twice as many machines (and twice as many productivity modules!) to get back to your original production.

3 productivity to 1 speed is a good ratio to minimize the total modules needed. If you really want to max out your free resources, use max productivity modules and beacons with speed modules.
This doesn't really answer my question as to what is the math behind it.

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

Re: What exactly is the formula for productivity modules?

Post by DaveMcW »

Input resources: 1x ingredients
Output resources: (1 + productivity bonus)x recipe

Input speed: (1 - speed penalty)
Output speed: (1 - speed penalty)

If you really care about resources per second, you can multiply them together.
Input resources/s: (1 - speed penalty)
Output resources/s: (1 - speed penalty) * (1 + productivity bonus)

But productivity modules are not about maxing resources per second in one assembling machine. They are about getting free stuff out of limited resources.

tester2314
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Mar 13, 2017 6:26 am
Contact:

Re: What exactly is the formula for productivity modules?

Post by tester2314 »

Sorry, I actually didn't see your first comment in your post (before the quote) saying that the first formula is correct. Thank you.

about my second question:
What I mean with "the math behind it" is: Why does this formula imply that it is better/more cost effective/better return on investment, to have X assembly machines/furnaces with speed modules AND productivity modules that produce Z amount, rather than producing the same Z amount WITHOUT speed modules and beacons, but with a larger amount of assembly machines?

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

Re: What exactly is the formula for productivity modules?

Post by DaveMcW »

tester2314 wrote:producing the same Z amount WITHOUT speed modules and beacons, but with a larger amount of assembly machines?
This is strictly better, because you have a higher productivity ratio in every assembling machine. It just costs twice as much to set up.

Once you have your giant, slow, very productive factory set up, look for places to add speed beacons. ;)

tester2314
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Mar 13, 2017 6:26 am
Contact:

Re: What exactly is the formula for productivity modules?

Post by tester2314 »

DaveMcW wrote:
tester2314 wrote:producing the same Z amount WITHOUT speed modules and beacons, but with a larger amount of assembly machines?
This is strictly better, because you have a higher productivity ratio in every assembling machine. It just costs twice as much to set up.

Once you have your giant, slow, very productive factory set up, look for places to add speed beacons. ;)
What do you mean by "productivity ratio", and why would it be higher? I hope you can explain it to me in an exact way, since I've already read general vague advice about this

vtx
Fast Inserter
Fast Inserter
Posts: 150
Joined: Tue Jun 28, 2016 9:48 am
Contact:

Re: What exactly is the formula for productivity modules?

Post by vtx »

tester2314 wrote:
DaveMcW wrote:
tester2314 wrote:producing the same Z amount WITHOUT speed modules and beacons, but with a larger amount of assembly machines?
This is strictly better, because you have a higher productivity ratio in every assembling machine. It just costs twice as much to set up.

Once you have your giant, slow, very productive factory set up, look for places to add speed beacons. ;)
What do you mean by "productivity ratio", and why would it be higher? I hope you can explain it to me in an exact way, since I've already read general vague advice about this
Simply because you get "free" ressource and the cost for creating rocket will be 33% of the full price. That mean you intend to play beyond the end-game ( sending one rocket ). Because as everyone forget to mention when I read about it is the initial cost to reach that reduction. In the end you'll need to send a fews rocket before you see true "free" items.

Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: What exactly is the formula for productivity modules?

Post by Helfima »

it s better to use productivity modules in machine and speed modules in beacon where it is possible.
i have try with speed modules and effectivity module and the base is 30% more bigger

Calculation 1 rocket per minute (with my mod in signature)

Some setup

tester2314
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Mar 13, 2017 6:26 am
Contact:

Re: What exactly is the formula for productivity modules?

Post by tester2314 »

nevermind...

Xeorm
Fast Inserter
Fast Inserter
Posts: 206
Joined: Wed May 28, 2014 7:11 pm
Contact:

Re: What exactly is the formula for productivity modules?

Post by Xeorm »

tester2314 wrote:Sorry, I actually didn't see your first comment in your post (before the quote) saying that the first formula is correct. Thank you.

about my second question:
What I mean with "the math behind it" is: Why does this formula imply that it is better/more cost effective/better return on investment, to have X assembly machines/furnaces with speed modules AND productivity modules that produce Z amount, rather than producing the same Z amount WITHOUT speed modules and beacons, but with a larger amount of assembly machines?
Each production module has a speed penalty of -15%. 3 of them in a machine means a cumulative penalty of -45%, or 55% total. If I add another machine with the same 3 modules, I'd have a cumulative speed of 110% normal, with the same amount of efficiency. If I instead add a speed 3 module to the first (+50% speed) you get a machine with 105% speed. Similar speed, but lower construction costs and easier on the logistics system.

Another way to look at it is that adding assembly machines is multiplicative speed. X*number of AMs. Modules are additive. More assembly machines works well when the speed values are relatively high, but modules work much better when they're relatively low. If you want to use productivity, then modules will tend to be much better than more machines.

aober93
Filter Inserter
Filter Inserter
Posts: 453
Joined: Tue Aug 30, 2016 9:07 pm
Contact:

Re: What exactly is the formula for productivity modules?

Post by aober93 »

tester2314 wrote:Why does this formula imply that it is better/more cost effective/better return on investment, to have X assembly machines/furnaces with speed modules AND productivity modules that produce Z amount, rather than producing the same Z amount WITHOUT speed modules and beacons, but with a larger amount of assembly machines?
The thing is a bit more trickier than you think. You save resources, thus you save assemblers, thus you save even more resources. This gets extremely ridiculous real fast.

Where does this formula imply what you said?

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

Re: What exactly is the formula for productivity modules?

Post by Frightning »

Ok, the main benefit of Production modules is the resource stretching that they provide because you get extra output items for the same input. For example, a single Productivity module 1 in a smelter, assembly machine, etc. means that it will produce an extra 4 items for every 100 items it would normally have made. However, this is comes at a pretty steep price: The assembly machine is now slower (-15%), consumes more energy per second (and it's slower, so that's a double whammy to your energy consumption per end-product produced), and produces more pollution per energy consumed by a bit (so pollution per sec from the smelter/assembly machine is higher for the given energy cost than it would otherwise be; but, also, pollution per item is increased dramatically, since the item costs more energy, and that energy cost converts to pollution production at a higher than normal rate on top of it). Modules themselves, especially higher tier modules are expensive. So setting up a factory to produce x items/sec with a desired productivity bonus can become VERY expensive in terms of fixed costs very quickly (e.g. if you want 5 Copper cables/sec, with no prod bonus, that's easy w/ a single Assembly machine 3, you get 5/sec, but to get that rate with the maximum +40% productivity (4x prod 3 modules), you would need 2 assembly machines and hence 8 prod 3 modules, which are very expensive, you would actually get slightly more than 5/sec because each assem 3 with 4x prod 3 produces (1-0.15*4)*(1+0.1*4)*5=2.8 Copper cables/sec, so you would see 5.6/sec, but at 1/1.4=~71.5% of usual cost in Copper plates).

Speed modules are a bit simpler, they speed up the assembly machine but at an increase in energy cost. The interesting thing about Speed modules and Productivity modules is that their speed adjustments interact additively instead of multiplicatively, hence an assem3 with 3x prod3 and 1x speed3 modules in it will have +30% productivity, (-15*3+50)=105%=+5% speed, +310% Energy comsumption, and +30% pollution (note that pollution is also affected by energy consumption, so the adjustment, from the assem3's base pollution value of 1.8/sec is 1.8*(1+3.1)*(1+0.3)=9.594 pollution/sec; notice how pollution modifier stacks multiplicatively with energy consumption modifier's effect on pollution.). This point and the fact that beacons can contain Speed modules, but not Production modules is why many setups use speed modules in beacons to support assembly machines with productivity modules them: They interact in a VERY favorable manner, and allow for compact, high throughput factory setups that also see the benefits of the increased productivity due to productivity modules.

Speaking the benefits of productivity modules, one important thing to note is that the resource stretch effect can be exploited at multiple stages of a production chain. For example, production of steel from iron ore deposits can actually be increased by a maximum of +87.2%. This is done by used the maximum number of prod3 modules in the Electric mining drill, the Electric furnace smelting Iron ore into Iron plates, as well as the Electric furnace smelting Iron plates into Steel plates. Those numbers are 3 for mining drill, and 2 for each furnace, hence the yield of Iron ore from the ground is being increased by 30% thanks to 3x prod3 in the Electric mining drill. That 130% iron ore is being further increased by 20% (multiplicatively!) by the 2x prod3 in the Electric furnace smelting said Iron ore into Iron plates (so 1.3*1.2=1.56=156% Iron plate yield from Iron ore on the ground). Which is finally being increased by a further (multiplicative) 20% by 2x prod3 in Electric furnace (so 1.3*1.2*1.2=1.872=187.2% Steel plate yield from Iron ore in the ground). The point being this: The more stages in the process of producing an item there are, the more opportunities there are to increase the yield of finished products from raw resources (provided that those stages are considered intermediate products, since Prod modules are only usable on intermediate products). The potential copper yield increase for blue circuit production is somewhere in the neighborhood of +350%. (Over 4x blue circuits from given copper used!)

Post Reply

Return to “Gameplay Help”