  Ensuring safety in industrial control systems usually involves imposing
constraints at the design stage of the control algorithm. Enforcing constraints
is challenging if the underlying functional form is unknown. The challenge can
be addressed by using surrogate models, such as Gaussian processes, which
provide confidence intervals used to find solutions that can be considered
safe. This in turn involves an exhaustive search on the entire search space.
That approach can quickly become computationally expensive. We reformulate the
exhaustive search as a series of optimization problems to find the next
recommended points. We show that the proposed reformulation allows using a wide
range of available optimization solvers, such as derivative-free methods. We
show that by exploiting the properties of the solver, we enable the
introduction of new stopping criteria into safe learning methods and increase
flexibility in trading off solver accuracy and computational time. The results
from a non-convex optimization problem and an application for controller tuning
confirm the flexibility and the performance of the proposed reformulation.
