Note: Subject length limit makes it hard to make meaningful title
I wanted train to depart after any of its two products: green boards or copper plates depleted.
So I used option "Read train content" on Station and calculated in Arithmetic calculator:
Code: Select all
A = copper_plates * green_boards
Code: Select all
Circuit: A < 1
I additionally added 1 second wait, then train stopped and waited until any of two products depleted.
IMO train exports its content data and reads circuit condition in the same tick. But signal "A", based on content read from train, is updated in next tick. So train departures basing on outdated signal.
Expected solution:
Trains stopped on station that uses "Read train contents", that also uses "Wait until: Circuit", should wait long enough before reading signal that signals state can be updated.
Alternatively, all trains wait at least one tick after stop, before deciding about departure.
Work around:
Add "AND 1 seconds passed" to "Wait until"