In the first lab, IFL 1, an extensible framework for directing a single, unspecified train to a specified location was defined. Intermediate Factorio Lab 2 builds on this by extending functionality to direct a specified train to a specified train stop. Individual trains will be identified by their Train ID, provided by mousing over a given train’s, T(M), locomotive. Two significant adjustments are made: (a) we must provide added circuitry to communicate the train’s ID, provided by signal T, to train stops, and each individual train’s schedule must be modified to accept T(M)s ID as a wait condition.
Motivation:
The motiviation behind IFL2 is to present how easy it is to add a new capability to the framework presented in IFL2. Our goal in IFL3 willl be to find a simple solution of allowing a specified train, T(M), to ‘visit’ some train stop S(Nf) and automatically return to S(Ni).
Recommended Mods:
Due to the added complexity, any mod that allows you to label your constant combinators and push buttons is great (so you can keep track of what to actuate!)
– Factorio text plates by Earendel
– Attach Notes by 321Freddy
Significant considerations
– Since we’re operating in a pulse based environment, the inclusion of the new signal, T, into our train control network means we must consider not only (a) which signals are received by train stop S(N) but also (b) WHEN those signals are received. Both signals must be received concurrently meaning that T must be received in the same tick that S is received. A pair of combinators will be used to achieve this 1 tick latency to match the receiving of both signals. More on this later.
– To coordinate this, the train schedule wait conditions must be ANDed. for Train T(M) to stop at S(N) the circuit condition would be T = M AND S != N – That means T(M) must be at a train stop to receive signal T and S. This is nothing new but merit’s reiteration.
Major Challenges:
– The pulse carrying signals S and T must act on the stop simultaneously. To achieve this, we’ll add a filter for T (D3: T != 0 :=> T) followed by an arithmetic identity operation: (X + 0, X * 1 = X) to induce a single tick latency into our circuit. In this example, A2: Ea. * 1 :=> Ea. is used (primarily because it’s easier to delete a single negative sign instead of making 2 changes. Any ‘identity’ combinator can be used; the only requirement is that T-in results in T-out.
Instructions:
1. Adjustments will be made to the test lab railway to allow trains to bypass occupied train stops. A design similar to an inline stacker is used with the innermost buffer being the train stop.

2. Rewire supporting circuit network infrastructure as necessary. DO not directly connect global to each station!
– DO NOT DIRECTLY CONNECT GLOBAL TO EACH STATION.
– CAVEAT LECTOR! If you are modifying a copy and pasted version of your original lab – YOU MUST CHANGE THE STATION NAMES!
– If you are modifying a copy and paste of IFL1 – YOU MUST CHANGE THE STATION NAMES! CHANGE THE STATION NAMES!!!! This is because trains can see every station on the map and, for some reason, if a station has the same name (even without a path to it), the load balancing algorithm seems to calculate the occurrence and state of the discnnected stop as well – it short circuits the routing logic and will cause the train to default to standard train schedule routing (the trian will go to the next stop on the schedule).
2. A new signal, T(M) is introduced. A decider and an arithmetic combinator are added to our logic stack at each stop that allow for the filtration of T and the synchronization of T with S. The decider receives it’s input signal from green global on the same wire as the previous pair of decider combinators:
– D3: T != 0 :=> T-in (T filter)
– A2: Ea. * 1 :=> Ea. (identity op, ‘sync’ combinator)
A2 will host an identity operation. The only purposes of A2 is to add 1 tick of latency to match the the latency of S – Any combinator causing the same result would work.
The train stop logic is rewired. D1, D2, and D3, receive input from global network (they’re ‘strung’ together’), D3 is connected to A2 directly, D1,D2 are connected to A1 and A1, A2 output is ‘strung’ together and connected to it’s train stop.

– If you are copying and pasting your combinators on each station, closely check and update each combinators configuration to match that of the stations. cmbinators D2 and A2 will both need an updated for each station so that they match the train stops configuration. Remember:
D1: S = 0 :=> S(1),
D2: S = N :=> S(1), (if copy and pasting check D2, A1’s N value!!!)
A1: S * N :=> S
3. Adjustments are made to the individual trains schedules. This is really where the magic happens. Each stop on the schedule has a new circuit condition added that reflects the train ID of hte train. This new condition is ANDED with the previous circuit condition which means the conditions for locomotion out of S(N) for T(M) is: please move when S != N and when T = M. A train with train ID 115 would have an updated schedule like this:

STATION 1
C/C S != -1
AND C/C T = -115
STATION 2
C/C S != -2
AND C/C T = -115
STATION 3
C/C S != -3
AND C/C T = -115
STATION 4
C/C S != -4
AND C/C T = -115
4. Add a new train and copy over the configuration from T(115). Update the new train’s T conditions to match it’s train ID. Note that you don’t need to use a trains give Train ID – you may arbitrarily choose the ID as long as your consistent and each train is represented by a different ID.
5. Test the new network until you’ve your fill. And then move on to IFL-3.
https://panconbutter.home.blog/intermediate-factorio-labs-3/