Constrained multi-fidelity Bayesian optimization with automatic stop condition