In other languages:

User:Fried biter/workspace: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (cosmetic change)
([WIP] Copied Railway from special:PermanentLink/154187 to translate)
Line 4: Line 4:
----
----


{{Languages}}
:''For the research see [[Railway (research)]]''
The Railway is one of the main transport methods in Factorio. Although the installation of such a network can be complicated, and requires a large amount of resource and space, it is faster and more efficient than [[Belt transport system|belts]] and [[Logistic network|robot logistics]], especially over large distances.
Railway construction, however, is not understood instantly. It takes some time to learn the basics, such as automating transportation. Learning how to manage and maintain upkeep of a larger train network takes time and experience.
== Infrastructure ==
To build a railway, tracks (also called rails) must be built for the train to ride on. Typically, this is done via the [[rail planner]], but can also be done manually. Bear in mind that rails are placed on a two-tile grid, so a rail cannot be moved by only one tile.
=== Minimum manually operated railway ===
As a minimum a manually operated railway has to consist of:
* [[Rail]]s (tracks)
* [[Locomotive]]s
Locomotives can be entered and then manually operated by standing next to them and pressing the {{Key|ENTER}} button.
=== Switches ===
* There is no visual representation of a working switch, however the rails will appear to merge. Using the rail planner, the player must place a [[rail]] overlapping an existing rail to form a switch. Switches are forks in tracks that allow a train to pick between two directional options.
* The crossing of two straight tracks is not usable as switch, as trains have a limited turning radius. They do, however, connect [[Rail signal| signal blocks]] which helps prevent collisions.
* Parallel tracks do not interact with each other. However, switching from one track to the other can require extra resources if they are too close together; the track must turn away from the other parallel track and then turn back to it. This can create complicated networks of signals and, as such, one should generally not build parallel tracks unless they are spaced adequately. (Generally, 2 track widths apart works well)
[[File:fff-140-controlled-gates.gif|thumb|An example of a safe railway crossing.]]
=== Crossing tracks ===
'''Be careful when crossing tracks! Trains are one of the highest damaging entities in the game, and will kill most players instantly on contact.'''


{{Languages}}
A checklist of proper track crossing etiquette:
'''回路ネットワーク(Circuit networks)'''は[[Red wire/ja|レッドケーブル]][[green wire/ja|グリーンケーブル]]で形成され、ネットワークに接続された送信者(sender)からの情報に基づいて受信者(receiver)を制御できる。大体の場合、送信者は貯蔵装置で、保有するアイテムや液体に基づいたチャネルにその情報を流す。各回路ネットワークはアイテム種別ごとのチャネルを持ち、加えてユーザ定義可能な45種の[[#仮想シグナル|仮想シグナル]]チャネルを持つ。「全て(Everything)」、「いずれか(Anything)」、「それぞれ(Each)」のワイルドカードも使用可能。
 
# Zoom out, so that you can see a train coming.
# Look left, then right.
# Check for signals nearby: If a [[rail signal]] suddenly jumps from green to red or green to yellow, a train is coming. Do not cross.
# Avoid walking near the tracks, as you do not need to be fully on the tracks to get hit.
# While it is possible to get into/out of a train while it is moving, a miss can cost your life. The sides of the train can still deal damage, as well as the player being able to slip between two rail cars.
# Heavy [[Energy shield|shields]] can be used to reduce the damage taken. In extreme cases, it is possible to stop a train with your body. This will require several shield modules to not be instantly killed, and will drain a large amount of the suit's energy.
# All entities with health will take damage getting hit by a train, so take care not to leave a [[Car]] or [[Tank]] on the tracks. However, this includes hostile forces!
# Trains far from a [[train stop]] will be traveling at (near) max speed, so take extra precaution when crossing and zoom out further. Trains near a [[train stop]] or signal will slow down to stop, and will be traveling slower. Trains of different configurations will also move slower or faster.
 
A safe railroad crossing like the example shown in the picture can be built. This works by restricting access to the tracks when an oncoming train has the rails reserved. When the player is on the rails, the signals are reserved by the [[circuit network]], and the train must stop and wait until the player leaves the tracks. When a player is inside the area crossing the tracks, the train gates are closed so the player can't get on the tracks outside the crossing. This is to completely ensure a safe crossing, and is often used on servers.
 
{{clear}}


[[File:InnerOfGreenCable.jpg|right|thumb|400px|プレイヤーによる、回路ケーブル内部の図解]]
== Trains ==
Train components:


== 利用法 ==
{| class="wikitable"
=== 情報の送信 ===
|{{Imagelink|Locomotive}} || {{Imagelink|Cargo wagon}} || {{Imagelink|Fluid wagon}} || {{Imagelink|Artillery wagon}}
送信者はアイテムや流体の量、またはプレイヤーが定義可能な他のデータを送信する。それぞれの量は対応するアイテムの「チャネル」上の数値となる。例えば、原油1000単位を保有する貯蔵タンクは原油チャネルに値1000を送信する。
|}


各チャネルは独立しているので、各ネットワークはゲーム中に存在するアイテムや流体全てとユーザ定義可能な追加チャネル全て(数字の0から9、アルファベットのAからZ、9種の異なる色)に関して同時に数値を伝達できる。未使用のチャネルは値0を伝達する。
[[File:Railway-assemble-train.png|thumb|left|300px|Placing a [[Cargo wagon]] so it is attached to the train.]]


同じアイテムや流体に関する複数の送信は加算的で、原油1000単位を保有する貯蔵タンク2つが接続されているとすればそのネットワークの原油チャネルの値は2000となる。
* A train consists of at least one locomotive.
* Trains can have more than one locomotive, and any number of [[Wagon]]s.
* Locomotives can be '''manually''' driven forwards or backwards, however, they are generally slower going backwards. The left and right movement keys are used to change direction at switches.
* Trains can only drive forwards automatically. An automatic train can drive forwards and backwards when two locomotives facing different directions are connected to the train.
* A train needs [[fuel]] to drive. Fuel can be added by inserters when the train is in manual mode or parked at a station, not when waiting at a signal or standing on automatic mode.


接点で繋がる同色のワイヤ全てが1つのネットワークを形成する。言い換えれば、相互にシグナルを交換する。例えば、ある回路部品(訳注:combinator。この場合は''定数回路(constant combinator)''のようなものをさす)の入力側で2つの赤ワイヤが交わっていれば、各ワイヤはもう一方の内容を受信する。このことに気をつけないとフィードバックを生み出しうる。詳細な議論はフィードバック ([[#回路部品|算術回路]]下)を見よ。
The locomotives' inventory is only used for [[fuel]]. To transport items or fluids [[cargo wagon]]s and/or [[fluid wagon]]s have to be attached to the train. To attach rolling stock, whether a wagon or a locomotive, the player may either prepare to place one near an existing train, where a green graphic will show the player that the stock will be attached, showing a connection between the train and the new stock. Alternatively, the player may manually connect rolling stock to trains with the rolling stock connect key, if the cargo wagon was placed far away from a train. Rolling stock can likewise be disconnected with the rolling stock disconnect key. The cargo wagons can be filled or emptied manually or by up to twelve adjacent [[Inserters]] (six on each side), while fluid wagons can be filled or emptied with up to three [[pump]]s, which will automatically connect to the nipples on top.


数値は32bit符号付き整数(signed 32 bit integer)の範囲となる。つまり-2147483648から2147483647まで。数値はオーバーフロー時にラップアラウンドし、たとえば2147483647 + 10 は -2147483639 である。
{{clear}}


=== 装置の制御 ===
== Stations ==
受信者は送信された情報を用いて、大概は装置をオン・オフする。異なるチャネル同士やチャネルと特定の値とを比較することもできる。
[[File:station-example-1.png|thumb|right|256px|A very minimal train station.]]
Station Components:
{| class="wikitable"
|{{Imagelink|Train stop}} || {{Imagelink|Straight rail|Rail|Rails}} || {{Imagelink|Inserter|Inserters}} or {{Imagelink|pump|pump|Pumps}}
|}


受信側の装置は繋がれた各ワイヤの全シグナルを、レッドケーブルとグリーンケーブルの間であろうが足し合わせる。例えば、あるインサータが鉄板20を伝達するレッドケーブルと銅板10を伝達するグリーンケーブル、さらに鉄板5を伝達するグリーンケーブルと接続されているなら、受信者は鉄板25と銅板10を受信する。


== 装置 ==
A '''train station''' is a combination of at least one [[train stop]] plus a [[storage]] and/or distribution system, used to fill or empty [[cargo wagon]]s and/or [[fluid wagon]]s, load [[fuel]] into the [[Locomotive|locomotive(s)]], load ammunition into [[artillery wagon]]s, or repair trains.


回路ネットワークに接続可能な装置は情報ペインの右上角に「回路ネットワーク」アイコンがある。これをクリックするとそのデバイスが利用可能な回路ネットワークオプションが表示される(注意:レッド/グリーンケーブルが接続されていなければ、代わりに「接続されていません」が表示される)。その隣のアイコンをクリックすると装置は(範囲内にあれば)物流ネットワークに接続でき、これも条件になりうる。
'''Don't mix up ''train stations'' with ''train stops''.''' A train station is a concept, whereas a [[train stop]] is an item.


条件は回路(レッド/グリーンケーブルの合計シグナル)と物流ネットワークの両方にセット可能で、論理積(logical AND)として働く。
[[Inserter]]s placed next to train tracks are used to load/unload trains at train stops. Inserters are the only way to automatically get items out of and into cargo and artillery wagons; pumps are the only way to automatically get fluids into and out of fluid wagons.


以下の装置は回路ネットワークに接続可能。
{{clear}}


{| class="wikitable mw-collapsible"
== Signals ==
|-
The two types of signals in Factorio:
! 装置 !! 出力しうるシグナル !! 利用可能な制御オプション
{| class="wikitable"
|-
| {{Imagelink|Rail signal}} || {{Imagelink|Rail chain signal}}
| {{Imagelink|Transport belt|Transport belts/ja|搬送ベルト各種}} || 乗っているものを回路ネットワークに送信可能。
*''パルスモード'': アイテムがベルトに載った瞬間の1tickだけシグナルが送信される。
*''ホールドモード'': アイテムがベルト上にある間中、ずっとシグナルが送信される。
|| 条件により起動可能。
|-
| {{Imagelink|Inserter|Inserters/ja|インサータ各種}} || 掴んでいるアイテムを回路ネットワークに送信可能。
*''パルスモード'': アイテムを掴んだ瞬間の1tickだけシグナルが送信される。
*''ホールドモード'': アイテムを掴んでいる間中、ずっとシグナルが送信される。
|| 条件により起動可能。インサータスタックサイズも制御信号からオーバーライド(設定)可能。
|-
| {{imagelink|Filter inserter|Filter inserter/ja|フィルターインサータ}} || 上に同じ || 加えて、フィルターも回路ネットワークから設定可能。
|-
| {{Imagelink|Wooden chest|Chests/ja|チェスト各種}} || 内容物を回路ネットワークに送信可能。物流ネットワークにつながるチェスト(Logistic chests)はさらに[[logistic network/ja|物流ネットワーク]]へも送信可能。 ||
|-
| {{imagelink|Requester chest|Requester chest/ja|要求チェスト}} || 上に同じ || 要求するアイテムを回路ネットワークから設定可能。
|-
| {{imagelink|Storage tank|Storage tank/ja|貯蔵タンク}} || 内容物の流体を回路ネットワークに送信可能。 ||
|-
| {{imagelink|Gate|Gate/ja|ゲート}} || 信号を回路ネットワークに送信可能。 || 条件により開くことができる。
|-
| {{imagelink|Rail signal|Rail signal/ja|列車用信号}} || その状態を回路ネットワークに送信可能。 || 条件により赤にすることができる。
|-
| {{imagelink|Train stop|Train stop/ja|駅}} || 停まった列車の内容や読み取った列車のIDコードを回路ネットワークに送信可能。|| 回路ネットワークから列車に情報を送信し待機条件に用いたり、駅自体を有効化/無効化したりできる。
|-
| {{imagelink|Accumulator|Accumulator/ja|蓄電池}} || 充電量(%)を回路ネットワークに送信可能。 ||
|-
| {{imagelink|Roboport|Roboport/ja|ロボットステーション}} || 物流ネットワークの内容やロボットの統計を回路ネットワークに送信可能。統計用のシグナルは設定可能。||
|-
| {{imagelink|Burner mining drill|Burner mining drill/ja|燃料式掘削機}} || 掘削機自体、または掘削機が設置されている鉱脈全体から予期される資源埋蔵量を送信可能。|| 条件により起動可能。
|-
| {{imagelink|Electric mining drill|Electric mining drill/ja|電動掘削機}} || 掘削機自体、または掘削機が設置されている鉱脈全体から予期される資源埋蔵量を送信可能。|| 条件により起動可能。
|-
| {{imagelink|Pumpjack|Pumpjack/ja|油井}} || 現在の掘削レートを送信可能。 || 条件により起動可能。
|-
| {{imagelink|Power switch|Power switch/ja|電源スイッチ}} || || 条件により電源ネットワークを接続できる。
|-
| {{imagelink|Programmable speaker|Programmable speaker/ja|プログラマブルスピーカー}} || || 回路ネットワークの信号に基づき、アラートを表示し音を再生する。簡単な音色を作ることもできる。
|-
| {{imagelink|Lamp|Lamp/ja|ランプ}} || || 条件により起動可能。色シグナルを受信したらその色になる。
|-
| {{imagelink|Offshore pump|Offshore pump/ja|汲み上げポンプ}} || || 条件により起動可能。
|-
| {{imagelink|Pump|Pump/ja|ポンプ}} || || 条件により起動可能。
|}
|}


== 物理的ネットワーク構造 ==
Understanding rail signals can be difficult. Several terms critical to understanding them are below:
回路ネットワークは同色のケーブルで接続された装置のみの間で構成される。装置間を直接結んでもよいし、間に任意の電柱を挟んでも良い。ケーブル長は直前の接続で制約される。
*Rail segment
: A piece of track (one item).
*Segment
: A single path of continuous track without intersections or switches. This becomes important when signals are employed. The player may mouse over a segment to see its number. It's number is unique within the world, however does not start from 0 or 1.
*Block
: A set of segments defined by rail signals. By default every connected segment belongs to one block, no matter whether a train can drive on it or not, and even if it can be driven only in one direction (e.g. at a switch, both segments of the switch belong to the same block). The blocks are shown as colored lines on the rails when the player holds a rail or rail chain signal.
 
Rail signals are used to employ multiple trains automatically. Note that driving a train manually ignores most of the rules described here; other automatic trains will follow signaling indicted by the player's movement dynamically, however it will sometimes be not possible to avoid a collision for automatic trains if the player ignores red/yellow signals. Always beware automatic trains and give them the right of way.
 
'''See [https://forums.factorio.com/viewtopic.php?f=18&t=3811#p28310 this forum post]''' for a good explanation about blocks.
 
=== Basic Signaling Rules ===
* There can only be one train in a block at any time. A train spanning multiple blocks occupies them all.
* A red signal means that the following block is occupied by a train.
* A yellow signal means that a train is approaching and already has the approval to enter the following block.
* [[Rail signal]]s separate a new block and reflect its state: green - free, yellow - reserved, red - occupied
* [[Rail chain signal]]s separate a new block and reflect the state of the next [[Rail signal]](s): see above, blue - at least one of the paths is blocked, but not all
* A train can only pass a signal on the right of the track, or if there is a signal on both sides on the same rail segment. Of course, manual driving overrides this.
 
{{clear}}
 
== Deadlocks ==
A deadlock or gridlock can happen when every train is locked by another. In nearly every case two or more trains are standing so that every train blocks (by minimum) one other train.
 
=== Deadlock occurrence ===
Deadlocks occur when two or more trains are prevented from continuing through an intersection, due to an unsolvable signal conflict. There are a few different types of deadlocks:
 
# Temporary - These are caused by a temporary hiccup in a train's path, such as a loading train being in the way, or created by closing a signal with the [[circuit network]]. These often resolve themselves.
# Semi-permanent - These are the result of a problem with pathing, often created by a fuel-less train or broken rail, and may require player interaction to resolve, or (in the case of broken rails) may be corrected automatically by construction robots.
# Permanent - This type is the worst, and cannot be resolved automatically, often requiring the player to manually drive several trains to get them out of the intersection. These often are caused by incorrect signal placement or unreachable stations.
 
It's important to remember that deadlocks can happen by chance, and by mistake of the player. Sometimes even perfectly signaled rails have issues. The rate of deadlocks is inversely proportional to the quality of signaling, however.
 
=== Factors that influence the deadlock chance ===
* Train length (shorter trains will have a lower chance with the same rail/signal layout, due to having less effect on the rails they're on.)
* Size of the blocks: More space for the blocks means lower chance of deadlock.
* Track layout: Some layouts have a higher chance of locking than others.
* Quantity of trains - More trains trying to use an intersection will result in higher chance of deadlock.
* The chance is also much higher if trains need to wait often in areas with rail-crossings.
 
Knowing the factors, how can deadlocks be reduced?
 
* Don't use 4-way junctions or roundabouts (circles) to create junctions.
* Use better 3-way junctions. See [http://www.factorioforums.com/forum/viewtopic.php?f=18&t=9044 A Detailed Look at a Bidirectional Three-way Train Intersection]
* Use roundabouts only for changing direction of train, and never for high traffic intersections.
* Build more tracks around junctions. Don't have one junction be the only way to reach a place, add redundancy. This keeps a small problem a small problem.
 
== Automated transport ==
[[File:train-schedule-gui.png|thumb|300px|The scheduale tab in the train GUI: 1 - switch between automatic and manual driving mode; 2 - add new train station; 3 - delete selected station; 4 - send train to selected station; 5 - add wait condition for selected station; 6 - delete selected wait condition; 7 - change logical mode of selected wait condition]]
 
Trains set on "Automatic" choose their destination stop and route on departure, and after waiting at a chain signal for five seconds, and when their destination stop disables itself by circuit condition. They choose the shortest route using a [[Railway/Train_path_finding|path finding algorithm]] that will get them to an enabled train stop with the right name, taking penalties for any apparent-at-the-time delays into account. If no such train stop exists they will skip the stop and go on to the next.
 
This section covers items used to make trains automatically transport items between stations. The player should be familiar with creating a rail system.
 
First, the player has to setup a rail system with at least two train stops, which are placed in the right-hand side of the  expected train arrival direction. By hovering over the train stop with the mouse you see the positions of the vehicles for better setting up the train station (including (un)loading machinery, refueling/repair installations).
 
When you set up the train schedule (see below) and fuel the train, you can start the train on it's schedule by switching from manual to automatic driving mode.
 
=== Train schedule ===
The player can set up a list of train stations in the upper window. The train will route to stops in the given order, if it's at the end it will continue with the first. Currently, it's not possible to make a one-time schedule. Stations can be added by clicking button 2 (see picture). A pop-up appears with a list of all stop names. If you select one, another pop-up appears for you to select a wait condition.
 
Wait conditions are used to tell the train when to leave the station. There are 7 types of wait conditions:
* '''Time passed'''
* '''Inventory full''' - All inventories of the train are full.
* '''Inventory empty''' - Same as above, but empty.
* '''Item count''' - The train (all cargoes summed) contains a specific amount of a certain item.
* '''Circuit condition''' - The train stop is connectable to the [[Circuit network]], so the signals can used for wait conditions.
* '''Inactivity''' - No items were added or removed for the specified amount of seconds.
* '''Fluid count''' - The train (all fluid wagons summed) contains a specific amount of a certain fluid.
 
Hereafter the word "term" is used to describe ''one'' type of wait condition, and the words "wait condition" are used to describe the whole set of terms (it turns a bit into maths).
 
If you add more than one term, you can change the connection of those using the logical operators AND and OR (button 7). An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.
 
When mixing AND and OR terms, the logic is grouped by the OR terms. When evaluating the wait condition, the first term is evaluated along with all AND terms immediately following up to but excluding the next occurring OR term. If they all evaluate true, the wait condition evaluates true. Otherwise, evaluation continues with that next occurring OR term and all AND terms immediately following it, up to the next OR term. This continues until either an OR group evaluates true and the wait condition is satisfied, or all terms have been checked.
 
==== Examples ====
<div class="toccolours mw-collapsible mw-collapsed" style="width:800px">
Expand for examples
<div class="mw-collapsible-content">
Wait until full, up to 30 seconds:
 
<pre>
Full cargo inventory
OR 30 seconds passed
</pre>
 
Wait until cargo full, ''or'' circuit condition Oil > 3000:
 
<pre>
Full cargo inventory
OR Circuit condition - Oil > 3000
</pre>
 
Wait until empty, ''and'' 30 seconds passed, ''and'' 5 seconds of inactivity:
 
<pre>
Empty cargo inventory
AND 30 seconds passed
AND 5 seconds of inactivity
</pre>
 
Wait until iron ore is low, ''or'' copper ore is low ''and'' at least 30 seconds passed:
 
<pre>
Cargo: Iron ore < 500
AND 30 seconds passed
OR Cargo: Copper ore < 500
AND 30 seconds passed
</pre>


接続されたケーブルの集まりがネットワークを分離することに注意せよ。例えば、4つの赤ネットワークと3つの緑ネットワークが同時に存在しうる。赤と緑のケーブルが同じ電柱や装置で触れ合ってもネットワークは分離されたままで、リンクは生じない。しかし、赤ケーブル同士や緑ケーブル同士が触れあえばリンクする。密接したネットワーク間を分離するなら異なった色のケーブルを使うべき。
Factorio's wait condition logic is read as disjunctive normal form ([https://en.wikipedia.org/wiki/Disjunctive_normal_form DNF]), and so this last example is processed as (note the parenthesis):


* ケーブルや銅線を電柱と結ぶには、単にそれをクリックし、そして電柱をクリックする。
<pre>((Cargo: Iron ore < 500 AND 30 seconds passed) OR (Cargo: Copper ore < 500 AND 30 seconds passed))</pre>
* ケーブルや銅線の接続を削除するには、同色のケーブルを既存の接続の上から設置する。ケーブルや銅線は戻ってこない。
* 電柱からの'''全ての'''接続を削除するには、電柱をShift+クリック。一回目で電気的接続が、二回目でレッド/グリーンケーブルが全て取り除かれる。ケーブルは戻ってこない。
* [[arithmetic combinator/ja|算術回路]]や[[decider combinator/ja|条件回路]]は、入出力の正しい側に繋ぐよう注意。「詳細を表示(Show details)」モードでオリエンテーションが見られる。(訳注: ?)
* マウスカーソルをアイテム上にホバーするとそのアイテムと接続された全てのケーブルがハイライトされる。
* マウスカーソルをネットワークを構成する電柱にホバーするとネットワーク上の信号が見られる。回路部品のような特定のアイテムにホバーしたときもその入出力シグナルが見られる。


== 回路部品 ==
Which is the same as this:
回路部品(Combinators)は送信も受信もでき、より高度な機能を回路ネットワーク上で利用可能とする。


*[[constant combinator/ja|定数回路]]は接続された任意のネットワークの任意のチャネルに15個までの値を送信する(今のところ赤/緑のチャネルを指定することは出来ないので、各色異なる値にしたければ、それぞれの色用に2つの回路部品を用いること)。任意のアイテム/[[Automatic control/ja/Virtual signals|仮想シグナル]]チャネルを使用できる。
<pre>((Cargo: Iron ore < 500 OR Cargo: Copper ore < 500) AND 30 seconds passed)</pre>
**15スロット中2スロットを'''同じ'''チャネルに設定した場合、その和の値を1つのスロットで設定した場合と同様になることに注意。
*[[arithmetic combinator/ja|算術回路]]は入力値に算術演算を行い結果を指定された出力チャネルに送信する。入出力は任意のアイテム/仮想シグナルチャネルをとりうる。
** 接続: 算術回路は'''入力(input)'''側で赤/緑ネットワークと接続し(本体に端子がついており、点火プラグのように見える)、算術計算を行って'''出力(output)'''側の指定されたチャネルに送信する(出力ケーブルは装置本体からやや引き出されている)。
** フィードバック: 入力ネットワークと出力ネットワークは'''同じネットワークではない'''事に注意せよ。出力ネットワークを入力ネットワークに戻して繋ぐことはフィードバックループを引き起こしうる。例えば、銅板の値に1を加えて銅板として送信する操作は出力が入力に戻されれば無限ループを引き起こす。銅板の値は急速に(一瞬ではない)増えていく(上昇率は現在のtickレートによって決定される)。この技法を条件回路と組み合わせれば電子時計、ゲート、他にも様々なシステムが作れる。より発展的な技法は[[Combinator Tutorial/ja|回路チュートリアル]]を見よ。
** それぞれ(Each): この回路部品は「それぞれ」シグナルを入出力に使用でき、その場合非ゼロの入力チャネル'''全て'''にこの回路の演算が適用され、出力側に送信される。入出力の両者にそれぞれシグナルを、演算には何も変えないようなもの(0を足すなど)を用いると、「一方通行」ケーブルと等価になる。入力ネットワークのすべての情報が出力ネットワークにコピーされ、逆は真でない。
**複数ネットワーク: 算術回路は入力側に赤ネットワークも緑ネットワークも繋げられ、それらの入植を足し合わせる。
*[[decider combinator/ja|条件回路]]は算術回路のように振る舞うが、値を比較するために設計されている。本質的に、条件を表すものである。接続、フィードバック、それぞれシグナルについて言えば上述の通り機能する。それらに加え、全て(Everything)シグナルやいずれか(Anything)シグナルも扱え、複数のネットワークに接続された場合は加算より複雑な関数を適用することができる。使い方に関する詳細は[[Decider combinator/ja|条件回路]]項を見よ。


== 仮想シグナル ==
Unfortunately, there is no way to write that shorter form in the current UI.
</div></div>


仮想シグナル(Virtual signal)はアイテムを表さない特別なシグナル。3種の論理シグナル(logic signal)を除いては、仮想シグナルの振る舞いもアイテムシグナルと変わらない。
=== Troubleshooting ===


45種の仮想シグナルがネットワーク上に送信可能。数字の0から9まで、アルファベットのAからZまで、色の赤(red)、緑(green)、青(blue)、黄(yellow)、紅(magenta)(訳注:0.15.40現在のbase.cfgではピンク(pink))、シアン(cyan)、白(white)、グレー(gray)、黒(black)が含まれる。
Below are some things to verify if a rail system or train is not working.


=== 論理シグナル ===
* Is the train fueled? Ensure that the locomotive has [[fuel]] of some kind.
[[File:logic_signals.png|300px|thumb|3種の論理シグナルのアイコン]]
* Misplaced or non-functional switches? Ensure that the train can plan a path through the switches.
仮想シグナルのうち3種はネットワークに送信できず、かわりに複数のシグナルへと特殊なロジックを適用する。
* Another train on the same [[Railway#Segment|segment]] or [[Railway#Block|block]]? Make sure the path of the train is unobstructed.
* Train stops placed correctly? Make sure that the yellow arrows when hovering on the stop point towards the end or exit of the stop.
* Is the train allowed to enter signals from the right direction? Are the signals set correctly?
* If a track is supposed to be two-way, the rail signals should be opposite each other. You can verify they match up by hovering the cursor over one. For a matched pair, it will show the other.


==== 全て ====
==== No path ====
''全て(Everything)''は条件の左辺に利用可能。各入力シグナルについて条件が真である時に真となる。シグナルが来ないときも真となる。つまり、''全て''シグナルは[[:Wikipedia:ja:全称記号|全称量化]]として振る舞う。
When trains cannot reach the target, a "no path" symbol pops up over the locomotive. Check:
* Can the train reach its current destination by '''only driving forward'''? Build turning slopes or place a locomotive at both ends of a train!
* Are the train stops standing in the right direction? Train stops must be on the right hand side of the track.
* If you use rail signals, check that the signals are all allowing traffic in the correct direction.
* Check for interruptions in the train tracks, drive to the station manually to check there are no rail parts missing. Especially near junctions these can be hard to spot if missing.


[[decider combinator/ja|条件回路]]の出力にも''全て''が使える。その場合、条件を満たす全てのシグナルを出力する。''全て''か''いずれか''シグナルを条件に用いたときのみ、複数のシグナルが条件をパスできる。
If you are still having problems, consider:
* Driving the train manually, and as you pass each switch, try switching to automatic. When it works, you will know the rough area of the problem.
[http://imgur.com/a/Nq2Yk A pictorial summary of typical problems].


==== いずれか ====
<!-- These tutorials are no longer included because they are outdated. However, this section can be put back into the article when there are newer or in-wiki tutorials
''いずれか(Anything)''は条件の左辺に利用可能。少なくとも1つのシグナルについて条件が真である時に真となる。つまり、''いずれか''シグナルは[[:Wikipedia:ja:存在記号|存在量化]]として振る舞う。


==== それぞれ ====
== User tips and tricks ==
''それぞれ(Each)''は[[decider combinator/ja|条件]]、[[arithmetic combinator/ja|算術]]回路の入力側の左辺および出力にのみ利用可能。入力も''それぞれ''のときに限り出力にも指定できる。入出力の両方に指定されると、その回路部品を各入力シグナルについて個別に適用する。入力にのみ指定されると、回路部品の出力は適用結果の総和となる。
This section contains further links to in-depth knowledge. As a general advisory, tips given in this section detail the more intricate mechanics in the game and can be dangerous to the experience of players who wish to discover better methods on their own. '''''Be warned that much of the info below could be outdated/incorrect.'''''


== チュートリアル ==
=== Tutorials ===
*'''[[Circuit-network Cookbook/ja|回路ネットワーク クックブック]]''' - ''例示に重点を置いたチュートリアル。回路ネットワークの使い方と利点を知りたい初心者向け''
==== Videos ====
*'''[[Combinator Tutorial/ja|回路チュートリアル]]''' - ''主に文字で、詳細なチュートリアル。''
We recommend viewing some videos of how to build a simple railway, which makes the basic steps very simple.


== 物流ネットワーク ==
* [https://www.youtube.com/watch?v=mXr7y02ZG00 Rail Signaling - Easy Rules for Placing Signals]
[[logistic robot/ja|物流ロボット]]が用いる物流ネットワークは本質的に、赤/緑の有線ネットワークと同列の第三の(ワイヤレスの)ネットワークである。物流ネットワークは中核[[roboport/ja|ロボットステーション]]周辺が基本となる。
* [http://www.factorioforums.com/forum/viewtopic.php?f=54&t=6984 Factorio Tutorial: Signals and Multi-train Networks] by Gepwin (read the whole article!)
* [http://www.factorioforums.com/forum/viewtopic.php?f=8&t=5451 Factorio Traintorial, all about trains] by Gepwin.
* ''v0.10, English [http://www.youtube.com/watch?v=XSGYSbEPpbM Rail basics tutorial] by MangledPork Gaming.
** And the second part of the tutorial [http://www.youtube.com/watch?v=k6wxl4FdSuQ Factorio Rail Tutorial Part 2: Signals]


いくつかの装置もまた物流ネットワークに接続可能。装置に回路・物流ネットワーク双方の条件が設定されていれば、両方の条件が真の場合にアクティブとなる。
* ''[http://www.reddit.com/r/factorio/comments/26igal/train_signal_tutorial/ A train-signal tutorial with pictures].
* v0.8, English [http://www.youtube.com/watch?v=RmyOdxi5hR4 Inzainia Plays: Factorio ver 0.8.0 EP:8 (Trains, Trains, Trains!!!)]
* v0.6, German [http://www.youtube.com/watch?v=idOaZpX8lnA Silver's Factorio Basic Train Tutorial]


より詳細には[[Logistic network/ja|物流ネットワーク]]及び[[Roboport/ja|ロボットステーション]]を見よ。
-->


<!-- History section skipped -->
== Achievements ==
{{Achievement|trans-factorio-express}}


== 関連項目 ==
== Connection to [http://www.openttd.org/ OpenTTD] ==
* [[Circuit network (research)/ja|回路ネットワーク(研究)]]
Factorio's railway system works basically exactly like [http://wiki.openttd.org/Signals#Block_signals≈ the block signals in Open Traffic Tycoon Deluxe]. Players who have ever played that game will find some elements of it in Factorio. If not, they can learn from the OpenTTD documentation.
* [http://www.factorioforums.com/forum/viewtopic.php?f=6&t=4728&p=37251#p37157 Logic gates revisited]


[[Category: Circuit network/ja]]
== See also ==
* [[Locomotive]]
* [[Cargo wagon]]

Revision as of 19:05, 14 March 2018

作業場/workspace 日本語話者の方、マサカリ投げてくださると助かります


For the research see Railway (research)

The Railway is one of the main transport methods in Factorio. Although the installation of such a network can be complicated, and requires a large amount of resource and space, it is faster and more efficient than belts and robot logistics, especially over large distances.

Railway construction, however, is not understood instantly. It takes some time to learn the basics, such as automating transportation. Learning how to manage and maintain upkeep of a larger train network takes time and experience.

Infrastructure

To build a railway, tracks (also called rails) must be built for the train to ride on. Typically, this is done via the rail planner, but can also be done manually. Bear in mind that rails are placed on a two-tile grid, so a rail cannot be moved by only one tile.

Minimum manually operated railway

As a minimum a manually operated railway has to consist of:

Locomotives can be entered and then manually operated by standing next to them and pressing the ENTER button.

Switches

  • There is no visual representation of a working switch, however the rails will appear to merge. Using the rail planner, the player must place a rail overlapping an existing rail to form a switch. Switches are forks in tracks that allow a train to pick between two directional options.
  • The crossing of two straight tracks is not usable as switch, as trains have a limited turning radius. They do, however, connect signal blocks which helps prevent collisions.
  • Parallel tracks do not interact with each other. However, switching from one track to the other can require extra resources if they are too close together; the track must turn away from the other parallel track and then turn back to it. This can create complicated networks of signals and, as such, one should generally not build parallel tracks unless they are spaced adequately. (Generally, 2 track widths apart works well)
An example of a safe railway crossing.

Crossing tracks

Be careful when crossing tracks! Trains are one of the highest damaging entities in the game, and will kill most players instantly on contact.

A checklist of proper track crossing etiquette:

  1. Zoom out, so that you can see a train coming.
  2. Look left, then right.
  3. Check for signals nearby: If a rail signal suddenly jumps from green to red or green to yellow, a train is coming. Do not cross.
  4. Avoid walking near the tracks, as you do not need to be fully on the tracks to get hit.
  5. While it is possible to get into/out of a train while it is moving, a miss can cost your life. The sides of the train can still deal damage, as well as the player being able to slip between two rail cars.
  6. Heavy shields can be used to reduce the damage taken. In extreme cases, it is possible to stop a train with your body. This will require several shield modules to not be instantly killed, and will drain a large amount of the suit's energy.
  7. All entities with health will take damage getting hit by a train, so take care not to leave a Car or Tank on the tracks. However, this includes hostile forces!
  8. Trains far from a train stop will be traveling at (near) max speed, so take extra precaution when crossing and zoom out further. Trains near a train stop or signal will slow down to stop, and will be traveling slower. Trains of different configurations will also move slower or faster.

A safe railroad crossing like the example shown in the picture can be built. This works by restricting access to the tracks when an oncoming train has the rails reserved. When the player is on the rails, the signals are reserved by the circuit network, and the train must stop and wait until the player leaves the tracks. When a player is inside the area crossing the tracks, the train gates are closed so the player can't get on the tracks outside the crossing. This is to completely ensure a safe crossing, and is often used on servers.

Trains

Train components:

Locomotive.png
Locomotive
Cargo wagon.png
Cargo wagon
Fluid wagon.png
Fluid wagon
Artillery wagon.png
Artillery wagon
Placing a Cargo wagon so it is attached to the train.
  • A train consists of at least one locomotive.
  • Trains can have more than one locomotive, and any number of Wagons.
  • Locomotives can be manually driven forwards or backwards, however, they are generally slower going backwards. The left and right movement keys are used to change direction at switches.
  • Trains can only drive forwards automatically. An automatic train can drive forwards and backwards when two locomotives facing different directions are connected to the train.
  • A train needs fuel to drive. Fuel can be added by inserters when the train is in manual mode or parked at a station, not when waiting at a signal or standing on automatic mode.

The locomotives' inventory is only used for fuel. To transport items or fluids cargo wagons and/or fluid wagons have to be attached to the train. To attach rolling stock, whether a wagon or a locomotive, the player may either prepare to place one near an existing train, where a green graphic will show the player that the stock will be attached, showing a connection between the train and the new stock. Alternatively, the player may manually connect rolling stock to trains with the rolling stock connect key, if the cargo wagon was placed far away from a train. Rolling stock can likewise be disconnected with the rolling stock disconnect key. The cargo wagons can be filled or emptied manually or by up to twelve adjacent Inserters (six on each side), while fluid wagons can be filled or emptied with up to three pumps, which will automatically connect to the nipples on top.

Stations

A very minimal train station.

Station Components:

Train stop.png
Train stop
Straight rail.png
Rails
Inserter.png
Inserters or
Pump.png
Pumps


A train station is a combination of at least one train stop plus a storage and/or distribution system, used to fill or empty cargo wagons and/or fluid wagons, load fuel into the locomotive(s), load ammunition into artillery wagons, or repair trains.

Don't mix up train stations with train stops. A train station is a concept, whereas a train stop is an item.

Inserters placed next to train tracks are used to load/unload trains at train stops. Inserters are the only way to automatically get items out of and into cargo and artillery wagons; pumps are the only way to automatically get fluids into and out of fluid wagons.

Signals

The two types of signals in Factorio:

Rail signal.png
Rail signal
Rail chain signal.png
Rail chain signal

Understanding rail signals can be difficult. Several terms critical to understanding them are below:

  • Rail segment
A piece of track (one item).
  • Segment
A single path of continuous track without intersections or switches. This becomes important when signals are employed. The player may mouse over a segment to see its number. It's number is unique within the world, however does not start from 0 or 1.
  • Block
A set of segments defined by rail signals. By default every connected segment belongs to one block, no matter whether a train can drive on it or not, and even if it can be driven only in one direction (e.g. at a switch, both segments of the switch belong to the same block). The blocks are shown as colored lines on the rails when the player holds a rail or rail chain signal.

Rail signals are used to employ multiple trains automatically. Note that driving a train manually ignores most of the rules described here; other automatic trains will follow signaling indicted by the player's movement dynamically, however it will sometimes be not possible to avoid a collision for automatic trains if the player ignores red/yellow signals. Always beware automatic trains and give them the right of way.

See this forum post for a good explanation about blocks.

Basic Signaling Rules

  • There can only be one train in a block at any time. A train spanning multiple blocks occupies them all.
  • A red signal means that the following block is occupied by a train.
  • A yellow signal means that a train is approaching and already has the approval to enter the following block.
  • Rail signals separate a new block and reflect its state: green - free, yellow - reserved, red - occupied
  • Rail chain signals separate a new block and reflect the state of the next Rail signal(s): see above, blue - at least one of the paths is blocked, but not all
  • A train can only pass a signal on the right of the track, or if there is a signal on both sides on the same rail segment. Of course, manual driving overrides this.

Deadlocks

A deadlock or gridlock can happen when every train is locked by another. In nearly every case two or more trains are standing so that every train blocks (by minimum) one other train.

Deadlock occurrence

Deadlocks occur when two or more trains are prevented from continuing through an intersection, due to an unsolvable signal conflict. There are a few different types of deadlocks:

  1. Temporary - These are caused by a temporary hiccup in a train's path, such as a loading train being in the way, or created by closing a signal with the circuit network. These often resolve themselves.
  2. Semi-permanent - These are the result of a problem with pathing, often created by a fuel-less train or broken rail, and may require player interaction to resolve, or (in the case of broken rails) may be corrected automatically by construction robots.
  3. Permanent - This type is the worst, and cannot be resolved automatically, often requiring the player to manually drive several trains to get them out of the intersection. These often are caused by incorrect signal placement or unreachable stations.

It's important to remember that deadlocks can happen by chance, and by mistake of the player. Sometimes even perfectly signaled rails have issues. The rate of deadlocks is inversely proportional to the quality of signaling, however.

Factors that influence the deadlock chance

  • Train length (shorter trains will have a lower chance with the same rail/signal layout, due to having less effect on the rails they're on.)
  • Size of the blocks: More space for the blocks means lower chance of deadlock.
  • Track layout: Some layouts have a higher chance of locking than others.
  • Quantity of trains - More trains trying to use an intersection will result in higher chance of deadlock.
  • The chance is also much higher if trains need to wait often in areas with rail-crossings.

Knowing the factors, how can deadlocks be reduced?

  • Don't use 4-way junctions or roundabouts (circles) to create junctions.
  • Use better 3-way junctions. See A Detailed Look at a Bidirectional Three-way Train Intersection
  • Use roundabouts only for changing direction of train, and never for high traffic intersections.
  • Build more tracks around junctions. Don't have one junction be the only way to reach a place, add redundancy. This keeps a small problem a small problem.

Automated transport

The scheduale tab in the train GUI: 1 - switch between automatic and manual driving mode; 2 - add new train station; 3 - delete selected station; 4 - send train to selected station; 5 - add wait condition for selected station; 6 - delete selected wait condition; 7 - change logical mode of selected wait condition

Trains set on "Automatic" choose their destination stop and route on departure, and after waiting at a chain signal for five seconds, and when their destination stop disables itself by circuit condition. They choose the shortest route using a path finding algorithm that will get them to an enabled train stop with the right name, taking penalties for any apparent-at-the-time delays into account. If no such train stop exists they will skip the stop and go on to the next.

This section covers items used to make trains automatically transport items between stations. The player should be familiar with creating a rail system.

First, the player has to setup a rail system with at least two train stops, which are placed in the right-hand side of the expected train arrival direction. By hovering over the train stop with the mouse you see the positions of the vehicles for better setting up the train station (including (un)loading machinery, refueling/repair installations).

When you set up the train schedule (see below) and fuel the train, you can start the train on it's schedule by switching from manual to automatic driving mode.

Train schedule

The player can set up a list of train stations in the upper window. The train will route to stops in the given order, if it's at the end it will continue with the first. Currently, it's not possible to make a one-time schedule. Stations can be added by clicking button 2 (see picture). A pop-up appears with a list of all stop names. If you select one, another pop-up appears for you to select a wait condition.

Wait conditions are used to tell the train when to leave the station. There are 7 types of wait conditions:

  • Time passed
  • Inventory full - All inventories of the train are full.
  • Inventory empty - Same as above, but empty.
  • Item count - The train (all cargoes summed) contains a specific amount of a certain item.
  • Circuit condition - The train stop is connectable to the Circuit network, so the signals can used for wait conditions.
  • Inactivity - No items were added or removed for the specified amount of seconds.
  • Fluid count - The train (all fluid wagons summed) contains a specific amount of a certain fluid.

Hereafter the word "term" is used to describe one type of wait condition, and the words "wait condition" are used to describe the whole set of terms (it turns a bit into maths).

If you add more than one term, you can change the connection of those using the logical operators AND and OR (button 7). An AND condition will result in true if all terms are true. An OR condition will return true if at least one of the terms is true.

When mixing AND and OR terms, the logic is grouped by the OR terms. When evaluating the wait condition, the first term is evaluated along with all AND terms immediately following up to but excluding the next occurring OR term. If they all evaluate true, the wait condition evaluates true. Otherwise, evaluation continues with that next occurring OR term and all AND terms immediately following it, up to the next OR term. This continues until either an OR group evaluates true and the wait condition is satisfied, or all terms have been checked.

Examples

Expand for examples

Wait until full, up to 30 seconds:

Full cargo inventory
OR 30 seconds passed

Wait until cargo full, or circuit condition Oil > 3000:

Full cargo inventory
OR Circuit condition - Oil > 3000

Wait until empty, and 30 seconds passed, and 5 seconds of inactivity:

Empty cargo inventory
AND 30 seconds passed
AND 5 seconds of inactivity

Wait until iron ore is low, or copper ore is low and at least 30 seconds passed:

Cargo: Iron ore < 500
AND 30 seconds passed
OR Cargo: Copper ore < 500
AND 30 seconds passed

Factorio's wait condition logic is read as disjunctive normal form (DNF), and so this last example is processed as (note the parenthesis):

((Cargo: Iron ore < 500 AND 30 seconds passed) OR (Cargo: Copper ore < 500 AND 30 seconds passed))

Which is the same as this:

((Cargo: Iron ore < 500 OR Cargo: Copper ore < 500) AND 30 seconds passed)

Unfortunately, there is no way to write that shorter form in the current UI.

Troubleshooting

Below are some things to verify if a rail system or train is not working.

  • Is the train fueled? Ensure that the locomotive has fuel of some kind.
  • Misplaced or non-functional switches? Ensure that the train can plan a path through the switches.
  • Another train on the same segment or block? Make sure the path of the train is unobstructed.
  • Train stops placed correctly? Make sure that the yellow arrows when hovering on the stop point towards the end or exit of the stop.
  • Is the train allowed to enter signals from the right direction? Are the signals set correctly?
  • If a track is supposed to be two-way, the rail signals should be opposite each other. You can verify they match up by hovering the cursor over one. For a matched pair, it will show the other.

No path

When trains cannot reach the target, a "no path" symbol pops up over the locomotive. Check:

  • Can the train reach its current destination by only driving forward? Build turning slopes or place a locomotive at both ends of a train!
  • Are the train stops standing in the right direction? Train stops must be on the right hand side of the track.
  • If you use rail signals, check that the signals are all allowing traffic in the correct direction.
  • Check for interruptions in the train tracks, drive to the station manually to check there are no rail parts missing. Especially near junctions these can be hard to spot if missing.

If you are still having problems, consider:

  • Driving the train manually, and as you pass each switch, try switching to automatic. When it works, you will know the rough area of the problem.

A pictorial summary of typical problems.


Achievements

Trans-factorio-express-achievement.png Trans-Factorio express

Have a train plan a path 1000 tiles or longer.

Connection to OpenTTD

Factorio's railway system works basically exactly like the block signals in Open Traffic Tycoon Deluxe. Players who have ever played that game will find some elements of it in Factorio. If not, they can learn from the OpenTTD documentation.

See also