Bi-level Flight Path Planning of UAV Formations with Collision Avoidance