I have a series of Arithmetic and Decider combinators on a segment of track heading into a holding yard for trains available to be dispatched. This counter (A) works perfectly fine in that it continues to increment as trains pass the track segment.
There's another segment of track past the dispatch station which counts the trains as they leave (D).
Incrementing each counter as trains pass works great. However, I need to decement the Dispatch (D) counter based on the Available counter (A) and vice versa. When a train returns to being Available, D needs to decrement one. When a train is dispatched, A needs to decrement one.
I've played with this quite a bit and feel like I've hit a wall so I was hoping I could get some help. I realize the LTN mod does this better than I ever could, but my goal is to understand what's going on and use vanilla - not simply get the end result.
In addition to this problem, I was hoping to get operational clarification on the counter I'm using. I don't recall what forum/reddit/google search I found it in.
- Why is Combinator #1 necessary? If I exclude it, the counter jumps by values of 20 - why?
- Why is the Red output from Combinator #1 insufficient for the subsequent Decider combinators? If I remove the red wire from #2 and #3 it fails to work. I'd have expected the Red signal coming from #1 to satisfy the Red = or > 1 evaluation.
- How is Combinator #3 preventing a double-add in value? If I remove it from the chain the counter increments twice - once as the train enters and and once as it exits the signal block