lines 6-59 of file: example/python/numeric/optimize_fun_xam.py # {xrst_begin numeric_optimize_fun_xam.py} # {xrst_spell # constr # cr # ipopt # scipy # } # {xrst_comment_ch #} # # # Example Using optimize_fun_class with Scipy Optimization # ######################################################## # # Reference # ********* # This problem comes form the # `Interfaces `_ # section of the Ipopt documentation. # # Problem # ******* # # .. math:: # # \begin{array}{cr} # {\rm minimize} & x_0 x_3 ( x_0 + x_1 + x_2 ) + x_2 \\ # {\rm subject \; to} & x_0 x_1 x_2 x_3 \geq 25 \\ # & x_0^2 + x_1^2 + x_2^2 + x_3^2 = 40 \\ # & 1 \leq x \leq 5 # \end{array} # # with the starting point :math:`x = (1, 5, 5, 1)`. # The optimal value for :math:`x` is # # .. math:: # # \newcommand{\W}[1]{{\; #1 \;}} # (1.00000000 \W{,} 4.74299963 \W{,} 3.82114998 \W{,} 1.37940829) # # trust_constr # ************ # This is one of the # `scipy.optimize # `_ # methods. # # Source Code # *********** # {xrst_literal # # BEGIN_PYTHON # # END_PYTHON # } # # {xrst_end numeric_optimize_fun_xam.py}