An adaptive multi-fidelity sampling framework for safety analysis of connected and automated vehicles