<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Untitled7</id>
	<title>Official Factorio Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Untitled7"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/Untitled7"/>
	<updated>2026-04-28T16:05:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=207011</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=207011"/>
		<updated>2024-11-24T11:54:48Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: /* Number of crafting machines */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]]. But first, a presentation of the results.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
The table below shows the best ratio for [[Quality module 3|quality]] to [[Productivity module 3|productivity modules]] in the crafting machines, while the [[Recycler|recyclers]] always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. e.g. &amp;quot;3.67 quality / 1.33 productivity&amp;quot; could have 4 machines where 3 have a ratio 4 to 1, and one a ratio 3 to 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
common modules = &lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.034014% || 2940&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.046275% || 2161&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.133814% || 747&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.176712% || 566&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6.5 quality &amp;lt;br /&amp;gt;1.5 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.119134%|| 840&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
uncommon modules = &lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.059498% || 1681&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.082296% || 1216&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.243699% || 410&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 4.7 quality &amp;lt;br /&amp;gt;0.3 productivity || 4.67 quality &amp;lt;br /&amp;gt;0.33 productivity || 4.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 4.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.324189% || 309&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.67 quality &amp;lt;br /&amp;gt;3.33 productivity  || 5 quality &amp;lt;br /&amp;gt;3 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.257621% || 389&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
rare modules = &lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.100660% || 994&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3 quality &amp;lt;br /&amp;gt;1 productivity || 3.1 quality &amp;lt;br /&amp;gt;0.9 productivity || 3.2 quality &amp;lt;br /&amp;gt;0.8 productivity || 3.33 quality &amp;lt;br /&amp;gt;0.67 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.145220% || 689&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.6 quality &amp;lt;br /&amp;gt;0.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.424039% || 236&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;1.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.588510% || 170&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 3.9 quality &amp;lt;br /&amp;gt;4.1 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.565030% || 177&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
epic modules = &lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.33 quality &amp;lt;br /&amp;gt;0.67 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.152486% || 656&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 2.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.232966% || 430&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.75 quality &amp;lt;br /&amp;gt;1.25 productivity || 3 quality &amp;lt;br /&amp;gt;1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.664130% || 151&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 2.9 quality &amp;lt;br /&amp;gt;2.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.974700% || 103&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 2.8 quality &amp;lt;br /&amp;gt;4.2 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 1.122444% || 90&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
legendary modules=&lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.333 productivity || 1.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.344061% || 291&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.8 quality &amp;lt;br /&amp;gt;2.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.586191% || 171&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.5 quality &amp;lt;br /&amp;gt;2.5 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 1.624266% || 62&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 2.722332% || 37&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 4.835199% || 21&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of uncommon items, which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier of quality. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100 \, \% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration and further adjusting for the crafting machines change in speed dependant on the modules (assuming the machines which only house productivity modules are not additionally boosted by [[Speed module 3|speed moduled]] [[beacon]]s). See the calculations further below for a full explanation of the calculations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing common items || Machines producing uncommon items || Machines producing rare items || Machines producing epic items || Machines producing legendary items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1 || 4.418130519 || 0.037216657 || 1.294369664 || 0.009779 || 0.431955&lt;br /&gt;
|- &lt;br /&gt;
| Assembling machine 3 || 1 || 4.733868899 || 0.052316655 || 1.527502978 || 0.015336 || 0.52576&lt;br /&gt;
|- &lt;br /&gt;
| Foundry || 1 || 4.314446 || 0.082198 || 1.683088 || 0.03016 || 0.58448&lt;br /&gt;
|- &lt;br /&gt;
| Electromagnetic plant || 1 || 4.494435 || 0.116985 || 1.93479 || 0.049665 || 0.60795&lt;br /&gt;
|- &lt;br /&gt;
| Cryogenic plant || 1 || 5.23556 || 0.21384 || 2.53374 || 0.1034 || 0.594&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per legendary crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing common items || Machines producing uncommon items || Machines producing rare items || Machines producing epic items || Machines producing legendary items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 90.1223 || 331.8198 || 38.5325 || 11.2893 || 2.9653 || 1&lt;br /&gt;
|- &lt;br /&gt;
| Assembling machine 3 || 52.8432 || 208.4632 || 30.3992 || 9.8094 || 2.8783 || 1&lt;br /&gt;
|- &lt;br /&gt;
| Foundry || 24.7668 || 89.0483 || 19.9206 || 7.7712 || 2.8592 || 1&lt;br /&gt;
|- &lt;br /&gt;
| Electromagnetic plant || 16.5379 || 61.9418 || 17.4010 || 7.4908 || 3.1822 || 1&lt;br /&gt;
|- &lt;br /&gt;
| Cryogenic plant || 10.8718 || 47.4350 || 18.2124 || 8.8138 || 4.2654 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per legendary crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing common items || Machines producing uncommon items || Machines producing rare items || Machines producing epic items || Machines producing legendary items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 53 || 198 || 23 || 7 || 2 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 31 || 123 || 18 || 6 || 2 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 14 || 53 || 12 || 5 || 2 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 14 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 9 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; (whereas 1 is common, 2 is uncommon, 3 is rare, 4 is epic, and 5 is legendary) after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, \% = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s (6.2% is the chance of a legendary tier quality module 3)&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, \%&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials (25% is the productivity boost of a legendary tier productivity module 3)&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, \%&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules, we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as uncommon items can only come forth from uncommon material failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{common material:}\quad m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
\text{uncommon material:}\quad m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
\text{rare material:}\quad m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
\text{epic material:}\quad m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
\text{legendary material:}\quad m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant. For legendary quality module 3&#039;s, it looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{common item:}\quad n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
\text{uncommon items:}\quad n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
\text{rare items:}\quad n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
\text{epic items:}\quad n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
\text{legendary items:}\quad n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{C}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=207002</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=207002"/>
		<updated>2024-11-23T22:06:08Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]]. But first, a presentation of the results.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
The table below shows the best ratio for [[Quality module 3|quality]] to [[Productivity module 3|productivity modules]] in the crafting machines, while the [[Recycler|recyclers]] always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. e.g. &amp;quot;3.67 quality / 1.33 productivity&amp;quot; could have 4 machines where 3 have a ratio 4 to 1, and one a ratio 3 to 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
common modules = &lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.034014% || 2940&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.046275% || 2161&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.133814% || 747&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.176712% || 566&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6.5 quality &amp;lt;br /&amp;gt;1.5 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.119134%|| 840&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
uncommon modules = &lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.059498% || 1681&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.082296% || 1216&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.243699% || 410&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 4.7 quality &amp;lt;br /&amp;gt;0.3 productivity || 4.67 quality &amp;lt;br /&amp;gt;0.33 productivity || 4.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 4.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.324189% || 309&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.67 quality &amp;lt;br /&amp;gt;3.33 productivity  || 5 quality &amp;lt;br /&amp;gt;3 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.257621% || 389&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
rare modules = &lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.100660% || 994&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3 quality &amp;lt;br /&amp;gt;1 productivity || 3.1 quality &amp;lt;br /&amp;gt;0.9 productivity || 3.2 quality &amp;lt;br /&amp;gt;0.8 productivity || 3.33 quality &amp;lt;br /&amp;gt;0.67 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.145220% || 689&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.6 quality &amp;lt;br /&amp;gt;0.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.424039% || 236&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;1.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.588510% || 170&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 3.9 quality &amp;lt;br /&amp;gt;4.1 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.565030% || 177&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
epic modules = &lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.33 quality &amp;lt;br /&amp;gt;0.67 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.152486% || 656&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 2.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.232966% || 430&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.75 quality &amp;lt;br /&amp;gt;1.25 productivity || 3 quality &amp;lt;br /&amp;gt;1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.664130% || 151&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 2.9 quality &amp;lt;br /&amp;gt;2.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.974700% || 103&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 2.8 quality &amp;lt;br /&amp;gt;4.2 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 1.122444% || 90&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
legendary modules=&lt;br /&gt;
The columns &amp;quot;Modules for X items&amp;quot; denote which modules need to go into the machines that are set to produce items of X quality.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules for common items || Modules for uncommon items || Modules for rare items  || Modules for epic || Modules for legendary || Percentage yield || Items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.333 productivity || 1.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.344061% || 291&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.8 quality &amp;lt;br /&amp;gt;2.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.586191% || 171&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.5 quality &amp;lt;br /&amp;gt;2.5 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 1.624266% || 62&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 2.722332% || 37&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 4.835199% || 21&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of uncommon items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100 \, \% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration. See the calculations further below for a full explanation of the calculations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing common items || Machines producing uncommon items || Machines producing rare items || Machines producing epic items || Machines producing legendary items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1 || 3.4427 || 0.0290 || 1.0086 || 0.0077 || 0.2979&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1 || 3.3027 || 0.0365 || 1.0657 || 0.0108 || 0.3286&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1 || 2.9551 || 0.0563 || 1.1528 || 0.0208 || 0.3653&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 || 2.7239 || 0.0709 || 1.1726 || 0.0301 || 0.3474&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 1 || 2.3798 || 0.0972 || 1.1517 || 0.0470 || 0.2700&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per legendary crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing common items || Machines producing uncommon items || Machines producing rare items || Machines producing epic items || Machines producing legendary items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 108.8978 || 374.9134 || 43.5367 || 12.7555 || 3.3856 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 70.4576 || 232.7032 || 33.9340 || 10.9500 || 3.2432 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 33.0224 || 97.5872 || 21.8308 || 8.5164 || 3.1550 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 24.1178 || 65.6959 || 18.4556 || 7.9448 || 3.3747 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 19.9316 || 47.4350 || 18.2124 || 8.8138 || 4.2654 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per legendary crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing common items || Machines producing uncommon items || Machines producing rare items || Machines producing epic items || Machines producing legendary items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 92 || 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 62 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 30 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 20 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 17 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; (whereas 1 is common, 2 is uncommon, 3 is rare, 4 is epic, and 5 is legendary) after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, \% = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s (6.2% is the chance of a legendary tier quality module 3)&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, \%&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials (25% is the productivity boost of a legendary tier productivity module 3)&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, \%&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules, we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as uncommon items can only come forth from uncommon material failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{common material:}\quad m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
\text{uncommon material:}\quad m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
\text{rare material:}\quad m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
\text{epic material:}\quad m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
\text{legendary material:}\quad m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant. For legendary quality module 3&#039;s, it looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{common item:}\quad n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
\text{uncommon items:}\quad n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
\text{rare items:}\quad n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
\text{epic items:}\quad n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
\text{legendary items:}\quad n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{C}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=207001</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=207001"/>
		<updated>2024-11-23T21:37:47Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: /* Recrafted items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]].&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, \% = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s (6.2% is the chance of a legendary tier quality module 3)&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, \%&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials (25% is the productivity boost of a legendary tier productivity module 3)&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, \%&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as we the lowest tier can only come forth from it&#039;s own tier failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant. For legendary quality module 3&#039;s, it looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{C}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
This table shows the best ratio for quality to productivity modules in the crafting machines, while the recyclers always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. e.g. &amp;quot;3.67 quality / 1.33 productivity&amp;quot; could have 4 machines where 3 have a ratio 4 to 1, and one a ratio 3 to 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
common modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.034014% || 2940&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.046275% || 2161&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.133814% || 747&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.176712% || 566&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6.5 quality &amp;lt;br /&amp;gt;1.5 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.119134%|| 840&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
uncommon modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.059498% || 1681&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.082296% || 1216&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.243699% || 410&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 4.7 quality &amp;lt;br /&amp;gt;0.3 productivity || 4.67 quality &amp;lt;br /&amp;gt;0.33 productivity || 4.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 4.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.324189% || 309&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.67 quality &amp;lt;br /&amp;gt;3.33 productivity  || 5 quality &amp;lt;br /&amp;gt;3 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.257621% || 389&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
rare modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.100660% || 994&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3 quality &amp;lt;br /&amp;gt;1 productivity || 3.1 quality &amp;lt;br /&amp;gt;0.9 productivity || 3.2 quality &amp;lt;br /&amp;gt;0.8 productivity || 3.33 quality &amp;lt;br /&amp;gt;0.67 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.145220% || 689&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.6 quality &amp;lt;br /&amp;gt;0.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.424039% || 236&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;1.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.588510% || 170&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 3.9 quality &amp;lt;br /&amp;gt;4.1 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.565030% || 177&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
epic modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.33 quality &amp;lt;br /&amp;gt;0.67 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.152486% || 656&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 2.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.232966% || 430&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.75 quality &amp;lt;br /&amp;gt;1.25 productivity || 3 quality &amp;lt;br /&amp;gt;1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.664130% || 151&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 2.9 quality &amp;lt;br /&amp;gt;2.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.974700% || 103&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 2.8 quality &amp;lt;br /&amp;gt;4.2 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 1.122444% || 90&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
legendary modules=&lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.333 productivity || 1.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.344061% || 291&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.8 quality &amp;lt;br /&amp;gt;2.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.586191% || 171&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.5 quality &amp;lt;br /&amp;gt;2.5 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 1.624266% || 62&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 2.722332% || 37&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 4.835199% || 21&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of tier 1 items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100 \, \% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1 || 3.4427 || 0.0290 || 1.0086 || 0.0077 || 0.2979&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1 || 3.3027 || 0.0365 || 1.0657 || 0.0108 || 0.3286&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1 || 2.9551 || 0.0563 || 1.1528 || 0.0208 || 0.3653&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 || 2.7239 || 0.0709 || 1.1726 || 0.0301 || 0.3474&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 1 || 2.3798 || 0.0972 || 1.1517 || 0.0470 || 0.2700&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 108.8978 || 374.9134 || 43.5367 || 12.7555 || 3.3856 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 70.4576 || 232.7032 || 33.9340 || 10.9500 || 3.2432 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 33.0224 || 97.5872 || 21.8308 || 8.5164 || 3.1550 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 24.1178 || 65.6959 || 18.4556 || 7.9448 || 3.3747 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 19.9316 || 47.4350 || 18.2124 || 8.8138 || 4.2654 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 92 || 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 62 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 30 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 20 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 17 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=207000</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=207000"/>
		<updated>2024-11-23T21:36:24Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: /* Mathematical model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]].&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, \% = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s (6.2% is the chance of a legendary tier quality module 3)&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, \%&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials (25% is the productivity boost of a legendary tier productivity module 3)&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, \%&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as we the lowest tier can only come forth from it&#039;s own tier failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant. For legendary quality module 3&#039;s, it looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
This table shows the best ratio for quality to productivity modules in the crafting machines, while the recyclers always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. e.g. &amp;quot;3.67 quality / 1.33 productivity&amp;quot; could have 4 machines where 3 have a ratio 4 to 1, and one a ratio 3 to 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
common modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.034014% || 2940&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.046275% || 2161&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.133814% || 747&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.176712% || 566&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6.5 quality &amp;lt;br /&amp;gt;1.5 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.119134%|| 840&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
uncommon modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.059498% || 1681&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.082296% || 1216&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.243699% || 410&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 4.7 quality &amp;lt;br /&amp;gt;0.3 productivity || 4.67 quality &amp;lt;br /&amp;gt;0.33 productivity || 4.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 4.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.324189% || 309&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.67 quality &amp;lt;br /&amp;gt;3.33 productivity  || 5 quality &amp;lt;br /&amp;gt;3 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.257621% || 389&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
rare modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.100660% || 994&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3 quality &amp;lt;br /&amp;gt;1 productivity || 3.1 quality &amp;lt;br /&amp;gt;0.9 productivity || 3.2 quality &amp;lt;br /&amp;gt;0.8 productivity || 3.33 quality &amp;lt;br /&amp;gt;0.67 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.145220% || 689&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.6 quality &amp;lt;br /&amp;gt;0.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.424039% || 236&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;1.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.588510% || 170&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 3.9 quality &amp;lt;br /&amp;gt;4.1 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.565030% || 177&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
epic modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.33 quality &amp;lt;br /&amp;gt;0.67 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.152486% || 656&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 2.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.232966% || 430&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.75 quality &amp;lt;br /&amp;gt;1.25 productivity || 3 quality &amp;lt;br /&amp;gt;1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.664130% || 151&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 2.9 quality &amp;lt;br /&amp;gt;2.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.974700% || 103&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 2.8 quality &amp;lt;br /&amp;gt;4.2 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 1.122444% || 90&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
legendary modules=&lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.333 productivity || 1.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.344061% || 291&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.8 quality &amp;lt;br /&amp;gt;2.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.586191% || 171&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.5 quality &amp;lt;br /&amp;gt;2.5 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 1.624266% || 62&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 2.722332% || 37&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 4.835199% || 21&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of tier 1 items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100 \, \% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1 || 3.4427 || 0.0290 || 1.0086 || 0.0077 || 0.2979&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1 || 3.3027 || 0.0365 || 1.0657 || 0.0108 || 0.3286&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1 || 2.9551 || 0.0563 || 1.1528 || 0.0208 || 0.3653&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 || 2.7239 || 0.0709 || 1.1726 || 0.0301 || 0.3474&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 1 || 2.3798 || 0.0972 || 1.1517 || 0.0470 || 0.2700&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 108.8978 || 374.9134 || 43.5367 || 12.7555 || 3.3856 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 70.4576 || 232.7032 || 33.9340 || 10.9500 || 3.2432 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 33.0224 || 97.5872 || 21.8308 || 8.5164 || 3.1550 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 24.1178 || 65.6959 || 18.4556 || 7.9448 || 3.3747 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 19.9316 || 47.4350 || 18.2124 || 8.8138 || 4.2654 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 92 || 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 62 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 30 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 20 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 17 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206999</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206999"/>
		<updated>2024-11-23T21:32:12Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: /* Best ratios */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]].&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, \% = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, \%&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, \%&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as we the lowest tier can only come forth from it&#039;s own tier failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant. For legendary quality module 3&#039;s, it looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
This table shows the best ratio for quality to productivity modules in the crafting machines, while the recyclers always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. e.g. &amp;quot;3.67 quality / 1.33 productivity&amp;quot; could have 4 machines where 3 have a ratio 4 to 1, and one a ratio 3 to 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
common modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.034014% || 2940&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.046275% || 2161&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.133814% || 747&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.176712% || 566&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6.5 quality &amp;lt;br /&amp;gt;1.5 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.119134%|| 840&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
uncommon modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.059498% || 1681&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.082296% || 1216&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.243699% || 410&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 4.7 quality &amp;lt;br /&amp;gt;0.3 productivity || 4.67 quality &amp;lt;br /&amp;gt;0.33 productivity || 4.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 4.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.324189% || 309&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.67 quality &amp;lt;br /&amp;gt;3.33 productivity  || 5 quality &amp;lt;br /&amp;gt;3 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.257621% || 389&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
rare modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.100660% || 994&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3 quality &amp;lt;br /&amp;gt;1 productivity || 3.1 quality &amp;lt;br /&amp;gt;0.9 productivity || 3.2 quality &amp;lt;br /&amp;gt;0.8 productivity || 3.33 quality &amp;lt;br /&amp;gt;0.67 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.145220% || 689&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.6 quality &amp;lt;br /&amp;gt;0.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.424039% || 236&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;1.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.588510% || 170&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 3.9 quality &amp;lt;br /&amp;gt;4.1 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.565030% || 177&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
epic modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.33 quality &amp;lt;br /&amp;gt;0.67 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.152486% || 656&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 2.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.232966% || 430&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.75 quality &amp;lt;br /&amp;gt;1.25 productivity || 3 quality &amp;lt;br /&amp;gt;1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.664130% || 151&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 2.9 quality &amp;lt;br /&amp;gt;2.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.974700% || 103&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 2.8 quality &amp;lt;br /&amp;gt;4.2 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 1.122444% || 90&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
legendary modules=&lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.333 productivity || 1.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.344061% || 291&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.8 quality &amp;lt;br /&amp;gt;2.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.586191% || 171&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.5 quality &amp;lt;br /&amp;gt;2.5 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 1.624266% || 62&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 2.722332% || 37&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 4.835199% || 21&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler to yield a single legendary item, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of tier 1 items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100 \, \% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1 || 3.4427 || 0.0290 || 1.0086 || 0.0077 || 0.2979&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1 || 3.3027 || 0.0365 || 1.0657 || 0.0108 || 0.3286&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1 || 2.9551 || 0.0563 || 1.1528 || 0.0208 || 0.3653&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 || 2.7239 || 0.0709 || 1.1726 || 0.0301 || 0.3474&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 1 || 2.3798 || 0.0972 || 1.1517 || 0.0470 || 0.2700&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 108.8978 || 374.9134 || 43.5367 || 12.7555 || 3.3856 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 70.4576 || 232.7032 || 33.9340 || 10.9500 || 3.2432 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 33.0224 || 97.5872 || 21.8308 || 8.5164 || 3.1550 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 24.1178 || 65.6959 || 18.4556 || 7.9448 || 3.3747 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 19.9316 || 47.4350 || 18.2124 || 8.8138 || 4.2654 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 92 || 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 62 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 30 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 20 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 17 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206998</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206998"/>
		<updated>2024-11-23T21:30:29Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]].&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, \% = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, \%&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, \%&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as we the lowest tier can only come forth from it&#039;s own tier failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant. For legendary quality module 3&#039;s, it looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
This table shows the best ratio for quality to productivity modules in the crafting machines, while the recyclers always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. e.g. &amp;quot;3.67 quality / 1.33 productivity&amp;quot; could have 4 machines where 3 have a ratio 4 to 1, and one a ratio 3 to 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
common modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.034014% || 2940&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.046275% || 2161&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.133814% || 747&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity || 5 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.176712% || 566&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6 quality &amp;lt;br /&amp;gt;2 productivity || 6.5 quality &amp;lt;br /&amp;gt;1.5 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.119134%|| 840&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
uncommon modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity || 3 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.059498% || 1681&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 3.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.082296% || 1216&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity || 4 quality &amp;lt;br /&amp;gt;0 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.243699% || 410&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 4.7 quality &amp;lt;br /&amp;gt;0.3 productivity || 4.67 quality &amp;lt;br /&amp;gt;0.33 productivity || 4.75 quality &amp;lt;br /&amp;gt;0.25 productivity || 4.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.324189% || 309&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.6 quality &amp;lt;br /&amp;gt;3.4 productivity || 4.67 quality &amp;lt;br /&amp;gt;3.33 productivity  || 5 quality &amp;lt;br /&amp;gt;3 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.257621% || 389&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
rare modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.8 quality &amp;lt;br /&amp;gt;0.2 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity || 2.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.100660% || 994&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 3 quality &amp;lt;br /&amp;gt;1 productivity || 3.1 quality &amp;lt;br /&amp;gt;0.9 productivity || 3.2 quality &amp;lt;br /&amp;gt;0.8 productivity || 3.33 quality &amp;lt;br /&amp;gt;0.67 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.145220% || 689&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.5 quality &amp;lt;br /&amp;gt;0.5 productivity || 3.6 quality &amp;lt;br /&amp;gt;0.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;0.1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.424039% || 236&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 3.9 quality &amp;lt;br /&amp;gt;1.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.588510% || 170&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity || 3.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 3.9 quality &amp;lt;br /&amp;gt;4.1 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0.565030% || 177&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
epic modules = &lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 2.33 quality &amp;lt;br /&amp;gt;0.67 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity || 2.4 quality &amp;lt;br /&amp;gt;0.6 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.152486% || 656&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.5 quality &amp;lt;br /&amp;gt;1.5 productivity || 2.6 quality &amp;lt;br /&amp;gt;1.4 productivity || 2.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.232966% || 430&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.7 quality &amp;lt;br /&amp;gt;1.3 productivity || 2.75 quality &amp;lt;br /&amp;gt;1.25 productivity || 3 quality &amp;lt;br /&amp;gt;1 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.664130% || 151&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;2.4 productivity || 2.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 2.9 quality &amp;lt;br /&amp;gt;2.1 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 0.974700% || 103&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;5.4 productivity || 2.6 quality &amp;lt;br /&amp;gt;4.4 productivity  || 2.8 quality &amp;lt;br /&amp;gt;4.2 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 1.122444% || 90&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
\-\&lt;br /&gt;
legendary modules=&lt;br /&gt;
&amp;quot;Modules in Tier X&amp;quot; means which Modules need to go into the machines that are set to produce the item at tier X.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || percentage yield || items recycled*&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;1.333 productivity || 1.8 quality &amp;lt;br /&amp;gt;1.2 productivity  || 0 quality &amp;lt;br /&amp;gt;3 productivity || 0.344061% || 291&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.67 quality &amp;lt;br /&amp;gt;2.33 productivity || 1.8 quality &amp;lt;br /&amp;gt;2.2 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 0.586191% || 171&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.4 quality &amp;lt;br /&amp;gt;2.6 productivity || 1.5 quality &amp;lt;br /&amp;gt;2.5 productivity  || 0 quality &amp;lt;br /&amp;gt;4 productivity || 1.624266% || 62&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity || 1 quality &amp;lt;br /&amp;gt;4 productivity  || 0 quality &amp;lt;br /&amp;gt;5 productivity || 2.722332% || 37&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity || 0 quality &amp;lt;br /&amp;gt;8 productivity  || 0 quality &amp;lt;br /&amp;gt;8 productivity || 4.835199% || 21&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &amp;quot;items recycled&amp;quot; quantifies how many items need to be crafted and put into the entire upcycler, it doesn&#039;t account for those which get recycled multiple times.&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of tier 1 items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100 \, \% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 1 || 3.4427 || 0.0290 || 1.0086 || 0.0077 || 0.2979&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 1 || 3.3027 || 0.0365 || 1.0657 || 0.0108 || 0.3286&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 1 || 2.9551 || 0.0563 || 1.1528 || 0.0208 || 0.3653&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 1 || 2.7239 || 0.0709 || 1.1726 || 0.0301 || 0.3474&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 1 || 2.3798 || 0.0972 || 1.1517 || 0.0470 || 0.2700&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 108.8978 || 374.9134 || 43.5367 || 12.7555 || 3.3856 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 70.4576 || 232.7032 || 33.9340 || 10.9500 || 3.2432 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 33.0224 || 97.5872 || 21.8308 || 8.5164 || 3.1550 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 24.1178 || 65.6959 || 18.4556 || 7.9448 || 3.3747 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 19.9316 || 47.4350 || 18.2124 || 8.8138 || 4.2654 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| Chemical plant || 92 || 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Assembling machine 3 || 62 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Foundry || 30 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Electromagnetic plant || 20 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| Cryogenic plant || 17 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206997</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206997"/>
		<updated>2024-11-23T19:29:29Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]].&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, \% = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, \%&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, \%&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as we the lowest tier can only come forth from it&#039;s own tier failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
This table shows the best ratio for quality to productivity modules in the crafting machines, while the recyclers always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || Percentage yield of legendary items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 1.67 quality / 1.33 productivity || 1.67 quality / 1.33 productivity || 1.67 quality / 1.333 productivity || 1.8 quality / 1.2 productivity  || 0 quality / 3 productivity || 0.344%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 1.67 quality / 2.33 productivity || 1.67 quality / 2.33 productivity || 1.67 quality / 2.33 productivity || 1.8 quality / 2.2 productivity  || 0 quality / 4 productivity || 0.586%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 1.4 quality / 2.6 productivity || 1.4 quality / 2.6 productivity || 1.4 quality / 2.6 productivity || 1.5 quality / 2.5 productivity  || 0 quality / 4 productivity || 1.624%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 1 quality / 4 productivity || 1 quality / 4 productivity || 1 quality / 4 productivity || 1 quality / 4 productivity  || 0 quality / 5 productivity || 2.722%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 0 quality / 8 productivity || 0 quality / 8 productivity || 0 quality / 8 productivity || 0 quality / 8 productivity  || 0 quality / 8 productivity || 4.835%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of tier 1 items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100 \, \% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 1 || 3.4427 || 0.0290 || 1.0086 || 0.0077 || 0.2979&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 1 || 3.3027 || 0.0365 || 1.0657 || 0.0108 || 0.3286&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 1 || 2.9551 || 0.0563 || 1.1528 || 0.0208 || 0.3653&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 1 || 2.7239 || 0.0709 || 1.1726 || 0.0301 || 0.3474&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 1 || 2.3798 || 0.0972 || 1.1517 || 0.0470 || 0.2700&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 108.8978 || 374.9134 || 43.5367 || 12.7555 || 3.3856 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 70.4576 || 232.7032 || 33.9340 || 10.9500 || 3.2432 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 33.0224 || 97.5872 || 21.8308 || 8.5164 || 3.1550 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 24.1178 || 65.6959 || 18.4556 || 7.9448 || 3.3747 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 19.9316 || 47.4350 || 18.2124 || 8.8138 || 4.2654 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 92 || 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 62 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 30 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 20 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 17 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206996</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206996"/>
		<updated>2024-11-23T19:11:35Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]].&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, % = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, %&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, %&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as we the lowest tier can only come forth from it&#039;s own tier failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
This table shows the best ratio for quality to productivity modules in the crafting machines, while the recyclers always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || Percentage yield of legendary items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 1.67 quality / 1.33 productivity || 1.67 quality / 1.33 productivity || 1.67 quality / 1.333 productivity || 1.8 quality / 1.2 productivity  || 0 quality / 3 productivity || 0.344%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 1.67 quality / 2.33 productivity || 1.67 quality / 2.33 productivity || 1.67 quality / 2.33 productivity || 1.8 quality / 2.2 productivity  || 0 quality / 4 productivity || 0.586%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 1.4 quality / 2.6 productivity || 1.4 quality / 2.6 productivity || 1.4 quality / 2.6 productivity || 1.5 quality / 2.5 productivity  || 0 quality / 4 productivity || 1.624%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 1 quality / 4 productivity || 1 quality / 4 productivity || 1 quality / 4 productivity || 1 quality / 4 productivity  || 0 quality / 5 productivity || 2.722%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 0 quality / 8 productivity || 0 quality / 8 productivity || 0 quality / 8 productivity || 0 quality / 8 productivity  || 0 quality / 8 productivity || 4.835%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of tier 1 items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 1 || 3.4427 || 0.0290 || 1.0086 || 0.0077 || 0.2979&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 1 || 3.3027 || 0.0365 || 1.0657 || 0.0108 || 0.3286&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 1 || 2.9551 || 0.0563 || 1.1528 || 0.0208 || 0.3653&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 1 || 2.7239 || 0.0709 || 1.1726 || 0.0301 || 0.3474&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 1 || 2.3798 || 0.0972 || 1.1517 || 0.0470 || 0.2700&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 108.8978 || 374.9134 || 43.5367 || 12.7555 || 3.3856 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 70.4576 || 232.7032 || 33.9340 || 10.9500 || 3.2432 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 33.0224 || 97.5872 || 21.8308 || 8.5164 || 3.1550 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 24.1178 || 65.6959 || 18.4556 || 7.9448 || 3.3747 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 19.9316 || 47.4350 || 18.2124 || 8.8138 || 4.2654 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 92 || 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 62 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 30 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 20 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 17 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206995</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206995"/>
		<updated>2024-11-23T18:09:16Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]].&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, % = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, %&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, %&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as we the lowest tier can only come forth from it&#039;s own tier failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
This table shows the best ratio for quality to productivity modules in the crafting machines, while the recyclers always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || Percentage yield of legendary items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 1.67 quality / 1.33 productivity || 1.67 quality / 1.33 productivity || 1.67 quality / 1.333 productivity || 1.8 quality / 1.2 productivity  || 0 quality / 3 productivity || 0.344%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 1.67 quality / 2.33 productivity || 1.67 quality / 2.33 productivity || 1.67 quality / 2.33 productivity || 1.8 quality / 2.2 productivity  || 0 quality / 4 productivity || 0.586%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 1.4 quality / 2.6 productivity || 1.4 quality / 2.6 productivity || 1.4 quality / 2.6 productivity || 1.5 quality / 2.5 productivity  || 0 quality / 4 productivity || 1.624%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 1 quality / 4 productivity || 1 quality / 4 productivity || 1 quality / 4 productivity || 1 quality / 4 productivity  || 0 quality / 5 productivity || 2.722%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 0 quality / 8 productivity || 0 quality / 8 productivity || 0 quality / 8 productivity || 0 quality / 8 productivity  || 0 quality / 8 productivity || 4.835%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of tier 1 items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 1 || 0.863 || 0.100 || 0.029 || 0.0078 || 0.0023&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 1 || 0.829 || 0.121 || 0.039 || 0.0115 || 0.0036&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 1 || 0.744 || 0.167 || 0.065 || 0.024 || 0.008&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 1 || 0,688 || 0.193 || 0.083 || 0.035 || 0.010&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 1 || 0.603 || 0.231 || 0.112 || 0.054 || 0.013&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 434.591 || 374.913 || 43.537 || 12.756 || 3.386 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 280.8301 || 232.703 || 33.934 || 10.950 || 3.243 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 131.090 || 97.587 || 21.831 || 8.516 || 3.155 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 95.471 || 65.696 || 18.456 || 7.945 || 3.375 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 78.727 || 47.435 || 18.212 || 8.814 || 4.265 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 368	|| 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 247 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 119 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 81 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 68 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
prettier ratio=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 375 || 350 || 40 || 10 || 4 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 250 || 200 || 30 || 10 || 4 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 120 || 90 || 20 || 8 || 4 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 80 || 60 || 16 || 8 || 4 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 64 || 48 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206994</id>
		<title>Tutorial:Quality upcycling math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Quality_upcycling_math&amp;diff=206994"/>
		<updated>2024-11-23T17:34:12Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: Created page with &amp;quot;How do we get the most amount of legendary items out of an upcycling plant?  The answer is not quite as straight forward as we&amp;#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from infinite technologies.  == The crafting machines == {| class=&amp;quot;wikitable&amp;quot; ! Crafting mac...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do we get the most amount of [[Quality|legendary]] items out of an upcycling plant?&lt;br /&gt;
&lt;br /&gt;
The answer is not quite as straight forward as we&#039;d like it to be, because it depends on a number of factors, luckily there is a finite number of possibilities of what the modules can be, and for the sake of simplicity this tutorial will ignore the productivity gain from [[Technologies#Space_Age|infinite technologies]].&lt;br /&gt;
&lt;br /&gt;
== The crafting machines ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Module slots &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; || Base productivity bonus &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 3 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 4 || +0%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 4 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 5 || +50%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 8 || +0%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Quality probability ==&lt;br /&gt;
When an item gets produced and the initial roll decides that the quality of the item will increase, there is a 90% chance it will rise one tier, a 9% chance it will rise two, a 0.9% chance it will rise three, and a 0.1% chance it will rise four. This is of course capped if the item already started out at a higher tier.&lt;br /&gt;
&lt;br /&gt;
== Mathematical model ==&lt;br /&gt;
The mathematical model is time discrete. As opposed to dealing with derivatives in respect to time, the next state is a direct function of the previous state.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;m_{i,k}&amp;lt;/math&amp;gt; ... Number of materials of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration before being crafted. (this doesn&#039;t mean that an item only needs one type of ingredient, but that &amp;quot;1 materials&amp;quot; can be crafted into 1 item from them)&lt;br /&gt;
* &amp;lt;math&amp;gt;n_{i,k}&amp;lt;/math&amp;gt; ... Number of items of tier &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; after the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th iteration, after being crafted together.&lt;br /&gt;
* &amp;lt;math&amp;gt;p_0&amp;lt;/math&amp;gt; ... the crafting machines inherent productivity bonus&lt;br /&gt;
* &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; ... number of modules the crafting machine can hold&lt;br /&gt;
* &amp;lt;math&amp;gt;q_r = 4 \cdot 6.2 \, % = 0.248&amp;lt;/math&amp;gt; ... quality probability of the recyclers with 4 [[quality module 3]]&#039;s&lt;br /&gt;
* &amp;lt;math&amp;gt;p_i = p_0 + x_i \cdot 25 \, %&amp;lt;/math&amp;gt; ... productivity due to &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; legendary [[productivity module 3]]&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
* &amp;lt;math&amp;gt;q_i = (N-x_i) \cdot 6.2 \, %&amp;lt;/math&amp;gt; ... quality probability due to &amp;lt;math&amp;gt;(N - x_i)&amp;lt;/math&amp;gt; legendary quality module 3&#039;s in the crafting machine which takes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-tier materials&lt;br /&gt;
&lt;br /&gt;
=== Recycled materials ===&lt;br /&gt;
When a quarter of all items being recycled and the quality probability rules we can write the equations for the amount of materials received after recycling. This calculation is rather simple, as we the lowest tier can only come forth from it&#039;s own tier failing to raise in quality. The second tier are 90% of tier 1 items that did increase, and all those tier 2 items that didn&#039;t. This continues for all tiers as follows, but legendary items &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt; will not be recycled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m_{1,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{2,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{3,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{4,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.009 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.09 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.9 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot (1 - q_r)\\&lt;br /&gt;
m_{5,k+1} &amp;amp;= \frac{n_{1,k}}{4} \cdot q_r \cdot 0.001 &amp;amp;+&amp;amp; \frac{n_{2,k}}{4} \cdot q_r \cdot 0.01 &amp;amp;+&amp;amp; \frac{n_{3,k}}{4} \cdot q_r \cdot 0.1 &amp;amp;+&amp;amp; \frac{n_{4,k}}{4} \cdot q_r\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which can also be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{m}_{k+1} = \textbf{A} \,\textbf{n}_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
=&lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
\frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.9 \, q_r}{4}   &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 &amp;amp; 0\\&lt;br /&gt;
\frac{0.09 \, q_r}{4}  &amp;amp; \frac{0.9 \, q_r}{4}  &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
\frac{0.009 \, q_r}{4} &amp;amp; \frac{0.09 \, q_r}{4} &amp;amp; \frac{0.9 \, q_r}{4} &amp;amp; \frac{1 - q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\frac{0.001 \, q_r}{4} &amp;amp; \frac{0.01 \, q_r}{4} &amp;amp; \frac{0.1 \, q_r}{4} &amp;amp; \frac{q_r}{4} &amp;amp; 0\\&lt;br /&gt;
\end{bmatrix}}_{\textbf{A}}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we assume there is nothing to be done about recyclers to make them more effective but fill them with all quality modules, the value of &amp;lt;math&amp;gt;q_r = 0.248&amp;lt;/math&amp;gt; is a constant, and therefore the matrix &amp;lt;math&amp;gt;\textbf{A}&amp;lt;/math&amp;gt; is also a constant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \textbf{A} = &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
0.000\,558 &amp;amp; 0.005\,58 &amp;amp; 0.055\,8 &amp;amp; 0.188 &amp;amp; 0 \\&lt;br /&gt;
0.000\,062 &amp;amp; 0.000\,62 &amp;amp; 0.006\,2 &amp;amp; 0.062 &amp;amp; 0 \\&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recrafted items ===&lt;br /&gt;
Once more we first check how many items are produced, which is, again, the sum of all possible ways to get to a tier, this time adding productivity &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, and bringing along all those items which are already legendary &amp;lt;math&amp;gt;n_{5,k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
n_{1,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot (1 - q_1)\\&lt;br /&gt;
n_{2,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot (1 - q_2)\\&lt;br /&gt;
n_{3,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot (1 - q_3) \\&lt;br /&gt;
n_{4,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot (1 - q_4) \\&lt;br /&gt;
n_{5,k+1} &amp;amp;= m_{1,k+1} \cdot ( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp;+&amp;amp;  m_{2,k+1} \cdot ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp;+&amp;amp; m_{3,k+1} \cdot ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp;+&amp;amp; m_{4,k+1} \cdot ( 1 + p_4) \cdot q_4 &amp;amp;+&amp;amp; m_{5,k+1} \cdot ( 1 + p_5) + n_{5,k}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can once more be written as a vector-matrix-multiplication &amp;lt;math&amp;gt;\textbf{n}_{k+1} = \textbf{B} \,\textbf{m}_{k+1} + \textbf{C} \,\textbf{n}_{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k+1}\\ n_{2,k+1}\\ n_{3,k+1}\\ n_{4,k+1}\\ n_{5,k+1}\\ \end{bmatrix}}_{\textbf{n}_{k+1}} = &lt;br /&gt;
\underbrace{\begin{bmatrix}&lt;br /&gt;
( 1 + p_1 ) \cdot (1 - q_1) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.9 &amp;amp;  ( 1 + p_2 ) \cdot (1 - q_2) &amp;amp; 0 &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.09 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.9 &amp;amp; ( 1 + p_3 ) \cdot (1 - q_3) &amp;amp; 0 &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.009 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.09 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.9  &amp;amp; ( 1 + p_4) \cdot (1 - q_4) &amp;amp; 0 \\&lt;br /&gt;
( 1 + p_1 ) \cdot q_1 \cdot 0.001 &amp;amp; ( 1 + p_2 ) \cdot q_2 \cdot 0.01 &amp;amp; ( 1 + p_3 ) \cdot q_3 \cdot 0.1  &amp;amp; ( 1 + p_4) \cdot q_4 &amp;amp; ( 1 + p_5)\\&lt;br /&gt;
\end{bmatrix}}_{B}&lt;br /&gt;
\underbrace{\begin{bmatrix} m_{1,k+1}\\ m_{2,k+1}\\ m_{3,k+1}\\ m_{4,k+1}\\ m_{5,k+1}\\ \end{bmatrix}}_{\textbf{m}_{k+1}}&lt;br /&gt;
+&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;0\\&lt;br /&gt;
0&amp;amp;0&amp;amp;0&amp;amp;1\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\underbrace{\begin{bmatrix} n_{1,k}\\ n_{2,k}\\ n_{3,k}\\ n_{4,k}\\ n_{5,k}\\ \end{bmatrix}}_{\textbf{n}_k}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Combined model ===&lt;br /&gt;
&lt;br /&gt;
As such we gain an equation for the amount of items for every tier after any amount of iterations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_{k+1} &lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{m}_{k+1} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{B} \, \textbf{A} \,\textbf{n}_{k} + \textbf{C} \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= (\textbf{B} \, \textbf{A} +\textbf{C} ) \, \textbf{n}_{k}\\&lt;br /&gt;
    &amp;amp;= \textbf{M} \, \textbf{n}_{k}\\&lt;br /&gt;
\textbf{n}_{k+2} &amp;amp;= \textbf{Q} \, \textbf{n}_{k+1} = \textbf{Q} \,  \textbf{Q} \, \textbf{n}_{k} = \textbf{Q}^2 \, \textbf{n}_{k}\\&lt;br /&gt;
&amp;amp;\vdots\\&lt;br /&gt;
\textbf{n}_k &amp;amp;= \textbf{Q}^k \, \textbf{n}_0\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A realistic starting point for &amp;lt;math&amp;gt;\textbf{n}_0&amp;lt;/math&amp;gt; is only items in tier 1, and if we do not care for any other tiers, we simply choose sufficiently large &amp;lt;math&amp;gt;k = 100&amp;lt;/math&amp;gt;, and, through numeric means, try to maximize a single value. &amp;lt;math&amp;gt;q_{100,\text{crit}}&amp;lt;/math&amp;gt;, which falls in the fifth row, first column, of the Matrix &amp;lt;math&amp;gt;\textbf{Q}&amp;lt;/math&amp;gt; raised to the 100th power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\textbf{n}_k &amp;amp;= Q^k \, \textbf{n}_0\\&lt;br /&gt;
\begin{bmatrix}*\\ *\\ *\\ *\\ n_{5,100} \end{bmatrix} &amp;amp;= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
 * &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
q_{100,\text{crit}} &amp;amp; * &amp;amp; * &amp;amp; * \\&lt;br /&gt;
\end{bmatrix} \begin{bmatrix}n_{1,0}\\ *\\ *\\ *\\ * \end{bmatrix}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The choice of optimization method (simplex, branch and bound, etc.) itself is irrelevant, although most software will want the problem to be stated in a way so it can find a minimum, and may require the proper guard rails as to not pick values below 0 or higher than the maximum number of allowed modules.&lt;br /&gt;
&lt;br /&gt;
== Best ratios ==&lt;br /&gt;
This table shows the best ratio for quality to productivity modules in the crafting machines, while the recyclers always take only quality modules. The values are not given in whole numbers because often it is not just a single crafting machine per tier that will be used, then the ratios can change between different crafting machines in the same tier. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Modules in Tier 1 || Modules in Tier 2 || Modules in Tier 3 || Modules in Tier 4 || Modules in Tier 5 || Percentage yield of legendary items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 1.67 quality / 1.33 productivity || 1.67 quality / 1.33 productivity || 1.67 quality / 1.333 productivity || 1.8 quality / 1.2 productivity  || 0 quality / 3 productivity || 0.344%&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 1.67 quality / 2.33 productivity || 1.67 quality / 2.33 productivity || 1.67 quality / 2.33 productivity || 1.8 quality / 2.2 productivity  || 0 quality / 4 productivity || 0.586%&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 1.4 quality / 2.6 productivity || 1.4 quality / 2.6 productivity || 1.4 quality / 2.6 productivity || 1.5 quality / 2.5 productivity  || 0 quality / 4 productivity || 1.624%&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 1 quality / 4 productivity || 1 quality / 4 productivity || 1 quality / 4 productivity || 1 quality / 4 productivity  || 0 quality / 5 productivity || 2.722%&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 0 quality / 8 productivity || 0 quality / 8 productivity || 0 quality / 8 productivity || 0 quality / 8 productivity  || 0 quality / 8 productivity || 4.835%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Number of crafting machines ===&lt;br /&gt;
If we assume a constant input stream of tier 1 items which will always fill back up, we can additionally figure out what ratio of items will be inside the system at once, and with that we can figure out how many crafting machines we need per tier. This is done by setting &amp;lt;math&amp;gt;m_{1,k+1} = 100% - m_{2,k+1} - m_{3,k+1} - m_{4,k+1}&amp;lt;/math&amp;gt; after each iteration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
per recycler=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 1 || 0.863 || 0.100 || 0.029 || 0.0078 || 0.0023&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 1 || 0.829 || 0.121 || 0.039 || 0.0115 || 0.0036&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 1 || 0.744 || 0.167 || 0.065 || 0.024 || 0.008&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 1 || 0,688 || 0.193 || 0.083 || 0.035 || 0.010&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 1 || 0.603 || 0.231 || 0.112 || 0.054 || 0.013&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (exact) =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 434.591 || 374.913 || 43.537 || 12.756 || 3.386 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 280.8301 || 232.703 || 33.934 || 10.950 || 3.243 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 131.090 || 97.587 || 21.831 || 8.516 || 3.155 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 95.471 || 65.696 || 18.456 || 7.945 || 3.375 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 78.727 || 47.435 || 18.212 || 8.814 || 4.265 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
per tier 5 crafter (conservative)=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 368	|| 318 || 37 || 11 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 247 || 205 || 30 || 10 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 119 || 89 || 20 || 8 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 81 || 56 || 16 || 7 || 3 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 68 || 41 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
\-\&lt;br /&gt;
prettier ratio=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Crafting machine || Recyclers || Machines producing Tier 1 items || Machines producing Tier 2 items || Machines producing Tier 3 items || Machines producing Tier 4 items || Machines producing Tier 5 items&lt;br /&gt;
|-&lt;br /&gt;
| [[Chemical plant]] || 375 || 350 || 40 || 10 || 4 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Assembling machine 3]] || 250 || 200 || 30 || 10 || 4 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Foundry]] || 120 || 90 || 20 || 8 || 4 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Electromagnetic plant]] || 80 || 60 || 16 || 8 || 4 || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Cryogenic plant]] || 64 || 48 || 16 || 8 || 4 || 1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Recycler&amp;diff=206815</id>
		<title>Recycler</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Recycler&amp;diff=206815"/>
		<updated>2024-11-21T20:31:20Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: used math notation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Recycler}}&lt;br /&gt;
{{Stub}}&lt;br /&gt;
{{About/Space age}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;recycler&#039;&#039;&#039; is a building that can convert most items into the ingredients used in their recipes, at the cost of losing 75% of said ingredients. In other words, it performs a lossy reversal of crafting.&lt;br /&gt;
&lt;br /&gt;
It has 4 module slots, but it cannot use [[Productivity module]]s.&lt;br /&gt;
&lt;br /&gt;
== Mechanics ==&lt;br /&gt;
&lt;br /&gt;
When an item enters a recycler, the item&#039;s main recipe is found, and the recycler is automatically set to perform its inverse.&lt;br /&gt;
&lt;br /&gt;
For each type of item used as an ingredient in the recycled item&#039;s main recipe, the number of items returned by the recycler is decided by &amp;lt;math&amp;gt;\left \lfloor 0.25 \cdot \tfrac{i}{o} + r \right\rfloor&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is the number of items used as ingredients, &amp;lt;math&amp;gt;o&amp;lt;/math&amp;gt; is the number of items returned by the recipe, and &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is a random number that is greater than or equal to 0 but less than 1. On average, this returns exactly 25% of the items needed to craft one item of the same type as the recycled item. For example, recycling a [[processing unit]] always gives 5 [[electronic circuit]]s while having a 50% chance of returning one [[advanced circuit]].&lt;br /&gt;
&lt;br /&gt;
All fluid ingredients are lost when recycling, as the recycler has no fluid output.&lt;br /&gt;
&lt;br /&gt;
Without quality modules, the resulting items have the same quality as the item being recycled, even if the latter was crafted using lower-quality ingredients. Quality modules can further increase the output&#039;s quality, just like with regular non-recycling recipes.&lt;br /&gt;
&lt;br /&gt;
The recycler has 12 internal slots for its output, but can only hold one stack of each item. The recycler will try to eject the contents of these slots, much like a mining drill. It is therefore not necessary to use an inserter to collect its output.&lt;br /&gt;
&lt;br /&gt;
=== Non-recyclable items ===&lt;br /&gt;
&lt;br /&gt;
The broad rule with the recycler&#039;s ability to reverse a recipe is that it can only reverse recipes made in [[Assembling machine]]s of some type. There are many exceptions to this, however. For the purposes of the recycler&#039;s ability to recycle items, the [[Electromagnetic plant]] counts as an &amp;quot;assembler&amp;quot;. So all of its recipes count unless otherwise stated.&lt;br /&gt;
&lt;br /&gt;
Items can have multiple recipes; all that is needed for the recycler to reverse it is to find a single reversible recipe that produces that item.&lt;br /&gt;
&lt;br /&gt;
If no valid recipe producing the item can be reversed, the recycler will return the same item 25% of the time (possibly with a [[Quality]] bonus if the appropriate modules are used), with the other 75% destroying the item.&lt;br /&gt;
&lt;br /&gt;
Assembler recipes which cannot be recycled:&lt;br /&gt;
* All science packs&lt;br /&gt;
* [[Wood processing]]&lt;br /&gt;
* [[Landfill]]&lt;br /&gt;
* [[Tungsten carbide]]&lt;br /&gt;
* [[Superconductor]]&lt;br /&gt;
* [[Biolab]]&lt;br /&gt;
* [[Uranium fuel cell]]&lt;br /&gt;
* [[Holmium plate]] (due to only using a liquid as input)&lt;br /&gt;
* All recipes for [[nutrients]], save the one made from [[spoilage]]&lt;br /&gt;
&lt;br /&gt;
Non-assembler/EMP recipes which can be recycled:&lt;br /&gt;
* [[Battery]]&lt;br /&gt;
* [[Big mining drill]]&lt;br /&gt;
* [[Turbo transport belt]], [[Turbo underground belt]], and [[Turbo splitter]]&lt;br /&gt;
* [[Cryogenic plant]]&lt;br /&gt;
* [[Railgun]]&lt;br /&gt;
* [[Railgun turret]]&lt;br /&gt;
* [[Fusion reactor]]&lt;br /&gt;
* [[Fusion generator]]&lt;br /&gt;
&lt;br /&gt;
=== Unique recycling recipes ===&lt;br /&gt;
&lt;br /&gt;
Some items have unique recycling recipes:&lt;br /&gt;
&lt;br /&gt;
* Recycling [[scrap]] will perform the [[scrap recycling]] recipe, for which there is no inverse, as scrap can not be crafted. This is used to obtain most resources on [[Fulgora]].&lt;br /&gt;
* Recycling one [[nutrients]] will yield 2.5x that amount of [[spoilage]], as if they were made using the [[nutrients from spoilage]] recipe. This is useful for getting rid of excess nutrients, as they cannot be burned directly.&lt;br /&gt;
&lt;br /&gt;
=== Stats ===&lt;br /&gt;
&lt;br /&gt;
The recycling recipe for an item besides scrap takes time equal to 1/16th (0.0625) of the time it takes to craft that item. (Items without recipes, such as ore, are treated as having a crafting time of 0.5 seconds.) But because the recycler has a base crafting speed of 0.5, the time it takes one recycler to recycle one item is effectively 1/8th (0.125) of the item&#039;s crafting time without modules or beacons. For example, the time it takes to craft a [[steel plate]] in a [[stone furnace]] (which has a crafting speed of 1) is 16 seconds, and so recycling a steel plate takes 2 seconds. The following table provides some examples of how long it takes a recycler without modules or beacons to recycle one of that item, and the rate at which it recycles those items.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left !important;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Recycler Input !! Time !! Rates&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Processing unit}} || 1.25s || 0.8/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Advanced circuit}} || 0.75s  || 1.33/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Low density structure}} || 1.875s || 0.533/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Steel plate}} || 2.0s || 0.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Copper plate}}  || 0.4s || 2.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Iron plate}} || 0.4s || 2.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Iron ore}} || 0.0625s || 16/s&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The scrap recycling recipe takes .2 seconds, meaning that it actually takes .4 seconds to run in a recycler, so a recycler takes in 2.5 scrap/s. The output rates are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Input ||  Output || Chance || Rate&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;12&amp;quot; | {{Imagelink|Scrap|space-age=yes}}&lt;br /&gt;
| {{Imagelink|Processing unit}}  || 2% || 0.05/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Advanced circuit}}  || 3% || 0.075/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Low density structure}}  || 1%  || 0.025/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Solid fuel}}  || 7%  || 0.175/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Steel plate}}  || 4%  || 0.1/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Concrete}}  || 6%  || 0.15/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Battery}}  || 4%  || 0.1/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Ice|space-age=yes}}  || 5%  || 0.125/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Stone}}  || 4% || 0.1/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Holmium ore|space-age=yes}}  || 1%  || 0.025/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Iron gear wheel}}  || 20%  || 0.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Copper cable}}  || 3%  || 0.075/s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In total, the recycler spits out 1.5 items/s, meaning 10 recyclers are just enough to saturate a yellow belt. The output values are increased by [[Scrap recycling productivity (research)|scrap recycling productivity research]].&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* If the recycled item has a fluid ingredient, then the smoke emitted from the recycler matches the fluid in colour.&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
[[File:Fff-375-recycler-freezeframe.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|2.0.7|&lt;br /&gt;
* Introduced in [[Space Age]]{{SA}} expansion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Quality]]{{SA}}&lt;br /&gt;
&lt;br /&gt;
{{ProductionNav}}&lt;br /&gt;
{{C|Producers}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206480</id>
		<title>Tutorial:Solar power math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206480"/>
		<updated>2024-11-16T19:18:23Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will properly quantify the amount of [[solar panel]]s and [[accumulator]]s needed and the proper ratio that is needed between the two buildings.&lt;br /&gt;
&lt;br /&gt;
== Equation symbols and units ==&lt;br /&gt;
The game uses SI units and reflects how they are used in the real world. &#039;&#039;&#039;Energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; and &#039;&#039;&#039;power&#039;&#039;&#039; &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are often used interchangeably, but power is the first time derivative of energy, i.e. how much energy is used or produced per second. Power can be used to get machines moving, as they perform &#039;&#039;&#039;work&#039;&#039;&#039; &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt;. A type of work can be lifting some mass against gravitational acceleration for a set distance. Usually there is always a loss of usable energy due to thermal energy being released, but Factorio does not take such losses into consideration. Lastly there is the charge in accumulators. Charge traditionally has the unit Coulomb and the energy in a capacitor depends on the charge and the voltage across it, but as Factorio also doesn&#039;t consider equipment using different voltages, a the charge &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; of a factorio-accumulator can be defined to use this combined value.&lt;br /&gt;
&lt;br /&gt;
Therefore the important equation symbols for energy are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; ... energy, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule, also often written in &amp;lt;math&amp;gt;\mathrm{kW} \, \mathrm{h}&amp;lt;/math&amp;gt; kilowatt-hours, where &amp;lt;math&amp;gt;1 \, \mathrm{kW} \, \mathrm{h} = 3\,600\,000 \mathrm{J} = 3.6 \, \mathrm{MJ}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt; ... performed work, in &amp;lt;math&amp;gt;\mathrm{kg} \, \tfrac{\mathrm{m}}{\mathrm{s}^2} \, \mathrm{m}&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\mathrm{N}\, \mathrm{m}&amp;lt;/math&amp;gt; Newton-meter which is equal to &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
* &amp;lt;math&amp;gt;A := \tfrac{1}{2} Q \cdot U^2&amp;lt;/math&amp;gt; ... accumulator charge, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
&lt;br /&gt;
And the important equation symbols for power are as follows, with dot-notation for the time derivative:&lt;br /&gt;
* &amp;lt;math&amp;gt;P_\text{S} := \tfrac{\mathrm{d}}{\mathrm{d} t} E = \dot{E}&amp;lt;/math&amp;gt; ... supplied power, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt, or &amp;lt;math&amp;gt;\tfrac{\mathrm{J}}{\mathrm{s}}&amp;lt;/math&amp;gt; Joule per second.&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{W} := \tfrac{\mathrm{d} W}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... ongoing mechanical work, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{A} := \tfrac{\mathrm{d} A}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... change in accumulator charge, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
&lt;br /&gt;
Energy can&#039;t be generated or destroyed, only converted into a different form. This means that the balance of energy must be upheld, and therefore its rate of change must be zero. If we subtract from the supplied power both the ongoing mechanical work and the rate at which accumulators are charging (therefore taking energy from the grid), the result will be zero. As such we can write&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P_\text{S} - \dot{W} - \dot{A} = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The player will not have to worry about overproduction, as any power generating equipment will cap its output automatically. Only too little production will no longer provide machines with the amount of power that they desire, causing them to throttle their own power demand and working slower. Therefore in almost all cases these rates will change over time, where solar panels produce energy dependant on the time of day, while machines equally draw more or less power depending on how much they are used. For example, inserters only draw their power when they swing their arms, while only using a tiny fraction of it on standby. As such we introduce notation for various statistically relevant values.&lt;br /&gt;
&lt;br /&gt;
* Average value over an interval &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is annotated with a bar above: &amp;lt;math&amp;gt;\bar{x} = \frac{1}{T} \int_{t}^{t+T} x(t) \mathrm{d}t&amp;lt;/math&amp;gt;&lt;br /&gt;
* Peak value with an upward facing chevron: &amp;lt;math&amp;gt;\hat{x} = \mathrm{max}\big( x(t) \big) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--* Idle value with a downward facing chevron: &amp;lt;math&amp;gt;\check{x} = \mathrm{min}\big( x(t) \big) &amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Average output of 1 solar panel ==&lt;br /&gt;
&lt;br /&gt;
While only the peak output of a solar panel can be easily be told at &amp;lt;math&amp;gt;\hat{P} = 60 \, \mathrm{kW}&amp;lt;/math&amp;gt;, its exact power output over the day changes with available daylight. Thankfully, if we install some accumulators, they can do the integration for us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
0 &amp;amp;= P(t) - \dot{A}(t)\\&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t)\\&lt;br /&gt;
A(T) &amp;amp;= \int_0^T P(t) \, \mathrm{d}t\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an experiment with one solar panel and 4 accumulators, we can see that one solar panel will produce 17.6 MJ of energy per day.&lt;br /&gt;
&lt;br /&gt;
[[File:Solar_panel_energy.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Due to rounding, this could be anywhere between 17.55 MJ and 17.65 MJ, therefore the experiment can be repeated over multiple days.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! day number || accumulator charge || energy produced per day&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 17.6 MJ || 17.6 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 35.3 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 52.9 MJ || 17.633 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 70.6 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 88.2 MJ || 17.64 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 106 MJ || 17.666 MJ&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Further experiments show that the true number will swing around and approach 17.64 MJ&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
A(T) &amp;amp;= 17\,640 \, \mathrm{kJ}\\&lt;br /&gt;
\bar{P} &lt;br /&gt;
 &amp;amp;= \frac{\int_{0}^{T} P(t) \, \mathrm{d}t}{T} &lt;br /&gt;
  = \frac{A(T)}{T}&lt;br /&gt;
  = \frac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}}&lt;br /&gt;
  = 42 \, \mathrm{kW}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A day on Nauvis lasts 7 minutes, or &amp;lt;math&amp;gt; T = 420 \, \mathrm{s}&amp;lt;/math&amp;gt;, which means that each solar panel provides about 42 kW of power on average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;  border-color:#141414 #3E3E3E #3E3E3E #141414;border-width: 2px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Solarpanel output as a function&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further calculations we assume the power output function of a solar panel looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
P(t) &amp;amp;=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\tfrac{60}{84} t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{5\,040}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 &lt;br /&gt;
&amp;amp; \frac{5\,040}{60} \, \mathrm{s} &amp;lt; t \leq \frac{17\,640}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 - \tfrac{60}{84} \cdot ( t - \frac{17\,640}{60} \, \mathrm{s})&lt;br /&gt;
&amp;amp; \frac{17\,640}{60} \, \mathrm{s} &amp;lt; t \leq \frac{22\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
0 &amp;amp; \frac{22\,680}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
\int_{0}^{T} P(t) \, \mathrm{d}t &amp;amp;= 17\,640 \, \mathrm{kJ}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knowing how much power a solar panel provides on average we can construct a fitting load to test how much max accumulator charge &amp;lt;math&amp;gt;\hat{A}&amp;lt;/math&amp;gt; is needed.&lt;br /&gt;
&lt;br /&gt;
In a second experiment we take two solar panels on separate grids and put a load of &amp;lt;math&amp;gt;\tfrac{17\,600 \, \mathrm{kJ}}{420 \, \mathrm{s}} \approx 41.9 \, \mathrm{kW}&amp;lt;/math&amp;gt; on one, and one with &amp;lt;math&amp;gt;\tfrac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}} = 42 \, \mathrm{kW}&amp;lt;/math&amp;gt;, which can be achieved with...&lt;br /&gt;
* 8 Assembly machines 2 (5 kW per unit), and&lt;br /&gt;
* 3/4 fast inserters (500 W per unit), and&lt;br /&gt;
* 1/0 regular inserters (400 W per unit).&lt;br /&gt;
To that we add a generous 100 accumulators and observe the energy in the system.&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
41.9 kW grid = [[File:Solar_panel_with_load_41point9kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid = [[File:Solar_panel_with_load_42kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid (zoomed in) = [[File:Solar_panel_with_load_42kW_zoom.png|1200px]]&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
Experimental values for the 41.9 kW grid show the first peak has a height of about 4.24 MJ, with each consecutive peak growing higher as the true output of a solar panel is indeed more than 41.9 kW.&amp;lt;br&amp;gt;&lt;br /&gt;
Experimental values for the 42 kW grid show each peak reaching about 4.24 MJ, but falling short for 5 seconds if it has to start from no charge at all. This may be due to the fact that machines start to behave differently when power is low. However, if we start the experiment with some slight pre-existing charge, the system will be stable.&lt;br /&gt;
&lt;br /&gt;
== Accumulators per solar panel ==&lt;br /&gt;
&lt;br /&gt;
4.24 MJ is enough to fill 0.848 accumulators as they can hold a charge of 5 MJ each. Conservatively we can therefore set 0.85 accumulators per solar panel, or a ratio of 20 solar panels to 17 accumulators. A less conservative approach is to use 0.84 accumulators per solar panel, or a ratio of 25 solar panels to 21 accumulators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;  border-color:#141414 #3E3E3E #3E3E3E #141414;border-width: 2px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Analytic solution: 2646/3125&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can set the previously defined power function as the rate of change of the accumulator and subtract it&#039;s average output as the load which the setup should be able to continuously supply. First we check when the power reaches 42 kW&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
42 &amp;amp;= \frac{60}{84} \cdot t_\text{start}\\&lt;br /&gt;
t_\text{start} &amp;amp;= \frac{3528}{60}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we shift the function for power in time and reduce it by the 42 kW so that the function will start at zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t-\tfrac{3528}{60})-\hat{P} =&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{1\,512}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{1\,512}{60} \, \mathrm{s} &amp;lt; t \leq \frac{14\,112}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{14\,112}{60} \, \mathrm{s} &amp;lt; t \leq \frac{19\,152}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
- 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{19\,152}{60} \, \mathrm{s} &amp;lt; t \leq \frac{21\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot ( t - \frac{21\,672}{60} \, \mathrm{s} ) - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{21\,672}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
A(T=420\,\mathrm{s}) &amp;amp;= \int_{0}^{T} \dot{A}(t) \, \mathrm{d}t = 0 \, \mathrm{J}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To find the critical point in time &amp;lt;math&amp;gt;t_\text{crit}&amp;lt;/math&amp;gt; at which the accumulator charge reaches it&#039;s peak &amp;lt;math&amp;gt;\hat{A} = A(t_\text{crit})&amp;lt;/math&amp;gt;, we need to see when it&#039;s derivative passes zero. This happens in it&#039;s 3rd section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t_\text{crit}) = 0 &amp;amp;= 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t_\text{crit}-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}\\&lt;br /&gt;
t_\text{crit} &amp;amp;= \frac{(60\,\mathrm{kW} - 42\,\mathrm{kW})}{\frac{60\,\mathrm{kW}}{84\,\mathrm{s}}} + \frac{14\,112}{60}\,\mathrm{s}  = \frac{15\,624}{60}\,\mathrm{s} = 260.4 \, \mathrm{s}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcccccc}&lt;br /&gt;
A(t_\text{crit}) = \displaystyle\int_0^{t_\text{crit}} \dot{A}(t) \, \mathrm{d}t &lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \displaystyle\int_{0\, \mathrm{s}}^{\frac{1\,512}{60}\, \mathrm{s}}  \frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t \, \mathrm{d}t &lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{1\,512}{60}\, \mathrm{s}}^{\frac{14\,112}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - 42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{14\,112}{60}\, \mathrm{s}}^{\frac{15\,624}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{1\,512}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{14\,112}{60}\, \mathrm{s}-\frac{1\,512}{60}\, \mathrm{s}\right)&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)-\frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   3\,780 \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; \frac{21\,168}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; 4\,233.6 \, \mathrm{kJ}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The true perfect ratio for solar panels to accumulators therefore turns out to be...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\tfrac{21\,168}{5} \mathrm{kJ}}{5\,000 \, \mathrm{kJ}} = \frac{2\,646}{3\,125} = 0.846\,72&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes 0.84672 accumulators per solar panel, or a ratio of 2646 accumulators to 3125 solar panels. Speaking conservatively we can take a higher ratio of 0.85 with 17 accumulators to 20 solar panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Best ratios ====&lt;br /&gt;
These ratios approach the one we got from the analytic solution, but to get more accurate, they need a larger number of individual equipment to do so.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width: 25em;&amp;quot;&lt;br /&gt;
|+ more accumulators than necessary&lt;br /&gt;
|-&lt;br /&gt;
! accumulators || solar panels || ratio&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 7 || 0.857142857&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 20 || 0.85&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 33 || 0.848484848&lt;br /&gt;
|-&lt;br /&gt;
| 39 || 46 || 0.847826087&lt;br /&gt;
|-&lt;br /&gt;
| 50 || 59 || 0.847457627&lt;br /&gt;
|-&lt;br /&gt;
| 61 || 72 || 0.847222222&lt;br /&gt;
|-&lt;br /&gt;
| 72 || 85 || 0.847058824&lt;br /&gt;
|-&lt;br /&gt;
| 83 || 98 || 0.846938776&lt;br /&gt;
|-&lt;br /&gt;
| 94 || 111 || 0.846846847&lt;br /&gt;
|-&lt;br /&gt;
| 105 || 124 || 0.846774194&lt;br /&gt;
|-&lt;br /&gt;
| 221 || 261 || 0.846743295&lt;br /&gt;
|-&lt;br /&gt;
| 337 || 398 || 0.846733668&lt;br /&gt;
|-&lt;br /&gt;
| 453 || 535 || 0.846728972&lt;br /&gt;
|-&lt;br /&gt;
| 569 || 672 || 0.84672619&lt;br /&gt;
|-&lt;br /&gt;
| 685 || 809 || 0.846724351&lt;br /&gt;
|-&lt;br /&gt;
| 801 || 946 || 0.846723044&lt;br /&gt;
|-&lt;br /&gt;
| 917 || 1083 || 0.846722068&lt;br /&gt;
|-&lt;br /&gt;
| 1033 || 1220 || 0.846721311&lt;br /&gt;
|-&lt;br /&gt;
| 1149 || 1357 || 0.846720707&lt;br /&gt;
|-&lt;br /&gt;
| 1265 || 1494 || 0.846720214&lt;br /&gt;
|-&lt;br /&gt;
| 2646 || 3125 || 0.84672&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width: 25em;&amp;quot;&lt;br /&gt;
|+ fewer accumulators than necessary&lt;br /&gt;
|-&lt;br /&gt;
! accumulators || solar panels || ratio&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 2 || 0.5&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 3 || 0.666666667&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 4 || 0.75&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 5 || 0.8&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 6 || 0.833333333&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 13 || 0.846153846&lt;br /&gt;
|-&lt;br /&gt;
| 116 || 137 || 0.846715328&lt;br /&gt;
|-&lt;br /&gt;
| 1381 || 1631 || 0.846719804&lt;br /&gt;
|-&lt;br /&gt;
| 2646 || 3125 || 0.84672&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Testing ratios ====&lt;br /&gt;
The most commonly recommended ratio is 21/25 or 0.84, let&#039;s see how it fairs against 17/20 or 0.84, and then check out ratios for 0.8467 and 0.8469. And for fairness, these tests start off with fully charged accumulators before a load is applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
84/100 (21/25 or 0.84) = [[File:Solar_panel_21to25.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
fell 0 kJ accumulator charge for 18 seconds&lt;br /&gt;
\-\&lt;br /&gt;
85/100 (17/20 or 0.85) = [[File:Solar_panel_17to20.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
lowest recorded accumulator charge: 959 kJ (11.282 kJ per accumulator)&lt;br /&gt;
\-\&lt;br /&gt;
83/98 (or 0.8469)= [[File:Solar_panel_83to98.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
lowest recorded accumulator charge: 107 kJ (1.289 kJ per accumulator)&lt;br /&gt;
\-\&lt;br /&gt;
116/137 (or 0.8467) = [[File:Solar_panel_116to137.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
fell 0 kJ accumulator charge for half a second&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tests support the analytic solution. The ratio for 0.8467 barely falls short of being able to sustain 42 kW of power, while 0.8469 almost fully discharges to 0.025%.&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206478</id>
		<title>Tutorial:Solar power math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206478"/>
		<updated>2024-11-16T18:47:16Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: /* Average output of 1 solar panel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will properly quantify the amount of [[solar panel]]s and [[accumulator]]s needed and the proper ratio that is needed between the two buildings.&lt;br /&gt;
&lt;br /&gt;
== Equation symbols and units ==&lt;br /&gt;
The game uses SI units and reflects how they are used in the real world. &#039;&#039;&#039;Energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; and &#039;&#039;&#039;power&#039;&#039;&#039; &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are often used interchangeably, but power is the first time derivative of energy, i.e. how much energy is used or produced per second. Power can be used to get machines moving, as they perform &#039;&#039;&#039;work&#039;&#039;&#039; &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt;. A type of work can be lifting some mass against gravitational acceleration for a set distance. Usually there is always a loss of usable energy due to thermal energy being released, but Factorio does not take such losses into consideration. Lastly there is the charge in accumulators. Charge traditionally has the unit Coulomb and the energy in a capacitor depends on the charge and the voltage across it, but as Factorio also doesn&#039;t consider equipment using different voltages, a the charge &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; of a factorio-accumulator can be defined to use this combined value.&lt;br /&gt;
&lt;br /&gt;
Therefore the important equation symbols for energy are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; ... energy, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule, also often written in &amp;lt;math&amp;gt;\mathrm{kW} \, \mathrm{h}&amp;lt;/math&amp;gt; kilowatt-hours, where &amp;lt;math&amp;gt;1 \, \mathrm{kW} \, \mathrm{h} = 3\,600\,000 \mathrm{J} = 3.6 \, \mathrm{MJ}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt; ... performed work, in &amp;lt;math&amp;gt;\mathrm{kg} \, \tfrac{\mathrm{m}}{\mathrm{s}^2} \, \mathrm{m}&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\mathrm{N}\, \mathrm{m}&amp;lt;/math&amp;gt; Newton-meter which is equal to &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
* &amp;lt;math&amp;gt;A := \tfrac{1}{2} Q \cdot U^2&amp;lt;/math&amp;gt; ... accumulator charge, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
&lt;br /&gt;
And the important equation symbols for power are as follows, with dot-notation for the time derivative:&lt;br /&gt;
* &amp;lt;math&amp;gt;P_\text{S} := \tfrac{\mathrm{d}}{\mathrm{d} t} E = \dot{E}&amp;lt;/math&amp;gt; ... supplied power, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt, or &amp;lt;math&amp;gt;\tfrac{\mathrm{J}}{\mathrm{s}}&amp;lt;/math&amp;gt; Joule per second.&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{W} := \tfrac{\mathrm{d} W}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... ongoing mechanical work, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{A} := \tfrac{\mathrm{d} A}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... change in accumulator charge, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
&lt;br /&gt;
Energy can&#039;t be generated or destroyed, only converted into a different form. This means that the balance of energy must be upheld, and therefore its rate of change must be zero. If we subtract from the supplied power both the ongoing mechanical work and the rate at which accumulators are charging (therefore taking energy from the grid), the result will be zero. As such we can write&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P_\text{S} - \dot{W} - \dot{A} = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The player will not have to worry about overproduction, as any power generating equipment will cap its output automatically. Only too little production will no longer provide machines with the amount of power that they desire, causing them to throttle their own power demand and working slower. Therefore in almost all cases these rates will change over time, where solar panels produce energy dependant on the time of day, while machines equally draw more or less power depending on how much they are used. For example, inserters only draw their power when they swing their arms, while only using a tiny fraction of it on standby. As such we introduce notation for various statistically relevant values.&lt;br /&gt;
&lt;br /&gt;
* Average value over an interval &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is annotated with a bar above: &amp;lt;math&amp;gt;\bar{x} = \frac{1}{T} \int_{t}^{t+T} x(t) \mathrm{d}t&amp;lt;/math&amp;gt;&lt;br /&gt;
* Peak value with an upward facing chevron: &amp;lt;math&amp;gt;\hat{x} = \mathrm{max}\big( x(t) \big) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--* Idle value with a downward facing chevron: &amp;lt;math&amp;gt;\check{x} = \mathrm{min}\big( x(t) \big) &amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Average output of 1 solar panel ==&lt;br /&gt;
&lt;br /&gt;
While only the peak output of a solar panel can be easily be told at &amp;lt;math&amp;gt;\hat{P} = 60 \, \mathrm{kW}&amp;lt;/math&amp;gt;, its exact power output over the day changes with available daylight. Thankfully, if we install some accumulators, they can do the integration for us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
0 &amp;amp;= P(t) - \dot{A}(t)\\&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t)\\&lt;br /&gt;
A(T) &amp;amp;= \int_0^T P(t) \, \mathrm{d}t\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an experiment with one solar panel and 4 accumulators, we can see that one solar panel will produce 17.6 MJ of energy per day.&lt;br /&gt;
&lt;br /&gt;
[[File:Solar_panel_energy.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Due to rounding, this could be anywhere between 17.55 MJ and 17.65 MJ, therefore the experiment can be repeated over multiple days.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! day number || accumulator charge || energy produced per day&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 17.6 MJ || 17.6 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 35.3 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 52.9 MJ || 17.633 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 70.6 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 88.2 MJ || 17.64 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 106 MJ || 17.666 MJ&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Further experiments show that the true number will swing around and approach 17.64 MJ&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
A(T) &amp;amp;= 17\,640 \, \mathrm{kJ}\\&lt;br /&gt;
\bar{P} &lt;br /&gt;
 &amp;amp;= \frac{\int_{0}^{T} P(t) \, \mathrm{d}t}{T} &lt;br /&gt;
  = \frac{A(T)}{T}&lt;br /&gt;
  = \frac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}}&lt;br /&gt;
  = 42 \, \mathrm{kW}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A day on Nauvis lasts 7 minutes, or &amp;lt;math&amp;gt; T = 420 \, \mathrm{s}&amp;lt;/math&amp;gt;, which means that each solar panel provides about 42 kW of power on average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;  border-color:#141414 #3E3E3E #3E3E3E #141414;border-width: 2px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Solarpanel output as a function&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further calculations we assume the power output function of a solar panel looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
P(t) &amp;amp;=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\tfrac{60}{84} t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{5\,040}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 &lt;br /&gt;
&amp;amp; \frac{5\,040}{60} \, \mathrm{s} &amp;lt; t \leq \frac{17\,640}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 - \tfrac{60}{84} \cdot ( t - \frac{17\,640}{60} \, \mathrm{s})&lt;br /&gt;
&amp;amp; \frac{17\,640}{60} \, \mathrm{s} &amp;lt; t \leq \frac{22\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
0 &amp;amp; \frac{22\,680}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
\int_{0}^{T} P(t) \, \mathrm{d}t &amp;amp;= 17\,640 \, \mathrm{kJ}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accumulators per solar panel ==&lt;br /&gt;
&lt;br /&gt;
Knowing how much power a solar panel provides on average we can construct a fitting load to test how much max accumulator charge &amp;lt;math&amp;gt;\hat{A}&amp;lt;/math&amp;gt; is needed.&lt;br /&gt;
&lt;br /&gt;
In a second experiment we take two solar panels on separate grids and put a load of &amp;lt;math&amp;gt;\tfrac{17\,600 \, \mathrm{kJ}}{420 \, \mathrm{s}} \approx 41.9 \, \mathrm{kW}&amp;lt;/math&amp;gt; on one, and one with &amp;lt;math&amp;gt;\tfrac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}} = 42 \, \mathrm{kW}&amp;lt;/math&amp;gt;, which can be achieved with...&lt;br /&gt;
* 8 Assembly machines 2 (5 kW per unit), and&lt;br /&gt;
* 3/4 fast inserters (500 W per unit), and&lt;br /&gt;
* 1/0 regular inserters (400 W per unit).&lt;br /&gt;
To that we add a generous 100 accumulators and observe the energy in the system.&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
41.9 kW grid = [[File:Solar_panel_with_load_41point9kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid = [[File:Solar_panel_with_load_42kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid (zoomed in) = [[File:Solar_panel_with_load_42kW_zoom.png|1200px]]&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
Experimental values for the 41.9 kW grid show the first peak has a height of about 4.24 MJ, with each consecutive peak growing higher as the true output of a solar panel is indeed more than 41.9 kW.&amp;lt;br&amp;gt;&lt;br /&gt;
Experimental values for the 42 kW grid show each peak reaching about 4.24 MJ, but falling short for 5 seconds.&lt;br /&gt;
&lt;br /&gt;
4.24 MJ is enough to fill 0.848 accumulators as they can hold a charge of 5 MJ each. Conservatively we can therefore set 0.85 accumulators per solar panel, or a ratio of 20 solar panels to 17 accumulators. A less conservative approach is to use 0.84 accumulators per solar panel, or a ratio of 25 solar panels to 21 accumulators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;  border-color:#141414 #3E3E3E #3E3E3E #141414;border-width: 2px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Analytic solution: 2646/3125&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can set the previously defined power function as the rate of change of the accumulator and subtract it&#039;s average output as the load which the setup should be able to continuously supply. First we check when the power reaches 42 kW&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
42 &amp;amp;= \frac{60}{84} \cdot t_\text{start}\\&lt;br /&gt;
t_\text{start} &amp;amp;= \frac{3528}{60}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we shift the function for power in time and reduce it by the 42 kW so that the function will start at zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t-\tfrac{3528}{60})-\hat{P} =&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{1\,512}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{1\,512}{60} \, \mathrm{s} &amp;lt; t \leq \frac{14\,112}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{14\,112}{60} \, \mathrm{s} &amp;lt; t \leq \frac{19\,152}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
- 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{19\,152}{60} \, \mathrm{s} &amp;lt; t \leq \frac{21\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot ( t - \frac{21\,672}{60} \, \mathrm{s} ) - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{21\,672}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
A(T=420\,\mathrm{s}) &amp;amp;= \int_{0}^{T} \dot{A}(t) \, \mathrm{d}t = 0 \, \mathrm{J}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To find the critical point in time &amp;lt;math&amp;gt;t_\text{crit}&amp;lt;/math&amp;gt; at which the accumulator charge reaches it&#039;s peak &amp;lt;math&amp;gt;\hat{A} = A(t_\text{crit})&amp;lt;/math&amp;gt;, we need to see when it&#039;s derivative passes zero. This happens in it&#039;s 3rd section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t_\text{crit}) = 0 &amp;amp;= 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t_\text{crit}-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}\\&lt;br /&gt;
t_\text{crit} &amp;amp;= \frac{(60\,\mathrm{kW} - 42\,\mathrm{kW})}{\frac{60\,\mathrm{kW}}{84\,\mathrm{s}}} + \frac{14\,112}{60}\,\mathrm{s}  = \frac{15\,624}{60}\,\mathrm{s} = 260.4 \, \mathrm{s}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcccccc}&lt;br /&gt;
A(t_\text{crit}) = \displaystyle\int_0^{t_\text{crit}} \dot{A}(t) \, \mathrm{d}t &lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \displaystyle\int_{0\, \mathrm{s}}^{\frac{1\,512}{60}\, \mathrm{s}}  \frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t \, \mathrm{d}t &lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{1\,512}{60}\, \mathrm{s}}^{\frac{14\,112}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - 42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{14\,112}{60}\, \mathrm{s}}^{\frac{15\,624}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{1\,512}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{14\,112}{60}\, \mathrm{s}-\frac{1\,512}{60}\, \mathrm{s}\right)&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)-\frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   3\,780 \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; \frac{21\,168}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; 4\,233.6 \, \mathrm{kJ}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The true perfect ratio for solar panels to accumulators therefore turns out to be...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\tfrac{21\,168}{5} \mathrm{kJ}}{5\,000 \, \mathrm{kJ}} = \frac{2\,646}{3\,125} = 0.846\,72&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes 0.84672 accumulators per solar panel, or a ratio of 2646 accumulators to 3125 solar panels. Speaking conservatively we can take a higher ratio of 0.85 with 17 accumulators to 20 solar panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Best ratios ====&lt;br /&gt;
These ratios approach the one we got from the analytic solution, but to get more accurate, they need a larger number of individual equipment to do so.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width: 25em;&amp;quot;&lt;br /&gt;
|+ more accumulators than necessary&lt;br /&gt;
|-&lt;br /&gt;
! accumulators || solar panels || ratio&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 7 || 0.857142857&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 20 || 0.85&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 33 || 0.848484848&lt;br /&gt;
|-&lt;br /&gt;
| 39 || 46 || 0.847826087&lt;br /&gt;
|-&lt;br /&gt;
| 50 || 59 || 0.847457627&lt;br /&gt;
|-&lt;br /&gt;
| 61 || 72 || 0.847222222&lt;br /&gt;
|-&lt;br /&gt;
| 72 || 85 || 0.847058824&lt;br /&gt;
|-&lt;br /&gt;
| 83 || 98 || 0.846938776&lt;br /&gt;
|-&lt;br /&gt;
| 94 || 111 || 0.846846847&lt;br /&gt;
|-&lt;br /&gt;
| 105 || 124 || 0.846774194&lt;br /&gt;
|-&lt;br /&gt;
| 221 || 261 || 0.846743295&lt;br /&gt;
|-&lt;br /&gt;
| 337 || 398 || 0.846733668&lt;br /&gt;
|-&lt;br /&gt;
| 453 || 535 || 0.846728972&lt;br /&gt;
|-&lt;br /&gt;
| 569 || 672 || 0.84672619&lt;br /&gt;
|-&lt;br /&gt;
| 685 || 809 || 0.846724351&lt;br /&gt;
|-&lt;br /&gt;
| 801 || 946 || 0.846723044&lt;br /&gt;
|-&lt;br /&gt;
| 917 || 1083 || 0.846722068&lt;br /&gt;
|-&lt;br /&gt;
| 1033 || 1220 || 0.846721311&lt;br /&gt;
|-&lt;br /&gt;
| 1149 || 1357 || 0.846720707&lt;br /&gt;
|-&lt;br /&gt;
| 1265 || 1494 || 0.846720214&lt;br /&gt;
|-&lt;br /&gt;
| 2646 || 3125 || 0.84672&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width: 25em;&amp;quot;&lt;br /&gt;
|+ fewer accumulators than necessary&lt;br /&gt;
|-&lt;br /&gt;
! accumulators || solar panels || ratio&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 2 || 0.5&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 3 || 0.666666667&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 4 || 0.75&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 5 || 0.8&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 6 || 0.833333333&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 13 || 0.846153846&lt;br /&gt;
|-&lt;br /&gt;
| 116 || 137 || 0.846715328&lt;br /&gt;
|-&lt;br /&gt;
| 1381 || 1631 || 0.846719804&lt;br /&gt;
|-&lt;br /&gt;
| 2646 || 3125 || 0.84672&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Testing ratios ====&lt;br /&gt;
The most commonly recommended ratio is 21/25 or 0.84, let&#039;s see how it fairs against 17/20 or 0.84, and then check out ratios for 0.8467 and 0.8469. And for fairness, these tests start off with fully charged accumulators before a load is applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
84/100 (21/25 or 0.84) = [[File:Solar_panel_21to25.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
fell 0 kJ accumulator charge for 18 seconds&lt;br /&gt;
\-\&lt;br /&gt;
85/100 (17/20 or 0.85) = [[File:Solar_panel_17to20.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
lowest recorded accumulator charge: 959 kJ (11.282 kJ per accumulator)&lt;br /&gt;
\-\&lt;br /&gt;
83/98 (or 0.8469)= [[File:Solar_panel_83to98.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
lowest recorded accumulator charge: 107 kJ (1.289 kJ per accumulator)&lt;br /&gt;
\-\&lt;br /&gt;
116/137 (or 0.8467) = [[File:Solar_panel_116to137.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
fell 0 kJ accumulator charge for half a second&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tests support the analytic solution. The ratio for 0.8467 barely falls short of being able to sustain 42 kW of power, while 0.8469 almost fully discharges to 0.025%.&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206477</id>
		<title>Tutorial:Solar power math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206477"/>
		<updated>2024-11-16T18:43:03Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will properly quantify the amount of [[solar panel]]s and [[accumulator]]s needed and the proper ratio that is needed between the two buildings.&lt;br /&gt;
&lt;br /&gt;
== Equation symbols and units ==&lt;br /&gt;
The game uses SI units and reflects how they are used in the real world. &#039;&#039;&#039;Energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; and &#039;&#039;&#039;power&#039;&#039;&#039; &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are often used interchangeably, but power is the first time derivative of energy, i.e. how much energy is used or produced per second. Power can be used to get machines moving, as they perform &#039;&#039;&#039;work&#039;&#039;&#039; &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt;. A type of work can be lifting some mass against gravitational acceleration for a set distance. Usually there is always a loss of usable energy due to thermal energy being released, but Factorio does not take such losses into consideration. Lastly there is the charge in accumulators. Charge traditionally has the unit Coulomb and the energy in a capacitor depends on the charge and the voltage across it, but as Factorio also doesn&#039;t consider equipment using different voltages, a the charge &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; of a factorio-accumulator can be defined to use this combined value.&lt;br /&gt;
&lt;br /&gt;
Therefore the important equation symbols for energy are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; ... energy, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule, also often written in &amp;lt;math&amp;gt;\mathrm{kW} \, \mathrm{h}&amp;lt;/math&amp;gt; kilowatt-hours, where &amp;lt;math&amp;gt;1 \, \mathrm{kW} \, \mathrm{h} = 3\,600\,000 \mathrm{J} = 3.6 \, \mathrm{MJ}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt; ... performed work, in &amp;lt;math&amp;gt;\mathrm{kg} \, \tfrac{\mathrm{m}}{\mathrm{s}^2} \, \mathrm{m}&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\mathrm{N}\, \mathrm{m}&amp;lt;/math&amp;gt; Newton-meter which is equal to &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
* &amp;lt;math&amp;gt;A := \tfrac{1}{2} Q \cdot U^2&amp;lt;/math&amp;gt; ... accumulator charge, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
&lt;br /&gt;
And the important equation symbols for power are as follows, with dot-notation for the time derivative:&lt;br /&gt;
* &amp;lt;math&amp;gt;P_\text{S} := \tfrac{\mathrm{d}}{\mathrm{d} t} E = \dot{E}&amp;lt;/math&amp;gt; ... supplied power, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt, or &amp;lt;math&amp;gt;\tfrac{\mathrm{J}}{\mathrm{s}}&amp;lt;/math&amp;gt; Joule per second.&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{W} := \tfrac{\mathrm{d} W}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... ongoing mechanical work, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{A} := \tfrac{\mathrm{d} A}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... change in accumulator charge, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
&lt;br /&gt;
Energy can&#039;t be generated or destroyed, only converted into a different form. This means that the balance of energy must be upheld, and therefore its rate of change must be zero. If we subtract from the supplied power both the ongoing mechanical work and the rate at which accumulators are charging (therefore taking energy from the grid), the result will be zero. As such we can write&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P_\text{S} - \dot{W} - \dot{A} = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The player will not have to worry about overproduction, as any power generating equipment will cap its output automatically. Only too little production will no longer provide machines with the amount of power that they desire, causing them to throttle their own power demand and working slower. Therefore in almost all cases these rates will change over time, where solar panels produce energy dependant on the time of day, while machines equally draw more or less power depending on how much they are used. For example, inserters only draw their power when they swing their arms, while only using a tiny fraction of it on standby. As such we introduce notation for various statistically relevant values.&lt;br /&gt;
&lt;br /&gt;
* Average value over an interval &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is annotated with a bar above: &amp;lt;math&amp;gt;\bar{x} = \frac{1}{T} \int_{t}^{t+T} x(t) \mathrm{d}t&amp;lt;/math&amp;gt;&lt;br /&gt;
* Peak value with an upward facing chevron: &amp;lt;math&amp;gt;\hat{x} = \mathrm{max}\big( x(t) \big) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--* Idle value with a downward facing chevron: &amp;lt;math&amp;gt;\check{x} = \mathrm{min}\big( x(t) \big) &amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Average output of 1 solar panel ==&lt;br /&gt;
&lt;br /&gt;
While only the peak output of a solar panel can be easily be told at &amp;lt;math&amp;gt;\hat{P} = 60 \, \mathrm{kW}&amp;lt;/math&amp;gt;, its exact power output over the day changes with available daylight. Thankfully, if we install some accumulators, they can do the integration for us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
0 &amp;amp;= P(t) - \dot{A}(t)\\&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t)\\&lt;br /&gt;
A(T) &amp;amp;= \int_0^T P(t) \, \mathrm{d}t\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an experiment with one solar panel and 4 accumulators, we can see that one solar panel will produce 17.6 MJ of energy per day.&lt;br /&gt;
&lt;br /&gt;
[[File:Solar_panel_energy.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Due to rounding, this could be anywhere between 17.55 MJ and 17.65 MJ, therefore the experiment can be repeated over multiple days.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! day number || accumulator charge || energy produced per day&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 17.6 MJ || 17.6 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 35.3 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 52.9 MJ || 17.633 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 70.6 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 88.2 MJ || 17.64 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 106 MJ || 17.666 MJ&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Further experiments show that the true number will swing around and approach 17.64 MJ&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
A(T) &amp;amp;= 17\,640 \, \mathrm{kJ}\\&lt;br /&gt;
\bar{P} &lt;br /&gt;
 &amp;amp;= \frac{\int_{0}^{T} P(t) \, \mathrm{d}t}{T} &lt;br /&gt;
  = \frac{A(T)}{T}&lt;br /&gt;
  = \frac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}}&lt;br /&gt;
  \approx 42 \, \mathrm{kW}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A day on Nauvis lasts 7 minutes, or &amp;lt;math&amp;gt; T = 420 \, \mathrm{s}&amp;lt;/math&amp;gt;, which means that each solar panel provides about 42 kW of power on average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;  border-color:#141414 #3E3E3E #3E3E3E #141414;border-width: 2px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Solarpanel output as a function&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further calculations we assume the power output function of a solar panel looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
P(t) &amp;amp;=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\tfrac{60}{84} t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{5\,040}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 &lt;br /&gt;
&amp;amp; \frac{5\,040}{60} \, \mathrm{s} &amp;lt; t \leq \frac{17\,640}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 - \tfrac{60}{84} \cdot ( t - \frac{17\,640}{60} \, \mathrm{s})&lt;br /&gt;
&amp;amp; \frac{17\,640}{60} \, \mathrm{s} &amp;lt; t \leq \frac{22\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
0 &amp;amp; \frac{22\,680}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
\int_{0}^{T} P(t) \, \mathrm{d}t &amp;amp;= 17\,640 \, \mathrm{kJ}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accumulators per solar panel ==&lt;br /&gt;
&lt;br /&gt;
Knowing how much power a solar panel provides on average we can construct a fitting load to test how much max accumulator charge &amp;lt;math&amp;gt;\hat{A}&amp;lt;/math&amp;gt; is needed.&lt;br /&gt;
&lt;br /&gt;
In a second experiment we take two solar panels on separate grids and put a load of &amp;lt;math&amp;gt;\tfrac{17\,600 \, \mathrm{kJ}}{420 \, \mathrm{s}} \approx 41.9 \, \mathrm{kW}&amp;lt;/math&amp;gt; on one, and one with &amp;lt;math&amp;gt;\tfrac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}} = 42 \, \mathrm{kW}&amp;lt;/math&amp;gt;, which can be achieved with...&lt;br /&gt;
* 8 Assembly machines 2 (5 kW per unit), and&lt;br /&gt;
* 3/4 fast inserters (500 W per unit), and&lt;br /&gt;
* 1/0 regular inserters (400 W per unit).&lt;br /&gt;
To that we add a generous 100 accumulators and observe the energy in the system.&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
41.9 kW grid = [[File:Solar_panel_with_load_41point9kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid = [[File:Solar_panel_with_load_42kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid (zoomed in) = [[File:Solar_panel_with_load_42kW_zoom.png|1200px]]&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
Experimental values for the 41.9 kW grid show the first peak has a height of about 4.24 MJ, with each consecutive peak growing higher as the true output of a solar panel is indeed more than 41.9 kW.&amp;lt;br&amp;gt;&lt;br /&gt;
Experimental values for the 42 kW grid show each peak reaching about 4.24 MJ, but falling short for 5 seconds.&lt;br /&gt;
&lt;br /&gt;
4.24 MJ is enough to fill 0.848 accumulators as they can hold a charge of 5 MJ each. Conservatively we can therefore set 0.85 accumulators per solar panel, or a ratio of 20 solar panels to 17 accumulators. A less conservative approach is to use 0.84 accumulators per solar panel, or a ratio of 25 solar panels to 21 accumulators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;  border-color:#141414 #3E3E3E #3E3E3E #141414;border-width: 2px;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Analytic solution: 2646/3125&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can set the previously defined power function as the rate of change of the accumulator and subtract it&#039;s average output as the load which the setup should be able to continuously supply. First we check when the power reaches 42 kW&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
42 &amp;amp;= \frac{60}{84} \cdot t_\text{start}\\&lt;br /&gt;
t_\text{start} &amp;amp;= \frac{3528}{60}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we shift the function for power in time and reduce it by the 42 kW so that the function will start at zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t-\tfrac{3528}{60})-\hat{P} =&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{1\,512}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{1\,512}{60} \, \mathrm{s} &amp;lt; t \leq \frac{14\,112}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{14\,112}{60} \, \mathrm{s} &amp;lt; t \leq \frac{19\,152}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
- 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{19\,152}{60} \, \mathrm{s} &amp;lt; t \leq \frac{21\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot ( t - \frac{21\,672}{60} \, \mathrm{s} ) - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{21\,672}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
A(T=420\,\mathrm{s}) &amp;amp;= \int_{0}^{T} \dot{A}(t) \, \mathrm{d}t = 0 \, \mathrm{J}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To find the critical point in time &amp;lt;math&amp;gt;t_\text{crit}&amp;lt;/math&amp;gt; at which the accumulator charge reaches it&#039;s peak &amp;lt;math&amp;gt;\hat{A} = A(t_\text{crit})&amp;lt;/math&amp;gt;, we need to see when it&#039;s derivative passes zero. This happens in it&#039;s 3rd section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t_\text{crit}) = 0 &amp;amp;= 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t_\text{crit}-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}\\&lt;br /&gt;
t_\text{crit} &amp;amp;= \frac{(60\,\mathrm{kW} - 42\,\mathrm{kW})}{\frac{60\,\mathrm{kW}}{84\,\mathrm{s}}} + \frac{14\,112}{60}\,\mathrm{s}  = \frac{15\,624}{60}\,\mathrm{s} = 260.4 \, \mathrm{s}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcccccc}&lt;br /&gt;
A(t_\text{crit}) = \displaystyle\int_0^{t_\text{crit}} \dot{A}(t) \, \mathrm{d}t &lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \displaystyle\int_{0\, \mathrm{s}}^{\frac{1\,512}{60}\, \mathrm{s}}  \frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t \, \mathrm{d}t &lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{1\,512}{60}\, \mathrm{s}}^{\frac{14\,112}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - 42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{14\,112}{60}\, \mathrm{s}}^{\frac{15\,624}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{1\,512}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{14\,112}{60}\, \mathrm{s}-\frac{1\,512}{60}\, \mathrm{s}\right)&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)-\frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   3\,780 \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; \frac{21\,168}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; 4\,233.6 \, \mathrm{kJ}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The true perfect ratio for solar panels to accumulators therefore turns out to be...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\tfrac{21\,168}{5} \mathrm{kJ}}{5\,000 \, \mathrm{kJ}} = \frac{2\,646}{3\,125} = 0.846\,72&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes 0.84672 accumulators per solar panel, or a ratio of 2646 accumulators to 3125 solar panels. Speaking conservatively we can take a higher ratio of 0.85 with 17 accumulators to 20 solar panels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Best ratios ====&lt;br /&gt;
These ratios approach the one we got from the analytic solution, but to get more accurate, they need a larger number of individual equipment to do so.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width: 25em;&amp;quot;&lt;br /&gt;
|+ more accumulators than necessary&lt;br /&gt;
|-&lt;br /&gt;
! accumulators || solar panels || ratio&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 7 || 0.857142857&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 20 || 0.85&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 33 || 0.848484848&lt;br /&gt;
|-&lt;br /&gt;
| 39 || 46 || 0.847826087&lt;br /&gt;
|-&lt;br /&gt;
| 50 || 59 || 0.847457627&lt;br /&gt;
|-&lt;br /&gt;
| 61 || 72 || 0.847222222&lt;br /&gt;
|-&lt;br /&gt;
| 72 || 85 || 0.847058824&lt;br /&gt;
|-&lt;br /&gt;
| 83 || 98 || 0.846938776&lt;br /&gt;
|-&lt;br /&gt;
| 94 || 111 || 0.846846847&lt;br /&gt;
|-&lt;br /&gt;
| 105 || 124 || 0.846774194&lt;br /&gt;
|-&lt;br /&gt;
| 221 || 261 || 0.846743295&lt;br /&gt;
|-&lt;br /&gt;
| 337 || 398 || 0.846733668&lt;br /&gt;
|-&lt;br /&gt;
| 453 || 535 || 0.846728972&lt;br /&gt;
|-&lt;br /&gt;
| 569 || 672 || 0.84672619&lt;br /&gt;
|-&lt;br /&gt;
| 685 || 809 || 0.846724351&lt;br /&gt;
|-&lt;br /&gt;
| 801 || 946 || 0.846723044&lt;br /&gt;
|-&lt;br /&gt;
| 917 || 1083 || 0.846722068&lt;br /&gt;
|-&lt;br /&gt;
| 1033 || 1220 || 0.846721311&lt;br /&gt;
|-&lt;br /&gt;
| 1149 || 1357 || 0.846720707&lt;br /&gt;
|-&lt;br /&gt;
| 1265 || 1494 || 0.846720214&lt;br /&gt;
|-&lt;br /&gt;
| 2646 || 3125 || 0.84672&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width: 25em;&amp;quot;&lt;br /&gt;
|+ fewer accumulators than necessary&lt;br /&gt;
|-&lt;br /&gt;
! accumulators || solar panels || ratio&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 2 || 0.5&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 3 || 0.666666667&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 4 || 0.75&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 5 || 0.8&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 6 || 0.833333333&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 13 || 0.846153846&lt;br /&gt;
|-&lt;br /&gt;
| 116 || 137 || 0.846715328&lt;br /&gt;
|-&lt;br /&gt;
| 1381 || 1631 || 0.846719804&lt;br /&gt;
|-&lt;br /&gt;
| 2646 || 3125 || 0.84672&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Testing ratios ====&lt;br /&gt;
The most commonly recommended ratio is 21/25 or 0.84, let&#039;s see how it fairs against 17/20 or 0.84, and then check out ratios for 0.8467 and 0.8469. And for fairness, these tests start off with fully charged accumulators before a load is applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
84/100 (21/25 or 0.84) = [[File:Solar_panel_21to25.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
fell 0 kJ accumulator charge for 18 seconds&lt;br /&gt;
\-\&lt;br /&gt;
85/100 (17/20 or 0.85) = [[File:Solar_panel_17to20.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
lowest recorded accumulator charge: 959 kJ (11.282 kJ per accumulator)&lt;br /&gt;
\-\&lt;br /&gt;
83/98 (or 0.8469)= [[File:Solar_panel_83to98.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
lowest recorded accumulator charge: 107 kJ (1.289 kJ per accumulator)&lt;br /&gt;
\-\&lt;br /&gt;
116/137 (or 0.8467) = [[File:Solar_panel_116to137.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
fell 0 kJ accumulator charge for half a second&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tests support the analytic solution. The ratio for 0.8467 barely falls short of being able to sustain 42 kW of power, while 0.8469 almost fully discharges to 0.025%.&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Solar_panel_116to137.png&amp;diff=206476</id>
		<title>File:Solar panel 116to137.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Solar_panel_116to137.png&amp;diff=206476"/>
		<updated>2024-11-16T18:28:01Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Screenshot}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Screenshot}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Solar_panel_83to98.png&amp;diff=206475</id>
		<title>File:Solar panel 83to98.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Solar_panel_83to98.png&amp;diff=206475"/>
		<updated>2024-11-16T18:27:57Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Screenshot}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Screenshot}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Solar_panel_17to20.png&amp;diff=206474</id>
		<title>File:Solar panel 17to20.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Solar_panel_17to20.png&amp;diff=206474"/>
		<updated>2024-11-16T18:27:48Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Screenshot}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Screenshot}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Solar_panel_21to25.png&amp;diff=206473</id>
		<title>File:Solar panel 21to25.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Solar_panel_21to25.png&amp;diff=206473"/>
		<updated>2024-11-16T18:27:12Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Screenshot}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Screenshot}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206419</id>
		<title>Tutorial:Solar power math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206419"/>
		<updated>2024-11-15T22:53:07Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: /* Accumulators per solar panel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will properly quantify the amount of [[solar panel]]s and [[accumulator]]s needed and the proper ratio that is needed between the two buildings.&lt;br /&gt;
&lt;br /&gt;
== Equation symbols and units ==&lt;br /&gt;
The game uses SI units and reflects how they are used in the real world. &#039;&#039;&#039;Energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; and &#039;&#039;&#039;power&#039;&#039;&#039; &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are often used interchangeably, but power is the first time derivative of energy, i.e. how much energy is used or produced per second. Power can be used to get machines moving, as they perform &#039;&#039;&#039;work&#039;&#039;&#039; &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt;. A type of work can be lifting some mass against gravitational acceleration for a set distance. Usually there is always a loss of usable energy due to thermal energy being released, but Factorio does not take such losses into consideration. Lastly there is the charge in accumulators. Charge traditionally has the unit Coulomb and the energy in a capacitor depends on the charge and the voltage across it, but as Factorio also doesn&#039;t consider equipment using different voltages, a the charge &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; of a factorio-accumulator can be defined to use this combined value.&lt;br /&gt;
&lt;br /&gt;
Therefore the important equation symbols for energy are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; ... energy, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule, also often written in &amp;lt;math&amp;gt;\mathrm{kW} \, \mathrm{h}&amp;lt;/math&amp;gt; kilowatt-hours, where &amp;lt;math&amp;gt;1 \, \mathrm{kW} \, \mathrm{h} = 3\,600\,000 \mathrm{J} = 3.6 \, \mathrm{MJ}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt; ... performed work, in &amp;lt;math&amp;gt;\mathrm{kg} \, \tfrac{\mathrm{m}}{\mathrm{s}^2} \, \mathrm{m}&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\mathrm{N}\, \mathrm{m}&amp;lt;/math&amp;gt; Newton-meter which is equal to &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
* &amp;lt;math&amp;gt;A := \tfrac{1}{2} Q \cdot U^2&amp;lt;/math&amp;gt; ... accumulator charge, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
&lt;br /&gt;
And the important equation symbols for power are as follows, with dot-notation for the time derivative:&lt;br /&gt;
* &amp;lt;math&amp;gt;P_\text{S} := \tfrac{\mathrm{d}}{\mathrm{d} t} E = \dot{E}&amp;lt;/math&amp;gt; ... supplied power, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt, or &amp;lt;math&amp;gt;\tfrac{\mathrm{J}}{\mathrm{s}}&amp;lt;/math&amp;gt; Joule per second.&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{W} := \tfrac{\mathrm{d} W}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... ongoing mechanical work, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{A} := \tfrac{\mathrm{d} A}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... change in accumulator charge, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
&lt;br /&gt;
Energy can&#039;t be generated or destroyed, only converted into a different form. This means that the balance of energy must be upheld, and therefore its rate of change must be zero. If we subtract from the supplied power both the ongoing mechanical work and the rate at which accumulators are charging (therefore taking energy from the grid), the result will be zero. As such we can write&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P_\text{S} - \dot{W} - \dot{A} = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The player will not have to worry about overproduction, as any power generating equipment will cap its output automatically. Only too little production will no longer provide machines with the amount of power that they desire, causing them to throttle their own power demand and working slower. Therefore in almost all cases these rates will change over time, where solar panels produce energy dependant on the time of day, while machines equally draw more or less power depending on how much they are used. For example, inserters only draw their power when they swing their arms, while only using a tiny fraction of it on standby. As such we introduce notation for various statistically relevant values.&lt;br /&gt;
&lt;br /&gt;
* Average value over an interval &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is annotated with a bar above: &amp;lt;math&amp;gt;\bar{x} = \frac{1}{T} \int_{t}^{t+T} x(t) \mathrm{d}t&amp;lt;/math&amp;gt;&lt;br /&gt;
* Peak value with an upward facing chevron: &amp;lt;math&amp;gt;\hat{x} = \mathrm{max}\big( x(t) \big) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--* Idle value with a downward facing chevron: &amp;lt;math&amp;gt;\check{x} = \mathrm{min}\big( x(t) \big) &amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Average output of 1 solar panel ==&lt;br /&gt;
&lt;br /&gt;
While only the peak output of a solar panel can be easily be told at &amp;lt;math&amp;gt;\hat{P} = 60 \, \mathrm{kW}&amp;lt;/math&amp;gt;, its exact power output over the day changes with available daylight. Thankfully, if we install some accumulators, they can do the integration for us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
0 &amp;amp;= P(t) - \dot{A}(t)\\&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t)\\&lt;br /&gt;
A(T) &amp;amp;= \int_0^T P(t) \, \mathrm{d}t\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an experiment with one solar panel and 4 accumulators, we can see that one solar panel will produce 17.6 MJ of energy per day.&lt;br /&gt;
&lt;br /&gt;
[[File:Solar_panel_energy.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Due to rounding, this could be anywhere between 17.55 MJ and 17.65 MJ, therefore the experiment can be repeated over multiple days.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! day number || accumulator charge || energy produced per day&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 17.6 MJ || 17.6 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 35.3 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 52.9 MJ || 17.633 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 70.6 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 88.2 MJ || 17.64 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 106 MJ || 17.666 MJ&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Further experiments show that the true number will swing around and approach 17.64 MJ&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
A(T) &amp;amp;= 17\,640 \, \mathrm{kJ}\\&lt;br /&gt;
\bar{P} &lt;br /&gt;
 &amp;amp;= \frac{\int_{0}^{T} P(t) \, \mathrm{d}t}{T} &lt;br /&gt;
  = \frac{A(T)}{T}&lt;br /&gt;
  = \frac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}}&lt;br /&gt;
  \approx 42 \, \mathrm{kW}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A day on Nauvis lasts 7 minutes, or &amp;lt;math&amp;gt; T = 420 \, \mathrm{s}&amp;lt;/math&amp;gt;, which means that each solar panel provides about 42 kW of power on average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Solarpanel output as a function&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further calculations we assume the power output function of a solar panel looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
P(t) &amp;amp;=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\tfrac{60}{84} t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{5\,040}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 &lt;br /&gt;
&amp;amp; \frac{5\,040}{60} \, \mathrm{s} &amp;lt; t \leq \frac{17\,640}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 - \tfrac{60}{84} \cdot ( t - \frac{17\,640}{60} \, \mathrm{s})&lt;br /&gt;
&amp;amp; \frac{17\,640}{60} \, \mathrm{s} &amp;lt; t \leq \frac{22\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
0 &amp;amp; \frac{22\,680}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
\int_{0}^{T} P(t) \, \mathrm{d}t &amp;amp;= 17\,640 \, \mathrm{kJ}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accumulators per solar panel ==&lt;br /&gt;
&lt;br /&gt;
Knowing how much power a solar panel provides on average we can construct a fitting load to test how much max accumulator charge &amp;lt;math&amp;gt;\hat{A}&amp;lt;/math&amp;gt; is needed.&lt;br /&gt;
&lt;br /&gt;
In a second experiment we take two solar panels on separate grids and put a load of &amp;lt;math&amp;gt;\tfrac{17\,600 \, \mathrm{kJ}}{420 \, \mathrm{s}} \approx 41.9 \, \mathrm{kW}&amp;lt;/math&amp;gt; on one, and one with &amp;lt;math&amp;gt;\tfrac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}} = 42 \, \mathrm{kW}&amp;lt;/math&amp;gt;, which can be achieved with...&lt;br /&gt;
* 8 Assembly machines 2 (5 kW per unit), and&lt;br /&gt;
* 3/4 fast inserters (500 W per unit), and&lt;br /&gt;
* 1/0 regular inserters (400 W per unit).&lt;br /&gt;
To that we add a generous 100 accumulators and observe the energy in the system.&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
41.9 kW grid = [[File:Solar_panel_with_load_41point9kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid = [[File:Solar_panel_with_load_42kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid (zoomed in) = [[File:Solar_panel_with_load_42kW_zoom.png|1200px]]&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
Experimental values for the 41.9 kW grid show the first peak has a height of about 4.24 MJ, with each consecutive peak growing higher as the true output of a solar panel is indeed more than 41.9 kW.&amp;lt;br&amp;gt;&lt;br /&gt;
Experimental values for the 42 kW grid show each peak reaching about 4.24 MJ, but falling short for 5 seconds.&lt;br /&gt;
&lt;br /&gt;
4.24 MJ is enough to fill 0.848 accumulators as they can hold a charge of 5 MJ each. Conservatively we can therefore set 0.85 accumulators per solar panel, or a ratio of 20 solar panels to 17 accumulators. A less conservative approach is to use 0.84 accumulators per solar panel, or a ratio of 25 solar panels to 21 accumulators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Analytic solution&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can set the previously defined power function as the rate of change of the accumulator and subtract it&#039;s average output as the load which the setup should be able to continuously supply. First we check when the power reaches 42 kW&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
42 &amp;amp;= \frac{60}{84} \cdot t_\text{start}\\&lt;br /&gt;
t_\text{start} &amp;amp;= \frac{3528}{60}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we shift the function for power in time and reduce it by the 42 kW so that the function will start at zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t-\tfrac{3528}{60})-\hat{P} =&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{1\,512}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{1\,512}{60} \, \mathrm{s} &amp;lt; t \leq \frac{14\,112}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{14\,112}{60} \, \mathrm{s} &amp;lt; t \leq \frac{19\,152}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
- 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{19\,152}{60} \, \mathrm{s} &amp;lt; t \leq \frac{21\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot ( t - \frac{21\,672}{60} \, \mathrm{s} ) - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{21\,672}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
A(T=420\,\mathrm{s}) &amp;amp;= \int_{0}^{T} \dot{A}(t) \, \mathrm{d}t = 0 \, \mathrm{J}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To find the critical point in time &amp;lt;math&amp;gt;t_\text{crit}&amp;lt;/math&amp;gt; at which the accumulator charge reaches it&#039;s peak &amp;lt;math&amp;gt;\hat{A} = A(t_\text{crit})&amp;lt;/math&amp;gt;, we need to see when it&#039;s derivative passes zero. This happens in it&#039;s 3rd section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t_\text{crit}) = 0 &amp;amp;= 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t_\text{crit}-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}\\&lt;br /&gt;
t_\text{crit} &amp;amp;= \frac{(60\,\mathrm{kW} - 42\,\mathrm{kW})}{\frac{60\,\mathrm{kW}}{84\,\mathrm{s}}} + \frac{14\,112}{60}\,\mathrm{s}  = \frac{15\,624}{60}\,\mathrm{s} = 260.4 \, \mathrm{s}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcccccc}&lt;br /&gt;
A(t_\text{crit}) = \displaystyle\int_0^{t_\text{crit}} \dot{A}(t) \, \mathrm{d}t &lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \displaystyle\int_{0\, \mathrm{s}}^{\frac{1\,512}{60}\, \mathrm{s}}  \frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t \, \mathrm{d}t &lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{1\,512}{60}\, \mathrm{s}}^{\frac{14\,112}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - 42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{14\,112}{60}\, \mathrm{s}}^{\frac{15\,624}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{1\,512}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{14\,112}{60}\, \mathrm{s}-\frac{1\,512}{60}\, \mathrm{s}\right)&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)-\frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   3\,780 \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; \frac{21\,168}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; 4\,233.6 \, \mathrm{kJ}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The true perfect ratio for solar panels to accumulators therefore turns out to be...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\tfrac{21\,168}{5} \mathrm{kJ}}{5\,000 \, \mathrm{kJ}} = \frac{2\,646}{3\,125} = 0.846\,72&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes 0.84672 accumulators per solar panel, or a ratio of 2646 accumulators to 3125 solar panels. Speaking conservatively we can take a higher ratio of 0.85 with 17 accumulators to 20 solar panels&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206418</id>
		<title>Tutorial:Solar power math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206418"/>
		<updated>2024-11-15T22:51:58Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will properly quantify the amount of [[solar panel]]s and [[accumulator]]s needed and the proper ratio that is needed between the two buildings.&lt;br /&gt;
&lt;br /&gt;
== Equation symbols and units ==&lt;br /&gt;
The game uses SI units and reflects how they are used in the real world. &#039;&#039;&#039;Energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; and &#039;&#039;&#039;power&#039;&#039;&#039; &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are often used interchangeably, but power is the first time derivative of energy, i.e. how much energy is used or produced per second. Power can be used to get machines moving, as they perform &#039;&#039;&#039;work&#039;&#039;&#039; &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt;. A type of work can be lifting some mass against gravitational acceleration for a set distance. Usually there is always a loss of usable energy due to thermal energy being released, but Factorio does not take such losses into consideration. Lastly there is the charge in accumulators. Charge traditionally has the unit Coulomb and the energy in a capacitor depends on the charge and the voltage across it, but as Factorio also doesn&#039;t consider equipment using different voltages, a the charge &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; of a factorio-accumulator can be defined to use this combined value.&lt;br /&gt;
&lt;br /&gt;
Therefore the important equation symbols for energy are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; ... energy, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule, also often written in &amp;lt;math&amp;gt;\mathrm{kW} \, \mathrm{h}&amp;lt;/math&amp;gt; kilowatt-hours, where &amp;lt;math&amp;gt;1 \, \mathrm{kW} \, \mathrm{h} = 3\,600\,000 \mathrm{J} = 3.6 \, \mathrm{MJ}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt; ... performed work, in &amp;lt;math&amp;gt;\mathrm{kg} \, \tfrac{\mathrm{m}}{\mathrm{s}^2} \, \mathrm{m}&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\mathrm{N}\, \mathrm{m}&amp;lt;/math&amp;gt; Newton-meter which is equal to &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
* &amp;lt;math&amp;gt;A := \tfrac{1}{2} Q \cdot U^2&amp;lt;/math&amp;gt; ... accumulator charge, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
&lt;br /&gt;
And the important equation symbols for power are as follows, with dot-notation for the time derivative:&lt;br /&gt;
* &amp;lt;math&amp;gt;P_\text{S} := \tfrac{\mathrm{d}}{\mathrm{d} t} E = \dot{E}&amp;lt;/math&amp;gt; ... supplied power, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt, or &amp;lt;math&amp;gt;\tfrac{\mathrm{J}}{\mathrm{s}}&amp;lt;/math&amp;gt; Joule per second.&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{W} := \tfrac{\mathrm{d} W}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... ongoing mechanical work, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{A} := \tfrac{\mathrm{d} A}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... change in accumulator charge, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
&lt;br /&gt;
Energy can&#039;t be generated or destroyed, only converted into a different form. This means that the balance of energy must be upheld, and therefore its rate of change must be zero. If we subtract from the supplied power both the ongoing mechanical work and the rate at which accumulators are charging (therefore taking energy from the grid), the result will be zero. As such we can write&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P_\text{S} - \dot{W} - \dot{A} = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The player will not have to worry about overproduction, as any power generating equipment will cap its output automatically. Only too little production will no longer provide machines with the amount of power that they desire, causing them to throttle their own power demand and working slower. Therefore in almost all cases these rates will change over time, where solar panels produce energy dependant on the time of day, while machines equally draw more or less power depending on how much they are used. For example, inserters only draw their power when they swing their arms, while only using a tiny fraction of it on standby. As such we introduce notation for various statistically relevant values.&lt;br /&gt;
&lt;br /&gt;
* Average value over an interval &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is annotated with a bar above: &amp;lt;math&amp;gt;\bar{x} = \frac{1}{T} \int_{t}^{t+T} x(t) \mathrm{d}t&amp;lt;/math&amp;gt;&lt;br /&gt;
* Peak value with an upward facing chevron: &amp;lt;math&amp;gt;\hat{x} = \mathrm{max}\big( x(t) \big) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--* Idle value with a downward facing chevron: &amp;lt;math&amp;gt;\check{x} = \mathrm{min}\big( x(t) \big) &amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Average output of 1 solar panel ==&lt;br /&gt;
&lt;br /&gt;
While only the peak output of a solar panel can be easily be told at &amp;lt;math&amp;gt;\hat{P} = 60 \, \mathrm{kW}&amp;lt;/math&amp;gt;, its exact power output over the day changes with available daylight. Thankfully, if we install some accumulators, they can do the integration for us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
0 &amp;amp;= P(t) - \dot{A}(t)\\&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t)\\&lt;br /&gt;
A(T) &amp;amp;= \int_0^T P(t) \, \mathrm{d}t\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an experiment with one solar panel and 4 accumulators, we can see that one solar panel will produce 17.6 MJ of energy per day.&lt;br /&gt;
&lt;br /&gt;
[[File:Solar_panel_energy.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Due to rounding, this could be anywhere between 17.55 MJ and 17.65 MJ, therefore the experiment can be repeated over multiple days.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! day number || accumulator charge || energy produced per day&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 17.6 MJ || 17.6 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 35.3 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 52.9 MJ || 17.633 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 70.6 MJ || 17.65 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 88.2 MJ || 17.64 MJ&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 106 MJ || 17.666 MJ&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Further experiments show that the true number will swing around and approach 17.64 MJ&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
A(T) &amp;amp;= 17\,640 \, \mathrm{kJ}\\&lt;br /&gt;
\bar{P} &lt;br /&gt;
 &amp;amp;= \frac{\int_{0}^{T} P(t) \, \mathrm{d}t}{T} &lt;br /&gt;
  = \frac{A(T)}{T}&lt;br /&gt;
  = \frac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}}&lt;br /&gt;
  \approx 42 \, \mathrm{kW}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A day on Nauvis lasts 7 minutes, or &amp;lt;math&amp;gt; T = 420 \, \mathrm{s}&amp;lt;/math&amp;gt;, which means that each solar panel provides about 42 kW of power on average.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Solarpanel output as a function&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further calculations we assume the power output function of a solar panel looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
P(t) &amp;amp;=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\tfrac{60}{84} t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{5\,040}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 &lt;br /&gt;
&amp;amp; \frac{5\,040}{60} \, \mathrm{s} &amp;lt; t \leq \frac{17\,640}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 - \tfrac{60}{84} \cdot ( t - \frac{17\,640}{60} \, \mathrm{s})&lt;br /&gt;
&amp;amp; \frac{17\,640}{60} \, \mathrm{s} &amp;lt; t \leq \frac{22\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
0 &amp;amp; \frac{22\,680}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
\int_{0}^{T} P(t) \, \mathrm{d}t &amp;amp;= 17\,640 \, \mathrm{kJ}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accumulators per solar panel ==&lt;br /&gt;
&lt;br /&gt;
Knowing how much power a solar panel provides on average we can construct a fitting load to test how much max accumulator charge &amp;lt;math&amp;gt;\hat{A}&amp;lt;/math&amp;gt; is needed.&lt;br /&gt;
&lt;br /&gt;
In a second experiment we take two solar panels on separate grids and put a load of &amp;lt;math&amp;gt;\tfrac{17\,600 \, \mathrm{kJ}}{420 \, \mathrm{s}} \approx 41.9 \, \mathrm{kW}&amp;lt;/math&amp;gt; on one, and one with &amp;lt;math&amp;gt;\tfrac{17\,640 \, \mathrm{kJ}}{420 \, \mathrm{s}} = 42 \, \mathrm{kW}&amp;lt;/math&amp;gt;, which can be achieved with...&lt;br /&gt;
* 8 Assembly machines 2 (5 kW per unit), and&lt;br /&gt;
* 3/4 fast inserters (500 W per unit), and&lt;br /&gt;
* 1/0 regular inserters (400 W per unit).&lt;br /&gt;
To that we add a generous 100 accumulators and observe the energy in the system.&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
41.9 kW grid = [[File:Solar_panel_with_load_41point9kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid = [[File:Solar_panel_with_load_42kW.png|1200px]]&lt;br /&gt;
\-\&lt;br /&gt;
42 kW grid (zoomed in) = [[File:Solar_panel_with_load_42kW_zoom.png|1200px]]&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
Experimental values for the 41.9 kW grid show the first peak has a height of about 4.24 MJ, with each consecutive peak growing higher as the true output of a solar panel is indeed more than 41.9 kW.&amp;lt;br&amp;gt;&lt;br /&gt;
Experimental values for the 42 kW grid show each peak reaching about 4.24 MJ, but falling short for 5 seconds.&lt;br /&gt;
&lt;br /&gt;
4.24 MJ is enough to fill 0.848 accumulators as they can hold a charge of 5 MJ each. Conservatively we can therefore set 0.85 accumulators per solar panel, or a ratio of 20 solar panels to 17 accumulators. A less conservative approach is to use 0.84 accumulators per solar panel, or a ratio of 25 solar panels to 21 accumulators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Analytic solution&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can set the previously defined power function as the rate of change of the accumulator and subtract it&#039;s average output as the load which the setup should be able to continuously supply. First we check when the power reaches 42 kW&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
42 &amp;amp;= \frac{60}{84} \cdot t_\text{start}\\&lt;br /&gt;
t_\text{start} = \frac{3528}{60}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we shift the function for power in time and reduce it by the 42 kW so that the function will start at zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t-\tfrac{3528}{60})-\hat{P} =&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{1\,512}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{1\,512}{60} \, \mathrm{s} &amp;lt; t \leq \frac{14\,112}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{14\,112}{60} \, \mathrm{s} &amp;lt; t \leq \frac{19\,152}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
- 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{19\,152}{60} \, \mathrm{s} &amp;lt; t \leq \frac{21\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot ( t - \frac{21\,672}{60} \, \mathrm{s} ) - 42\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{21\,672}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
A(T=420\,\mathrm{s}) &amp;amp;= \int_{0}^{T} \dot{A}(t) \, \mathrm{d}t = 0 \, \mathrm{J}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To find the critical point in time &amp;lt;math&amp;gt;t_\text{crit}&amp;lt;/math&amp;gt; at which the accumulator charge reaches it&#039;s peak &amp;lt;math&amp;gt;\hat{A} = A(t_\text{crit})&amp;lt;/math&amp;gt;, we need to see when it&#039;s derivative passes zero. This happens in it&#039;s 3rd section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t_\text{crit}) = 0 &amp;amp;= 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t_\text{crit}-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW}\\&lt;br /&gt;
t_\text{crit} &amp;amp;= \frac{(60\,\mathrm{kW} - 42\,\mathrm{kW})}{\frac{60\,\mathrm{kW}}{84\,\mathrm{s}}} + \frac{14\,112}{60}\,\mathrm{s}  = \frac{15\,624}{60}\,\mathrm{s} = 260.4 \, \mathrm{s}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rcccccc}&lt;br /&gt;
A(t_\text{crit}) = \displaystyle\int_0^{t_\text{crit}} \dot{A}(t) \, \mathrm{d}t &lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \displaystyle\int_{0\, \mathrm{s}}^{\frac{1\,512}{60}\, \mathrm{s}}  \frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t \, \mathrm{d}t &lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{1\,512}{60}\, \mathrm{s}}^{\frac{14\,112}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - 42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
   &amp;amp;+&amp;amp;&lt;br /&gt;
   \displaystyle\int_{\frac{14\,112}{60}\, \mathrm{s}}^{\frac{15\,624}{60}\, \mathrm{s}} 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t-\frac{14\,112}{60}\,\mathrm{s}\right)-42\,\mathrm{kW} \, \mathrm{d}t&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp; &lt;br /&gt;
   \frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{1\,512}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{14\,112}{60}\, \mathrm{s}-\frac{1\,512}{60}\, \mathrm{s}\right)&lt;br /&gt;
   &amp;amp;+&amp;amp; &lt;br /&gt;
   \left(60\, \mathrm{kW}-42\, \mathrm{kW}\right)\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)-\frac{60\, \mathrm{kW}}{84\, \mathrm{s}}\cdot\frac{1}{2}\cdot\left(\frac{15\,624}{60}\, \mathrm{s}-\frac{14\,112}{60}\, \mathrm{s}\right)^{2}&lt;br /&gt;
 \\&lt;br /&gt;
 &amp;amp;=&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   3\,780 \, \mathrm{kJ}&lt;br /&gt;
 &amp;amp;+&amp;amp;&lt;br /&gt;
   \frac{1\,134}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; \frac{21\,168}{5} \, \mathrm{kJ}\\&lt;br /&gt;
 &amp;amp;=&amp;amp; 4\,233.6 \, \mathrm{kJ}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The true perfect ratio for solar panels to accumulators therefore turns out to be...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\tfrac{21\,168}{5} \mathrm{kJ}}{5\,000 \, \mathrm{kJ}} = \frac{2\,646}{3\,125} = 0.846\,72&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes 0.84672 accumulators per solar panel, or a ratio of 2646 accumulators to 3125 solar panels. Speaking conservatively we can take a higher ratio of 0.85 with 17 accumulators to 20 solar panels&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Solar_panel_with_load_42kW_zoom.png&amp;diff=206415</id>
		<title>File:Solar panel with load 42kW zoom.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Solar_panel_with_load_42kW_zoom.png&amp;diff=206415"/>
		<updated>2024-11-15T22:27:19Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Screenshot}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Screenshot}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Solar_panel_with_load_42kW.png&amp;diff=206414</id>
		<title>File:Solar panel with load 42kW.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Solar_panel_with_load_42kW.png&amp;diff=206414"/>
		<updated>2024-11-15T22:10:44Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Screenshot}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Screenshot}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206238</id>
		<title>Tutorial:Solar power math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Solar_power_math&amp;diff=206238"/>
		<updated>2024-11-13T22:02:42Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: Created page with &amp;quot;In this tutorial we will properly quantify the amount of solar panels and accumulators needed and the proper ratio that is needed between the two buildings.  == Equation symbols and units == The game uses SI units and reflects how they are used in the real world. &amp;#039;&amp;#039;&amp;#039;Energy&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; and &amp;#039;&amp;#039;&amp;#039;power&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are often used interchangeably, but power is the first time derivative of energy, i.e. how much energy is used or produced per second. Power can...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial we will properly quantify the amount of [[solar panel]]s and [[accumulator]]s needed and the proper ratio that is needed between the two buildings.&lt;br /&gt;
&lt;br /&gt;
== Equation symbols and units ==&lt;br /&gt;
The game uses SI units and reflects how they are used in the real world. &#039;&#039;&#039;Energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; and &#039;&#039;&#039;power&#039;&#039;&#039; &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are often used interchangeably, but power is the first time derivative of energy, i.e. how much energy is used or produced per second. Power can be used to get machines moving, as they perform &#039;&#039;&#039;work&#039;&#039;&#039; &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt;. A type of work can be lifting some mass against gravitational acceleration for a set distance. Usually there is always a loss of usable energy due to thermal energy being released, but Factorio does not take such losses into consideration. Lastly there is the charge in accumulators. Charge traditionally has the unit Coulomb and the energy in a capacitor depends on the charge and the voltage across it, but as Factorio also doesn&#039;t consider equipment using different voltages, a the charge &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; of a factorio-accumulator can be defined to use this combined value.&lt;br /&gt;
&lt;br /&gt;
Therefore the important equation symbols for energy are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; ... energy, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule, also often written in &amp;lt;math&amp;gt;\mathrm{kW} \, \mathrm{h}&amp;lt;/math&amp;gt; kilowatt-hours, where &amp;lt;math&amp;gt;1 \, \mathrm{kW} \, \mathrm{h} = 3\,600\,000 \mathrm{J} = 3.6 \, \mathrm{MJ}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt; ... performed work, in &amp;lt;math&amp;gt;\mathrm{kg} \, \tfrac{\mathrm{m}}{\mathrm{s}^2} \, \mathrm{m}&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\mathrm{N}\, \mathrm{m}&amp;lt;/math&amp;gt; Newton-meter which is equal to &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
* &amp;lt;math&amp;gt;A := \tfrac{1}{2} Q \cdot U^2&amp;lt;/math&amp;gt; ... accumulator charge, in &amp;lt;math&amp;gt;\mathrm{J}&amp;lt;/math&amp;gt; Joule&lt;br /&gt;
&lt;br /&gt;
And the important equation symbols for power are as follows, with dot-notation for the time derivative:&lt;br /&gt;
* &amp;lt;math&amp;gt;P_\text{S} := \tfrac{\mathrm{d}}{\mathrm{d} t} E = \dot{E}&amp;lt;/math&amp;gt; ... supplied power, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt, or &amp;lt;math&amp;gt;\tfrac{\mathrm{J}}{\mathrm{s}}&amp;lt;/math&amp;gt; Joule per second.&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{W} := \tfrac{\mathrm{d} W}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... ongoing mechanical work, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
* &amp;lt;math&amp;gt;\dot{A} := \tfrac{\mathrm{d} A}{\mathrm{d} t}&amp;lt;/math&amp;gt; ... change in accumulator charge, in &amp;lt;math&amp;gt;\mathrm{W}&amp;lt;/math&amp;gt; Watt&lt;br /&gt;
&lt;br /&gt;
Energy can&#039;t be generated or destroyed, only converted into a different form. This means that the balance of energy must be upheld, and therefore its rate of change must be zero. If we subtract from the supplied power both the ongoing mechanical work and the rate at which accumulators are charging (therefore taking energy from the grid), the result will be zero. As such we can write&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P_\text{S} - \dot{W} - \dot{A} = 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The player will not have to worry about overproduction, as any power generating equipment will cap its output automatically. Only too little production will no longer provide machines with the amount of power that they desire, causing them to throttle their own power demand and working slower. Therefore in almost all cases these rates will change over time, where solar panels produce energy dependant on the time of day, while machines equally draw more or less power depending on how much they are used. For example, inserters only draw their power when they swing their arms, while only using a tiny fraction of it on standby. As such we introduce notation for various statistically relevant values.&lt;br /&gt;
&lt;br /&gt;
* Average value over an interval &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is annotated with a bar above: &amp;lt;math&amp;gt;\bar{x} = \frac{1}{T} \int_{t}^{t+T} x(t) \mathrm{d}t&amp;lt;/math&amp;gt;&lt;br /&gt;
* Peak value with an upward facing chevron: &amp;lt;math&amp;gt;\hat{x} = \mathrm{max}\big( x(t) \big) &amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--* Idle value with a downward facing chevron: &amp;lt;math&amp;gt;\check{x} = \mathrm{min}\big( x(t) \big) &amp;lt;/math&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Average output of 1 solar panel ==&lt;br /&gt;
&lt;br /&gt;
While only the peak output of a solar panel can be easily be told at &amp;lt;math&amp;gt;\hat{P} = 60 \, \mathrm{kW}&amp;lt;/math&amp;gt;, its exact power output over the day changes with available daylight. Thankfully, if we install some accumulators, they can do the integration for us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
0 &amp;amp;= P(t) - \dot{A}(t)\\&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t)\\&lt;br /&gt;
A(T) &amp;amp;= \int_0^T P(t) \, \mathrm{d}t\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In an experiment with one solar panel and 4 accumulators, we can see that one solar panel will produce 17.6 MJ of energy per day.&lt;br /&gt;
&lt;br /&gt;
[[File:Solar_panel_energy.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
A(T) &amp;amp;= 17\,600 \, \mathrm{kJ}\\&lt;br /&gt;
\bar{P} &lt;br /&gt;
 &amp;amp;= \frac{\int_{0}^{T} P(t) \, \mathrm{d}t}{T} &lt;br /&gt;
  = \frac{A(T)}{T}&lt;br /&gt;
  = \frac{17\,600 \, \mathrm{kJ}}{420 \, \mathrm{s}}&lt;br /&gt;
  = \frac{880}{21} \, \mathrm{kW}&lt;br /&gt;
  \approx 41.9 \, \mathrm{kW}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A day on Nauvis lasts 7 minutes, or &amp;lt;math&amp;gt; T = 420 \, \mathrm{s}&amp;lt;/math&amp;gt;, which means that each solar panel averages about 41.9 kW of power.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Solarpanel output as a function&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further calculations we assume the power output function of a solar panel looks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
P(t) &amp;amp;=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\tfrac{60}{84} t&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{5\,040}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 &lt;br /&gt;
&amp;amp; \frac{5\,040}{60} \, \mathrm{s} &amp;lt; t \leq \frac{17\,600}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 - \tfrac{60}{84} \cdot ( t - \frac{17\,600}{60} \, \mathrm{s})&lt;br /&gt;
&amp;amp; \frac{17\,600}{60} \, \mathrm{s} &amp;lt; t \leq \frac{22\,640}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
0 &amp;amp; \frac{22\,640}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
\int_{0}^{T} P(t) \, \mathrm{d}t &amp;amp;= 17\,600 \, \mathrm{kJ}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accumulators per solar panel ==&lt;br /&gt;
&lt;br /&gt;
Knowing how much power a solar panel provides on average we can construct a fitting load to test how much max accumulator charge &amp;lt;math&amp;gt;\hat{A}&amp;lt;/math&amp;gt; is needed.&lt;br /&gt;
&lt;br /&gt;
In an experiment we take one solar panel and put on a load of 41.9 kW, which can be achieved with...&lt;br /&gt;
* 8 Assembly machines 2 (&amp;lt;math&amp;gt;\check{P}_\text{AM2} = 5 \, \mathrm{kW} &amp;lt;/math&amp;gt; per unit)&lt;br /&gt;
* 1 inserter (&amp;lt;math&amp;gt;\check{P}_\text{I} = 400 \, \mathrm{W} &amp;lt;/math&amp;gt; per unit)&lt;br /&gt;
* 3 fast inserters (&amp;lt;math&amp;gt;\check{P}_\text{I2} = 500 \, \mathrm{W} &amp;lt;/math&amp;gt; per unit)&lt;br /&gt;
To that we add a generous 100 accumulators and observe the energy in the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Solar_panel_with_load_41point9kW.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Experimental values show the first peak has a height of about 4.24 MJ, with each consecutive peak growing higher as the true output of a solar panel is ever so slightly more than 41.9 kW.&lt;br /&gt;
4.24 MJ is enough to fill 0.848 accumulators as they can hold a charge of 5 MJ each. Conservatively we can therefore set 0.85 accumulators per solar panel, or a ratio of 20 solar panels to 17 accumulators. A less conservative approach is to use 0.84 accumulators per solar panel, or a ratio of 25 solar panels to 21 accumulators.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Analytic solution&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can set the previously defined power function as the rate of change of the accumulator and subtract it&#039;s average output as the load which the setup should be able to continuously supply. Further, we shift the function in time so that the function will start at zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t) &amp;amp;= P(t-\tfrac{176}{3})-\hat{P} =&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot t - \frac{880}{21}\,\mathrm{kW}&lt;br /&gt;
&amp;amp; 0 \, \mathrm{s} \leq  t &amp;lt;  \frac{1\,520}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - \frac{880}{21}\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{1\,520}{60} \, \mathrm{s} &amp;lt; t \leq \frac{14\,080}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t_\text{crit}-\frac{17\,600}{60}\,\mathrm{s}\right)-\frac{880}{21}\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{14\,080}{60} \, \mathrm{s} &amp;lt; t \leq \frac{19\,120}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
- \frac{880}{21}\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{19\,120}{60} \, \mathrm{s} &amp;lt; t \leq \frac{21\,680}{60} \, \mathrm{s}&lt;br /&gt;
\\&lt;br /&gt;
\frac{60\,\mathrm{kW}}{84\,\mathrm{s}} \cdot ( t - \frac{14\,080}{60} \, \mathrm{s} ) - \frac{880}{21}\,\mathrm{kW}&lt;br /&gt;
&amp;amp; \frac{21\,680}{60} \, \mathrm{s} &amp;lt; t \leq \frac{25\,200}{60} \, \mathrm{s}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
A(T=420\,\mathrm{s}) &amp;amp;= \int_{0}^{T} \dot{A}(t) \, \mathrm{d}t = 0 \, \mathrm{J}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To find the critical point in time &amp;lt;math&amp;gt;t_\text{crit}&amp;lt;/math&amp;gt; at which the accumulator charge reaches it&#039;s peak &amp;lt;math&amp;gt;\hat{A} = A(t_\text{crit})&amp;lt;/math&amp;gt;, we need to see when it&#039;s derivative passes zero.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\dot{A}(t_\text{crit}) = 0 &amp;amp;= 60 \,\mathrm{kW} - \frac{60\,\mathrm{kW}}{84\,\mathrm{s}}\cdot\left(t_\text{crit}-\frac{14\,080}{60}\,\mathrm{s}\right)-\frac{880}{21}\,\mathrm{kW}\\&lt;br /&gt;
t_\text{crit} &amp;amp;= \frac{(60\,\mathrm{kW} - \frac{880}{21}\,\mathrm{kW})}{\frac{60\,\mathrm{kW}}{84\,\mathrm{s}}} + \frac{14\,080}{60}\,\mathrm{s}  = 260 \, \mathrm{s}\\&lt;br /&gt;
A(t_\text{crit}) &amp;amp;= \int_0^{t_\text{crit}} \dot{A}(t) \, \mathrm{d}t = \frac{2327}{548} \, \mathrm{MJ} = 4.246 \, \mathrm{MJ}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The true perfect ratio for solar panels to accumulators therefore turns out to be...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{5}{\frac{2327}{548}} = \frac{2\,740}{2\,327} \approx \frac{617}{524} \approx \frac{20}{17} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It takes 0.84927 accumulators per solar panel, or a ratio of 617 solar panels to 524 accumulators. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Solar_panel_with_load_41point9kW.png&amp;diff=206222</id>
		<title>File:Solar panel with load 41point9kW.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Solar_panel_with_load_41point9kW.png&amp;diff=206222"/>
		<updated>2024-11-13T20:17:55Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Screenshot}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Screenshot}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Solar_panel_energy.png&amp;diff=206216</id>
		<title>File:Solar panel energy.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Solar_panel_energy.png&amp;diff=206216"/>
		<updated>2024-11-13T20:06:49Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Screenshot}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Screenshot}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Applied_power_math&amp;diff=205917</id>
		<title>Tutorial:Applied power math</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Applied_power_math&amp;diff=205917"/>
		<updated>2024-11-11T07:29:45Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
In this tutorial we&#039;ll be answering the question: &#039;&#039;&#039;how much coal is needed to power a factory?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
First off, we need to know: how much power does our factory use? That&#039;s easy - you can check the electricity tab by clicking on a power pole.&lt;br /&gt;
&lt;br /&gt;
[[File:power-details.png|800px]]&lt;br /&gt;
&lt;br /&gt;
Here we see one radar using 300 kW of electrical power &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;. Factorio uses real science here. The unit of power, or energy transfer, is measured in Watt (W). A kilowatt (kW) is 1000 W, a megawatt (MW) is 1000 kW, and if you&#039;re lucky enough to ever make a factory big enough, a gigawatt (GW) is 1000 MW.&lt;br /&gt;
&lt;br /&gt;
So that answers the question of how much power our factory uses. To keep our factory running at full speed we need to maintain 300 kW. For ease of comparison, we&#039;ll convert that to 0.3 MW.&lt;br /&gt;
&lt;br /&gt;
Next question! How much energy &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; is released when burning one piece of coal? That&#039;s also easy, because it tells us when we hover over it: 4 MJ.&lt;br /&gt;
&lt;br /&gt;
[[File:coal-joules.png|300px]]&lt;br /&gt;
&lt;br /&gt;
A Joule is the standard measure of energy &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt;. As with Watts a kilojoule (kJ) is 1000 J, and so on. There is a fixed relationship between Joules and Watts. &#039;&#039;&#039;1 Joule of energy can provide 1 Watt of power for 1 second of time.&#039;&#039;&#039; So one Joule is equal to one Wattsecond.&lt;br /&gt;
As a formula:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
E &amp;amp;= P \cdot t\\&lt;br /&gt;
\left[ \text{J} \right] &amp;amp;= \left[ \text{W} \right] \cdot \left[ \text{s} \right]&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So to run our factory at 0.3 MW, we need to consume 0.3 MJ every second.&lt;br /&gt;
&lt;br /&gt;
== Quiz ==&lt;br /&gt;
&lt;br /&gt;
How long could one piece of coal &amp;lt;math&amp;gt;E = 4 \, \text{MJ}&amp;lt;/math&amp;gt; run&lt;br /&gt;
our single radar &amp;lt;math&amp;gt;P = 0.3 \, \text{MW}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Expand to reveal answer&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
J &amp;amp;= P \cdot t \\&lt;br /&gt;
t &amp;amp;= \frac{J}{P} \\&lt;br /&gt;
  &amp;amp;= \frac{4 \, \text{MJ}}{0.3 \, \text{MW}} &lt;br /&gt;
   = \frac{4\,000\,000 \, \text{J}}{300\,000 \, \text{W}} &lt;br /&gt;
   = 13.333 \text{s}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A bit more than 13 seconds.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What is the maximum size factory (in watts)&lt;br /&gt;
a single piece of coal &amp;lt;math&amp;gt;E = 4 \text{MJ} &amp;lt;/math&amp;gt; could run for &amp;lt;math&amp;gt;t = 5 \text{s}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Expand to reveal answer&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
J &amp;amp;= P \cdot t \\&lt;br /&gt;
P &amp;amp;= \frac{J}{t} \\&lt;br /&gt;
  &amp;amp;= \frac{4 \, \text{MJ}}{5 \, \text{s}} &lt;br /&gt;
   = \frac{4\,000\,000 \, \text{J}}{5 \, \text{s}} &lt;br /&gt;
   = 800\,000 \, \text{W}&lt;br /&gt;
   = 0.8 \, \text{MW}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0.8 megawatts.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BONUS!&#039;&#039;&#039; A metric ton of real world coal &amp;lt;math&amp;gt;m = 1 \, \text{ton}&amp;lt;/math&amp;gt; can [http://hypertextbook.com/facts/2006/LunChen.shtml produce about 7.2 GJ in an electrical power plant]. How much does a piece of Factorio coal weigh?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Expand to reveal answer&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
The energy ratios will match the weight ratios, so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{m_\text{Factorio}}{m_\text{real}} = \frac{E_\text{Factorio}}{E_\text{real}} \quad \Leftrightarrow \quad&lt;br /&gt;
m_\text{Factorio} &amp;amp;= \frac{E_\text{Factorio} \cdot m_\text{real}}{E_\text{real}} \\&lt;br /&gt;
 1 \, \text{unit} &amp;amp;= \frac{4 \, \text{MJ}\cdot 1 \, \text{ton}}{7.2 \, \text{GJ}}\\&lt;br /&gt;
                  &amp;amp;= \frac{4\,000\,000 \, \text{J}\cdot 1\,000 \,\text{kg}}{7\,200\,000\,000 \, \text{J}}\\&lt;br /&gt;
                  &amp;amp;= 0.555\,555 \, \text{kg}\\&lt;br /&gt;
                  &amp;amp;= 555.555 \, \text{g}\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
About 555g! Still doesn&#039;t explain how our character can carry so much of it...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we have everything we need to answer our initial question: &#039;&#039;&#039;how much coal do we need to power our factory?&#039;&#039;&#039; Well, the question actually needs to be a bit more precise: how much coal do we need &#039;&#039;per second&#039;&#039; to power our factory?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Aside: why did the radar run for 20s and not 13.5s (50% of 27s)?&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Because it doesn&#039;t turn on and off instantly&amp;lt;!--. As you can see in the graph --&amp;gt;, the radar&#039;s demand of electrical power ramps up before reaching its operating power demand, therefore its electrical power usage is a function of time &amp;lt;math&amp;gt;p_\text{el}(t)&amp;lt;/math&amp;gt;. When speaking of a machine using power over time, the common equation symbol is &amp;lt;math&amp;gt;W&amp;lt;/math&amp;gt; for &#039;&#039;&#039;performed work&#039;&#039;&#039;, which must be equal to the amount of &#039;&#039;&#039;energy supplied&#039;&#039;&#039;&amp;lt;math&amp;gt;E_{supply}&amp;lt;/math&amp;gt;. To easier visualize the amount of energy or work, in the real world, instead of Joule, the unit in use is the kilowatt-hour (kWh).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;E_{supply} = W = \int p_\text{el}(t) \mathop{}\!\mathrm{d} t&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, as the accuracy of integration is not required, to conservatively approximate the required power supply the equation can be simplified by treating the average power &amp;lt;math&amp;gt;\bar{P}_\text{el}&amp;lt;/math&amp;gt; as the radars peak operating power &amp;lt;math&amp;gt;\hat{P}_\text{el}&amp;lt;/math&amp;gt; within a duration &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; as a constant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
E_{supply} &amp;amp;= \int_{t_0}^{t_0 + T} \hat{P}_\text{el}(t) \mathop{}\!\mathrm{d}t&lt;br /&gt;
           &amp;amp;= \hat{P}_\text{el} \cdot T&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For completeness sake it should be mentioned that the boilers turn 4 MJ of &#039;&#039;&#039;chemical energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E_\text{chem}&amp;lt;/math&amp;gt; stored in coal, to 4 MJ of &#039;&#039;&#039;thermal energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E_\text{therm}&amp;lt;/math&amp;gt; stored in the steam, which steam turbines only consume as the grid demands &#039;&#039;&#039;electrical energy&#039;&#039;&#039; &amp;lt;math&amp;gt;E_\text{el}&amp;lt;/math&amp;gt;, where the grid then transfers &#039;&#039;&#039;electrical power per second&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Quiz ==&lt;br /&gt;
&lt;br /&gt;
How much coal per second is needed to power a 20 MW factory?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Expand to reveal answer&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Since &amp;lt;math&amp;gt;E = P \cdot t&amp;lt;/code&amp;gt;, a 20 MW factory will consume 20 MJ/s. Since coal contains 4 MJ, we&#039;ll need &#039;&#039;&#039;5 coal per second&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
5 \cdot 4\, \text{MJ} = 20 \, \text{MW}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BONUS!&#039;&#039;&#039; How many [[Mining|mining drills]] are needed to produce that much coal?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Expand to reveal answer&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Per the linked page, an electric mining drill mine 0.5 coal per second, so we&#039;ll need &#039;&#039;&#039;10 electric mining drills&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{5 \, \text{units}}{\text{s}}{0.5\, \frac{\text{units}}{\text{s}}} = 5&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SECOND BONUS!&#039;&#039;&#039; The average American household uses [https://www.eia.gov/tools/faqs/faq.php?id=97&amp;amp;t=3 3.2 GJ in a month] (typically expressed as &#039;&#039;888 kilowatt-hours&#039;&#039;). How much Factorio coal would be needed to power one of these homes for that period, and how many homes could a steam engine support ([[Steam_engine|900 kW]]), assuming the power is used at a constant rate? (Assume 30 days in a month.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Expand to reveal answer&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
3.2 \, \mathrm{GJ} &amp;amp;= 3\,200 \, \mathrm{MJ}\\&lt;br /&gt;
\frac{3\,200 \, \mathrm{MJ}}{4 \, \mathrm{MJ}} &amp;amp;= 800\\&lt;br /&gt;
\\&lt;br /&gt;
3\,200 \, \mathrm{MJ} &amp;amp;\cdot \frac{1 \, \mathrm{m}}{30 \, \mathrm{d}} \cdot \frac{1 \, \mathrm{d}}{24 \, \mathrm{h}}  \cdot \frac{1 \, \mathrm{h}}{60 \, \mathrm{min}}   \cdot \frac{1 \, \mathrm{min}}{60 \, \mathrm{s}} = 1\,234.567\,9 \, \mathrm{W}\\&lt;br /&gt;
\frac{900 \, \mathrm{kW}}{1\,234.567\,9 \, \mathrm{W}} &amp;amp;= 729&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
800 pieces of coal per household and a single steam engine could power 729 households exactly.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Factorio_talk:Style_guide&amp;diff=205412</id>
		<title>Factorio talk:Style guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Factorio_talk:Style_guide&amp;diff=205412"/>
		<updated>2024-11-08T15:13:44Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How can I add a blueprint? ==&lt;br /&gt;
I would like to edit https://wiki.factorio.com/Tutorial:Combinator_tutorial#Memory, and I would like to add blueprints to make it easier to follow along. I would very much appreciate some guidance on the preferred way of sharing blueprints here on the Wiki.&lt;br /&gt;
--[[User:Ndh|Ndh]] ([[User talk:Ndh|talk]]) 17:30, 27 June 2024 (UTC)&lt;br /&gt;
: Hey, you interest is appreciated! You can use [[Template:BlueprintString]] for blueprint strings, see [[Inserters#Inserter_Throughput]] for example. [[Tutorial:Circuit_network_cookbook#Memory_Cell_/_Counter]] may also interest you. Happy editing! -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 17:50, 27 June 2024 (UTC)&lt;br /&gt;
:: Ooooh that is awesome! Thank you so much! Although now I&#039;m wondering how I could have found this. On the left there is a list of links under &amp;quot;Editor Help&amp;quot;, but &amp;quot;Templates&amp;quot; links to some generic mediawiki page. Would it be possible maybe to change this link to https://wiki.factorio.com/Category:Templates instead? Both https://wiki.factorio.com/Special:WhatLinksHere/Category:Templates and https://wiki.factorio.com/Special:WhatLinksHere/Category:Documentation_templates are pretty empty right now. Or maybe the style guide would be the better place? --[[User:Ndh|Ndh]] ([[User talk:Ndh|talk]]) 18:02, 27 June 2024 (UTC)&lt;br /&gt;
::: Usually people find the templates by seeing them used on the wiki. But that doesn&#039;t refute your point, so I linked to the category in the style guide section about templates. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 15:05, 30 August 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Adding &#039;Quality&#039; to Non-Space-Age Pages ==&lt;br /&gt;
&lt;br /&gt;
I was editing the page for the Solar panel infobox to include quality information, but I wanted to check if there was a certain way we wanted to do this.&lt;br /&gt;
Either adding it directly to the boxes quality affects, like the first image attached:&lt;br /&gt;
[[File:Solarpanelquality-editor question.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
Or if we should use the quality infobox template and list the items changed, like the second image attatched:&lt;br /&gt;
[[File:Solarpanelquality-editor question2.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
Are either of these appropriate? If so which one? Is there another way that would work better to the style and legibility of the wiki?&lt;br /&gt;
--[[User:Soundfoam|Soundfoam]] ([[User talk:Soundfoam|talk]]) 7:49, 29 October 2024 (UTC)&lt;br /&gt;
: The quality effects should be noted in the row of the property they affect, so for example directly in the health row. So like in your first image. You can find documentation on the infoboxes, including how to do the quality, on [[Template:Infobox]]. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 15:17, 1 November 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Draft: equation style guide ==&lt;br /&gt;
&lt;br /&gt;
This is not a guide on proper LaTeX syntax within the math environment, such a guide can be found here: [https://www.mediawiki.org/wiki/Extension:Math/Syntax Extension:Math/Syntax].&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the more specific the styles are the more difficult they are to be implemented by a laymen not familiar with LaTeX. &lt;br /&gt;
However, LaTeX already is a hurdle of entry, and it doesn&#039;t have a very wide usecase except more niche places on the wiki like the Tutorial namespace.&lt;br /&gt;
&amp;lt;div style=&amp;quot;&lt;br /&gt;
    margin: 15px;&lt;br /&gt;
    padding: 5px 10px;&lt;br /&gt;
    border-radius: 0;&lt;br /&gt;
    background: #242324;&lt;br /&gt;
    border-color: #141414 #3E3E3E #3E3E3E #141414;&lt;br /&gt;
    border-style: solid;&lt;br /&gt;
    border-width: 3px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Preferred Notation ===&lt;br /&gt;
* &#039;&#039;&#039;Multiplication&#039;&#039;&#039;: In multiplication of scalar values &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\cdot&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is preferred over &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\times&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. However, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; may not be used.&lt;br /&gt;
* &#039;&#039;&#039;Division&#039;&#039;&#039;: Divisions must be handled as fractions &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\frac{...}{...}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\div&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; operator may not be used.&lt;br /&gt;
* &#039;&#039;&#039;Differential d&#039;&#039;&#039;: The differential d must be non-italicized as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\mathrm{d}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Function names&#039;&#039;&#039;A number of functions already exist in the math environment like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\sin \log \exp \ln&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; resulting in &amp;lt;math&amp;gt;\sin \log \exp \ln&amp;lt;/math&amp;gt;. If an editor wants to use other functions like the binary logarithm (logarithmus dualis) they can use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\mathrm{...}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to revert the italics to write &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\log_2 = \mathrm{ld}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; resulting in &amp;lt;math&amp;gt;\log_2 = \mathrm{ld}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Function arguments&#039;&#039;&#039;: Parentheses around function arguments are must be used &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\sin (\alpha)&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\sin (\alpha)&amp;lt;/math&amp;gt;, they may not be omitted.&lt;br /&gt;
* &#039;&#039;&#039;Time derivatives&#039;&#039;&#039;: Dot notation may be used for time derivatives, like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\dot{m} := \tfrac{\mathrm{d}m}{\mathrm{d}t}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\dot{m} := \tfrac{\mathrm{d}m}{\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Units ===&lt;br /&gt;
* &#039;&#039;&#039;Units should not be italicized&#039;&#039;&#039;, but symbols in equations are italicized by default, therefore the exceptions must be treated by wrapping them in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\mathrm{...}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. And between the quantity and the unit should be a small gap, which can be done in the math environment with a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\,&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;t = 15 \, \mathrm{s}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; results in &amp;lt;math&amp;gt;t = 15 \, \mathrm{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Compound of multiple units&#039;&#039;&#039;: the different units should also be separated by a small gap. If a unit is fractional, it should use text style fractions &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\tfrac{...}{...}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, especially for inline equations.&lt;br /&gt;
: Example 1: Energy usage in kilowatt-hours: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;E = 720 \, \mathrm{kW}\, \mathrm{h}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; results in &amp;lt;math&amp;gt;E = 720 \, \mathrm{kW}\, \mathrm{h}&amp;lt;/math&amp;gt;&lt;br /&gt;
: Example 2: Resource flow in units per minute: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\dot{m} = 750 \, \tfrac{\mathrm{u}}{\mathrm{min}}&amp;lt;/math&amp;gt; science&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; results in &amp;lt;math&amp;gt;\dot{m} = 750 \, \tfrac{\mathrm{u}}{\mathrm{min}}&amp;lt;/math&amp;gt; science&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
*** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;t = 15 \mathrm{s}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;t = 15 \mathrm{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
*** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;t = 15 \, s&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;t = 15 \, s&amp;lt;/math&amp;gt;&lt;br /&gt;
*** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;t = 15s&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;t = 15s&amp;lt;/math&amp;gt;&lt;br /&gt;
*** Incorrect: units per minute: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;750\frac{\mathrm{u}}{\mathrm{min}}&amp;lt;/math&amp;gt; science&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;750\frac{\mathrm{u}}{\mathrm{min}}&amp;lt;/math&amp;gt; science&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Separators ===&lt;br /&gt;
* &#039;&#039;&#039;Symbol separator&#039;&#039;&#039;: Symbols separated by no operator are implied to get multiplied together. However, as one symbol can consist of multiple glyphs, they should be separated by a small gap. A small gap can be done in the math environment with a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\,&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\Delta F = k \, \Delta x&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\Delta F = k \, \Delta x&amp;lt;/math&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Quantity seperator&#039;&#039;&#039;: When symbols are replaced by the quantity and unit they represent, a operator must be given. &lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;10 \, \mathrm{N} = 50 \, \tfrac{\mathrm{N}}{\mathrm{m}} \cdot 0.2 \, \mathrm{N}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;10 \, \mathrm{N} = 50 \, \tfrac{\mathrm{N}}{\mathrm{m}} \cdot 0.2 \, \mathrm{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Thousands separator&#039;&#039;&#039;: To aid the eye, but be non-intrusive or confusing, the thousands separator should be a small gap, not a comma or period. This should also apply to every thousandth after the decimal place.&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12\,000\,000 \, \mathrm{J}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12\,000\,000 \, \mathrm{J}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12 000 000 \, \mathrm{J}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12 000 000 \, \mathrm{J}&amp;lt;/math&amp;gt;&lt;br /&gt;
** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12.000.000 \, \mathrm{J}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12.000.000 \, \mathrm{J}&amp;lt;/math&amp;gt;&lt;br /&gt;
** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12,000,000 \, \mathrm{J}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12,000,000 \, \mathrm{J}&amp;lt;/math&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Decimal separator&#039;&#039;&#039;: The decimal separator is a period in America and most English-speaking countries, but a comma in Europe and most Arabic-speaking countries. As the wiki is in English, the decimal separator should also be period.&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\pi = 3.141\,592\,653\,589&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\pi = 3.141\,592\,653\,589&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\pi = 3,141\,592\,653\,589&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\pi = 3,141\,592\,653\,589&amp;lt;/math&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Large equations ===&lt;br /&gt;
Equations that will span multiple lines should be placed in their own paragraphs. Then they should be properly aligned in either an &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;array&amp;lt;/code&amp;gt; environment&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:flex; flex-wrap: wrap; column-gap: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
E &amp;amp;= \int_{t_0}^{t_1} P(t) \, \mathrm{d}t \qquad P(t) \approx P_\mbox{peak}\\&lt;br /&gt;
  &amp;amp;= \int_{t_0}^{t_1} P_\mbox{peak} \, \mathrm{d}t\\&lt;br /&gt;
  &amp;amp;= P_\mbox{peak} \, \int_{t_0}^{t_1} \, \mathrm{d}t\\&lt;br /&gt;
  &amp;amp;= P_\mbox{peak} \, (t_1 - t_0)\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
E &amp;amp;= \int_{t_0}^{t_1} P(t) \, \mathrm{d}t \qquad P(t) \approx P_\mbox{peak}\\&lt;br /&gt;
  &amp;amp;= \int_{t_0}^{t_1} P_\mbox{peak} \, \mathrm{d}t\\&lt;br /&gt;
  &amp;amp;= P_\mbox{peak} \, \int_{t_0}^{t_1} \, \mathrm{d}t\\&lt;br /&gt;
  &amp;amp;= P_\mbox{peak} \, (t_1 - t_0)\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Factorio_talk:Style_guide&amp;diff=205409</id>
		<title>Factorio talk:Style guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Factorio_talk:Style_guide&amp;diff=205409"/>
		<updated>2024-11-08T15:13:15Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: /* Draft: equation style guide */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How can I add a blueprint? ==&lt;br /&gt;
I would like to edit https://wiki.factorio.com/Tutorial:Combinator_tutorial#Memory, and I would like to add blueprints to make it easier to follow along. I would very much appreciate some guidance on the preferred way of sharing blueprints here on the Wiki.&lt;br /&gt;
--[[User:Ndh|Ndh]] ([[User talk:Ndh|talk]]) 17:30, 27 June 2024 (UTC)&lt;br /&gt;
: Hey, you interest is appreciated! You can use [[Template:BlueprintString]] for blueprint strings, see [[Inserters#Inserter_Throughput]] for example. [[Tutorial:Circuit_network_cookbook#Memory_Cell_/_Counter]] may also interest you. Happy editing! -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 17:50, 27 June 2024 (UTC)&lt;br /&gt;
:: Ooooh that is awesome! Thank you so much! Although now I&#039;m wondering how I could have found this. On the left there is a list of links under &amp;quot;Editor Help&amp;quot;, but &amp;quot;Templates&amp;quot; links to some generic mediawiki page. Would it be possible maybe to change this link to https://wiki.factorio.com/Category:Templates instead? Both https://wiki.factorio.com/Special:WhatLinksHere/Category:Templates and https://wiki.factorio.com/Special:WhatLinksHere/Category:Documentation_templates are pretty empty right now. Or maybe the style guide would be the better place? --[[User:Ndh|Ndh]] ([[User talk:Ndh|talk]]) 18:02, 27 June 2024 (UTC)&lt;br /&gt;
::: Usually people find the templates by seeing them used on the wiki. But that doesn&#039;t refute your point, so I linked to the category in the style guide section about templates. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 15:05, 30 August 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Adding &#039;Quality&#039; to Non-Space-Age Pages ==&lt;br /&gt;
&lt;br /&gt;
I was editing the page for the Solar panel infobox to include quality information, but I wanted to check if there was a certain way we wanted to do this.&lt;br /&gt;
Either adding it directly to the boxes quality affects, like the first image attached:&lt;br /&gt;
[[File:Solarpanelquality-editor question.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
Or if we should use the quality infobox template and list the items changed, like the second image attatched:&lt;br /&gt;
[[File:Solarpanelquality-editor question2.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
Are either of these appropriate? If so which one? Is there another way that would work better to the style and legibility of the wiki?&lt;br /&gt;
--[[User:Soundfoam|Soundfoam]] ([[User talk:Soundfoam|talk]]) 7:49, 29 October 2024 (UTC)&lt;br /&gt;
: The quality effects should be noted in the row of the property they affect, so for example directly in the health row. So like in your first image. You can find documentation on the infoboxes, including how to do the quality, on [[Template:Infobox]]. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 15:17, 1 November 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Draft: equation style guide ==&lt;br /&gt;
&lt;br /&gt;
This is not a guide on proper LaTeX syntax within the math environment, such a guide can be found here: [https://www.mediawiki.org/wiki/Extension:Math/Syntax Extension:Math/Syntax].&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the more specific the styles are the more difficult they are to be implemented by a laymen not familiar with LaTeX. &lt;br /&gt;
However, LaTeX already is a hurdle of entry, and it doesn&#039;t have a very wide usecase except more niche places on the wiki like the Tutorial namespace.&lt;br /&gt;
&amp;lt;div style=&amp;quot;&lt;br /&gt;
    margin: 15px;&lt;br /&gt;
    padding: 5px 10px;&lt;br /&gt;
    border-radius: 0;&lt;br /&gt;
    background: #242324;&lt;br /&gt;
    border-color: #141414 #3E3E3E #3E3E3E #141414;&lt;br /&gt;
    border-style: solid;&lt;br /&gt;
    border-width: 3px;&amp;quot;&amp;gt;&lt;br /&gt;
=== Preferred Notation ===&lt;br /&gt;
* &#039;&#039;&#039;Multiplication&#039;&#039;&#039;: In multiplication of scalar values &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\cdot&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is preferred over &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\times&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. However, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; may not be used.&lt;br /&gt;
* &#039;&#039;&#039;Division&#039;&#039;&#039;: Divisions must be handled as fractions &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\frac{...}{...}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\div&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; operator may not be used.&lt;br /&gt;
* &#039;&#039;&#039;Differential d&#039;&#039;&#039;: The differential d must be non-italicized as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\mathrm{d}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Function names&#039;&#039;&#039;A number of functions already exist in the math environment like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\sin \log \exp \ln&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; resulting in &amp;lt;math&amp;gt;\sin \log \exp \ln&amp;lt;/math&amp;gt;. If an editor wants to use other functions like the binary logarithm (logarithmus dualis) they can use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\mathrm{...}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to revert the italics to write &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\log_2 = \mathrm{ld}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; resulting in &amp;lt;math&amp;gt;\log_2 = \mathrm{ld}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Function arguments&#039;&#039;&#039;: Parentheses around function arguments are must be used &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\sin (\alpha)&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\sin (\alpha)&amp;lt;/math&amp;gt;, they may not be omitted.&lt;br /&gt;
* &#039;&#039;&#039;Time derivatives&#039;&#039;&#039;: Dot notation may be used for time derivatives, like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\dot{m} := \tfrac{\mathrm{d}m}{\mathrm{d}t}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\dot{m} := \tfrac{\mathrm{d}m}{\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Units ===&lt;br /&gt;
* &#039;&#039;&#039;Units should not be italicized&#039;&#039;&#039;, but symbols in equations are italicized by default, therefore the exceptions must be treated by wrapping them in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\mathrm{...}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. And between the quantity and the unit should be a small gap, which can be done in the math environment with a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\,&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;t = 15 \, \mathrm{s}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; results in &amp;lt;math&amp;gt;t = 15 \, \mathrm{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Compound of multiple units&#039;&#039;&#039;: the different units should also be separated by a small gap. If a unit is fractional, it should use text style fractions &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\tfrac{...}{...}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, especially for inline equations.&lt;br /&gt;
: Example 1: Energy usage in kilowatt-hours: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;E = 720 \, \mathrm{kW}\, \mathrm{h}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; results in &amp;lt;math&amp;gt;E = 720 \, \mathrm{kW}\, \mathrm{h}&amp;lt;/math&amp;gt;&lt;br /&gt;
: Example 2: Resource flow in units per minute: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\dot{m} = 750 \, \tfrac{\mathrm{u}}{\mathrm{min}}&amp;lt;/math&amp;gt; science&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; results in &amp;lt;math&amp;gt;\dot{m} = 750 \, \tfrac{\mathrm{u}}{\mathrm{min}}&amp;lt;/math&amp;gt; science&lt;br /&gt;
&amp;lt;!---&lt;br /&gt;
*** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;t = 15 \mathrm{s}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;t = 15 \mathrm{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
*** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;t = 15 \, s&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;t = 15 \, s&amp;lt;/math&amp;gt;&lt;br /&gt;
*** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;t = 15s&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;t = 15s&amp;lt;/math&amp;gt;&lt;br /&gt;
*** Incorrect: units per minute: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;750\frac{\mathrm{u}}{\mathrm{min}}&amp;lt;/math&amp;gt; science&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;750\frac{\mathrm{u}}{\mathrm{min}}&amp;lt;/math&amp;gt; science&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Separators ===&lt;br /&gt;
* &#039;&#039;&#039;Symbol separator&#039;&#039;&#039;: Symbols separated by no operator are implied to get multiplied together. However, as one symbol can consist of multiple glyphs, they should be separated by a small gap. A small gap can be done in the math environment with a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;\,&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\Delta F = k \, \Delta x&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\Delta F = k \, \Delta x&amp;lt;/math&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Quantity seperator&#039;&#039;&#039;: When symbols are replaced by the quantity and unit they represent, a operator must be given. &lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;10 \, \mathrm{N} = 50 \, \tfrac{\mathrm{N}}{\mathrm{m}} \cdot 0.2 \, \mathrm{N}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;10 \, \mathrm{N} = 50 \, \tfrac{\mathrm{N}}{\mathrm{m}} \cdot 0.2 \, \mathrm{N}&amp;lt;/math&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Thousands separator&#039;&#039;&#039;: To aid the eye, but be non-intrusive or confusing, the thousands separator should be a small gap, not a comma or period. This should also apply to every thousandth after the decimal place.&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12\,000\,000 \, \mathrm{J}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12\,000\,000 \, \mathrm{J}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12 000 000 \, \mathrm{J}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12 000 000 \, \mathrm{J}&amp;lt;/math&amp;gt;&lt;br /&gt;
** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12.000.000 \, \mathrm{J}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12.000.000 \, \mathrm{J}&amp;lt;/math&amp;gt;&lt;br /&gt;
** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12,000,000 \, \mathrm{J}&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;12 \, \mathrm{MJ} = 12,000,000 \, \mathrm{J}&amp;lt;/math&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Decimal separator&#039;&#039;&#039;: The decimal separator is a period in America and most English-speaking countries, but a comma in Europe and most Arabic-speaking countries. As the wiki is in English, the decimal separator should also be period.&lt;br /&gt;
: Example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\pi = 3.141\,592\,653\,589&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\pi = 3.141\,592\,653\,589&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;!--** Incorrect: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;math&amp;gt;\pi = 3,141\,592\,653\,589&amp;lt;/math&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;math&amp;gt;\pi = 3,141\,592\,653\,589&amp;lt;/math&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Large equations ===&lt;br /&gt;
Equations that will span multiple lines should be placed in their own paragraphs. Then they should be properly aligned in either an &amp;lt;code&amp;gt;align&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;array&amp;lt;/code&amp;gt; environment&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:flex; flex-wrap: wrap; column-gap: 1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
E &amp;amp;= \int_{t_0}^{t_1} P(t) \, \mathrm{d}t \qquad P(t) \approx P_\mbox{peak}\\&lt;br /&gt;
  &amp;amp;= \int_{t_0}^{t_1} P_\mbox{peak} \, \mathrm{d}t\\&lt;br /&gt;
  &amp;amp;= P_\mbox{peak} \, \int_{t_0}^{t_1} \, \mathrm{d}t\\&lt;br /&gt;
  &amp;amp;= P_\mbox{peak} \, (t_1 - t_0)\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
E &amp;amp;= \int_{t_0}^{t_1} P(t) \, \mathrm{d}t \qquad P(t) \approx P_\mbox{peak}\\&lt;br /&gt;
  &amp;amp;= \int_{t_0}^{t_1} P_\mbox{peak} \, \mathrm{d}t\\&lt;br /&gt;
  &amp;amp;= P_\mbox{peak} \, \int_{t_0}^{t_1} \, \mathrm{d}t\\&lt;br /&gt;
  &amp;amp;= P_\mbox{peak} \, (t_1 - t_0)\\&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Electric_furnace&amp;diff=204163</id>
		<title>Electric furnace</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Electric_furnace&amp;diff=204163"/>
		<updated>2024-11-01T14:07:42Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Electric furnace}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;electric furnace&#039;&#039;&#039; is the third and last tier of furnace. As its name implies, it uses [[electric system|electricity]] rather than [[fuel]] to operate, removing the need for a fuel belt.&lt;br /&gt;
&lt;br /&gt;
The electric furnace smelts items at the same speed as a [[steel furnace]], and also has two slots for [[module|modules]]. However, it is slightly larger than the other two tiers of furnaces; it occupies a 3×3 area instead of a 2×2 area.&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; | Resource&lt;br /&gt;
! {{Imagelink|Stone furnace}}&lt;br /&gt;
! {{Imagelink|Steel furnace}}&lt;br /&gt;
! {{Imagelink|Electric furnace}}&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Coal consumption&#039;&#039;&#039;: 0.0225/sec&lt;br /&gt;
| &#039;&#039;&#039;Coal consumption&#039;&#039;&#039;: 0.0225/sec&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | Iron&lt;br /&gt;
| {{Icon|Iron plate|0.3125}} 0.3125/sec&lt;br /&gt;
| {{Icon|Iron plate|0.625}} 0.625/sec&lt;br /&gt;
| {{Icon|Iron plate|0.625}} 0.625/sec&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | Copper&lt;br /&gt;
| {{Icon|Copper plate|0.3125}} 0.3125/sec&lt;br /&gt;
| {{Icon|Copper plate|0.625}} 0.625/sec&lt;br /&gt;
| {{Icon|Copper plate|0.625}} 0.625/sec&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | Stone brick&lt;br /&gt;
| {{Icon|Stone brick|0.3125}} 0.3125/sec&lt;br /&gt;
| {{Icon|Stone brick|0.625}} 0.625/sec&lt;br /&gt;
| {{Icon|Stone brick|0.625}} 0.625/sec&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | Steel plate&lt;br /&gt;
| {{Icon|Steel plate|0.0625}} 0.0625/sec&lt;br /&gt;
| {{Icon|Steel plate|0.125}} 0.125/sec&lt;br /&gt;
| {{Icon|Steel plate|0.125}} 0.125/sec&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Quality&#039;s effect on output ==&lt;br /&gt;
&lt;br /&gt;
[[Quality]] (from the [[Space Age]] expansion) does not affect coal or power consumption for furnaces, but does affect how quickly they process things. This stacks multiplicatively with [[Speed module]]s.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Resource&lt;br /&gt;
! [[File:quality_normal.png|15px|link=Quality]] Normal&lt;br /&gt;
! [[File:quality_uncommon.png|15px|link=Quality]] Uncommon&lt;br /&gt;
! [[File:quality_rare.png|15px|link=Quality]] Rare&lt;br /&gt;
! [[File:quality_epic.png|15px|link=Quality]] Epic&lt;br /&gt;
! [[File:quality_legendary.png|15px|link=Quality]] Legendary&lt;br /&gt;
|-&lt;br /&gt;
! {{Icon|Iron plate}}{{Icon|Copper plate}}{{Icon|Stone brick}}&lt;br /&gt;
| 0.625/sec || 0.8125/sec || 1/sec || 1.1875/sec || 1.5625/sec&lt;br /&gt;
|-&lt;br /&gt;
! {{Icon|Lithium plate|space-age=yes}} &lt;br /&gt;
| 0.3125/sec || 0.40625/sec || 0.5/sec || 0.59375/sec || 0.78125/sec&lt;br /&gt;
|-&lt;br /&gt;
! {{Icon|Steel plate}} &lt;br /&gt;
| 0.125/sec || 0.1625/sec || 0.2/sec || 0.2375/sec || 0.3125/sec&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|0.6.1|&lt;br /&gt;
* Now has the same smelting speed as the steel furnace.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.6.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Electric system]]&lt;br /&gt;
&lt;br /&gt;
{{ProductionNav}}&lt;br /&gt;
{{C|Furnaces}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Infobox:Boiler&amp;diff=204156</id>
		<title>Infobox:Boiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Infobox:Boiler&amp;diff=204156"/>
		<updated>2024-11-01T13:25:24Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox&lt;br /&gt;
|required-technologies = Steam power&lt;br /&gt;
|resistance = {{Translation|Explosion}}: 0/30%&amp;lt;br&amp;gt;{{Translation|Fire}}: 0/90%&amp;lt;br&amp;gt;{{Translation|Impact}}: 0/30%&lt;br /&gt;
|mining-time = 0.2&lt;br /&gt;
|map-color = 006090&lt;br /&gt;
|prototype-type = boiler&lt;br /&gt;
|internal-name = boiler&lt;br /&gt;
|image = Boiler entity&lt;br /&gt;
|category = Production&lt;br /&gt;
|health = {{Quality|200|260|320|380|500}}&lt;br /&gt;
|stack-size   =50&lt;br /&gt;
|dimensions   =2×3&lt;br /&gt;
|energy       =1.8 {{Translation|MW}} burner&lt;br /&gt;
|power-output  =1.8 {{Translation|MW}}&amp;lt;br /&amp;gt;({{Translation|liquid heat}})&lt;br /&gt;
|pollution = 30{{Translation|/m}}&lt;br /&gt;
|fluid-storage-volume ={{Translation|Input}}: 200&amp;lt;br&amp;gt;{{Translation|Output}}: 200&lt;br /&gt;
|valid-fuel = Wood + Coal + Solid fuel + Rocket fuel + Nuclear fuel&lt;br /&gt;
|recipe = Time, 0.5 + Pipe, 4 + Stone furnace, 1&lt;br /&gt;
|total-raw = Time, 3 + Iron plate, 4 + Stone, 5&lt;br /&gt;
|producers = Assembling machine + Player&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;[[category:Infobox page]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Belt_transport_system&amp;diff=204154</id>
		<title>Belt transport system</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Belt_transport_system&amp;diff=204154"/>
		<updated>2024-11-01T12:43:00Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: /* Belt throughput */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
[[File:transport_belt_preview.png|right]]The belt transport system is the first system the [[player]] will use to transport items from place to place. It, along with [[Railway|trains]], and [[Logistic network|Logistic robots]], makes up the systems of item transportation in Factorio.&lt;br /&gt;
&lt;br /&gt;
Belts specifically are used to transport items and run without using energy. Belts can also interact with other moving entities such as [[player]]s, [[vehicle]]s and [[enemies]], also allowing for faster or slower movement speed.&lt;br /&gt;
&lt;br /&gt;
== Belt tier overview ==&lt;br /&gt;
[[File:Transport_belts_speed.gif|300px|thumb|top|Animation showing the three types of belt and their speed (from top to bottom: regular belts, fast belts, and express belts).]]&lt;br /&gt;
There are 3 different tiers of belts available for use. The [[transport belt]] has a yellow color and is the slowest, as well as the cheapest to craft. The next tier up, the [[fast transport belt]] has a red color and is twice as fast as the standard transport belt. The [[express transport belt]] is the final tier. It is colored blue and is three times faster than normal belts, or 1.5× faster than red belts.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! [[Transport belts]] !!  [[Underground belts]] !!  [[Splitters]] !! Max. throughput&amp;lt;br&amp;gt;(Items/[[Time#Seconds|second]]) !! Needed research&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Transport belt}}&lt;br /&gt;
| {{Imagelink|Underground belt}}&lt;br /&gt;
| {{Imagelink|Splitter|Splitter}} &lt;br /&gt;
| 15&lt;br /&gt;
| [[Logistics (research)]]&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Fast transport belt}}&lt;br /&gt;
| {{Imagelink|Fast underground belt}}&lt;br /&gt;
| {{Imagelink|Fast splitter}} &lt;br /&gt;
| 30&lt;br /&gt;
| [[Logistics 2 (research)]]&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Express transport belt}}&lt;br /&gt;
| {{Imagelink|Express underground belt}}&lt;br /&gt;
| {{Imagelink|Express splitter}}&lt;br /&gt;
| 45&lt;br /&gt;
| [[Logistics 3 (research)]]&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Turbo transport belt|space-age=yes}}&lt;br /&gt;
| {{Imagelink|Turbo underground belt|space-age=yes}}&lt;br /&gt;
| {{Imagelink|Turbo splitter|space-age=yes}}&lt;br /&gt;
| 60&lt;br /&gt;
| [[Turbo transport belt (research)]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt; Only for the underground belt and splitter. The basic transport belt is available at the start of the game.&lt;br /&gt;
&lt;br /&gt;
Regardless of the belt tier, a fully filled straight transport belt holds 8 items in total. For more information on this, see [[Transport belts/Physics]] and [https://factorio.com/blog/post/fff-276 Friday Facts #276 - Belt item spacing].&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Belt mechanics ==&lt;br /&gt;
&lt;br /&gt;
=== Merging and un-merging belts ===&lt;br /&gt;
&lt;br /&gt;
Belts of all tiers have 2 lanes for items to ride on. This allows for either a double flow of one material, or to transport two different materials on the same belt. Mixed belts can be beneficial for&lt;br /&gt;
smelting ore, or producing items with many different ingredients such as [[Utility science pack]]. The belt can be unmerged using a splitter filter. It is also possible to unmerge a mixed belt by using underground belts since an underground belt will block half of the belt. &lt;br /&gt;
&lt;br /&gt;
[[File:Transport_belts_2_lanes.gif|top]]&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;[[File:Transport_belts_unmerge.gif|top]]&lt;br /&gt;
&lt;br /&gt;
Belts going across a splitter will have items from the splitter moving to one side of the crossing belt.&lt;br /&gt;
&lt;br /&gt;
[[File:splitters_to_one_side.gif|top|Splitters moving objects to just one side of a belt.]]&lt;br /&gt;
&lt;br /&gt;
Commonly, merging and un-merging is done by using a [[splitter]]. The trick in the second gif is better described in the &#039;&#039;&#039;[[Belt_transport_system#Separating_belt_lanes|underground belt]]&#039;&#039;&#039; section.&lt;br /&gt;
&lt;br /&gt;
=== Lane balance ===&lt;br /&gt;
&lt;br /&gt;
Due to how items are placed onto belts by [[inserters]], their lanes can sometimes become unbalanced. In order to&lt;br /&gt;
maintain throughput, balancing the lanes may be necessary. The gifs below show two ways how to do this. The former only works if only one lane is in use initially. For further explanation of the mechanics, see [[Balancer mechanics#Lane_balancers|lane balancers]].&lt;br /&gt;
&lt;br /&gt;
[[File:Transport_belts_balance1.gif|top]]&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;[[File:Transport_belts_balance2.gif|top]]&lt;br /&gt;
&lt;br /&gt;
=== Belt throughput ===&lt;br /&gt;
[[File:Stack inserters fill express belt.gif|frame|230px|right|4 [[bulk inserter]]s can compress an express belt at stack size 12 for the left inserters and stack size 8 for the right inserters.]]&lt;br /&gt;
Maximizing the throughput means ensuring that as many items as possible are transported. Therefore some definitions need to&lt;br /&gt;
be introduced:&lt;br /&gt;
&lt;br /&gt;
; Speed &lt;br /&gt;
: How fast a belt moves in tiles per second. This is 1.875, 3.75, 5.625 and 7.5 for basic, fast, express and turbo belts respectively.&lt;br /&gt;
; Density &lt;br /&gt;
: How tight are the items put onto the belts; each straight belt piece can hold exactly 8 items.&lt;br /&gt;
; Throughput &lt;br /&gt;
: This is speed × density. It describes how many items pass by at a given time.&lt;br /&gt;
&lt;br /&gt;
So, there are three opportunities to enhance the throughput:&lt;br /&gt;
&lt;br /&gt;
; More density &lt;br /&gt;
:Sometimes items have small gaps in between each other that aren&#039;t big enough for other items to fit in. However, mining drills, inserters, and belt sideloading can still force an item into these gaps, temporarily squashing the items on the belt. The squashed gap is extended to normal size once the front of the belt starts to move again.&lt;br /&gt;
; More speed &lt;br /&gt;
:If the belts in the factory are already at maximum density, their speed can still be upgraded with better belts.  Finding the bottleneck is the first thing that needs to be done, usually it can be discovered quite easily. There will be a part of the belt where the items don&#039;t move quickly (or at all) or stop at maximum density and suddenly they come to a point where this &#039;stop and go&#039; effect releases itself, the bottleneck has been found. In most cases, this will be the place where belt optimization is needed.&lt;br /&gt;
; More belts &lt;br /&gt;
:Adding additional parallel belts can also increase the throughput. Simply place more belts carrying the item that needs throughput.&lt;br /&gt;
&lt;br /&gt;
=== Belt tricks ===&lt;br /&gt;
&lt;br /&gt;
Moving fast can be essential to defend alien attacks in time. Running on a belt will increase or decrease the movement speed of the [[player]] accordingly to the belts speed. That is why building a belt towards your defenses can be beneficial.&lt;br /&gt;
&lt;br /&gt;
However, the player is not the only unit that can be moved by transport belts. Additionally, biters and spitters can be moved. This can be abused to improve your defense. Firstly, biters will have a harder time to reach your walls when placing express transport belt in front of them. Secondly, spitters can be moved closer to your walls. That way more turrets can attack a single spitter at once.&lt;br /&gt;
&lt;br /&gt;
Another useful usage is [[car]]s on transport belts. Cars have an inventory and can be filled by [[inserters]]. So, they can be used as moving boxes on belts. This has several advantages: Firstly the throughput of the belt-car-boxes is amazingly high, secondly the inserter stack size bonus does apply here and makes inserters more effective.&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
[[Splitters]] are another form of item manipulation. Splitters are a 2×1 entity that splits incoming items on belts&lt;br /&gt;
from up to two input to up to two outputs, in a 1:1 ratio. They are used to divide resources between two belts, or balance&lt;br /&gt;
multiple belts.&lt;br /&gt;
&lt;br /&gt;
=== Mechanics ===&lt;br /&gt;
&lt;br /&gt;
The behavior of splitters looks simple at first glance. But they are not that simple. Splitters have an astonishing amount of uses.&lt;br /&gt;
&lt;br /&gt;
* Splitters have two input belts and two output belts. If the splitter receives items on one belt, it will split the input evenly between its two outputs. If one of the outputs is fully backed-up and the splitter cannot split evenly, it will put all input on its other output.&lt;br /&gt;
* Splitters can also merge belts, taking two inputs and one output.&lt;br /&gt;
* Splitters preserve the lanes of the items, by moving through the splitter an item on the right lane will not be moved to the left lane, and vice versa.&lt;br /&gt;
* Splitters can prioritize one input and/or one output. Clicking on a splitter opens its GUI where the priorities can be set.&lt;br /&gt;
* One output of the splitter can be filtered to one item. Items of that type will only go to that output, and not to the other one.&lt;br /&gt;
&lt;br /&gt;
The speed of the splitter is the same as its relevant type of belt, so in order to properly join/split belts, the splitter must be the same speed as the incoming belts. Otherwise the splitter will become a bottleneck.&lt;br /&gt;
&lt;br /&gt;
==== Priority ====&lt;br /&gt;
For both the input and output side of the splitter it is possible to set the priority to either left or right.&lt;br /&gt;
&lt;br /&gt;
A splitter where the input priority has been set will first try to consume the specified input side, and will only&lt;br /&gt;
consume the other input once there is a gap on the prioritized input belt.&lt;br /&gt;
&lt;br /&gt;
Similarly a splitter where the output priority has been set will try to redirect all incoming items&lt;br /&gt;
to the specified output, and will only output on the other output once the specified output is full.&lt;br /&gt;
&lt;br /&gt;
==== Filter ====&lt;br /&gt;
If a specific item is set in the splitter&#039;s filter slot, the slider for the output priority will&lt;br /&gt;
be used for the filter instead. All items of the set type will be redirected to that specific output&lt;br /&gt;
and all other items are directed to the other output. The input priority can be set independently of the filter.&lt;br /&gt;
&lt;br /&gt;
=== Balancing ===&lt;br /&gt;
&lt;br /&gt;
{{Main|Balancer mechanics}}&lt;br /&gt;
&lt;br /&gt;
Balancers are used to evenly distribute items over multiple belts or multiple belt lanes.&lt;br /&gt;
&lt;br /&gt;
=== Manipulating belt lanes ===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;slideshow&amp;quot;&amp;gt;&lt;br /&gt;
File:Swap_belt_lanes.png|Swapping lanes on a belt with a different item per belt lane.&lt;br /&gt;
File:Splitter_seperate_belt_lanes.png|Separating lanes with different items on them.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Circuit network]] ==&lt;br /&gt;
&lt;br /&gt;
[[File:transport_belt_circuits.png|thumb|200px|Two belts connected to a [[constant combinator]].]][[Red wire|Red]] or [[green wire]]s can be connected to segments of transport belts to use them as part of a circuit. Belts connected to the circuit network will appear with a yellow cage above them, with a moving red scanner within it. When a belt is connected to a circuit, a GUI can be accessed from the connected belt for settings on how the belt will be used for a circuit; there are two modes of operation that can be used:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Enable/disable&#039;&#039;&#039; - A circuit condition dictates whether or not the belt will allow items through.&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Read belt contents&#039;&#039;&#039; - If enabled, the contents on the belt will be read.&lt;br /&gt;
&lt;br /&gt;
The belt&#039;s GUI will also have a &amp;quot;content read mode&amp;quot; setting, which can be set to either &#039;&#039;&#039;pulse&#039;&#039;&#039; or &#039;&#039;&#039;hold&#039;&#039;&#039;. &#039;&#039;&#039;Pulse&#039;&#039;&#039; will read the belt&#039;s contents for only one [[Time|tick]], while &#039;&#039;&#039;hold&#039;&#039;&#039; will read the belt&#039;s contents continuously on every tick.&lt;br /&gt;
&lt;br /&gt;
[[File:transport_belt_circuit_gui.png|thumb|right|Transport belt GUI.|130px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;slideshow&amp;quot;&amp;gt;&lt;br /&gt;
File:transport_belt_circuit_example1.gif|A small example of a transport belt circuit reading belt contents to trigger two lamps.&lt;br /&gt;
File:transport_belt_circuit_example2.gif|[[Fast inserter]]s are activated by the [[arithmetic combinator]]s&#039; setup; when a specific item enters a belt segment that&#039;s connected to the circuit network, the inserters place the same item on another belt.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Underground belts ==&lt;br /&gt;
&lt;br /&gt;
Underground belts can be used to cross different flows of items without interfering. They move items like a [[Transport belts|normal belt]].&lt;br /&gt;
&lt;br /&gt;
[[File:4-6-8.png|thumb|right|Underground lengths|200px]]&lt;br /&gt;
* Underground belts can cross any number of entities and all types of ground, like water and grass. (as long as the input and output endpoints are on land)&lt;br /&gt;
* Underground belts can cross other underground entities (any number of underground belts or underground pipes). They won&#039;t be mixed.&lt;br /&gt;
* For the connection only the endpoints (entry-side and exit-side) are relevant.&lt;br /&gt;
* The underground distance is 4, 6 and 8 [[Map_structure#Tile|tiles]], respectivly, for the three belt types.&lt;br /&gt;
* An underground belt pair that bridges a gap of 4 tiles stores up to 44 items. An express underground belt pair at max length stores up to 72 items.&lt;br /&gt;
* The half of the underground belt tile with a belt can accept input from the side. The other half (with a tunnel entrance) blocks incoming items.&lt;br /&gt;
&lt;br /&gt;
=== Separating belt lanes ===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;slideshow&amp;quot;&amp;gt;&lt;br /&gt;
File:Block belt lane.png|This is built by placing one underground belt and then using R to reverse its direction. This converts the underground belt entrance to an exit (and vice versa).&lt;br /&gt;
File:Transport belts unmerge.gif|This can also be used to split the lanes of a belt onto seperate belts instead of using a splitter filter.&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Braiding ===&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;slideshow&amp;quot;&amp;gt;&lt;br /&gt;
File:underground_belt_braiding.gif|Different types of underground belts can be braided together along the same line of tiles, with items staying in their respective belt types.&lt;br /&gt;
File:underground_belt_braiding2.gif|The same concept, but with a different belt design.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Braiding can be particularly useful where more than two input lanes are required while also avoiding the use of a parallel belt/[[long-handed inserter]] combination. For example, this can be useful if there is limited space, such as when using a beacon. With a beacon range of 3 orthogonal tiles, two of which would be occupied by a belt and inserter, it would not be possible to place the parallel belt in the third space and still have a beacon on the same side, as the assembler would now be in the fourth tile and not in range. With the space saved by braiding, this is now possible.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Splitters]]&lt;br /&gt;
* [[Transport belts]]&lt;br /&gt;
* [[Underground belts]]&lt;br /&gt;
&lt;br /&gt;
{{C|Logistics{{!}}#Belt transport system}} {{C|Belt transport system{{!}}#Belt transport system}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Talk:Electric_furnace&amp;diff=204084</id>
		<title>Talk:Electric furnace</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Talk:Electric_furnace&amp;diff=204084"/>
		<updated>2024-10-31T20:47:54Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Quality table: what are the rows for? ==&lt;br /&gt;
[[User:Omnifarious]], there are 4 rows with different values for each quality. What do they mean if electric furnaces can only have 2 modules max? A column is missing to explain them. [[User:Vadcx|Vadcx]] ([[User talk:Vadcx|talk]]) 12:10, 31 October 2024 (UTC)&lt;br /&gt;
: [[User:Untitled7]] I have no idea what the current table is supposed to be either. I&#039;d guess that the table is supposed to look like this:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left:1.6em&amp;quot; &amp;lt;!-- the margin-left and Crafting Speeds are only here for the discussion, shouldn&#039;t be in the final version --&amp;gt;&lt;br /&gt;
! Resource&lt;br /&gt;
! [[File:quality_normal.png|15px|link=Quality]] Normal&amp;lt;br&amp;gt;&amp;lt;span title=&amp;quot;Crafting Speed&amp;quot; style=&amp;quot;text-decoration: dotted underline;&amp;quot;&amp;gt;Speed: 2&amp;lt;/span&amp;gt;&lt;br /&gt;
! [[File:quality_uncommon.png|15px|link=Quality]] Uncommon&amp;lt;br&amp;gt;&amp;lt;span title=&amp;quot;Crafting Speed&amp;quot; style=&amp;quot;text-decoration: dotted underline;&amp;quot;&amp;gt;Speed: 2.6&amp;lt;/span&amp;gt;&lt;br /&gt;
! [[File:quality_rare.png|15px|link=Quality]] Rare&amp;lt;br&amp;gt;&amp;lt;span title=&amp;quot;Crafting Speed&amp;quot; style=&amp;quot;text-decoration: dotted underline;&amp;quot;&amp;gt;Speed: 3.2&amp;lt;/span&amp;gt;&lt;br /&gt;
! [[File:quality_epic.png|15px|link=Quality]] Epic&amp;lt;br&amp;gt;&amp;lt;span title=&amp;quot;Crafting Speed&amp;quot; style=&amp;quot;text-decoration: dotted underline;&amp;quot;&amp;gt;Speed: 3.8&amp;lt;/span&amp;gt;&lt;br /&gt;
! [[File:quality_legendary.png|15px|link=Quality]] Legendary&amp;lt;br&amp;gt;&amp;lt;span title=&amp;quot;Crafting Speed&amp;quot; style=&amp;quot;text-decoration: dotted underline;&amp;quot;&amp;gt;Speed: 5&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Iron plate}} {{Icon|Copper plate}} {{Icon|Stone brick}} || 0.625/s || 0.8125/s || 1/s || 1.1875/s || 1.5625/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon|Steel plate}} || 0.125/s || 0.1625/s || 0.2/s || 0.2375/s || 0.3125/s&lt;br /&gt;
|}&lt;br /&gt;
: --[[User:Untitled7|Untitled7]] ([[User talk:Untitled7|talk]]) 20:47, 31 October 2024 (UTC)&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Infobox:Electric_furnace&amp;diff=204069</id>
		<title>Infobox:Electric furnace</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Infobox:Electric_furnace&amp;diff=204069"/>
		<updated>2024-10-31T20:13:37Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox&lt;br /&gt;
|resistance = {{Translation|Fire}}: 0/80%&lt;br /&gt;
|mining-time = 0.2&lt;br /&gt;
|map-color = 006090&lt;br /&gt;
|prototype-type = furnace&lt;br /&gt;
|internal-name = electric-furnace&lt;br /&gt;
|category = Production&lt;br /&gt;
|health = {{Quality|350|455|560|665|875}}&lt;br /&gt;
|dimensions=3×3&lt;br /&gt;
|image=Electric furnace entity&lt;br /&gt;
|energy=180 {{Translation|kW}} electric&lt;br /&gt;
|crafting-speed={{Quality|2|2.6|3.2|3.8|5}}&lt;br /&gt;
|drain=6 {{Translation|kW}} electric&lt;br /&gt;
|modules=2&lt;br /&gt;
|pollution = 1{{Translation|/m}}&lt;br /&gt;
|stack-size=50&lt;br /&gt;
|recipe = Time, 5 + Advanced circuit, 5 + Steel plate, 10 + Stone brick, 10&lt;br /&gt;
|total-raw = Time, 52.5 + Copper plate, 25 + Iron plate, 10 + Plastic bar, 10 + Steel plate, 10 + Stone brick, 10&lt;br /&gt;
|required-technologies = Advanced material processing 2&lt;br /&gt;
|producers = Assembling machine + Player&lt;br /&gt;
|consumers = Production science pack&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;[[Category:Infobox page]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Recycler&amp;diff=204044</id>
		<title>Recycler</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Recycler&amp;diff=204044"/>
		<updated>2024-10-31T19:27:47Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Recycler}}&lt;br /&gt;
{{Stub}}&lt;br /&gt;
{{About/Space age}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;recycler&#039;&#039;&#039; is a building that can convert most items into the ingredients used in their recipes, at the cost of losing 75% of said ingredients. In other words, it performs a lossy reversal of crafting.&lt;br /&gt;
&lt;br /&gt;
It has 4 module slots, but it cannot use [[Productivity module]]s.&lt;br /&gt;
&lt;br /&gt;
== Mechanics ==&lt;br /&gt;
&lt;br /&gt;
When an item enters a recycler, the item&#039;s main recipe is found, and the recycler is automatically set to perform its inverse.&lt;br /&gt;
&lt;br /&gt;
For each type of item used as an ingredient in the recycled item&#039;s main recipe, the number of items returned by the recycler is decided by &amp;lt;code&amp;gt;floor(0.25 * i / o + r)&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; is the number of items used as ingredients, &amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; is the number of items returned by the recipe, and &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt; is a random number that is greater than or equal to 0 but less than 1. On average, this returns exactly 25% of the items needed to craft one item of the same type as the recycled item. For example, recycling a [[processing unit]] always gives 5 [[electronic circuit]]s while having a 50% chance of returning one [[advanced circuit]].&lt;br /&gt;
&lt;br /&gt;
All fluid ingredients are lost when recycling, as the recycler has no fluid output.[https://www.reddit.com/r/factorio/comments/16d7h82/friday_facts_375_quality/jzpac1z/]&lt;br /&gt;
&lt;br /&gt;
Without quality modules, the resulting items have the same quality as the item being recycled, even if the latter was crafted using lower-quality ingredients. Quality modules can further increase the output&#039;s quality, just like with regular non-recycling recipes.&lt;br /&gt;
&lt;br /&gt;
The recycler has 12 internal slots for its output, but can only hold one stack of each item. The recycler will try to eject the contents of these slots, much like a mining drill. It is therefore not necessary to use an inserter to collect its output.&lt;br /&gt;
&lt;br /&gt;
=== Non-recyclable items ===&lt;br /&gt;
Some items, such as ores, have no recipe, and can therefore not be recycled. There are also some recipes that are irreversible, which include smelting and chemical processes.[https://discord.com/channels/139677590393716737/603392474458882065/1149692470511276152]&lt;br /&gt;
&lt;br /&gt;
When an item with no reversible recipe is &amp;quot;recycled&amp;quot;, then the same item has a 25% chance of being returned, and a 75% chance of being destroyed instead. This can be used to destroy unwanted items, such as byproducts from [[scrap recycling]].&lt;br /&gt;
&lt;br /&gt;
Irreversible recipes include (but may not be limited to:&lt;br /&gt;
* Recipes performed in furnaces or chemical plants&lt;br /&gt;
* Recipes for science packs&lt;br /&gt;
* Recipes for [[uranium fuel cell]]s&lt;br /&gt;
* Recipes for [[biolab]]s or [[captive biter spawner]]s&lt;br /&gt;
* Recipes for spoilable products&lt;br /&gt;
&lt;br /&gt;
=== Unique recycling recipes ===&lt;br /&gt;
&lt;br /&gt;
Some items have unique recycling recipes:&lt;br /&gt;
&lt;br /&gt;
* Recycling [[scrap]] will perform the [[scrap recycling]] recipe, for which there is no inverse, as scrap can not be crafted. This is used to obtain most resources on [[Fulgora]].&lt;br /&gt;
* Recycling one [[nutrients]] will yield 2.5x that amount of [[spoilage]]. This is useful for getting rid of excess nutrients, as they cannot be burned directly.&lt;br /&gt;
&lt;br /&gt;
=== Stats ===&lt;br /&gt;
Scrap recycling rates:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Input ||  Output || Chance || Rate&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;12&amp;quot; | {{Imagelink|Scrap|space-age=yes}}&lt;br /&gt;
| {{Imagelink|Processing unit}}  || 2% || 0.05/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Advanced circuit}}  || 3% || 0.08/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Low density structure}}  || 1%  || 0.02/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Solid fuel}}  || 7%  || 0.19/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Steel plate}}  || 4%  || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Concrete}}  || 6%  || 0.16/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Battery}}  || 4%  || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Ice|space-age=yes}}  || 5%  || 0.13/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Stone}}  || 4% || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Holmium ore|space-age=yes}}  || 1%  || 0.02/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Iron gear wheel}}  || 20%  || 0.55/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Copper cable}}  || 3%  || 0.08/s&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Alternatively, the recycler takes in 2.5 scrap/s and spits out 1.47 items/s, meaning 10 recyclers are enough to almost saturate a yellow belt. &amp;lt;br&amp;gt;&lt;br /&gt;
Additionally the recycling times for various items are different from the usual 0.125s. This is not an exhaustive list and is specified in item/s input.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left !important;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Recycler Input !! Rates&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Processing unit}}  || 0.8/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Advanced circuit}}  || 1.33/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Low density structure}}  || 0.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Steel plate}}  || 0.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Copper plate}}  || 2.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Iron plate}}  || 2.5/s&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* If the recycled item has a fluid ingredient, then the smoke emitted from the recycler matches the fluid in colour.&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
[[File:Fff-375-recycler-freezeframe.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|2.0.7|&lt;br /&gt;
* Introduced in [[Space Age]]{{SA}} expansion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Quality]]{{SA}}&lt;br /&gt;
&lt;br /&gt;
{{ProductionNav}}&lt;br /&gt;
{{C|Producers}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Recycler&amp;diff=203966</id>
		<title>Recycler</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Recycler&amp;diff=203966"/>
		<updated>2024-10-31T08:53:05Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Recycler}}&lt;br /&gt;
{{Stub}}&lt;br /&gt;
{{About/Space age}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;recycler&#039;&#039;&#039; is a building that can convert most items into the ingredients used in their recipes, at the cost of losing 75% of said ingredients. In other words, it performs a lossy reversal of crafting.&lt;br /&gt;
&lt;br /&gt;
It has 4 module slots, but it cannot use [[Productivity module]]s.&lt;br /&gt;
&lt;br /&gt;
== Mechanics ==&lt;br /&gt;
&lt;br /&gt;
When an item enters a recycler, the item&#039;s main recipe is found, and the recycler is automatically set to perform its inverse.&lt;br /&gt;
&lt;br /&gt;
For each type of item used as an ingredient in the recycled item&#039;s main recipe, the number of items returned by the recycler is decided by &amp;lt;code&amp;gt;floor(0.25 * i / o + r) * 100%&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; is the number of items used as ingredients, &amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; is the number of items returned by the recipe, and &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt; is a random number that is greater than or equal to 0 but less than 1. On average, this returns exactly 25% of the items needed to craft one item of the same type as the recycled item. For example, recycling a [[processing unit]] always gives 5 [[electronic circuit]]s while having a 50% chance of returning one [[advanced circuit]].&lt;br /&gt;
&lt;br /&gt;
All fluid ingredients are lost when recycling, as the recycler has no fluid output.[https://www.reddit.com/r/factorio/comments/16d7h82/friday_facts_375_quality/jzpac1z/]&lt;br /&gt;
&lt;br /&gt;
Without quality modules, the resulting items have the same quality as the item being recycled, even if the latter was crafted using lower-quality ingredients. Quality modules can further increase the output&#039;s quality, just like with regular non-recycling recipes.&lt;br /&gt;
&lt;br /&gt;
The recycler has 12 internal slots for its output, but can only hold one stack of each item. The recycler will try to eject the contents of these slots, much like a mining drill. It is therefore not necessary to use an inserter to collect its output.&lt;br /&gt;
&lt;br /&gt;
=== Non-recyclable items ===&lt;br /&gt;
Some items, such as ores, have no recipe, and can therefore not be recycled. There are also some recipes that are irreversible, which include smelting and chemical processes.[https://discord.com/channels/139677590393716737/603392474458882065/1149692470511276152]&lt;br /&gt;
&lt;br /&gt;
When an item with no reversible recipe is &amp;quot;recycled&amp;quot;, then the same item has a 25% chance of being returned, and a 75% chance of being destroyed instead. This can be used to destroy unwanted items, such as byproducts from [[scrap recycling]].&lt;br /&gt;
&lt;br /&gt;
Irreversible recipes include (but may not be limited to:&lt;br /&gt;
* Recipes performed in furnaces or chemical plants&lt;br /&gt;
* Recipes for science packs&lt;br /&gt;
* Recipes for [[uranium fuel cell]]s&lt;br /&gt;
* Recipes for [[biolab]]s or [[captive biter spawner]]s&lt;br /&gt;
* Recipes for spoilable products&lt;br /&gt;
&lt;br /&gt;
=== Scrap recycling ===&lt;br /&gt;
As a special case, recycling [[scrap]] will perform the [[scrap recycling]] recipe, for which there is no inverse, as scrap can not be crafted. This is used to obtain most resources on [[Fulgora]].&lt;br /&gt;
&lt;br /&gt;
=== Stats ===&lt;br /&gt;
Scrap recycling rates:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Input !! Output&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Scrap|space-age=yes}} || &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Processing unit}}  || 2% || 0.05/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Advanced circuit}}  || 3% || 0.08/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Low density structure}}  || 1%  || 0.02/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Solid fuel}}  || 7%  || 0.19/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Steel plate}}  || 4%  || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Concrete}}  || 6%  || 0.16/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Battery}}  || 4%  || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Ice|space-age=yes}}  || 5%  || 0.13/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Stone}}  || 4% || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Holmium ore|space-age=yes}}  || 1%  || 0.02/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Iron gear wheel}}  || 20%  || 0.55/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Copper cable}}  || 3%  || 0.08/s&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Alternatively, the recycler takes in 2.5 scrap/s and spits out 1.47 items/s, meaning 10 recyclers are enough to almost saturate a yellow belt. &amp;lt;br&amp;gt;&lt;br /&gt;
Additionally the recycling times for various items are different from the usual 0.125s. This is not an exhaustive list and is specified in item/s input.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left !important;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Recycler Input !! Rates&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Processing unit}}  || 0.8/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Advanced circuit}}  || 1.33/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Low density structure}}  || 0.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Steel plate}}  || 0.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Copper plate}}  || 2.5/s&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Iron plate}}  || 2.5/s&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* If the recycled item has a fluid ingredient, then the smoke emitted from the recycler matches the fluid in colour.&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
[[File:Fff-375-recycler-freezeframe.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|2.0.7|&lt;br /&gt;
* Introduced in [[Space Age]]{{SA}} expansion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Quality]]{{SA}}&lt;br /&gt;
&lt;br /&gt;
{{ProductionNav}}&lt;br /&gt;
{{C|Producers}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Recycler&amp;diff=203964</id>
		<title>Recycler</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Recycler&amp;diff=203964"/>
		<updated>2024-10-31T08:09:47Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{:Infobox:Recycler}}&lt;br /&gt;
{{Stub}}&lt;br /&gt;
{{About/Space age}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;recycler&#039;&#039;&#039; is a building that can convert most items into the ingredients used in their recipes, at the cost of losing 75% of said ingredients. In other words, it performs a lossy reversal of crafting.&lt;br /&gt;
&lt;br /&gt;
It has 4 module slots, but it cannot use [[Productivity module]]s.&lt;br /&gt;
&lt;br /&gt;
== Mechanics ==&lt;br /&gt;
&lt;br /&gt;
When an item enters a recycler, the item&#039;s main recipe is found, and the recycler is automatically set to perform its inverse.&lt;br /&gt;
&lt;br /&gt;
For each type of item used as an ingredient in the recycled item&#039;s main recipe, the number of items returned by the recycler is decided by &amp;lt;code&amp;gt;floor(0.25 * i / o + r) * 100%&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; is the number of items used as ingredients, &amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; is the number of items returned by the recipe, and &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt; is a random number that is greater than or equal to 0 but less than 1. On average, this returns exactly 25% of the items needed to craft one item of the same type as the recycled item. For example, recycling a [[processing unit]] always gives 5 [[electronic circuit]]s while having a 50% chance of returning one [[advanced circuit]].&lt;br /&gt;
&lt;br /&gt;
All fluid ingredients are lost when recycling, as the recycler has no fluid output.[https://www.reddit.com/r/factorio/comments/16d7h82/friday_facts_375_quality/jzpac1z/]&lt;br /&gt;
&lt;br /&gt;
Without quality modules, the resulting items have the same quality as the item being recycled, even if the latter was crafted using lower-quality ingredients. Quality modules can further increase the output&#039;s quality, just like with regular non-recycling recipes.&lt;br /&gt;
&lt;br /&gt;
The recycler has 12 internal slots for its output, but can only hold one stack of each item. The recycler will try to eject the contents of these slots, much like a mining drill. It is therefore not necessary to use an inserter to collect its output.&lt;br /&gt;
&lt;br /&gt;
=== Non-recyclable items ===&lt;br /&gt;
Some items, such as ores, have no recipe, and can therefore not be recycled. There are also some recipes that are irreversible, which include smelting and chemical processes.[https://discord.com/channels/139677590393716737/603392474458882065/1149692470511276152]&lt;br /&gt;
&lt;br /&gt;
When an item with no reversible recipe is &amp;quot;recycled&amp;quot;, then the same item has a 25% chance of being returned, and a 75% chance of being destroyed instead. This can be used to destroy unwanted items, such as byproducts from [[scrap recycling]].&lt;br /&gt;
&lt;br /&gt;
Irreversible recipes include (but may not be limited to:&lt;br /&gt;
* Recipes performed in furnaces or chemical plants&lt;br /&gt;
* Recipes for science packs&lt;br /&gt;
* Recipes for [[uranium fuel cell]]s&lt;br /&gt;
* Recipes for [[biolab]]s or [[captive biter spawner]]s&lt;br /&gt;
* Recipes for spoilable products&lt;br /&gt;
&lt;br /&gt;
=== Scrap recycling ===&lt;br /&gt;
As a special case, recycling [[scrap]] will perform the [[scrap recycling]] recipe, for which there is no inverse, as scrap can not be crafted. This is used to obtain most resources on [[Fulgora]].&lt;br /&gt;
&lt;br /&gt;
=== Stats ===&lt;br /&gt;
Scrap recycling rates:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Input !! Output&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Scrap|space-age=yes}} || &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Processing unit}}  || 2% || 0.05/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Advanced circuit}}  || 3% || 0.08/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Low density structure}}  || 1%  || 0.02/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Solid fuel}}  || 7%  || 0.19/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Steel plate}}  || 4%  || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Concrete}}  || 6%  || 0.16/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Battery}}  || 4%  || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Ice|space-age=yes}}  || 5%  || 0.13/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Stone}}  || 4% || 0.11/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Holmium ore|space-age=yes}}  || 1%  || 0.02/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Iron gear wheel}}  || 20%  || 0.55/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Copper cable}}  || 3%  || 0.08/s&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Alternatively, the recycler takes in 2.5 scrap/s and spits out 1.47 items/s, meaning 10 recyclers are enough to almost saturate a yellow belt. &amp;lt;br&amp;gt;&lt;br /&gt;
Additionally the recycling times for various items are different from the usual 0.125s. This is not an exhaustive list and is specified in item/s input.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left !important;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Recycler Input !! Rates&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Processing unit}}  || 0.8/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Advanced circuit}}  || 1.33/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Low density structure}}  || 0.5/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Steel plate}}  || 0.5/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Copper plate}}  || 2.5/s&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left !important;&amp;quot; | {{Imagelink|Iron plate}}  || 2.5/s&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
* If the recycled item has a fluid ingredient, then the smoke emitted from the recycler matches the fluid in colour.&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
[[File:Fff-375-recycler-freezeframe.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{history|2.0.7|&lt;br /&gt;
* Introduced in [[Space Age]]{{SA}} expansion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Quality]]{{SA}}&lt;br /&gt;
&lt;br /&gt;
{{ProductionNav}}&lt;br /&gt;
{{C|Producers}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203935</id>
		<title>Template:Quality</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203935"/>
		<updated>2024-10-30T21:05:47Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: restored previous version as bug occurred in a different Template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;{{{1}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_uncommon.png |12px|link=Quality{{If language suffix}}]]{{{2}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_rare.png     |12px|link=Quality{{If language suffix}}]]{{{3}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_epic.png     |12px|link=Quality{{If language suffix}}]]{{{4}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_legendary.png|12px|link=Quality{{If language suffix}}]]{{{5}}}&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Type&amp;diff=203934</id>
		<title>Template:Type</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Type&amp;diff=203934"/>
		<updated>2024-10-30T21:00:25Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: potential bugfix for Infobox rows that use the Quality template v3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#switch:{{lc:{{#explode:{{{1}}}| |-1}}}}&lt;br /&gt;
| burner = {{#sub:{{{1}}}|0|-{{#len:{{#explode:{{{1}}}| |-1}}}}}} ([[Fuel{{If language suffix}}|{{Translation|burner}}]])&lt;br /&gt;
| electric = {{#sub:{{{1}}}|0|-{{#len:{{#explode:{{{1}}}| |-1}}}}}} ([[Electric system{{If language suffix}}|{{Translation|electric}}]])&lt;br /&gt;
| explosion | explosive = {{#sub:{{{1}}}|0|-{{#len:{{#explode:{{{1}}}| |-1}}}}}} ([[Damage{{If language suffix}}|explosive]])&lt;br /&gt;
| physical = {{#sub:{{{1}}}|0|-{{#len:{{#explode:{{{1}}}| |-1}}}}}} ([[Damage{{If language suffix}}|physical]])&lt;br /&gt;
| poison = {{#sub:{{{1}}}|0|-{{#len:{{#explode:{{{1}}}| |-1}}}}}}/s ([[Damage{{If language suffix}}|poison]])&lt;br /&gt;
| laser = {{#sub:{{{1}}}|0|-{{#len:{{#explode:{{{1}}}| |-1}}}}}}([[Damage{{If language suffix}}|laser]])&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Type&amp;diff=203933</id>
		<title>Template:Type</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Type&amp;diff=203933"/>
		<updated>2024-10-30T20:57:07Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: Undo revision 203932 by Untitled7 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#explode:{{{1}}}| |0}} {{#explode:{{{1}}}| |1}} {{#switch:{{lc:{{#explode:{{{1}}}| |-1}}}}&lt;br /&gt;
| burner = ([[Fuel{{If language suffix}}|{{Translation|burner}}]])&lt;br /&gt;
| electric = ([[Electric system{{If language suffix}}|{{Translation|electric}}]])&lt;br /&gt;
| explosion | explosive = ([[Damage{{If language suffix}}|explosive]])&lt;br /&gt;
| physical = ([[Damage{{If language suffix}}|physical]])&lt;br /&gt;
| poison = /s ([[Damage{{If language suffix}}|poison]])&lt;br /&gt;
| laser = ([[Damage{{If language suffix}}|laser]])&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Type&amp;diff=203932</id>
		<title>Template:Type</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Type&amp;diff=203932"/>
		<updated>2024-10-30T20:56:33Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: potential bugfix for Infobox rows that use the Quality template v2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#vardefine|unit|{{lc:{{#explode:{{{1}}}| |-1}}}}}}{{#replace:{{{1}}}|{{#switch:{{#var:unit}}|&amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;}} {{#switch:{{#var:unit}}&lt;br /&gt;
| burner = ([[Fuel{{If language suffix}}|{{Translation|burner}}]])&lt;br /&gt;
| electric = ([[Electric system{{If language suffix}}|{{Translation|electric}}]])&lt;br /&gt;
| explosion | explosive = ([[Damage{{If language suffix}}|explosive]])&lt;br /&gt;
| physical = ([[Damage{{If language suffix}}|physical]])&lt;br /&gt;
| poison = /s ([[Damage{{If language suffix}}|poison]])&lt;br /&gt;
| laser = ([[Damage{{If language suffix}}|laser]])&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Type&amp;diff=203931</id>
		<title>Template:Type</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Type&amp;diff=203931"/>
		<updated>2024-10-30T20:52:08Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: potential bugfix for Infobox rows that use the Quality template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#explode:{{{1}}}| |0}} {{#explode:{{{1}}}| |1}} {{#switch:{{lc:{{#explode:{{{1}}}| |-1}}}}&lt;br /&gt;
| burner = ([[Fuel{{If language suffix}}|{{Translation|burner}}]])&lt;br /&gt;
| electric = ([[Electric system{{If language suffix}}|{{Translation|electric}}]])&lt;br /&gt;
| explosion | explosive = ([[Damage{{If language suffix}}|explosive]])&lt;br /&gt;
| physical = ([[Damage{{If language suffix}}|physical]])&lt;br /&gt;
| poison = /s ([[Damage{{If language suffix}}|poison]])&lt;br /&gt;
| laser = ([[Damage{{If language suffix}}|laser]])&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203930</id>
		<title>Template:Quality</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203930"/>
		<updated>2024-10-30T20:46:09Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: another test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;{{{1}}}&amp;lt;/span&amp;gt;｜&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[[File:quality_uncommon.png|12px|link=Quality{{If language suffix}}]]{{{2}}}&amp;lt;/span&amp;gt;｜&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[[File:quality_rare.png|12px|link=Quality{{If language suffix}}]]{{{3}}}&amp;lt;/span&amp;gt;｜&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[[File:quality_epic.png|12px|link=Quality{{If language suffix}}]]{{{4}}}&amp;lt;/span&amp;gt;｜&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[[File:quality_legendary.png|12px|link=Quality{{If language suffix}}]]{{{5}}}&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203929</id>
		<title>Template:Quality</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203929"/>
		<updated>2024-10-30T20:44:41Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: reverted previous and removed all whitespace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;{{{1}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[[File:quality_uncommon.png|12px|link=Quality{{If language suffix}}]]{{{2}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[[File:quality_rare.png|12px|link=Quality{{If language suffix}}]]{{{3}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[[File:quality_epic.png|12px|link=Quality{{If language suffix}}]]{{{4}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;[[File:quality_legendary.png|12px|link=Quality{{If language suffix}}]]{{{5}}}&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203926</id>
		<title>Template:Quality</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203926"/>
		<updated>2024-10-30T20:39:51Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: test with different unicode character for vertical bar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;{{{1}}}&amp;lt;/span&amp;gt;｜&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_uncommon.png |12px|link=Quality{{If language suffix}}]]{{{2}}}&amp;lt;/span&amp;gt;｜&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_rare.png     |12px|link=Quality{{If language suffix}}]]{{{3}}}&amp;lt;/span&amp;gt;｜&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_epic.png     |12px|link=Quality{{If language suffix}}]]{{{4}}}&amp;lt;/span&amp;gt;｜&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_legendary.png|12px|link=Quality{{If language suffix}}]]{{{5}}}&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Space-Age-logo.png&amp;diff=203858</id>
		<title>File:Space-Age-logo.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Space-Age-logo.png&amp;diff=203858"/>
		<updated>2024-10-30T09:42:52Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Promotional Material}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Promotional Material}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Factorio-Space-Age-logo.png&amp;diff=203857</id>
		<title>File:Factorio-Space-Age-logo.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Factorio-Space-Age-logo.png&amp;diff=203857"/>
		<updated>2024-10-30T09:42:08Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: {{Promotional Material}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
{{Promotional Material}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203729</id>
		<title>Template:Quality</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Template:Quality&amp;diff=203729"/>
		<updated>2024-10-29T08:40:33Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: stopped the unit from wrapping without the corresponding quality icon&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;{{{1}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_uncommon.png |12px|link=Quality{{If language suffix}}]]{{{2}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_rare.png     |12px|link=Quality{{If language suffix}}]]{{{3}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_epic.png     |12px|link=Quality{{If language suffix}}]]{{{4}}}&amp;lt;/span&amp;gt; | &amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;span style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;[[File:quality_legendary.png|12px|link=Quality{{If language suffix}}]]{{{5}}}&amp;lt;/span&amp;gt;&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Untitled7/common.css&amp;diff=203446</id>
		<title>User:Untitled7/common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Untitled7/common.css&amp;diff=203446"/>
		<updated>2024-10-27T20:40:45Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.advanced-tooltip {&lt;br /&gt;
  position:relative;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.advanced-tooltip--content {&lt;br /&gt;
  display:none;&lt;br /&gt;
  position:absolute;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.advanced-tooltip:hover .advanced-tooltip--content {&lt;br /&gt;
  display:unset;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.factorio-quality-tooltip {    &lt;br /&gt;
    z-index: 1;&lt;br /&gt;
    border: 3px solid;&lt;br /&gt;
    border-color: #3E3E3E #141414 #0B0B0B #141414;&lt;br /&gt;
    box-shadow: 0px 0px 3px rgba(0,0,0,0.75);&lt;br /&gt;
    padding: 0 0.5em 0 0.75em;&lt;br /&gt;
    background: rgba(31,30,31,0.75);&lt;br /&gt;
    font-size: 0.8em;&lt;br /&gt;
    backdrop-filter: blur(4px)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.factorio-quality-tooltip tr td {&lt;br /&gt;
    border: 0 !important;&lt;br /&gt;
    text-align: left !important;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Untitled7&amp;diff=203412</id>
		<title>User:Untitled7</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Untitled7&amp;diff=203412"/>
		<updated>2024-10-27T15:19:05Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|prototype-type = armor&lt;br /&gt;
|internal-name = power-armor&lt;br /&gt;
|category = Combat&lt;br /&gt;
|image = player_armor_type2.png&lt;br /&gt;
|resistance={{Translation|Acid}}: 0/60%&amp;lt;br&amp;gt;{{Translation|Explosion}}: 40/40%&amp;lt;br&amp;gt;{{Translation|Fire}}: 0/60%&amp;lt;br&amp;gt;{{Translation|Physical}}: 8/30%&lt;br /&gt;
|inventory-size-bonus=&amp;lt;span class=&amp;quot;advanced-tooltip &amp;quot;&amp;gt;20 &amp;lt;span class=&amp;quot;factorio-quality-diamond&amp;quot;&amp;gt;♦&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;advanced-tooltip--content&amp;quot; &lt;br /&gt;
    data-desc=&amp;quot;Increases the inventory size bonus at higher qualities.&amp;quot; &lt;br /&gt;
    data-normal=&amp;quot;20&amp;quot;&lt;br /&gt;
    data-uncommon=&amp;quot;26&amp;quot;&lt;br /&gt;
    data-rare=&amp;quot;32&amp;quot;&lt;br /&gt;
    data-epic=&amp;quot;38&amp;quot;&lt;br /&gt;
    data-legendary=&amp;quot;50&amp;quot;&lt;br /&gt;
    &amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
|stack-size=1&lt;br /&gt;
|grid-size=&amp;lt;span class=&amp;quot;advanced-tooltip &amp;quot;&amp;gt;6x8 &amp;lt;span class=&amp;quot;factorio-quality-diamond&amp;quot;&amp;gt;♦&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;advanced-tooltip--content&amp;quot; &lt;br /&gt;
    data-desc=&amp;quot;Increases the grid size at higher qualities.&amp;quot; &lt;br /&gt;
    data-normal=&amp;quot;6x8&amp;quot;&lt;br /&gt;
    data-uncommon=&amp;quot;7x9&amp;quot;&lt;br /&gt;
    data-rare=&amp;quot;8x10&amp;quot;&lt;br /&gt;
    data-epic=&amp;quot;9x11&amp;quot;&lt;br /&gt;
    data-legendary=&amp;quot;10x13&amp;quot;&lt;br /&gt;
    &amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
|durability = {{Translation|Infinite}}&lt;br /&gt;
|equipment = Portable solar panel + Portable fusion reactor + Energy shield + Energy shield MK2 + Personal battery + Personal battery MK2 + Personal laser defense + Discharge defense + Exoskeleton + Personal roboport + Personal roboport MK2 + Nightvision + Belt immunity equipment&lt;br /&gt;
|recipe = Time, 20 + Electric engine unit, 20 + Processing unit, 40 + Steel plate, 40&lt;br /&gt;
|required-technologies=Power armor&lt;br /&gt;
|producers = Assembling machine + Player&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Untitled7/common.css&amp;diff=203411</id>
		<title>User:Untitled7/common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Untitled7/common.css&amp;diff=203411"/>
		<updated>2024-10-27T15:11:22Z</updated>

		<summary type="html">&lt;p&gt;Untitled7: Created page with &amp;quot;.advanced-tooltip {   position:relative; }  .advanced-tooltip--content {   display:none;   position:absolute; }  .advanced-tooltip:hover .advanced-tooltip--content {   display:unset; }  .factorio-quality-tooltip {         z-index: 1;     border: 3px solid;     border-color: #3E3E3E #141414 #0B0B0B #141414;     box-shadow: 0px 0px 3px rgba(0,0,0,0.75);     padding: 0 0.5em 0 0.75em;     background: rgba(31,30,31,0.75);     font-size: 0.8em;     backdrop-filter: blur(4px)...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.advanced-tooltip {&lt;br /&gt;
  position:relative;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.advanced-tooltip--content {&lt;br /&gt;
  display:none;&lt;br /&gt;
  position:absolute;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.advanced-tooltip:hover .advanced-tooltip--content {&lt;br /&gt;
  display:unset;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.factorio-quality-tooltip {    &lt;br /&gt;
    z-index: 1;&lt;br /&gt;
    border: 3px solid;&lt;br /&gt;
    border-color: #3E3E3E #141414 #0B0B0B #141414;&lt;br /&gt;
    box-shadow: 0px 0px 3px rgba(0,0,0,0.75);&lt;br /&gt;
    padding: 0 0.5em 0 0.75em;&lt;br /&gt;
    background: rgba(31,30,31,0.75);&lt;br /&gt;
    font-size: 0.8em;&lt;br /&gt;
    backdrop-filter: blur(4px)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.factorio-quality-tooltip tr td {&lt;br /&gt;
    border: 0 !important;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Untitled7</name></author>
	</entry>
</feed>