Real time control of public transit