Trains and Circuits
Posted: Mon Aug 24, 2020 3:20 pm
I'm giving a rail based setup my first serious attempt, and I'm trying to go with a "wait at a central depot" method of dispatching trains. The way I have it set up is every source of a given product has a station with the same name and every destination likewise, for example "iron plates pickup" and "iron plates drop-off". I have a dedicated refuelling station and a set of "wait here" depot stations. The trains are scheduled like this:
refuelling (inactivity) > depot (circuit condition) > pickup (full cargo) > depot (circuit condition) > drop-off (empty cargo).
I have combinators to count the items in the chests at each station and if a pickup station has enough for a full train, it generates a signal, likewise for drop-off stations if it has enough space to accept a full train. I put the signals on wires that span the whole rail network, and the pickup and drop-off stations are set to activate/deactivate based on the signal, and the same signal is used for the depot circuit condition.
Apart from the odd bit of traffic jam, everything works except for one thing. When a signal is sent to open a station, the train receives the signal but sees the station as "closed", so skips that stop on its schedule. My guess is that because the station takes 1 "tick" to register as open and the train and station receive the signal at the same instant, the station is still closed at the moment the train activates, it skips the stop.
I figured a way to fix this would be to pass the signal wire between the wider network and the depot station through an arithmetic combinator set to each * 1 = each, so that there is a one tick delay in sending the signal to the train. This does not appear to be fixing the problem. Am I misunderstanding what is going on? Is there a better way to achieve what I want (I am aware of mods like LTN, but I would rather make this work in vanilla).
refuelling (inactivity) > depot (circuit condition) > pickup (full cargo) > depot (circuit condition) > drop-off (empty cargo).
I have combinators to count the items in the chests at each station and if a pickup station has enough for a full train, it generates a signal, likewise for drop-off stations if it has enough space to accept a full train. I put the signals on wires that span the whole rail network, and the pickup and drop-off stations are set to activate/deactivate based on the signal, and the same signal is used for the depot circuit condition.
Apart from the odd bit of traffic jam, everything works except for one thing. When a signal is sent to open a station, the train receives the signal but sees the station as "closed", so skips that stop on its schedule. My guess is that because the station takes 1 "tick" to register as open and the train and station receive the signal at the same instant, the station is still closed at the moment the train activates, it skips the stop.
I figured a way to fix this would be to pass the signal wire between the wider network and the depot station through an arithmetic combinator set to each * 1 = each, so that there is a one tick delay in sending the signal to the train. This does not appear to be fixing the problem. Am I misunderstanding what is going on? Is there a better way to achieve what I want (I am aware of mods like LTN, but I would rather make this work in vanilla).