So the "sensor" is way more than a sensor. It's a programable storage unit? what are the limitations in terms of stored commands and how flexible is the programming sequence? Can it handle if then else conditions, e.g east bound loco 7 throws switch to through and accelerates to speed x while west bound 7 decelerates and engine 10 maintains current speed?
Chuck, Rudy is correct that logical operations are not part of the programming; your scenario is plausible.
1) Record loco 7 eastbound, throw a switch, accelerate to speed X.
2) Record loco 7 westbound, decelerate to speed X.
Loco 10 will not be affected by the recordings for loco 7, maintaining current speed.