Decision making for connected and automated vehicles: A Max-Plus approach