<?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=Kcsixgap</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=Kcsixgap"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/Kcsixgap"/>
	<updated>2026-04-23T15:43:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Enemies/zh&amp;diff=173963</id>
		<title>Enemies/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Enemies/zh&amp;diff=173963"/>
		<updated>2019-06-19T00:54:43Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: /* 进化 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{Stub/zh}}&lt;br /&gt;
&#039;&#039;&#039;敌对生物&#039;&#039;&#039;就是想要来干（危害）玩家的生物。敌对生物分为三种：食人虫，喷吐虫和沙虫。每种敌对生物都有三个成长阶段。 &lt;br /&gt;
&lt;br /&gt;
==生物==&lt;br /&gt;
===食人虫===&lt;br /&gt;
食人虫是两种主要的敌人之一。它们是外星世界的原住民，不会与喷吐虫和沙虫打架。食人虫是节肢动物，生活在虫巢中。它们有三种尺寸：小，中，大。在自由模式开局时，只会生成小的。但是随着[[pollution/zh|污染]]的增加，它们的等级会提升。这与 [[evolution|进化]]有关系。&lt;br /&gt;
食人虫会被污染所吸引与激怒，因此它们会试图摧毁污染源。它们在看到玩家,[[turret/zh|防御塔]]以及[[logistic robot/zh|物流机器人]]时，会转而攻击他们。&lt;br /&gt;
食人虫会给玩家造成身体伤害。&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! 图片 !! 名字 !! 资料&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small biter.png]] || 小型食人虫&lt;br /&gt;
| 最弱的食人虫，能被手枪轻松击杀。&lt;br /&gt;
* 生命值: 15&lt;br /&gt;
* 伤害：6&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium biter.png]] || 中型食人虫&lt;br /&gt;
| 比小型食人虫更肉也更慢。它们可能造成一些问题，有时它们甚至可以击杀弱小的玩家。&lt;br /&gt;
* 生命值: 75&lt;br /&gt;
* 伤害: 15&lt;br /&gt;
&lt;br /&gt;
防御:&lt;br /&gt;
*爆炸免疫 0/10%&lt;br /&gt;
*物理免疫 4/0%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big biter.png]] || 大型食人虫&lt;br /&gt;
| 很肉, 几乎对枪击无敌。他们几乎能直接破墙并攻击其后的东西。&lt;br /&gt;
* 生命值: 375&lt;br /&gt;
* 伤害: 30&lt;br /&gt;
&lt;br /&gt;
防御:&lt;br /&gt;
*爆炸免疫 0/10%&lt;br /&gt;
*物理免疫 8/0%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth biter.png]] || 巨型食人虫&lt;br /&gt;
| 很肉, 几乎对枪击无敌。他们几乎能直接破墙并攻击其后的东西。&lt;br /&gt;
* 生命值: 5000&lt;br /&gt;
* 伤害: 100&lt;br /&gt;
&lt;br /&gt;
防御:&lt;br /&gt;
*爆炸免疫 10/20%&lt;br /&gt;
*物理免疫 8/20%&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====战斗====&lt;br /&gt;
食人虫是对玩家工厂最常见的威胁。虽然他们的每次攻击都足以摧毁不设防的工厂，但大多数玩家能够在于小型食人虫的战斗中占据上风。它们也能被一定数量的防御塔阻挡。&lt;br /&gt;
&lt;br /&gt;
污染会引起食人虫攻击，高污染工厂会更早地受到攻击。一旦污染范围达到了虫巢，玩家就能预见食人虫就会在很短的时间内出现。虫群会致力于摧毁污染源。但当遇见更有诱惑力的目标（玩家与防御塔）时，它们也会改变进攻计划。食人虫也有在防御圈上趁虚而入的能力。这一特性能部分用于控制食人虫的路径，使得防御塔有更长的攻击时间，但这个陷阱需要&amp;quot;诱饵&amp;quot;。 食人虫们不总会掉到圈套里。一些“聪明的”虫子会看透陷阱，并直接攻击你的墙。这会使你的陷阱失效，也使得食人虫们更加危险。&lt;br /&gt;
&lt;br /&gt;
===喷吐虫===&lt;br /&gt;
除了它们的外表，喷吐虫与食人虫很像。它们唯一的不同点是攻击地点不等。他们会向所有对手(例如：玩家)喷吐不可闪避与被转移目标的酸球。通常，建筑物(例如[[turret/zh|炮塔]]与[[armor/zh|护甲]])的酸液防御能力要比物理防御能力低得多，因此喷吐虫造成的平均伤害会比食人虫高。除了它们的血量与防御不同，它们的大小与行为与对应的食人虫很像。&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! 图片 !! 名字 !! 信息&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small spitter.png]] || 小型喷吐虫&lt;br /&gt;
| 最弱的喷吐虫。能在其射程外轻松被任何一种武器轻松击杀。&lt;br /&gt;
* 生命值: 10&lt;br /&gt;
* 伤害：10&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium spitter.png]] || 中型喷吐虫&lt;br /&gt;
| 比小喷吐虫更慢也更肉了。它们可能造成一些问题，有时它们甚至可以击杀弱小的玩家。远程攻击，使得它对[[turret/zh|防御塔]]十分危险。&lt;br /&gt;
* 生命值: 50&lt;br /&gt;
* 伤害：20&lt;br /&gt;
&lt;br /&gt;
防御:&lt;br /&gt;
*爆炸免疫 0/10%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big spitter.png]] || 大型喷吐虫&lt;br /&gt;
| 它是次大的喷吐虫，也能造成次大的伤害。远程攻击使得它对[[turret/zh|防御塔]]以及玩家造成了巨大的威胁。&lt;br /&gt;
* 生命值: 200&lt;br /&gt;
* 伤害：30&lt;br /&gt;
&lt;br /&gt;
防御:&lt;br /&gt;
*爆炸免疫 0/30%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Behemoth spitter.png]] || 巨型喷吐虫&lt;br /&gt;
| 它是最大的喷吐虫，也能造成最大的伤害。远程攻击使得它对[[turret/zh|防御塔]]以及玩家造成了巨大的威胁。&lt;br /&gt;
* 生命值: 2000&lt;br /&gt;
* 伤害: 50&lt;br /&gt;
&lt;br /&gt;
防御:&lt;br /&gt;
*爆炸免疫 0/35%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===沙虫=== &lt;br /&gt;
沙虫是一种自然的攻击性动物。如果你离它足够近，他会喷出东西来杀死你。 他们像静态的 [[turret|炮塔]] 且不会跟随你, 但是攻击范围比其他虫子大得多。在离开巢穴时会造成伤害。 但不管怎么说，因为它们是静态的，所以使得他们更容易遭受攻击。&lt;br /&gt;
&lt;br /&gt;
跟别的虫子一样，沙虫也有3种大小，它们的攻击力随着大小的增加而增加。 不像食人虫和喷吐虫, 大型或中型的沙虫可以直接地被生成于创建世界之时, 而且不是在虫巢生成的. 它们的表现不会根据时间的变化而变化. (具体请查看 http://www.factorioforums.com/forum/viewtopic.php?f=23&amp;amp;t=6454)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! 图片 !! 名字 !! 信息&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Small worm.png]] || 小型沙虫&lt;br /&gt;
| 非常菜鸡的沙虫，但还是不太容易被搞死。&lt;br /&gt;
* 生命值: 200&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Medium worm.png]] || 中型沙虫&lt;br /&gt;
| 中型沙虫非常危险，甚至可以对相对经过更长时间磨炼的玩家造成伤害，应该小心对待它们。&lt;br /&gt;
* 生命值: 350&lt;br /&gt;
&lt;br /&gt;
防御:&lt;br /&gt;
*爆炸免疫: 5/15%&lt;br /&gt;
*物理免疫: 4/0%&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Big worm.png]] || 大型沙虫&lt;br /&gt;
| 大型沙虫是Factorio中最强的生物了。它们可以造成很高的伤害,不是那么容易被普通武器造成伤害。&lt;br /&gt;
* 生命值: 500&lt;br /&gt;
&lt;br /&gt;
防御:&lt;br /&gt;
*爆炸免疫: 10/30%&lt;br /&gt;
*物理免疫: 8/0%&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Picture !! Name&lt;br /&gt;
|-&lt;br /&gt;
| [[File:worm.gif]] || 沙虫动画&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==巢穴==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! 图片 !! 名字&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Biter nest.png]] || 食人虫巢穴&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Spitter nest.png]] || 喷吐虫巢穴&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===进化===&lt;br /&gt;
进化因子是游戏的全局设定之一，它决定了会生成什么样的虫子。 你可以在调试控制台查看这个变量:&lt;br /&gt;
 game.player.print(game.evolutionfactor)&lt;br /&gt;
&lt;br /&gt;
它从0开始 (根本不进化) to 1 (最大进化). 目前进化因素只能增加。这一演变因素增加了三种事件：&lt;br /&gt;
&lt;br /&gt;
* 时间的流逝稍微增加了进化因素。&lt;br /&gt;
* 污染的产生（全局）增加了进化因素。&lt;br /&gt;
* 攻击虫子会产生很大的进化因素。&lt;br /&gt;
&lt;br /&gt;
这些值都在地图设定中。它们也可以被改变或被mod改变。&lt;br /&gt;
&lt;br /&gt;
这些是默认进化设置:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!进化来源&lt;br /&gt;
!在&amp;lt;code&amp;gt;enemy_evolution&amp;lt;/code&amp;gt;的变量&lt;br /&gt;
!增长百分比&lt;br /&gt;
|-&lt;br /&gt;
| [[Game-second|每秒]] || &amp;lt;code&amp;gt;time_factor&amp;lt;/code&amp;gt; || 0.0004%&lt;br /&gt;
|-&lt;br /&gt;
| 1000个污染单元 || &amp;lt;code&amp;gt;pollution_factor&amp;lt;/code&amp;gt; || 0.0015%&lt;br /&gt;
|-&lt;br /&gt;
| 摧毁一个虫巢 || &amp;lt;code&amp;gt;destroy_factor&amp;lt;/code&amp;gt; || 0.2%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Pollution production is the total pollution produced by [[Pollution_Production#Polluters|buildings]] per tick, not the pollution spreading on the map, so it is not reduced by trees or other absorbers.&lt;br /&gt;
e.g. : 15 burner mining drills produce 150 pollution per second, raising the evolution factor by 0,00000225 per tick.&lt;br /&gt;
&lt;br /&gt;
The percentages are applied on the base of &amp;lt;code&amp;gt;1 - current_evolution_factor&amp;lt;/code&amp;gt;. So for instance destroying enemy spawners in the beginning of the game results in increase of evolution factor by 0.005 (half a percent) while doing this when the evolution factor is 0.5 the increase is only 0.0025 (quarter a percent).&lt;br /&gt;
&lt;br /&gt;
Besides choosing what kind of biter will be spawned the evolution also influences the spawning interval. This interval (&amp;lt;code&amp;gt;spawning_cooldown&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;enemy-spawner&amp;lt;/code&amp;gt; definition) is interpolated between 360 (0 evolution) and 150 (1 evolution) ticks.&lt;br /&gt;
&lt;br /&gt;
=== Spawn chances by evolution factor ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float:left; margin-right:1em; width:15em&amp;quot;&lt;br /&gt;
! !!colspan=&amp;quot;4&amp;quot;| Biter&#039;s Nest&lt;br /&gt;
|-&lt;br /&gt;
! Factor&lt;br /&gt;
! Small Biter&lt;br /&gt;
! Medium Biter&lt;br /&gt;
! Big Biter&lt;br /&gt;
! Behemoth Biter&lt;br /&gt;
|-&lt;br /&gt;
|0%||100%|| || || &lt;br /&gt;
|-&lt;br /&gt;
|5%||100%|| || || &lt;br /&gt;
|-&lt;br /&gt;
|10%||100%|| || || &lt;br /&gt;
|-&lt;br /&gt;
|15%||100%|| || || &lt;br /&gt;
|-&lt;br /&gt;
|20%||100%|| || || &lt;br /&gt;
|-&lt;br /&gt;
|25%||82%||18%|| || &lt;br /&gt;
|-&lt;br /&gt;
|30%||67%||33%|| || &lt;br /&gt;
|-&lt;br /&gt;
|35%||53%||47%|| || &lt;br /&gt;
|-&lt;br /&gt;
|40%||40%||60%|| || &lt;br /&gt;
|-&lt;br /&gt;
|45%||29%||71%|| || &lt;br /&gt;
|-&lt;br /&gt;
|50%||18%||82%|| || &lt;br /&gt;
|-&lt;br /&gt;
|55%||8%||80%||12%|| &lt;br /&gt;
|-&lt;br /&gt;
|60%|| ||79%||21%|| &lt;br /&gt;
|-&lt;br /&gt;
|65%|| ||63%||37%|| &lt;br /&gt;
|-&lt;br /&gt;
|70%|| ||38%||62%|| &lt;br /&gt;
|-&lt;br /&gt;
|75%|| ||33%||67%|| &lt;br /&gt;
|-&lt;br /&gt;
|80%|| ||29%||71%|| &lt;br /&gt;
|-&lt;br /&gt;
|85%|| ||26%||74%|| &lt;br /&gt;
|-&lt;br /&gt;
|90%|| ||24%||76%|| &lt;br /&gt;
|-&lt;br /&gt;
|95%|| ||16%||59%||25%&lt;br /&gt;
|-&lt;br /&gt;
|100%|| ||13%||50%||37%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:20em&amp;quot;&lt;br /&gt;
! !!colspan=&amp;quot;5&amp;quot;| Spitter&#039;s Nest&lt;br /&gt;
|-&lt;br /&gt;
! Factor&lt;br /&gt;
! Small Biter&lt;br /&gt;
! Small Spitter&lt;br /&gt;
! Medium Spitter&lt;br /&gt;
! Big Spitter&lt;br /&gt;
! Behemoth Spitter&lt;br /&gt;
|-&lt;br /&gt;
|0%||100%|| || || || &lt;br /&gt;
|-&lt;br /&gt;
|5%||100%|| || || || &lt;br /&gt;
|-&lt;br /&gt;
|10%||100%|| || || || &lt;br /&gt;
|-&lt;br /&gt;
|15%||100%|| || || || &lt;br /&gt;
|-&lt;br /&gt;
|20%||100%|| || || || &lt;br /&gt;
|-&lt;br /&gt;
|25%||100%|| || || || &lt;br /&gt;
|-&lt;br /&gt;
|30%||42%||58%|| || || &lt;br /&gt;
|-&lt;br /&gt;
|35%|| ||100%|| || || &lt;br /&gt;
|-&lt;br /&gt;
|40%|| ||100%|| || || &lt;br /&gt;
|-&lt;br /&gt;
|45%|| ||83%||17%|| || &lt;br /&gt;
|-&lt;br /&gt;
|50%|| ||75%||25%|| || &lt;br /&gt;
|-&lt;br /&gt;
|55%|| ||54%||36%||10%|| &lt;br /&gt;
|-&lt;br /&gt;
|60%|| ||35%||47%||19%|| &lt;br /&gt;
|-&lt;br /&gt;
|65%|| ||17%||56%||27%|| &lt;br /&gt;
|-&lt;br /&gt;
|70%|| || ||65%||35%|| &lt;br /&gt;
|-&lt;br /&gt;
|75%|| || ||56%||44%|| &lt;br /&gt;
|-&lt;br /&gt;
|80%|| || ||45%||55%|| &lt;br /&gt;
|-&lt;br /&gt;
|85%|| || ||35%||65%|| &lt;br /&gt;
|-&lt;br /&gt;
|90%|| || ||24%||76%|| &lt;br /&gt;
|-&lt;br /&gt;
|95%|| || ||16%||59%||25%&lt;br /&gt;
|-&lt;br /&gt;
|100%|| || ||13%||50%||37%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Expansions===&lt;br /&gt;
Sometimes a small group of biters will leave their base to create a new base. This group will search for a suitable spot that&#039;s about 3 chunks away from existing biter bases and 3 chunks away from any of your buildings. &lt;br /&gt;
Once they have found a suitable spot the group of biters dies and forms a new base. This new base will first be very small (about one spawner and a few worms) but will get some additional spawners within a small area as time passes. This base-wide expansion is somehow limited (the blog says something about 7, but that doesn&#039;t seem to match reality in some cases).&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Stack/zh&amp;diff=163975</id>
		<title>Stack/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Stack/zh&amp;diff=163975"/>
		<updated>2018-08-25T17:51:41Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
堆是异星工厂储存[[Items/zh|物品]]的基本单元。&lt;br /&gt;
&lt;br /&gt;
不要把堆叠和能量装甲插槽或者其他的插件插槽搞混了（并且计划插入给车辆或其他设备）！&lt;br /&gt;
&lt;br /&gt;
== 堆叠的用途 ==&lt;br /&gt;
&lt;br /&gt;
几乎所有的设备都有堆叠空间，可以用来堆放物品。堆叠空间也存在于一些其他（不需要等太久的）地方。全部插槽列表：&lt;br /&gt;
&lt;br /&gt;
* 玩家堆叠空间&lt;br /&gt;
** 背包堆叠空间&lt;br /&gt;
** [[Toolbelt/zh|工具腰带]]（或快捷栏）&lt;br /&gt;
** 工具，装甲，武器和军火堆叠空间&lt;br /&gt;
** 玩家的手（也是堆叠空间）&lt;br /&gt;
* [[Vehicle/zh|车辆]]也包含了一些放置[[Fuel/zh|燃料]]的堆叠空间&lt;br /&gt;
** [[Car/zh|汽车]]（包含了游戏中最多的堆叠空间）&lt;br /&gt;
** [[Train/zh|火车]]（货运车厢和内燃机车）&lt;br /&gt;
* [[Chests/zh|箱子]]：堆叠空间的最好的例子。基本上来说，箱子就是一组堆叠空间。&lt;br /&gt;
* 设备&lt;br /&gt;
** [[Furnace/zh|熔炉]]：烧燃料的，进来和出去的堆叠空间&lt;br /&gt;
** [[Assembly/zh|制造机]]和[[Chemical plant/zh|化工厂]]：有一些进来和出去的堆叠空间，这基于制造的物品的种类&lt;br /&gt;
** [[Lab/zh|研究中心]]&lt;br /&gt;
** 烧燃料的：[[Boiler/zh|锅炉]]，[[Burner mining drill/zh|热能采掘机]]，[[Burner inserter/zh|热能机械臂]]&lt;br /&gt;
** 机器人指挥中心（只有机器人和维修包）&lt;br /&gt;
** 机枪炮塔&lt;br /&gt;
* 特别的东西&lt;br /&gt;
** 机械臂和机器人（它们有一些受限的堆叠空间，参见堆叠空间加成），所以它们也能在堆叠空间之间一次运输多个物品。&lt;br /&gt;
&lt;br /&gt;
== 如何工作？==&lt;br /&gt;
&lt;br /&gt;
一个堆叠空间可以存储相同数量的物品。&lt;br /&gt;
&lt;br /&gt;
第一个插入的物品决定了可以存储哪种类型的物品。&lt;br /&gt;
&lt;br /&gt;
同时也决定了，可以存储多少物品（每堆的数量是由它的“尺寸”来决定的）。参见下边的内容。&lt;br /&gt;
&lt;br /&gt;
只有物品可以被存储；你不能把一辆汽车——所有堆叠空间都塞满了——放到一个堆叠空间里面。如果要这么做，汽车的堆叠空间必须是空的。箱子也是一样的（直到v0.9版拆除一个装满的箱子时，如果你的背包里面没有足够的堆叠空间，就会导致“箱子爆炸”）。&lt;br /&gt;
&lt;br /&gt;
=== 堆叠大小 ===&lt;br /&gt;
&lt;br /&gt;
堆叠的容量，就是一个堆叠能够存储多少的物品，这取决于物品的种类。一个石油精炼厂使用一个堆叠空间，但是你可以存储500个外星核心在一个堆叠空间中。&lt;br /&gt;
&lt;br /&gt;
=== 堆叠过滤 ===&lt;br /&gt;
&lt;br /&gt;
堆叠也有种类限制的，不管是默认的（锅炉/熔炉，或是机器人平台）或是为货运车箱或工具腰带手动的设置的（默认是用鼠标中键，参见[[Keyboard bindings/zh|按键绑定]]）。&lt;br /&gt;
&lt;br /&gt;
=== 损坏的物品 ===&lt;br /&gt;
&lt;br /&gt;
当前版本中当你有两个不同损坏程度的石墙，它们被认为是两个不同的物品，并且会被存储在两个不同的堆叠空间中。&lt;br /&gt;
&lt;br /&gt;
=== 实际上呢？===&lt;br /&gt;
&lt;br /&gt;
堆叠空间是高科技的超空间科技：插入的物品被超空间能量传输走，这种方式传输的物品要取回也是很容易的。所以堆叠空间也可以压缩物品，实际上是在游戏中被压缩（同时也在你电脑的内存中被压缩）。&lt;br /&gt;
&lt;br /&gt;
为什么一个堆叠空间可以压缩那么多的物品，这是一个异星工厂未解之谜，但是显然这是一种高科技。这种超高科技的基础已经被幼儿园的孩子学会了，当他们必须收拾自己的玩具的时候就会使用这种技术。&lt;br /&gt;
&lt;br /&gt;
== 堆叠空间大小增益 ==&lt;br /&gt;
&lt;br /&gt;
* [[Inserter capacity bonus (research)/zh|机械臂搬运量加成]],&lt;br /&gt;
* [[Worker robot cargo size (research)/zh|物流机器人储存空间]]&lt;br /&gt;
&lt;br /&gt;
== 机械臂限制 ==&lt;br /&gt;
&lt;br /&gt;
* [[Inserters/zh#抓取限制|当达到限制数量时机械臂不会继续填充堆叠空间]]&lt;br /&gt;
&lt;br /&gt;
== 堆叠限制 ==&lt;br /&gt;
&lt;br /&gt;
某些设备的堆叠空间的数量，[[Inserters/zh|机械臂]]或者[[Logistic robot/zh|物流机器人]]可以将物品插入限制区域。&lt;br /&gt;
&lt;br /&gt;
在大多数情况下，这常用来限制能够储存的物品的数量。这是有用的，如果你想要存储一些物品，但又不能填充满一整个箱子，它可以被有红绿线系统的智能机械臂的组合或物流网络所代替的。&lt;br /&gt;
&lt;br /&gt;
一个大大的红色X在堆叠空间的末端，你可以通过按这个红色的X，来限制堆叠空间的数量。选中的堆叠空间会被标记上。（一些图片丢失）&lt;br /&gt;
&lt;br /&gt;
*  [[Inserters/zh|机械臂]]或[[Logistic robot/zh|物流机器人]]不能限制堆叠空间的数量，但是他们可以从中拿取物品。&lt;br /&gt;
* 角色（你）也可以将物品放入堆叠限制区中。&lt;br /&gt;
* 以下物品有堆叠限制功能：&lt;br /&gt;
** [[Chests/zh|箱子]]&lt;br /&gt;
** [[Cargo wagon/zh|货运车厢]]&lt;br /&gt;
&lt;br /&gt;
== 不同物品种类有不同的物品堆叠数量上限 ==&lt;br /&gt;
&lt;br /&gt;
举例来说：通常[[Items/zh#资源|资源]]物件的堆叠数量为50个。但是[[Items/zh#零部件|零部件]]，例如铁板的堆叠数量是每堆100个。这是对于想要利用火车来运输或储存物品来说是非常重要的。&lt;br /&gt;
&lt;br /&gt;
== 堆叠空间的操作 ==&lt;br /&gt;
&lt;br /&gt;
这里有一些[[Keyboard bindings/zh|按键绑定]]（这里并没有全部列出！）可以快速对堆叠空间进行操作。例如移动一半的物品到另一堆。&lt;br /&gt;
&lt;br /&gt;
== 历史 ==&lt;br /&gt;
&lt;br /&gt;
In v0.10 the number of items, which can be stored in a stack changed for most items from dual numbers to decimal (base 2 vs. base 10). This was mainly made, because it is easier to calculate numbers based on the base-10-system (20 stacks á 50 items = 1000 items, 18 stacks á 64 items = ???items) and because there have been stack-numbers, which where already based on decimal and there is no need - like in minecraft - to split up stacks by hand to half-stacks (that is, what automated crafting is thought for).&lt;br /&gt;
&lt;br /&gt;
Example: before that change, a stack could store 64 iron ore, after that only 50. This has created a lot of discussions in the forum (TODO: find some). In the end there are now not much players anymore, which say, they want the old stack-numbers back. But if so, there is also a mod, which does that change!&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163973</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163973"/>
		<updated>2018-08-25T17:47:53Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{Stub/zh}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 这盏灯与箱子相连&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===设置灯亮起的条件===&lt;br /&gt;
# 打开灯 (用左键点击)&lt;br /&gt;
# 将输入设置为桶&lt;br /&gt;
# 将操作符设置为&amp;lt;（小于）&lt;br /&gt;
# 设置常量:&lt;br /&gt;
## 左键点击常量框&lt;br /&gt;
## 移动滑条直到显示10，或者直接编辑数值框&lt;br /&gt;
## 点击设置&lt;br /&gt;
&lt;br /&gt;
如果箱子是空的，或者里面有你设置数量的物品，它就有可能会亮起来，具体取决于你设置的条件。&lt;br /&gt;
&lt;br /&gt;
这个小电路有个缺点，灯是白色的，在晚上很难和其它普通的灯区分开来。&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== 石油设置 ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== 轻油裂解 ===&lt;br /&gt;
* 这个电路将会裂解过多的轻油来保持轻油与石油气的平衡&lt;br /&gt;
* {{L|Pump}}通过{{L|Red wire}}被连接到{{L|Storage tank}}&lt;br /&gt;
* {{L|Pump}}的启用条件被设置为&#039;&#039;&#039;轻油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== 重油裂解 ===&lt;br /&gt;
* 同上个电路一样，只不过这个电路变成了重油裂解，您可以根据需要扩展电路，让重油裂解为轻油，或者润滑油等等&lt;br /&gt;
* {{L|Pump}}的启动条件被设置为&#039;&#039;&#039;重油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== 石油气在生成塑料和硫酸之间均匀分配 ===&lt;br /&gt;
* 这个电路将至少100石油气充入到储液罐中，然后排出到小于50并且再度充入循环&lt;br /&gt;
* 为了实现这个目标我们需要做以下努力&lt;br /&gt;
* 首先{{L|Pump}}通过{{L|Red wire}}连接到{{L|Wooden chest}}，{{L|Pump}}的启用条件设置为&#039;&#039;&#039;原木 &amp;gt; 0&#039;&#039;&#039;&lt;br /&gt;
* 两个{{L|Inserter}}都通过{{L|Red wire}}连接到{{L|Storage tank}}&lt;br /&gt;
* 左边的{{L|Inserter}}启用条件是&#039;&#039;&#039;石油气 &amp;gt; 100&#039;&#039;&#039;&lt;br /&gt;
* 右边的{{L|Inserter}}启用条件是&#039;&#039;&#039;石油气 &amp;lt; 50&#039;&#039;&#039;&lt;br /&gt;
* 你需要将一个原木放进箱子里来让这个电路正常工作&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* 你也可以使用{{L|decider combinator|判断运算器}}来做到这一点&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Glossary/zh&amp;diff=163972</id>
		<title>User:Kcsixgap/Glossary/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Glossary/zh&amp;diff=163972"/>
		<updated>2018-08-25T17:44:08Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{Stub/zh}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
这个页面收集了一些Factorio玩家的中文术语&lt;br /&gt;
&lt;br /&gt;
== 零件 ==&lt;br /&gt;
&lt;br /&gt;
;三色板:指电路板、集成电路和处理器。因为三种物品外观相同，仅颜色不同，故得名&lt;br /&gt;
;绿板:指电路板，通体绿色&lt;br /&gt;
;红板:指集成电路，通体红色&lt;br /&gt;
;紫板:指处理器，通体紫色&lt;br /&gt;
&lt;br /&gt;
== 游戏机制 ==&lt;br /&gt;
&lt;br /&gt;
;黑盒:本质是由玩家制作的蓝图，往往具有高度复杂、高度集成、性状规则成矩形、效率极高的特点，可让新手玩家迅速铺出一大片高效率工厂&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Glossary/zh&amp;diff=163971</id>
		<title>User:Kcsixgap/Glossary/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Glossary/zh&amp;diff=163971"/>
		<updated>2018-08-25T17:43:21Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{Stub}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
这个页面收集了一些Factorio玩家的中文术语&lt;br /&gt;
&lt;br /&gt;
== 零件 ==&lt;br /&gt;
&lt;br /&gt;
;三色板:指电路板、集成电路和处理器。因为三种物品外观相同，仅颜色不同，故得名&lt;br /&gt;
;绿板:指电路板，通体绿色&lt;br /&gt;
;红板:指集成电路，通体红色&lt;br /&gt;
;紫板:指处理器，通体紫色&lt;br /&gt;
&lt;br /&gt;
== 游戏机制 ==&lt;br /&gt;
&lt;br /&gt;
;黑盒:本质是由玩家制作的蓝图，往往具有高度复杂、高度集成、性状规则成矩形、效率极高的特点，可让新手玩家迅速铺出一大片高效率工厂&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Glossary/zh&amp;diff=163970</id>
		<title>User:Kcsixgap/Glossary/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Glossary/zh&amp;diff=163970"/>
		<updated>2018-08-25T17:39:47Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: Created page with &amp;quot;{{Languages}} __NOTOC__  这个页面收集了一些Factorio玩家的中文术语  == 零件 ==  ;三色板:指电路板、集成电路和处理器。因为三种物品外观...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
这个页面收集了一些Factorio玩家的中文术语&lt;br /&gt;
&lt;br /&gt;
== 零件 ==&lt;br /&gt;
&lt;br /&gt;
;三色板:指电路板、集成电路和处理器。因为三种物品外观相同，仅颜色不同，故得名&lt;br /&gt;
;绿板:指电路板，通体绿色&lt;br /&gt;
;红板:指集成电路，通体红色&lt;br /&gt;
;紫版:指处理器，通体紫色&lt;br /&gt;
&lt;br /&gt;
== 游戏机制 ==&lt;br /&gt;
&lt;br /&gt;
;黑盒:本质是由玩家制作的蓝图，往往具有高度复杂、高度集成、性状规则成矩形、效率极高的特点，可让新手玩家迅速铺出一大片高效率工厂&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Worker_robot_speed_(research)/zh&amp;diff=163965</id>
		<title>Worker robot speed (research)/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Worker_robot_speed_(research)/zh&amp;diff=163965"/>
		<updated>2018-08-25T17:20:25Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}{{:Infobox:Worker robot speed (research)}}&lt;br /&gt;
&#039;&#039;&#039;{{Translation|Worker robot speed (research)}}&#039;&#039;&#039;加成对{{L|Logistic robot}}和{{L|Construction robot}}有效。&lt;br /&gt;
{{Translation|Logistic robot}}的基础移动速度是0.05格/游戏刻（每秒3格），{{Translation|Construction robot}}的基础移动速度是0.06格/游戏刻（每秒3.6格）。&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! 科技 !! 花费 !! 效果 !! 累积效果&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Worker robot speed (research)|1}} {{Translation|Worker robot speed}} 1 || {{Icon|Time|30}} {{Icon|Science pack 1|1}} {{Icon|Science pack 2|1}} {{Icon|Science pack 3|1}} ✖ &amp;lt;big&amp;gt;50&amp;lt;/big&amp;gt; || 35% || 35%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Worker robot speed (research)|2}} {{Translation|Worker robot speed}} 2 || {{Icon|Time|30}} {{Icon|Science pack 1|1}} {{Icon|Science pack 2|1}} {{Icon|Science pack 3|1}} ✖ &amp;lt;big&amp;gt;100&amp;lt;/big&amp;gt; || 40% || 75%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Worker robot speed (research)|3}} {{Translation|Worker robot speed}} 3 || {{Icon|Time|60}} {{Icon|Science pack 1|1}} {{Icon|Science pack 2|1}} {{Icon|Science pack 3|1}} {{Icon|Production science pack|1}} ✖ &amp;lt;big&amp;gt;150&amp;lt;/big&amp;gt; || 45% || 120%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Worker robot speed (research)|4}} {{Translation|Worker robot speed}} 4 || {{Icon|Time|60}} {{Icon|Science pack 1|1}} {{Icon|Science pack 2|1}} {{Icon|Science pack 3|1}} {{Icon|Production science pack|1}} ✖ &amp;lt;big&amp;gt;250&amp;lt;/big&amp;gt; || 55% || 175%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Worker robot speed (research)|5}} {{Translation|Worker robot speed}} 5 || {{Icon|Time|60}} {{Icon|Science pack 1|1}} {{Icon|Science pack 2|1}} {{Icon|Science pack 3|1}} {{Icon|Production science pack|1}} {{Icon|High tech science pack|1}} ✖ &amp;lt;big&amp;gt;500&amp;lt;/big&amp;gt; || 65% || 240%&lt;br /&gt;
|-&lt;br /&gt;
| {{Icontech|Worker robot speed (research)|6-&amp;amp;infin;}} {{Translation|Worker robot speed}} 6 - &amp;amp;infin; || {{Icon|Time|60}} {{Icon|Science pack 1|1}} {{Icon|Science pack 2|1}} {{Icon|Science pack 3|1}} {{Icon|Production science pack|1}} {{Icon|High tech science pack|1}} {{Icon|Space science pack|1}} ✖ &amp;lt;big&amp;gt;(1000&amp;lt;/big&amp;gt; × &amp;lt;big&amp;gt;2&amp;lt;/big&amp;gt;&amp;lt;sup&amp;gt;(等级-6)&amp;lt;/sup&amp;gt;&amp;lt;big&amp;gt;)&amp;lt;/big&amp;gt;&amp;lt;br/&amp;gt;（6级为1000，7级为2000，8级为4000，以此类推） || 每级增加65% || 240% + 65% × (等级 - 5)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 请参见 ==&lt;br /&gt;
* {{L|Research}}&lt;br /&gt;
* {{L|Technologies}}&lt;br /&gt;
&lt;br /&gt;
{{TechNav}}&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163806</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163806"/>
		<updated>2018-08-24T06:21:26Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: /* Petroleum split evenly between plastic and sulphuric acid */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 这盏灯与箱子相连&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===设置灯亮起的条件===&lt;br /&gt;
# 打开灯 (用左键点击)&lt;br /&gt;
# 将输入设置为桶&lt;br /&gt;
# 将操作符设置为&amp;lt;（小于）&lt;br /&gt;
# 设置常量:&lt;br /&gt;
## 左键点击常量框&lt;br /&gt;
## 移动滑条直到显示10，或者直接编辑数值框&lt;br /&gt;
## 点击设置&lt;br /&gt;
&lt;br /&gt;
如果箱子是空的，或者里面有你设置数量的物品，它就有可能会亮起来，具体取决于你设置的条件。&lt;br /&gt;
&lt;br /&gt;
这个小电路有个缺点，灯是白色的，在晚上很难和其它普通的灯区分开来。&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== 石油设置 ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== 轻油裂解 ===&lt;br /&gt;
* 这个电路将会裂解过多的轻油来保持轻油与石油气的平衡&lt;br /&gt;
* {{L|Pump}}通过{{L|Red wire}}被连接到{{L|Storage tank}}&lt;br /&gt;
* {{L|Pump}}的启用条件被设置为&#039;&#039;&#039;轻油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== 重油裂解 ===&lt;br /&gt;
* 同上个电路一样，只不过这个电路变成了重油裂解，您可以根据需要扩展电路，让重油裂解为轻油，或者润滑油等等&lt;br /&gt;
* {{L|Pump}}的启动条件被设置为&#039;&#039;&#039;重油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== 石油气在生成塑料和硫酸之间均匀分配 ===&lt;br /&gt;
* 这个电路将至少100石油气充入到储液罐中，然后排出到小于50并且再度充入循环&lt;br /&gt;
* 为了实现这个目标我们需要做以下努力&lt;br /&gt;
* 首先{{L|Pump}}通过{{L|Red wire}}连接到{{L|Wooden chest}}，{{L|Pump}}的启用条件设置为&#039;&#039;&#039;原木 &amp;gt; 0&#039;&#039;&#039;&lt;br /&gt;
* 两个{{L|Inserter}}都通过{{L|Red wire}}连接到{{L|Storage tank}}&lt;br /&gt;
* 左边的{{L|Inserter}}启用条件是&#039;&#039;&#039;石油气 &amp;gt; 100&#039;&#039;&#039;&lt;br /&gt;
* 右边的{{L|Inserter}}启用条件是&#039;&#039;&#039;石油气 &amp;lt; 50&#039;&#039;&#039;&lt;br /&gt;
* 你需要将一个原木放进箱子里来让这个电路正常工作&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* 你也可以使用{{L|decider combinator|判断运算器}}来做到这一点&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163805</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163805"/>
		<updated>2018-08-24T06:04:14Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: /* 重油裂解 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 这盏灯与箱子相连&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===设置灯亮起的条件===&lt;br /&gt;
# 打开灯 (用左键点击)&lt;br /&gt;
# 将输入设置为桶&lt;br /&gt;
# 将操作符设置为&amp;lt;（小于）&lt;br /&gt;
# 设置常量:&lt;br /&gt;
## 左键点击常量框&lt;br /&gt;
## 移动滑条直到显示10，或者直接编辑数值框&lt;br /&gt;
## 点击设置&lt;br /&gt;
&lt;br /&gt;
如果箱子是空的，或者里面有你设置数量的物品，它就有可能会亮起来，具体取决于你设置的条件。&lt;br /&gt;
&lt;br /&gt;
这个小电路有个缺点，灯是白色的，在晚上很难和其它普通的灯区分开来。&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== 石油设置 ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== 轻油裂解 ===&lt;br /&gt;
* 这个电路将会裂解过多的轻油来保持轻油与石油气的平衡&lt;br /&gt;
* {{L|Pump}}通过{{L|Red wire}}被连接到{{L|Storage tank}}&lt;br /&gt;
* {{L|Pump}}的启用条件被设置为&#039;&#039;&#039;轻油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== 重油裂解 ===&lt;br /&gt;
* 同上个电路一样，只不过这个电路变成了重油裂解，您可以根据需要扩展电路，让重油裂解为轻油，或者润滑油等等&lt;br /&gt;
* {{L|Pump}}的启动条件被设置为&#039;&#039;&#039;重油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163804</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163804"/>
		<updated>2018-08-24T05:56:37Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 这盏灯与箱子相连&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===设置灯亮起的条件===&lt;br /&gt;
# 打开灯 (用左键点击)&lt;br /&gt;
# 将输入设置为桶&lt;br /&gt;
# 将操作符设置为&amp;lt;（小于）&lt;br /&gt;
# 设置常量:&lt;br /&gt;
## 左键点击常量框&lt;br /&gt;
## 移动滑条直到显示10，或者直接编辑数值框&lt;br /&gt;
## 点击设置&lt;br /&gt;
&lt;br /&gt;
如果箱子是空的，或者里面有你设置数量的物品，它就有可能会亮起来，具体取决于你设置的条件。&lt;br /&gt;
&lt;br /&gt;
这个小电路有个缺点，灯是白色的，在晚上很难和其它普通的灯区分开来。&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== 石油设置 ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== 轻油裂解 ===&lt;br /&gt;
* 这个电路将会裂解过多的轻油来保持轻油与石油气的平衡&lt;br /&gt;
* {{L|Pump}}通过{{L|Red wire}}被连接到{{L|Storage tank}}&lt;br /&gt;
* {{L|Pump}}的启用条件被设置为&#039;&#039;&#039;轻油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== 重油裂解 ===&lt;br /&gt;
* This circuit extends on the previous circuit by adding optional heavy oil cracking to provide lubricant etc.&lt;br /&gt;
* {{L|Pump}}的启动条件被设置为&#039;&#039;&#039;重油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163803</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163803"/>
		<updated>2018-08-24T05:45:51Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: /* Oil Setups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 这盏灯与箱子相连&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===设置灯亮起的条件===&lt;br /&gt;
# 打开灯 (用左键点击)&lt;br /&gt;
# 将输入设置为桶&lt;br /&gt;
# 将操作符设置为&amp;lt;（小于）&lt;br /&gt;
# 设置常量:&lt;br /&gt;
## 左键点击常量框&lt;br /&gt;
## 移动滑条直到显示10，或者直接编辑数值框&lt;br /&gt;
## 点击设置&lt;br /&gt;
&lt;br /&gt;
如果箱子是空的，或者里面有你设置数量的物品，它就有可能会亮起来，具体取决于你设置的条件。&lt;br /&gt;
&lt;br /&gt;
这个小电路有个缺点，灯是白色的，在晚上很难和其它普通的灯区分开来。&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== 石油设置 ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== 轻油裂解 ===&lt;br /&gt;
* 这个电路将会裂解过多的轻油来保持轻油与石油气的平衡&lt;br /&gt;
* [[Pump/zh]]通过[[Red wire/zh]]被连接到[[Storage tank/zh]]&lt;br /&gt;
* [[Pump/zh]]的启用条件被设置为&#039;&#039;&#039;轻油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== 重油裂解 ===&lt;br /&gt;
* This circuit extends on the previous circuit by adding optional heavy oil cracking to provide lubricant etc.&lt;br /&gt;
* [[Pump/zh]]的启动条件被设置为&#039;&#039;&#039;重油 &amp;gt; 2000&#039;&#039;&#039;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163802</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163802"/>
		<updated>2018-08-24T05:32:43Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: /* 设置灯亮起的条件 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 这盏灯与箱子相连&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===设置灯亮起的条件===&lt;br /&gt;
# 打开灯 (用左键点击)&lt;br /&gt;
# 将输入设置为桶&lt;br /&gt;
# 将操作符设置为&amp;lt;（小于）&lt;br /&gt;
# 设置常量:&lt;br /&gt;
## 左键点击常量框&lt;br /&gt;
## 移动滑条直到显示10，或者直接编辑数值框&lt;br /&gt;
## 点击设置&lt;br /&gt;
&lt;br /&gt;
如果箱子是空的，或者里面有你设置数量的物品，它就有可能会亮起来，具体取决于你设置的条件。&lt;br /&gt;
&lt;br /&gt;
这个小电路有个缺点，灯是白色的，在晚上很难和其它普通的灯区分开来。&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Oil Setups ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== Light Oil Cracking ===&lt;br /&gt;
* This circuit provides balanced light oil and petroleum gas production by cracking excess light oil into gas. &lt;br /&gt;
* The [[Pump]] is connected to the [[Storage tank]] by a [[Red wire]]. &lt;br /&gt;
* The [[small pump]] has an enabled condition set to &#039;&#039;&#039;Light Oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Heavy Oil Cracking ===&lt;br /&gt;
* This circuit extends on the previous circuit by adding optional heavy oil cracking to provide lubricant etc.&lt;br /&gt;
* The [[Pump]] has an enabled condition set to &#039;&#039;&#039;Heavy oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163801</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163801"/>
		<updated>2018-08-24T05:32:02Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: /* 设置灯亮起的条件 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 这盏灯与箱子相连&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===设置灯亮起的条件===&lt;br /&gt;
# 打开灯 (用左键点击)&lt;br /&gt;
# 将输入设置为桶&lt;br /&gt;
# 将操作符设置为&amp;lt;（小于）&lt;br /&gt;
# 设置常量:&lt;br /&gt;
## 左键点击常量框&lt;br /&gt;
## 移动滑条直到显示10，或者直接编辑数值框&lt;br /&gt;
## 点击设置&lt;br /&gt;
&lt;br /&gt;
如果箱子是空的，或者里面有你设置数量的物品，它就有可能会亮起来，具体取决于你设置的条件。&lt;br /&gt;
&lt;br /&gt;
这个缺点就是灯是白色的，在晚上很难和其它普通的灯区分开来。&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Oil Setups ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== Light Oil Cracking ===&lt;br /&gt;
* This circuit provides balanced light oil and petroleum gas production by cracking excess light oil into gas. &lt;br /&gt;
* The [[Pump]] is connected to the [[Storage tank]] by a [[Red wire]]. &lt;br /&gt;
* The [[small pump]] has an enabled condition set to &#039;&#039;&#039;Light Oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Heavy Oil Cracking ===&lt;br /&gt;
* This circuit extends on the previous circuit by adding optional heavy oil cracking to provide lubricant etc.&lt;br /&gt;
* The [[Pump]] has an enabled condition set to &#039;&#039;&#039;Heavy oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163800</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163800"/>
		<updated>2018-08-24T05:27:29Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 这盏灯与箱子相连&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===设置灯亮起的条件===&lt;br /&gt;
# 打开灯 (用左键点击)&lt;br /&gt;
# 将输入设置为桶&lt;br /&gt;
# 将操作符设置为&amp;lt;（小于）&lt;br /&gt;
# 设置常量:&lt;br /&gt;
## 左键点击常量框&lt;br /&gt;
## 移动滑条直到显示10，或者直接编辑数值框&lt;br /&gt;
## 点击设置&lt;br /&gt;
&lt;br /&gt;
Depending on the condition you set, the lamp may light if the chest is empty, or if it contains the required quantity of items.&lt;br /&gt;
&lt;br /&gt;
The drawback with this scenario is that the lamp has a white light , and is therefore difficult to differentiate from an ordinary lamp at night.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Oil Setups ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== Light Oil Cracking ===&lt;br /&gt;
* This circuit provides balanced light oil and petroleum gas production by cracking excess light oil into gas. &lt;br /&gt;
* The [[Pump]] is connected to the [[Storage tank]] by a [[Red wire]]. &lt;br /&gt;
* The [[small pump]] has an enabled condition set to &#039;&#039;&#039;Light Oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Heavy Oil Cracking ===&lt;br /&gt;
* This circuit extends on the previous circuit by adding optional heavy oil cracking to provide lubricant etc.&lt;br /&gt;
* The [[Pump]] has an enabled condition set to &#039;&#039;&#039;Heavy oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163799</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163799"/>
		<updated>2018-08-24T03:46:08Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: /* 建立电路连接 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物（在本例中是空桶）的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 灯连接到箱子&lt;br /&gt;
* 如果箱子里的空桶少于10个，灯就会亮起来&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===To set the light condition===&lt;br /&gt;
# open the lamp (left click on it)&lt;br /&gt;
# Set the input to barrels&lt;br /&gt;
# Set the operator to &amp;lt; (less than)&lt;br /&gt;
# Set the constant number:&lt;br /&gt;
## Left click on the constant number&lt;br /&gt;
## Move the slider until 10 is shown, or edit the value box directly&lt;br /&gt;
## Press set&lt;br /&gt;
&lt;br /&gt;
Depending on the condition you set, the lamp may light if the chest is empty, or if it contains the required quantity of items.&lt;br /&gt;
&lt;br /&gt;
The drawback with this scenario is that the lamp has a white light , and is therefore difficult to differentiate from an ordinary lamp at night.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Oil Setups ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== Light Oil Cracking ===&lt;br /&gt;
* This circuit provides balanced light oil and petroleum gas production by cracking excess light oil into gas. &lt;br /&gt;
* The [[Pump]] is connected to the [[Storage tank]] by a [[Red wire]]. &lt;br /&gt;
* The [[small pump]] has an enabled condition set to &#039;&#039;&#039;Light Oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Heavy Oil Cracking ===&lt;br /&gt;
* This circuit extends on the previous circuit by adding optional heavy oil cracking to provide lubricant etc.&lt;br /&gt;
* The [[Pump]] has an enabled condition set to &#039;&#039;&#039;Heavy oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163798</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163798"/>
		<updated>2018-08-24T03:43:46Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: /* Setting up circuit connection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物（在本例中是空桶）的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===建立电路连接===&lt;br /&gt;
* 将灯连接到箱子&lt;br /&gt;
* 将灯设置到箱子里最少有10个空桶则亮起&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
===To set the light condition===&lt;br /&gt;
# open the lamp (left click on it)&lt;br /&gt;
# Set the input to barrels&lt;br /&gt;
# Set the operator to &amp;lt; (less than)&lt;br /&gt;
# Set the constant number:&lt;br /&gt;
## Left click on the constant number&lt;br /&gt;
## Move the slider until 10 is shown, or edit the value box directly&lt;br /&gt;
## Press set&lt;br /&gt;
&lt;br /&gt;
Depending on the condition you set, the lamp may light if the chest is empty, or if it contains the required quantity of items.&lt;br /&gt;
&lt;br /&gt;
The drawback with this scenario is that the lamp has a white light , and is therefore difficult to differentiate from an ordinary lamp at night.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Oil Setups ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== Light Oil Cracking ===&lt;br /&gt;
* This circuit provides balanced light oil and petroleum gas production by cracking excess light oil into gas. &lt;br /&gt;
* The [[Pump]] is connected to the [[Storage tank]] by a [[Red wire]]. &lt;br /&gt;
* The [[small pump]] has an enabled condition set to &#039;&#039;&#039;Light Oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Heavy Oil Cracking ===&lt;br /&gt;
* This circuit extends on the previous circuit by adding optional heavy oil cracking to provide lubricant etc.&lt;br /&gt;
* The [[Pump]] has an enabled condition set to &#039;&#039;&#039;Heavy oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163797</id>
		<title>User:Kcsixgap/Circuit network cookbook/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=User:Kcsixgap/Circuit_network_cookbook/zh&amp;diff=163797"/>
		<updated>2018-08-24T03:41:28Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: Created page with &amp;quot;{{Languages}} ==前言==  这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
==前言== &lt;br /&gt;
这个页面提供了有关电路网络信号的设计例子，有简单的也有复杂的，各位可以随意使用、组合以及修改。它们以尽可能容易被理解的方式来设计。要在不打开运算器的情况下查看运算器的设置，您必须在“设置”-&amp;gt;“交互”-&amp;gt;“细节显现”中，勾选“细节显现模式下显示运算器信号设置”。&lt;br /&gt;
&lt;br /&gt;
==简单的灯箱电路==&lt;br /&gt;
[[File:LightWiredToChest.png|left|218 × 412px]]&lt;br /&gt;
&lt;br /&gt;
这是电路网络最简单的用途。灯会根据箱子中货物（在本例中是空桶）的数量来亮起或者熄灭。&lt;br /&gt;
&lt;br /&gt;
===Setting up circuit connection===&lt;br /&gt;
* The lamp is connected to the chest&lt;br /&gt;
* the lamp is set to light if the chest contain less than 10 empty barrels.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LamponBarrelCondition.png|left|400x400px]]&lt;br /&gt;
===To set the light condition===&lt;br /&gt;
# open the lamp (left click on it)&lt;br /&gt;
# Set the input to barrels&lt;br /&gt;
# Set the operator to &amp;lt; (less than)&lt;br /&gt;
# Set the constant number:&lt;br /&gt;
## Left click on the constant number&lt;br /&gt;
## Move the slider until 10 is shown, or edit the value box directly&lt;br /&gt;
## Press set&lt;br /&gt;
&lt;br /&gt;
Depending on the condition you set, the lamp may light if the chest is empty, or if it contains the required quantity of items.&lt;br /&gt;
&lt;br /&gt;
The drawback with this scenario is that the lamp has a white light , and is therefore difficult to differentiate from an ordinary lamp at night.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Oil Setups ==&lt;br /&gt;
[[File:LgtOilCracking.png|left|400x400px]]&lt;br /&gt;
=== Light Oil Cracking ===&lt;br /&gt;
* This circuit provides balanced light oil and petroleum gas production by cracking excess light oil into gas. &lt;br /&gt;
* The [[Pump]] is connected to the [[Storage tank]] by a [[Red wire]]. &lt;br /&gt;
* The [[small pump]] has an enabled condition set to &#039;&#039;&#039;Light Oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:HvyOilCracking.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Heavy Oil Cracking ===&lt;br /&gt;
* This circuit extends on the previous circuit by adding optional heavy oil cracking to provide lubricant etc.&lt;br /&gt;
* The [[Pump]] has an enabled condition set to &#039;&#039;&#039;Heavy oil &amp;gt; 2000&#039;&#039;&#039;.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[file:BalancedPlasticSulfur.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Petroleum split evenly between plastic and sulphuric acid ===&lt;br /&gt;
* This circuit buffers gas in the tank until there is at least 100, then it lets the tank drain until there is less than 50 and the cycle repeats.&lt;br /&gt;
* It has a few elements that work together to do achieve this. &lt;br /&gt;
* Firstly the [[Pump]] is connected to the [[Wooden chest]] by a [[Red wire]] and the enabled condition on the [[Pump]] is set to &#039;&#039;&#039;Raw wood &amp;gt; 0&#039;&#039;&#039;.&lt;br /&gt;
* Both of the [[Inserter]]s are connected to the [[Storage tank]] by [[Red wire]]s. &lt;br /&gt;
* The enabled condition on the left inserter is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039; &lt;br /&gt;
* The enabled condition on the right inserter is &#039;&#039;&#039;Petroleum gas &amp;lt; 50&#039;&#039;&#039;. &lt;br /&gt;
* You will need to insert a single &amp;quot;Raw wood&amp;quot; into the chest to make it all work. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
* It is also possible to do this with [[decider combinator]]s instead of the inserters, belt and the Wood chest or even just belts.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Lights ==&lt;br /&gt;
[[File:ConditionalLights.png|left|400x400px]]&lt;br /&gt;
=== Conditional Lights ===&lt;br /&gt;
* In this circuit we connect a series of [[lamp]]s to a [[Storage tank]].&lt;br /&gt;
* By setting different conditions on each [[lamp]] we can build an indicator strip. &lt;br /&gt;
* The Enabled condition of the first [[lamp]] is &#039;&#039;&#039;Petroleum gas &amp;gt; 100&#039;&#039;&#039;.&lt;br /&gt;
* The others light up when gas is greater than 200, 300, 400 and 500 respectively.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
In this scenario you can connect the storage tank to the lamps directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ColoredLights.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Colored Lights ===&lt;br /&gt;
* To light a [[lamp]] with a color rather than white, you need an intermediate device like an [[Arithmetic combinator]] that can send a color signal.  &lt;br /&gt;
Instead of directly connect  the the [[Lamp]] and the [[Storage tank]] you need:&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Add the [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Connect the [[Storage tank]] with the input of the  [[Arithmetic combinator]].&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Connect the  output of the [[Arithmetic combinator]] with the [[lamp]].&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Set up the [[Arithmetic combinator]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
4.1 Setting the input to Petroleum Gas + 0 (the constant 0 not the signal 0)&amp;lt;BR&amp;gt;&lt;br /&gt;
4.2 Set the output to the Pink signal (on the bottom row of the last tab of signals.)&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Set up the [[lamp]]:&amp;lt;BR&amp;gt;&lt;br /&gt;
5.1  Select the &amp;quot;Use colors&amp;quot; check box on the lamp.&amp;lt;BR&amp;gt;&lt;br /&gt;
5.2 Set the condition to the Pink signal, and what value you want (i.e. &amp;gt; 100)&amp;lt;BR&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
[[file:MulitipleChestsAndPoles.png|left|400x400px]]&lt;br /&gt;
=== Multiple Storages === &lt;br /&gt;
* If you connect multiple chests to a pole, the pole displays the sum of items in all the chests. &lt;br /&gt;
* This also works with [[Storage tank]]s and [[roboport]]s.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ConstantComb.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator ===&lt;br /&gt;
* With a [[constant combinator]] you can generate any signals you may need. &lt;br /&gt;
* In this example we have generated a signal of 50 Laser turrets and 200 Piercing round magazine. &lt;br /&gt;
* Constant combinators are not of much use on their own but we shall use them later.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:LogicGates.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Logic gates ===&lt;br /&gt;
* In each case the two inputs can be connected with the same color wire or different colors. The inputs are powered by two [[Constant combinator]]s each of them output an A signal with value 1 for true and nothing or false.&lt;br /&gt;
* You can use [[Decider combinator]]s to make all of the common logic gates.&lt;br /&gt;
* The output for each should be set to 1 and the signal of your choice.&lt;br /&gt;
* Use the following settings to create different gates:&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
    NOT  A=0&lt;br /&gt;
    NOR  A=0&lt;br /&gt;
    NAND A&amp;lt;2&lt;br /&gt;
    XOR  A=1&lt;br /&gt;
    AND  A=2&lt;br /&gt;
    OR   A&amp;gt;0&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:ThisASign.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Constant combinator signs ===&lt;br /&gt;
* You can use [[Constant combinator]]s to make signs, just set the letter signals in the combinator, each combinator can display 2 characters side by side.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MemoryCell.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Memory Cell / Counter ===&lt;br /&gt;
* Basic memory cell that counts all the items moved by the inserter&lt;br /&gt;
* The [[Fast inserter]] is connected to &#039;&#039;&#039;BOTH&#039;&#039;&#039; ends of the arithmetic combinator.&lt;br /&gt;
&lt;br /&gt;
* If the [[Fast inserter]] hasn&#039;t picked anything up this tick the input to the Arithmetic combinator is the same as and output and hence the values are persisted. &lt;br /&gt;
* When the [[Fast inserter]] does pick something up its value is added to the output from the previous tick thus incrementing that item. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BeltCache.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Automatic Belt-Cache ===&lt;br /&gt;
* Some intermediate products are huge in demand during peak-production only. To bypass the need of providing a huge amount of factories in order to cover that peaks, a cache-unit can be used. The unit stores items while the belt has backed up (so there&#039;s obviously no current demand downstream) and releases items as soon as the belt gets too empty.&lt;br /&gt;
* The blue area is 3 parts of Express belts. According to the wiki, each belt can hold up to 7.11 items. This means the feeding fast belt can not provide 7.11 items for the express belts as long as the belt is moving. (And while the belt is moving, we don&#039;t want to cache items, but let regular production run, or even release items from the cache.)&lt;br /&gt;
* This means, once the counters on the two express belts are 7.11 each, the belt has backed up, so we can start &amp;quot;caching&amp;quot; items into our storage array. &lt;br /&gt;
* For this purpose, the counters are connected to the arithmetic combinator (A) which multiples the input (*100) into green signals. So, if the belt has backed up, B shows &amp;quot;&amp;gt;1422&amp;quot; green signals.&lt;br /&gt;
* This is the activation condition for the Belt (C), which will redirect the input to the storage array.&lt;br /&gt;
* Since items should only be released if the belt starts to clear, the counter (D) is evaluated by the belt (E) which is only activated, if item-count on (D) is smaller than 6 (this number has to be adjusted to personal needs, when the cache should become &amp;quot;active&amp;quot; and release items)&lt;br /&gt;
* The layout can be extended to cache whatever amount of items is required. (Some balancing for the release-method would be required of course.)&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:combinatorMultiplierDetailed.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Multiplier and Dictionaries/Arrays ===&lt;br /&gt;
* Multiplying two signals together is simple and requires only a single combinator, however multiplying a set of signals is more complicated.&lt;br /&gt;
* A proof is shown below for the equation and why it works.&lt;br /&gt;
* A dictionary is a system that allows a value on a specific signal to be accessed. For example, A can contain many signals (either from a constant combinator or memory cell) and B can contain 1 of a specific signal (such as blue signal). What remains is the blue-signal value from A. This is because all the other signals are multiplied by 0.&lt;br /&gt;
* Arrays are similar to dictionaries, but instead of using a signal as a key, we use a number. Constant combinators are placed mapping each signal to a unique number (such as 1 yellow belt, 2 red belt, 3 blue belt, 4 burner inserter, etc). Then, use a combinator of &amp;quot;each = index OUTPUT 1 of each&amp;quot; and plug that in as the input to a dictionary.&lt;br /&gt;
[[File:combinatorMultiplierMath.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
    ((A+B)^2 - (A-B)^2)/4 = AB&lt;br /&gt;
    (A+B)^2 - (A-B)^2 = 4AB&lt;br /&gt;
    (A^2 + 2AB + B^2) - (A^2 - 2AB + B^2) = 4AB&lt;br /&gt;
    4AB = 4AB&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Inserters ==&lt;br /&gt;
[[File:LimitItemsPlacedIntoAChest.png|left|400x400px]]&lt;br /&gt;
=== Limit items placed into a chest ===&lt;br /&gt;
*  The [[Inserter]] is connected to the [[Wooden chest]] using a [[Red wire]]. &lt;br /&gt;
*  The inserter&#039;s enabled condition is &#039;&#039;&#039;Advanced Circuit &amp;lt; 10&#039;&#039;&#039;. &lt;br /&gt;
*  In reality this means the inserter may place more than 10 Advanced circuits in the chest because it could pick up to 3 at once due to stack size bonuses.&lt;br /&gt;
*  This effect can be even greater with Stack inserters because of their large carrying capacity. &lt;br /&gt;
*  This technique still gives far greater control than limiting the inventory on the chest.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Balanced chest insert ===&lt;br /&gt;
Goal: Load n chests with approximately the same number of items.&lt;br /&gt;
*  Place n chests and n inserters. &lt;br /&gt;
*  Place 1 [[Arithmetic combinator]]&lt;br /&gt;
*  Set the combinator to take Each (yellow star) and divide by the negative number of chests. ie &amp;amp;minus;n.&lt;br /&gt;
*  Connect all chests to each other and to the input of the combinator using red wire.&lt;br /&gt;
*  Connect all inserters to each other and to the output of the combinator using red wire.&lt;br /&gt;
*  Connect each inserter to the box it inserts into with green wire.&lt;br /&gt;
*  Set the enable condition on each inserter to be Everything (red star) &amp;lt; 0.&lt;br /&gt;
&lt;br /&gt;
The combinator calculates the average number of items in the chests, and makes it negative. Each inserter gets the amount in the chest it is inserting to and adds the negative average, ie it calculates how many more than the average it has in its chest. Thus if that number is negative, it has less than the average in the chest and it enables. &lt;br /&gt;
&lt;br /&gt;
Due to inserter stack bonus the count is not exact. If a precise count is needed, set the inserter stack size to 1. &lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SmartOutpostUnloader.png|left|400x400px]]&lt;br /&gt;
=== Keeping outpost stocked with specified items ===&lt;br /&gt;
*  This circuit keeps a [[Storage chest]] at an outpost stocked with customized levels of different items. &lt;br /&gt;
*  For example you could keep an outpost stocked with 50 laser turrets and 200 piercing magazine rounds but not have to worry about it being over filled. &lt;br /&gt;
*  The [[storage chest]] is attached to the input of the [[Arithmetic combinator]] (left side in the picture) with a [[Red wire]]. &lt;br /&gt;
*  Another couple of [[Red wire]]s join the output of the [[Arithmetic combinator]] (right side) to the [[constant combinator]] and to the [[stack filter inserter]]. &lt;br /&gt;
*  The [[Arithmetic combinator]] &#039;&#039;&#039;multiplies&#039;&#039;&#039; each input value (from the storage chest) by &#039;&#039;&#039;-1&#039;&#039;&#039;. &lt;br /&gt;
*  Finally the filter stack inserter&#039;s mode of operation is set to &#039;&#039;&#039;Set filters&#039;&#039;&#039;.&lt;br /&gt;
*  So the input to the [[stack filter inserter]] is &#039;&#039;&#039;&amp;lt;Constant combinator&amp;gt; - &amp;lt;Storage chest contents&amp;gt;&#039;&#039;&#039; and the filter is set to filter the item of greatest demand.   &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SolarAccumalatorBalancer.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Balanced Solar panel / Accumulator Production ===&lt;br /&gt;
* This circuit balances production of [[Solar panel]]s and [[Accumulator]]s to a desired ratio in my case 24:20.&lt;br /&gt;
* The first [[Arithmetic combinator]] takes the number of accumulators in the chest and &#039;&#039;&#039;multiplies&#039;&#039;&#039; it by &#039;&#039;&#039;24&#039;&#039;&#039;. &lt;br /&gt;
* The second [[Arithmetic combinator]] takes the output of the first combinator and &#039;&#039;&#039;divides&#039;&#039;&#039; it by &#039;&#039;&#039;20&#039;&#039;&#039;. &lt;br /&gt;
* This gives us the number of accumulators that we can directly compare to the number of Solar panels in both inserters. &lt;br /&gt;
* If the number of accumulators is greater we enable the Solar panels inserter, if the number of Solar panels is greater we enable the accumulators inserter. &lt;br /&gt;
* However, if they are equal, neither machine does anything. So we add a single accumulator to one of the inserters using a constant combinator and a wire of the other color, therefore breaking the deadlock.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Sushi Belts ==&lt;br /&gt;
[[File:SushiScience1.png|left|400x400px]]&lt;br /&gt;
=== Reading Belt Design ===&lt;br /&gt;
* Six belts in a row are connected with Red wire and set to &#039;&#039;&#039;Read belts contents&#039;&#039;&#039; and &#039;&#039;&#039;Hold&#039;&#039;&#039; &lt;br /&gt;
* This [[Red wire]] is then connected to the inserters that insert onto the belt. &lt;br /&gt;
* Read hand contents is unselected for all inserters.&lt;br /&gt;
* Mode of operation is set to &#039;&#039;&#039;Enable/Disable&#039;&#039;&#039; on all inserters. &lt;br /&gt;
* The first inserter is enabled when &#039;&#039;&#039;Science pack 1 = 0&#039;&#039;&#039;&lt;br /&gt;
* The other inserters are set similarly for the other science packs. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SushiScience2.png|left|400x400px]]&lt;br /&gt;
=== Memory Cell Design ===&lt;br /&gt;
* This circuit counts the number of items of each type on a looping belt by counting the numbers that are added and removed from the belt by inserters.&lt;br /&gt;
* Each inserter that takes items off the belt is connected together with Red wire and each of these inserters is set to &#039;&#039;&#039;Mode of operation none, Read hand content selected&#039;&#039;&#039; and &#039;&#039;&#039;Hand read mode pulse&#039;&#039;&#039;. &lt;br /&gt;
* These inserters are connected to the input of the left arithmetic combinator. &lt;br /&gt;
* The left [[Arithmetic combinator]] multiples &#039;&#039;&#039;each&#039;&#039;&#039; input by &#039;&#039;&#039;-1&#039;&#039;&#039; and outputs it to &#039;&#039;&#039;each&#039;&#039;&#039;. &lt;br /&gt;
* The right [[Arithmetic combinator]] is a &#039;&#039;&#039;memory cell&#039;&#039;&#039; as above.&lt;br /&gt;
* The memory cell&#039;s input is connected to the inserters that are placing items on the belt and the output of the left [[Arithmetic combinator]]. &lt;br /&gt;
* The inserters that place items onto the belt have an enabled condition that is based on the number of items on the belt.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Splitters ==&lt;br /&gt;
&lt;br /&gt;
(These recipes are redundant with the addition of priority splitter functionality in 0.16)&lt;br /&gt;
[[file:CondSplitter.png|left|400x400px]]&lt;br /&gt;
=== Conditional splitter ===&lt;br /&gt;
* This is the simplest circuit you can have for &amp;quot;controlling&amp;quot; a splitter.&lt;br /&gt;
* A signal X=1 is transmitted from off screen when the items need to be sent down the belt.&lt;br /&gt;
* The belt on the left is enabled when X=1.&lt;br /&gt;
* The belt on the right is enabled when X=0.&lt;br /&gt;
* The two belts are wired together and to a pole. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:PrioritySplitter.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Priority Splitter ===&lt;br /&gt;
* This circuit prioritizes items to the belt going of the screen to the left but will send items straight on if the belt to the left is backed up.&lt;br /&gt;
* Its not perfect and will leak some items but its good enough for most applications. &lt;br /&gt;
* The balancer means it will work even if the supply or demand is uneven. &lt;br /&gt;
* It is critical that the belts are setup as in this picture otherwise it may not work. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Power ==&lt;br /&gt;
[[File:SteamBackup.png|left|400x400px]]&lt;br /&gt;
=== Backup steam power ===&lt;br /&gt;
* The [[steam engine]]s are not directly connected to the power network. They are connected to the power network through a [[Power switch]]. &lt;br /&gt;
* The [[power switch]] is connected to one of the [[accumulator]]s in the main network. &lt;br /&gt;
* The [[power switch]] turns on when A &amp;lt; 10. That is when the [[accumulator]]s are less than 10% full.&lt;br /&gt;
{{clear}}&lt;br /&gt;
=== Optimal usage of fuel for nuclear power ===&lt;br /&gt;
Unlike the normal steam power that adjusts fuel usage based on power usage, the [[Power_production#Nuclear_power|nuclear reactors]] spend fuel in fixed units of time. To be exact, the consumption of 1 fuel cell takes exactly 200 seconds.&lt;br /&gt;
&lt;br /&gt;
Combined with the fact that creating the nuclear fuel cells are time consuming and expensive to create, it is therefore beneficial to optimize their use to match the actual consumed power.&lt;br /&gt;
&lt;br /&gt;
[[File:NuclearCircuits.jpg]]&lt;br /&gt;
&lt;br /&gt;
The above picture shows a setup with 4 reactors, that spend only 1 fuel cell each whenever steam runs low.&lt;br /&gt;
&lt;br /&gt;
There are a few elements in this setup:&lt;br /&gt;
&lt;br /&gt;
* Storage tank that provides the [[Steam]] signal.  You should only read from one storage tank, and it should have pipe connections to all your other steam storage tanks.&lt;br /&gt;
* Chests containing [[Uranium_fuel_cell|Uranium fuel cells]] for the reactor.&lt;br /&gt;
* Output inserters that take [[Used_up_uranium_fuel_cell|Empty fuel cells]] from the reactor. This is connected to the storage tank to listen for the steam signal, and to the chests to listen for the uranium fuel cell signal. If the steam level is low and there are uranium fuel cells available, it removes the empty fuel cells from the reactor and sends an empty fuel cell signal (since &amp;quot;Read hand contents&amp;quot; is checked).&lt;br /&gt;
* Input inserters that put uranium fuel cells into the reactor. This is connected to the output inserters and listens for the empty fuel cell signal. The &amp;quot;Override stack size&amp;quot; is set to 1, so that it only inserts 1 fuel cell at a time.&lt;br /&gt;
&lt;br /&gt;
Since this design uses empty fuel cells as a signal to fill the reactor, you need to manually insert 1 uranium fuel cell into the reactor to get it started.&lt;br /&gt;
&lt;br /&gt;
== Latches ==&lt;br /&gt;
=== RS latch - single decider version ===&lt;br /&gt;
[https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=14556 This discussion] on the Factorio forums starts with the common 2 decider RS latch version, but the thread [https://forums.factorio.com/viewtopic.php?p=160896#p160896 goes on to explain] why this single decider version is better. In the thread, the latch is described as an SR latch. However, when both inputs are true, the latch will reset, so it is an RS latch.&lt;br /&gt;
==== Backup steam example ====&lt;br /&gt;
This example will turn on the steam generator when the Accumulator charge drops to 20%, but will &amp;quot;latch&amp;quot; (remember) the On state until the accumulator is charged to 90%.&lt;br /&gt;
&lt;br /&gt;
Latching is used to introduce [[Wikipedia:hysteresis|hysteresis]] and avoid the power switch rapidly cycling on and off (as the accumulator falls to 19%, charges to 20%, falls to 19% and so on).&lt;br /&gt;
[[File:SR-01-Layout.png|left]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:50em;&amp;quot;&amp;gt;&lt;br /&gt;
Blueprint string for above backup steam example&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&amp;lt;pre style=&amp;quot;white-space: pre-wrap; &lt;br /&gt;
 white-space: -moz-pre-wrap; &lt;br /&gt;
 white-space: -pre-wrap; &lt;br /&gt;
 white-space: -o-pre-wrap; &lt;br /&gt;
 word-wrap: break-word;&amp;quot;&amp;gt;&lt;br /&gt;
0eNrFVk1vozAQ/SuVz1ABCaRBq5WqXntKjqsKOTBJR8IGGTtpFPHfd+w0HyU0G6pVewkxnnmemfdmzI4tSgO1QqlZumOYV7Jh6Z8da3AleWnf6W0NLGVrVNrQG49JLuyLvYU/Z63HUBbwxtKw9QZ4zs48o15P1CBObgXkWIDy80osUHJdqTOAUfviMZAaNcI+A7fYZtKIBSiK7YgjoEAjfCgh1wpzv65KoFPqqiHnStrzCdAPA49t6Rm1NrYOWjQY7QrY6FQZwcvyX1jJFajxEYrnuRGmdGW6DCe+jx1KcB9TDYl1raoyW8ArXyM5kFVldG10djObj6zdI0kKHp2Mdiy0PysFIM8pwYKldHyOKjeo3TI8y8Wup93tl7Yv3fiaOC6zjt6z9uk4VqDaR+rY7CvBO2ZGewUec1qiaobVxaE3mtseiwK7EjVXLsaU/SKPobWe7zHrLYVmpM6WqhIZSsJg6ZKXDQyiYkzF9Vhk9xUU3d3kNiaSQUwEB/l9Hw+uZg1YjGzYiPpA1+/vpKuHjk7fRNf7JrJTsZf05MLwoIFbzLvtOvlEFZNjKepqQ5poNqjz10s9jA6N+fk8Ohx/FMFXNXDqxeCC20F901vCJxN07UjVG9K4+x9YQp5M2LUZfbTpq+XDKRsNnG4cuULZcz089HZWD+D0a8Pz52bnNPgPzTj76dlJAnDfNenZp5fHSr4ACp/NZ3fPnHrkDt64qN31vwbVuFIn43GUjCdxHIVt+xcL2lBp&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-02-Accumulator.png|left]]Accumulator outputs the current charge level as % on signal [[File:Signal-A.png]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-03-RangeDeciders.png|left]]First decider outputs &amp;quot;Set&amp;quot; ([[File:Signal-S.png]] = 1) if Accumulator is less than 20%.&lt;br /&gt;
Second decider outputs &amp;quot;Reset&amp;quot; ([[File:Signal-R.png]] = 1) once Accumulator is more than 90% full.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-04-SRLatch.png|left]]&lt;br /&gt;
==== RS Latch configuration ====&lt;br /&gt;
&#039;&#039;&#039;The central decider and green feedback wire is the actual RS Latch.&#039;&#039;&#039;&lt;br /&gt;
It latches the Set signal [[File:Signal-S.png]] until the Reset signal [[File:Signal-R.png]] is received (and vice-versa).&amp;lt;br /&amp;gt;&lt;br /&gt;
NB: the latch expects binary inputs ([[File:Signal-S.png]] &amp;amp; [[File:Signal-R.png]] must be 0 or 1) - this is why the previous two deciders are required.&amp;lt;br /&amp;gt;&lt;br /&gt;
When both inputs are true, the reset signal takes priority and the latch resets. This means it is an RS latch instead of an SR latch.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
[[File:SR-05-PowerSwitch.png|left]]The Power switch isolates the generator from the rest of the factory until [[File:Signal-S.png]] = 1&lt;br /&gt;
&amp;lt;br clear=all&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== RS latch ===&lt;br /&gt;
[[File:SRLatch.png|left|400x400px]]&lt;br /&gt;
* This should be familiar to anyone with any background in electronics. &lt;br /&gt;
* The signal is set and reset with the [[constant combinator]]s on the left by setting an A=1 signal. &lt;br /&gt;
* The latch &amp;quot;remembers&amp;quot; which one was last set and the light stays on until another signal is received.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:SRlatchinaction.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage of RS latch ===&lt;br /&gt;
* Here is an example of how you could use an RS latch.&lt;br /&gt;
* The two extra [[Decider combinator]]s provide the set and reset conditions. &lt;br /&gt;
* Petroleum gas &amp;lt; 50 and petroleum gas &amp;gt; 100. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BeltLatch.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Belt only latch ===&lt;br /&gt;
* This is the most compact latch I am aware of. &lt;br /&gt;
* To make it work you need to place &#039;&#039;&#039;3&#039;&#039;&#039; raw wood on the inside lane of the belt.&lt;br /&gt;
* I believe it will have higher latency than the combinator version but in most situations you will not notice the difference. &lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Displays ==&lt;br /&gt;
[[File:5digitDisplay.png|left|400x400px]]&lt;br /&gt;
=== Numerical Display ===&lt;br /&gt;
* Each digit is driven by its own [[Green wire]], that wire holds 15 signals one for each lamp used in the digit.&lt;br /&gt;
* [[Constant combinator]]s are used to define which lamp should light up for each value. &lt;br /&gt;
* Blueprint string including decoder [https://www.dropbox.com/s/5o13xuwthalzzfe/Brain2.txt?dl=0]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:BWDisplay.png|left|400x400px]]&lt;br /&gt;
&lt;br /&gt;
=== Black and White Grid Display ===&lt;br /&gt;
* Each row has its own [[Red wire]] connection and within that row each light has a numbered signal 0-9.&lt;br /&gt;
* We turn each light on by just setting or clearing the relevant signal.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
[[File:MultiColoredDisplay.png|left|400x400px]]&lt;br /&gt;
=== Multicolor Display by DaveMcW ===&lt;br /&gt;
* To understand how this works, you first need to understand how color lights choose which color to light up when there are multiple colored signals. &lt;br /&gt;
* The [[lamp]] will light up with the colored signal that is greater than zero and earliest in this list: Red, Green, Blue, Yellow, Pink, Cyan, White.  &lt;br /&gt;
* We have a [[Red wire]] per column, that wire has each of the colored signals on it at different values and a numbered signal for each row. &lt;br /&gt;
* There is a [[Arithmetic combinator]] for each cell that subtracts the &amp;quot;row&amp;quot; value from each of the colored signals. &lt;br /&gt;
* And this enables us to choose the color for each cell. &lt;br /&gt;
* Simple!&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;br /&gt;
* [[Circuit network]]&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Install_guide/zh&amp;diff=163717</id>
		<title>Install guide/zh</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Install_guide/zh&amp;diff=163717"/>
		<updated>2018-08-20T11:50:08Z</updated>

		<summary type="html">&lt;p&gt;Kcsixgap: Created page with &amp;quot;{{Languages}} 异星工厂可以在Steam上非常方便地购买、下载及安装。如果游戏是在[https://factorio.com 异星工厂官网]购买的，则可以直接从...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
异星工厂可以在Steam上非常方便地购买、下载及安装。如果游戏是在[https://factorio.com 异星工厂官网]购买的，则可以直接从官网下载。您可以将Steam和异星工厂的账户链接在一起，如此一来，您在Steam和官网都可以下载游戏，无需额外费用。&lt;br /&gt;
&lt;br /&gt;
请注意：从0.15版本开始，不再提供32位的游戏版本，32位的游戏版本将停留在0.14.23。如果您无法运行64位版本的程序，请升级你的电脑系统至64位版本。您可以在网络上搜索如何查询自己的操作系统是否是64位版本。 &amp;lt;!-- 这里可以贴一个外部教程查询系统版本 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 下载并安装稳定版本 ==&lt;br /&gt;
&lt;br /&gt;
=== 通过官方网站 ===&lt;br /&gt;
&lt;br /&gt;
要安装异星工厂，请访问[https://www.factorio.com/download 官网下载页面]，如果没有登录请先登录。在已经登陆的情况下可以下载最新的稳定版本。下载之后，如果是zip压缩包，请将其解压缩。如果是exe安装包，则直接运行。具体操作取决于您的下载方式。随后就可以从安装的地方运行异星工厂了。从官方网站下载的游戏是受到数字版权管理的，可以在没有网络的情况下脱离Wube服务器离线运行。然而，您不应该将其随意分发。&lt;br /&gt;
&lt;br /&gt;
这个版本将会自动更新到最新的稳定版本，如果您希望从稳定版切换到测试版，则需要改变游戏的配置来下载测试版，请观看[https://www.youtube.com/watch?v=UdpQTNcHIgY 这个视频]来了解更多详细信息。&lt;br /&gt;
&lt;br /&gt;
=== 通过Steam ===&lt;br /&gt;
&lt;br /&gt;
如果你已经购买了游戏，可以通过Steam下载和安装。只需使用Steam自带的安装即可。&lt;br /&gt;
&lt;br /&gt;
=== 通过一个自动化的程序 ===&lt;br /&gt;
&lt;br /&gt;
由于异星工厂需要进行身份验证才能下载，所以程序必须具备提供用户名和密码的功能，才能使用这个程序（例如下载管理器、wget之类的程序）。有关更多信息，请参阅[[Web Authentication API]], 和 [[Download API]].&lt;br /&gt;
&lt;br /&gt;
== 下载和安装测试版本 ==&lt;br /&gt;
&lt;br /&gt;
=== 通过官方网站 ===&lt;br /&gt;
&lt;br /&gt;
要从网站下载测试版本，只需要访问[https://www.factorio.com/download/experimental 官方下载门户]即可下载测试版本。 &amp;lt;!-- 这里有一段无法理解，没有翻译 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
从官方网站下载的游戏是受到数字版权管理的，可以在没有网络的情况下脱离Wube服务器离线运行。然而，您不应该将其随意分发。&lt;br /&gt;
&lt;br /&gt;
=== 通过Steam ===&lt;br /&gt;
&lt;br /&gt;
在Steam上，可以通过右键单击Steam库中的Factorio，选择“属性”，进入“测试”选项卡并选择测试版本进行安装。建议选择以.x结尾的测试版本（例如0.15.x），因为每当发布新版本时，游戏将会自动更新为最新的测试版本。一旦测试结束，建议将游戏切换回稳定版，否则容易出现问题。&lt;br /&gt;
&lt;br /&gt;
== 将异星工厂添加到系统启动器 ==&lt;br /&gt;
异星工厂可以固定在系统启动器托盘上，方便使用。请参阅以下链接来了解如何操作&lt;br /&gt;
&lt;br /&gt;
* [https://support.microsoft.com/en-us/help/15059/windows-8-pin-apps-folders-desktop-taskbar Windows]&lt;br /&gt;
* [https://support.apple.com/en-us/HT201730#Adding_and_removing_Dock_items Mac OSX]&lt;br /&gt;
&lt;br /&gt;
对于Linux，只需要在&amp;lt;code&amp;gt;Factorio.desktop&amp;lt;/code&amp;gt;任意位置创建文件，然后在其中插入以下文本即可，注意将路径替换为自己的路径。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Desktop Entry]&lt;br /&gt;
Encoding=UTF-8&lt;br /&gt;
Name=Factorio&lt;br /&gt;
Exec=/path/to/factorio&lt;br /&gt;
Icon=/path/to/some/icon&lt;br /&gt;
Type=Application&lt;br /&gt;
Categories=Game;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 卸载 ==&lt;br /&gt;
&lt;br /&gt;
要卸载异星工厂，请根据您的安装方法来执行以下步骤：&lt;br /&gt;
&lt;br /&gt;
=== 独立安装 ===&lt;br /&gt;
&lt;br /&gt;
如果您是下载的zip压缩包随后解压缩来安装的游戏，只需要将游戏目录删除即可。游戏不会和操作系统产生关联。&lt;br /&gt;
&lt;br /&gt;
=== 自动安装程序 ===&lt;br /&gt;
&lt;br /&gt;
如果您使用的是自动安装程序，则可以通过操作系统自带的软件管理或第三方程序管家来卸载游戏。&lt;br /&gt;
&lt;br /&gt;
=== Steam或其它游戏分发平台 ===&lt;br /&gt;
&lt;br /&gt;
若是在Steam上安装的游戏，只需要在游戏库中对游戏点击右键，选择“卸载”即可。在其它平台也是类似的操作。&lt;/div&gt;</summary>
		<author><name>Kcsixgap</name></author>
	</entry>
</feed>