.. _scipy_minimization: Gradient-based minimization of a non-expensive scalar function ========================================================================================== :Driver: :ref:`ScipyMinimizer` :Download script: :download:`scipy_minimization.py` The target of the study is to minimize a scalar function. The scalar function is assumed to be inexpensive to evaluate (i.e. evaluation time shorter than a second) and to have known derivatives. In this case a global optimization can be performed by a set of gradient-based local optimizations starting at different initial points. We start independent minimizations from six initial points (``num_initial=6``) and allow for two parallel evaluations of the objective function (``num_parallel=2``). As an example, the 2D `Rastrigin function `_ on a circular domain is minimized, .. math:: &\text{min.}\,& f(x_1,x_2) = 2\cdot10 + \sum_{i=1,2} \left(x_i^2 - 10\cos(2\pi x_i)\right) &\text{s.t.}\,& \sqrt{x_1^2 + x_2^2} \leq 1.5. .. literalinclude:: ./scipy_minimization.py :language: python :linenos: