lines 8-157 of file: example/abs_normal/min_nso_quad.hpp {xrst_begin min_nso_quad} {xrst_spell affine approximations dbl maxitr minimizer qp } Non-Smooth Optimization Using Abs-normal Quadratic Approximations ################################################################# Syntax ****** | *ok* = ``min_nso_quad`` ( | |tab| *level* , *f* , *g* , *a* , *epsilon* , *maxitr* , *b_in* , *x_in* , *x_out* | ) Prototype ********* {xrst_literal // BEGIN PROTOTYPE // END PROTOTYPE } Source ****** This following is a link to the source code for this example: :ref:`min_nso_quad.hpp-name` . Purpose ******* Given a current that abs-normal representation :ref:`abs_normal_fun@g` , :ref:`abs_normal_fun@a` , for a function :math:`f(x)`, this routine minimizes :math:`f(x)`. DblVector ********* is a :ref:`SimpleVector-name` class with elements of type ``double`` . SizeVector ********** is a :ref:`SimpleVector-name` class with elements of type ``size_t`` . level ***** This value is less that or equal 5. If *level* == 0 , no tracing of the optimization is printed. If *level* >= 1 , a trace of each iteration of ``min_nso_quad`` is printed. If *level* >= 2 , a trace of each iteration of the ``abs_min_quad`` sub-problem is printed. If *level* >= 3 , a trace of the :ref:`qp_box-name` sub-problem is printed. If *level* >= 4 , a trace of the :ref:`qp_interior-name` sub-problem is printed. f * This is the original function for the abs-normal form; see :ref:`abs_normal_fun@f` . n = We use *n* to denote the dimension of the domain for *f* ; i.e., *f* . ``Domain`` () . m = We use *m* to denote the dimension of the range for *f* ; i.e., *f* . ``Range`` () . This must be equal to one. s = We use :ref:`abs_normal_fun@f@s` to denote the number absolute terms in *f* . g * This is the function :ref:`abs_normal_fun@g` in the abs-normal representation of *f* . a * This is the function :ref:`abs_normal_fun@a` in the abs-normal representation of *f* . epsilon ******* This is a vector with size 2. The value *epsilon* [0] is convergence criteria in terms of the infinity norm of the difference of *x_out* between iterations. The value *epsilon* [1] is convergence criteria in terms of the derivative of :math:`f(x)`. This derivative is actually the average of the directional derivative in the direction of the sub-problem minimizer. maxitr ****** This is a vector with size 3. The value *maxitr* [0] is the maximum number of ``min_nso_quad`` iterations to try before giving up on convergence. The value *maxitr* [1] is the maximum number of iterations in the ``abs_min_quad`` sub-problem. The value *maxitr* [2] is the maximum number of iterations in the :ref:`qp_interior` sub-problems. b_in **** This the initial bound on the trust region size. To be specific, if :math:`b` is the current trust region size, at each iteration affine approximation is minimized with respect to :math:`\Delta x` and subject to .. math:: -b \leq \Delta x_j \leq b for *j* = 0 , ..., *n* ``-1`` . It must hold that *b_in* > *epsilon* [0] . x_in **** This vector *x_out* has size *n* . It is the starting point for the optimization procedure; i.e., the ``min_nso_quad`` iterations. x_out ***** This vector *x_out* has size *n* . The input value of its elements does not matter. Upon return, it is the approximate minimizer of the abs-normal approximation for :math:`f(x)` over the trust region is :math:`x = \hat{x} + \Delta x`. {xrst_toc_hidden example/abs_normal/min_nso_quad.cpp example/abs_normal/min_nso_quad.xrst } Example ******* The file :ref:`min_nso_quad.cpp-name` contains an example and test of ``min_nso_quad`` . {xrst_end min_nso_quad}