A discrete event model for monitoring and controlling freeways