A control scheme for freeway traffic systems based on hybrid automata