A hybrid automaton for multi-class ramp metering in freeway systems