A piecewise switched linear approach for traffic flow modeling