Trajectory-based algorithm selection with warm-starting