How a Real Locomotive Works