.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/rosenbrock.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_rosenbrock.py: A simple optimization problem: Rosenbrock function ================================================== This example illustrates the basic usage of :class:`csnlp.Nlp` in solving a simple optimization problem, taken from `this CasADi blog post `_ Consider the parametric (in :math:`r`) constrained Rosenbrock function .. math:: \min_{x}{ (1 - x_1)^2 + (x_2 - x_1^2)^2 } \text{ s.t. } x_1^2 + x_2^2 \leq r. .. GENERATED FROM PYTHON SOURCE LINES 17-21 Creating and solving the problem -------------------------------- The imports are pretty standard, as if we were using ``casadi`` alone. We just need to additionally import the :class:`csnlp.Nlp` class. .. GENERATED FROM PYTHON SOURCE LINES 21-28 .. code-block:: Python import casadi as cs import matplotlib.pyplot as plt import numpy as np from csnlp import Nlp .. GENERATED FROM PYTHON SOURCE LINES 29-32 In order to build the optimization problem, we first create an instance of :class:`csnlp.Nlp` (instructed to use :class:`casadi.MX` under the hood) and primal variable :math:`x` and parameter :math:`r`. .. GENERATED FROM PYTHON SOURCE LINES 32-37 .. code-block:: Python nlp = Nlp[cs.MX](sym_type="MX") x = nlp.variable("x", (2, 1))[0] r = nlp.parameter("r") .. GENERATED FROM PYTHON SOURCE LINES 38-44 Then, formulate the objective and the constraint, and initialize the solver (this is mandatory before any solving run). Under the hood, by default, the solver is set to IPOPT. Note that for the constraint we save the corresponding Lagrange multiplier :math:`\lambda` in the variable `lam` to be used later. .. GENERATED FROM PYTHON SOURCE LINES 44-54 .. code-block:: Python def rosenbrock(x): return (1 - x[0]) ** 2 + (x[1] - x[0] ** 2) ** 2 nlp.minimize(rosenbrock(x)) _, lam = nlp.constraint("con1", cs.sumsqr(x), "<=", r) nlp.init_solver() .. GENERATED FROM PYTHON SOURCE LINES 55-57 For a given value of :math:`r`, e.g., :math:`r=1`, we can solve the problem as follows .. GENERATED FROM PYTHON SOURCE LINES 57-61 .. code-block:: Python r_value = 1 sol = nlp.solve(pars={"r": r_value}) .. rst-class:: sphx-glr-script-out .. code-block:: none This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 7.0171713e-02 0.00e+00 1.63e-01 -1.7 5.11e-01 - 1.00e+00 1.00e+00h 1 3 4.0186889e-02 6.78e-03 5.35e-03 -1.7 4.77e-01 - 1.00e+00 1.00e+00h 1 4 4.1076918e-02 0.00e+00 2.46e-06 -3.8 1.05e-02 - 1.00e+00 1.00e+00h 1 5 4.0921291e-02 0.00e+00 7.37e-07 -5.7 1.45e-03 - 1.00e+00 1.00e+00h 1 6 4.0919039e-02 0.00e+00 1.46e-10 -8.6 2.13e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 6 (scaled) (unscaled) Objective...............: 4.0919038671969346e-02 4.0919038671969346e-02 Dual infeasibility......: 1.4614634502585488e-10 1.4614634502585488e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.5995835817288543e-09 2.5995835817288543e-09 Overall NLP error.......: 2.5995835817288543e-09 2.5995835817288543e-09 Number of objective function evaluations = 7 Number of objective gradient evaluations = 7 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 7 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 7 Number of Lagrangian Hessian evaluations = 6 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 15.00us ( 2.14us) 15.14us ( 2.16us) 7 nlp_g | 23.00us ( 3.29us) 19.92us ( 2.85us) 7 nlp_grad_f | 24.00us ( 3.00us) 21.86us ( 2.73us) 8 nlp_hess_l | 22.00us ( 3.67us) 21.00us ( 3.50us) 6 nlp_jac_g | 16.00us ( 2.00us) 15.68us ( 1.96us) 8 total | 3.51ms ( 3.51ms) 3.51ms ( 3.51ms) 1 .. GENERATED FROM PYTHON SOURCE LINES 62-63 And we can also visualize the solution .. GENERATED FROM PYTHON SOURCE LINES 63-85 .. code-block:: Python _, ax = plt.subplots(constrained_layout=True) X, Y = np.meshgrid(np.linspace(0, 1.5, 100), np.linspace(-0.5, 1.5, 100)) F = rosenbrock((X, Y)) contour = ax.contour(X, Y, F, levels=100, cmap="viridis") theta = np.linspace(0, 2 * np.pi, 100) x_circle = np.cos(theta) y_circle = np.sin(theta) ax.plot(x_circle, y_circle, "k-") x_opt = sol.value(x) ax.plot(x_opt[0], x_opt[1], "r*", markersize=20) ax.set_xlabel("x") ax.set_ylabel("y") ax.set_aspect("equal") ax.set_xlim(0, 1.5) ax.set_ylim(-0.5, 1.5) plt.show() .. image-sg:: /auto_examples/images/sphx_glr_rosenbrock_001.png :alt: rosenbrock :srcset: /auto_examples/images/sphx_glr_rosenbrock_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 86-91 Computing multipliers and sensitivities --------------------------------------- What's cooler, we can set the value of :math:`r` at runtime to any valid value, run the solver, and compute the sensitivity of the objective with respect to :math:`r` as the value of the mutiplier :math:`\lambda` at the optimal point. .. GENERATED FROM PYTHON SOURCE LINES 91-100 .. code-block:: Python r_values = np.linspace(1, 3, 25) f_values = [] lam_values = [] for r_value in r_values: sol = nlp.solve(pars={"r": r_value}) f_values.append(sol.f) lam_values.append(sol.value(lam)) .. rst-class:: sphx-glr-script-out .. code-block:: none This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 7.0171713e-02 0.00e+00 1.63e-01 -1.7 5.11e-01 - 1.00e+00 1.00e+00h 1 3 4.0186889e-02 6.78e-03 5.35e-03 -1.7 4.77e-01 - 1.00e+00 1.00e+00h 1 4 4.1076918e-02 0.00e+00 2.46e-06 -3.8 1.05e-02 - 1.00e+00 1.00e+00h 1 5 4.0921291e-02 0.00e+00 7.37e-07 -5.7 1.45e-03 - 1.00e+00 1.00e+00h 1 6 4.0919039e-02 0.00e+00 1.46e-10 -8.6 2.13e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 6 (scaled) (unscaled) Objective...............: 4.0919038671969346e-02 4.0919038671969346e-02 Dual infeasibility......: 1.4614634502585488e-10 1.4614634502585488e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.5995835817288543e-09 2.5995835817288543e-09 Overall NLP error.......: 2.5995835817288543e-09 2.5995835817288543e-09 Number of objective function evaluations = 7 Number of objective gradient evaluations = 7 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 7 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 7 Number of Lagrangian Hessian evaluations = 6 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 18.00us ( 2.57us) 16.85us ( 2.41us) 7 nlp_g | 26.00us ( 3.71us) 21.29us ( 3.04us) 7 nlp_grad_f | 29.00us ( 3.62us) 26.88us ( 3.36us) 8 nlp_hess_l | 29.00us ( 4.83us) 28.69us ( 4.78us) 6 nlp_jac_g | 22.00us ( 2.75us) 20.37us ( 2.55us) 8 total | 3.93ms ( 3.93ms) 3.92ms ( 3.92ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 6.7526488e-02 0.00e+00 1.71e-01 -1.7 5.17e-01 - 1.00e+00 1.00e+00h 1 3 3.3194215e-02 0.00e+00 2.42e-03 -1.7 5.33e-01 - 1.00e+00 1.00e+00h 1 4 3.2811235e-02 0.00e+00 1.08e-05 -3.8 3.13e-02 - 1.00e+00 1.00e+00h 1 5 3.2593999e-02 0.00e+00 1.68e-06 -5.7 2.37e-03 - 1.00e+00 1.00e+00h 1 6 3.2591222e-02 0.00e+00 2.54e-10 -8.6 3.20e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 6 (scaled) (unscaled) Objective...............: 3.2591222205591665e-02 3.2591222205591665e-02 Dual infeasibility......: 2.5355909039070923e-10 2.5355909039070923e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.6695320873635210e-09 2.6695320873635210e-09 Overall NLP error.......: 2.6695320873635210e-09 2.6695320873635210e-09 Number of objective function evaluations = 7 Number of objective gradient evaluations = 7 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 7 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 7 Number of Lagrangian Hessian evaluations = 6 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 16.00us ( 2.29us) 14.78us ( 2.11us) 7 nlp_g | 23.00us ( 3.29us) 18.31us ( 2.62us) 7 nlp_grad_f | 18.00us ( 2.25us) 18.78us ( 2.35us) 8 nlp_hess_l | 29.00us ( 4.83us) 28.94us ( 4.82us) 6 nlp_jac_g | 17.00us ( 2.12us) 15.51us ( 1.94us) 8 total | 3.32ms ( 3.32ms) 3.32ms ( 3.32ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 6.5303478e-02 0.00e+00 1.77e-01 -1.7 5.22e-01 - 1.00e+00 1.00e+00h 1 3 2.7779959e-02 0.00e+00 1.58e-03 -1.7 5.82e-01 - 1.00e+00 1.00e+00h 1 4 2.8306757e-02 0.00e+00 1.21e-05 -2.5 2.91e-02 - 1.00e+00 1.00e+00h 1 5 2.5901594e-02 0.00e+00 2.44e-04 -3.8 3.00e-02 - 1.00e+00 1.00e+00h 1 6 2.5616635e-02 0.00e+00 3.13e-06 -5.7 3.95e-03 - 1.00e+00 1.00e+00h 1 7 2.5613061e-02 0.00e+00 4.92e-10 -8.6 5.04e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 7 (scaled) (unscaled) Objective...............: 2.5613061133718768e-02 2.5613061133718768e-02 Dual infeasibility......: 4.9234530341557559e-10 4.9234530341557559e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.8262707475320204e-09 2.8262707475320204e-09 Overall NLP error.......: 2.8262707475320204e-09 2.8262707475320204e-09 Number of objective function evaluations = 8 Number of objective gradient evaluations = 8 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 8 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 8 Number of Lagrangian Hessian evaluations = 7 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 19.00us ( 2.38us) 18.43us ( 2.30us) 8 nlp_g | 30.00us ( 3.75us) 23.42us ( 2.93us) 8 nlp_grad_f | 24.00us ( 2.67us) 21.73us ( 2.41us) 9 nlp_hess_l | 26.00us ( 3.71us) 23.79us ( 3.40us) 7 nlp_jac_g | 18.00us ( 2.00us) 17.48us ( 1.94us) 9 total | 3.82ms ( 3.82ms) 3.82ms ( 3.82ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 6.3410205e-02 0.00e+00 1.82e-01 -1.7 5.26e-01 - 1.00e+00 1.00e+00h 1 3 2.3549513e-02 0.00e+00 4.39e-03 -1.7 6.25e-01 - 1.00e+00 1.00e+00h 1 4 2.2524747e-02 0.00e+00 2.60e-05 -2.5 5.81e-02 - 1.00e+00 1.00e+00h 1 5 2.0107070e-02 0.00e+00 3.00e-04 -3.8 3.58e-02 - 1.00e+00 1.00e+00h 1 6 1.9788468e-02 0.00e+00 4.83e-06 -5.7 5.29e-03 - 1.00e+00 1.00e+00h 1 7 1.9783909e-02 0.00e+00 9.79e-10 -8.6 7.76e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 7 (scaled) (unscaled) Objective...............: 1.9783909425558625e-02 1.9783909425558625e-02 Dual infeasibility......: 9.7912045138315307e-10 9.7912045138315307e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 3.1416546642908773e-09 3.1416546642908773e-09 Overall NLP error.......: 3.1416546642908773e-09 3.1416546642908773e-09 Number of objective function evaluations = 8 Number of objective gradient evaluations = 8 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 8 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 8 Number of Lagrangian Hessian evaluations = 7 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 17.00us ( 2.12us) 16.76us ( 2.10us) 8 nlp_g | 24.00us ( 3.00us) 21.97us ( 2.75us) 8 nlp_grad_f | 24.00us ( 2.67us) 20.63us ( 2.29us) 9 nlp_hess_l | 22.00us ( 3.14us) 23.03us ( 3.29us) 7 nlp_jac_g | 18.00us ( 2.00us) 17.29us ( 1.92us) 9 total | 3.70ms ( 3.70ms) 3.71ms ( 3.71ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 6.1779089e-02 0.00e+00 1.86e-01 -1.7 5.30e-01 - 1.00e+00 1.00e+00h 1 3 2.0210403e-02 0.00e+00 7.71e-03 -1.7 6.62e-01 - 1.00e+00 1.00e+00h 1 4 1.7814298e-02 0.00e+00 2.09e-04 -2.5 8.97e-02 - 1.00e+00 1.00e+00h 1 5 1.5322705e-02 0.00e+00 3.91e-04 -3.8 4.41e-02 - 1.00e+00 1.00e+00h 1 6 1.4950015e-02 0.00e+00 8.36e-06 -5.7 7.45e-03 - 1.00e+00 1.00e+00h 1 7 1.4943401e-02 0.00e+00 2.59e-09 -8.6 1.37e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 7 (scaled) (unscaled) Objective...............: 1.4943401174661818e-02 1.4943401174661818e-02 Dual infeasibility......: 2.5936949393789988e-09 2.5936949393789988e-09 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 4.1817302141429776e-09 4.1817302141429776e-09 Overall NLP error.......: 4.1817302141429776e-09 4.1817302141429776e-09 Number of objective function evaluations = 8 Number of objective gradient evaluations = 8 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 8 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 8 Number of Lagrangian Hessian evaluations = 7 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 19.00us ( 2.38us) 18.40us ( 2.30us) 8 nlp_g | 28.00us ( 3.50us) 24.68us ( 3.09us) 8 nlp_grad_f | 25.00us ( 2.78us) 23.04us ( 2.56us) 9 nlp_hess_l | 25.00us ( 3.57us) 24.94us ( 3.56us) 7 nlp_jac_g | 18.00us ( 2.00us) 18.47us ( 2.05us) 9 total | 3.79ms ( 3.79ms) 3.79ms ( 3.79ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 6.0359672e-02 0.00e+00 1.90e-01 -1.7 5.33e-01 - 1.00e+00 1.00e+00h 1 3 1.7546815e-02 0.00e+00 1.08e-02 -1.7 6.95e-01 - 1.00e+00 1.00e+00h 1 4 1.4029877e-02 0.00e+00 5.59e-04 -2.5 1.22e-01 - 1.00e+00 1.00e+00h 1 5 1.1426418e-02 0.00e+00 5.32e-04 -3.8 5.53e-02 - 1.00e+00 1.00e+00h 1 6 1.0972613e-02 0.00e+00 1.62e-05 -5.7 1.10e-02 - 1.00e+00 1.00e+00h 1 7 1.0963256e-02 0.00e+00 6.61e-09 -5.7 2.40e-04 - 1.00e+00 1.00e+00h 1 8 1.0961410e-02 0.00e+00 3.05e-10 -8.6 4.29e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 1.0961410459303357e-02 1.0961410459303357e-02 Dual infeasibility......: 3.0470378997726755e-10 3.0470378997726755e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.7041299620319639e-09 2.7041299620319639e-09 Overall NLP error.......: 2.7041299620319639e-09 2.7041299620319639e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 17.00us ( 1.89us) 17.99us ( 2.00us) 9 nlp_g | 31.00us ( 3.44us) 24.02us ( 2.67us) 9 nlp_grad_f | 26.00us ( 2.60us) 23.95us ( 2.40us) 10 nlp_hess_l | 44.00us ( 5.50us) 28.02us ( 3.50us) 8 nlp_jac_g | 20.00us ( 2.00us) 18.60us ( 1.86us) 10 total | 3.91ms ( 3.91ms) 3.91ms ( 3.91ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.9113564e-02 0.00e+00 1.93e-01 -1.7 5.36e-01 - 1.00e+00 1.00e+00h 1 3 1.5399389e-02 0.00e+00 1.36e-02 -1.7 7.24e-01 - 1.00e+00 1.00e+00h 1 4 1.1027756e-02 0.00e+00 1.04e-03 -2.5 1.53e-01 - 1.00e+00 1.00e+00h 1 5 8.3154312e-03 0.00e+00 7.31e-04 -3.8 6.92e-02 - 1.00e+00 1.00e+00h 1 6 7.7525665e-03 0.00e+00 3.38e-05 -5.7 1.68e-02 - 1.00e+00 1.00e+00h 1 7 7.7328231e-03 0.00e+00 4.14e-08 -5.7 6.20e-04 - 1.00e+00 1.00e+00h 1 8 7.7309570e-03 0.00e+00 4.25e-10 -8.6 5.40e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 7.7309569713546727e-03 7.7309569713546727e-03 Dual infeasibility......: 4.2531619198760140e-10 4.2531619198760140e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.7820333367420236e-09 2.7820333367420236e-09 Overall NLP error.......: 2.7820333367420236e-09 2.7820333367420236e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 20.00us ( 2.22us) 18.20us ( 2.02us) 9 nlp_g | 29.00us ( 3.22us) 24.14us ( 2.68us) 9 nlp_grad_f | 24.00us ( 2.40us) 23.15us ( 2.32us) 10 nlp_hess_l | 27.00us ( 3.37us) 25.98us ( 3.25us) 8 nlp_jac_g | 19.00us ( 1.90us) 18.24us ( 1.82us) 10 total | 3.92ms ( 3.92ms) 3.92ms ( 3.92ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.8011063e-02 0.00e+00 1.96e-01 -1.7 5.38e-01 - 1.00e+00 1.00e+00h 1 3 1.3649962e-02 0.00e+00 1.62e-02 -1.7 7.50e-01 - 1.00e+00 1.00e+00h 1 4 8.6707087e-03 0.00e+00 1.60e-03 -2.5 1.83e-01 - 1.00e+00 1.00e+00h 1 5 5.8954198e-03 0.00e+00 9.85e-04 -3.8 8.51e-02 - 1.00e+00 1.00e+00h 1 6 5.2072471e-03 0.00e+00 7.16e-05 -5.7 2.56e-02 - 1.00e+00 1.00e+00h 1 7 5.1650623e-03 0.00e+00 2.81e-07 -5.7 1.66e-03 - 1.00e+00 1.00e+00h 1 8 5.1630545e-03 0.00e+00 7.08e-10 -8.6 7.44e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 5.1630545058838810e-03 5.1630545058838810e-03 Dual infeasibility......: 7.0799513474106845e-10 7.0799513474106845e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.9638576191297612e-09 2.9638576191297612e-09 Overall NLP error.......: 2.9638576191297612e-09 2.9638576191297612e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 36.00us ( 4.00us) 35.51us ( 3.95us) 9 nlp_g | 30.00us ( 3.33us) 23.40us ( 2.60us) 9 nlp_grad_f | 24.00us ( 2.40us) 23.41us ( 2.34us) 10 nlp_hess_l | 29.00us ( 3.62us) 26.77us ( 3.35us) 8 nlp_jac_g | 18.00us ( 1.80us) 18.59us ( 1.86us) 10 total | 3.93ms ( 3.93ms) 3.92ms ( 3.92ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.7028844e-02 0.00e+00 1.98e-01 -1.7 5.41e-01 - 1.00e+00 1.00e+00h 1 3 1.2210370e-02 0.00e+00 1.84e-02 -1.7 7.72e-01 - 1.00e+00 1.00e+00h 1 4 6.8338682e-03 0.00e+00 2.19e-03 -2.5 2.10e-01 - 1.00e+00 1.00e+00h 1 5 4.0714589e-03 0.00e+00 1.27e-03 -3.8 1.02e-01 - 1.00e+00 1.00e+00h 1 6 3.3899608e-03 0.00e+00 1.01e-04 -3.8 3.21e-02 - 1.00e+00 1.00e+00h 1 7 3.1911382e-03 0.00e+00 1.04e-05 -5.7 9.67e-03 - 1.00e+00 1.00e+00h 1 8 3.1829352e-03 0.00e+00 1.76e-08 -8.6 4.16e-04 - 1.00e+00 1.00e+00h 1 9 3.1829246e-03 0.00e+00 2.87e-14 -8.6 5.45e-07 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 9 (scaled) (unscaled) Objective...............: 3.1829246345669135e-03 3.1829246345669135e-03 Dual infeasibility......: 2.8664570717040760e-14 2.8664570717040760e-14 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.5059217572868037e-09 2.5059217572868037e-09 Overall NLP error.......: 2.5059217572868037e-09 2.5059217572868037e-09 Number of objective function evaluations = 10 Number of objective gradient evaluations = 10 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 10 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 10 Number of Lagrangian Hessian evaluations = 9 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 30.00us ( 3.00us) 29.96us ( 3.00us) 10 nlp_g | 33.00us ( 3.30us) 27.43us ( 2.74us) 10 nlp_grad_f | 25.00us ( 2.27us) 24.66us ( 2.24us) 11 nlp_hess_l | 30.00us ( 3.33us) 28.92us ( 3.21us) 9 nlp_jac_g | 21.00us ( 1.91us) 20.40us ( 1.85us) 11 total | 4.22ms ( 4.22ms) 4.22ms ( 4.22ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.6148346e-02 0.00e+00 2.00e-01 -1.7 5.43e-01 - 1.00e+00 1.00e+00h 1 3 1.1014320e-02 0.00e+00 2.04e-02 -1.7 7.92e-01 - 1.00e+00 1.00e+00h 1 4 5.4088330e-03 0.00e+00 2.76e-03 -2.5 2.34e-01 - 1.00e+00 1.00e+00h 1 5 2.7440080e-03 0.00e+00 1.57e-03 -3.8 1.17e-01 - 1.00e+00 1.00e+00h 1 6 1.9864582e-03 0.00e+00 1.96e-04 -3.8 4.59e-02 - 1.00e+00 1.00e+00h 1 7 1.7451048e-03 0.00e+00 2.63e-05 -5.7 1.62e-02 - 1.00e+00 1.00e+00h 1 8 1.7290667e-03 0.00e+00 1.20e-07 -5.7 1.14e-03 - 1.00e+00 1.00e+00h 1 9 1.7271532e-03 0.00e+00 1.82e-09 -8.6 1.32e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 9 (scaled) (unscaled) Objective...............: 1.7271531695755196e-03 1.7271531695755196e-03 Dual infeasibility......: 1.8226307303692568e-09 1.8226307303692568e-09 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 3.6720751174653786e-09 3.6720751174653786e-09 Overall NLP error.......: 3.6720751174653786e-09 3.6720751174653786e-09 Number of objective function evaluations = 10 Number of objective gradient evaluations = 10 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 10 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 10 Number of Lagrangian Hessian evaluations = 9 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 21.00us ( 2.10us) 20.01us ( 2.00us) 10 nlp_g | 33.00us ( 3.30us) 27.65us ( 2.77us) 10 nlp_grad_f | 25.00us ( 2.27us) 24.84us ( 2.26us) 11 nlp_hess_l | 28.00us ( 3.11us) 28.66us ( 3.18us) 9 nlp_jac_g | 21.00us ( 1.91us) 20.26us ( 1.84us) 11 total | 4.21ms ( 4.21ms) 4.21ms ( 4.21ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.5354621e-02 0.00e+00 2.02e-01 -1.7 5.45e-01 - 1.00e+00 1.00e+00h 1 3 1.0011545e-02 0.00e+00 2.22e-02 -1.7 8.10e-01 - 1.00e+00 1.00e+00h 1 4 4.3051888e-03 0.00e+00 3.28e-03 -2.5 2.55e-01 - 1.00e+00 1.00e+00h 1 5 1.8114983e-03 0.00e+00 1.82e-03 -3.8 1.31e-01 - 1.00e+00 1.00e+00h 1 6 1.0586031e-03 0.00e+00 3.20e-04 -3.8 6.02e-02 - 1.00e+00 1.00e+00h 1 7 7.8447246e-04 0.00e+00 6.75e-05 -5.7 2.70e-02 - 1.00e+00 1.00e+00h 1 8 7.4439194e-04 0.00e+00 1.69e-06 -5.7 4.40e-03 - 1.00e+00 1.00e+00h 1 9 7.4151795e-04 0.00e+00 9.20e-09 -8.6 3.15e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 9 (scaled) (unscaled) Objective...............: 7.4151795194904750e-04 7.4151795194904750e-04 Dual infeasibility......: 9.2008462446169226e-09 9.2008462446169226e-09 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 8.3392495297081416e-09 8.3392495297081416e-09 Overall NLP error.......: 9.2008462446169226e-09 9.2008462446169226e-09 Number of objective function evaluations = 10 Number of objective gradient evaluations = 10 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 10 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 10 Number of Lagrangian Hessian evaluations = 9 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 21.00us ( 2.10us) 20.52us ( 2.05us) 10 nlp_g | 35.00us ( 3.50us) 27.95us ( 2.79us) 10 nlp_grad_f | 42.00us ( 3.82us) 43.13us ( 3.92us) 11 nlp_hess_l | 29.00us ( 3.22us) 28.80us ( 3.20us) 9 nlp_jac_g | 20.00us ( 1.82us) 19.86us ( 1.81us) 11 total | 4.20ms ( 4.20ms) 4.20ms ( 4.20ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.4635500e-02 0.00e+00 2.04e-01 -1.7 5.47e-01 - 1.00e+00 1.00e+00h 1 3 9.1635916e-03 0.00e+00 2.38e-02 -1.7 8.26e-01 - 1.00e+00 1.00e+00h 1 4 3.4498835e-03 0.00e+00 3.74e-03 -2.5 2.74e-01 - 1.00e+00 1.00e+00h 1 5 1.1774797e-03 0.00e+00 2.00e-03 -3.8 1.42e-01 - 1.00e+00 1.00e+00h 1 6 5.1088991e-04 0.00e+00 4.33e-04 -3.8 7.16e-02 - 1.00e+00 1.00e+00h 1 7 2.5921931e-04 0.00e+00 1.37e-04 -5.7 3.98e-02 - 1.00e+00 1.00e+00h 1 8 1.9120913e-04 0.00e+00 1.66e-05 -5.7 1.41e-02 - 1.00e+00 1.00e+00h 1 9 1.8139089e-04 0.00e+00 4.15e-07 -5.7 2.23e-03 - 1.00e+00 1.00e+00h 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 10 1.7930937e-04 0.00e+00 1.96e-08 -8.6 4.75e-04 - 1.00e+00 1.00e+00h 1 11 1.7929715e-04 0.00e+00 6.69e-13 -8.6 2.83e-06 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 11 (scaled) (unscaled) Objective...............: 1.7929714680027842e-04 1.7929714680027842e-04 Dual infeasibility......: 6.6888682093146912e-13 6.6888682093146912e-13 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.5063234157341978e-09 2.5063234157341978e-09 Overall NLP error.......: 2.5063234157341978e-09 2.5063234157341978e-09 Number of objective function evaluations = 12 Number of objective gradient evaluations = 12 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 12 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 12 Number of Lagrangian Hessian evaluations = 11 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 27.00us ( 2.25us) 25.58us ( 2.13us) 12 nlp_g | 36.00us ( 3.00us) 32.26us ( 2.69us) 12 nlp_grad_f | 29.00us ( 2.23us) 28.76us ( 2.21us) 13 nlp_hess_l | 36.00us ( 3.27us) 34.01us ( 3.09us) 11 nlp_jac_g | 24.00us ( 1.85us) 22.89us ( 1.76us) 13 total | 4.87ms ( 4.87ms) 4.86ms ( 4.86ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.3980978e-02 0.00e+00 2.05e-01 -1.7 5.48e-01 - 1.00e+00 1.00e+00h 1 3 8.4407793e-03 0.00e+00 2.52e-02 -1.7 8.41e-01 - 1.00e+00 1.00e+00h 1 4 2.7852896e-03 0.00e+00 4.13e-03 -2.5 2.90e-01 - 1.00e+00 1.00e+00h 1 5 7.5806761e-04 0.00e+00 2.11e-03 -3.8 1.49e-01 - 1.00e+00 1.00e+00h 1 6 2.2625261e-04 0.00e+00 4.87e-04 -3.8 7.76e-02 - 1.00e+00 1.00e+00h 1 7 5.7246642e-05 0.00e+00 1.79e-04 -5.7 4.66e-02 - 1.00e+00 1.00e+00h 1 8 1.4739390e-05 0.00e+00 4.42e-05 -5.7 2.35e-02 - 1.00e+00 1.00e+00h 1 9 4.1552852e-06 0.00e+00 1.03e-05 -5.7 1.14e-02 - 1.00e+00 1.00e+00h 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 10 1.5499396e-06 0.00e+00 2.01e-06 -5.7 5.01e-03 - 1.00e+00 1.00e+00h 1 11 3.8848094e-07 0.00e+00 1.24e-06 -8.6 3.92e-03 - 1.00e+00 1.00e+00h 1 12 9.7729804e-08 0.00e+00 3.09e-07 -8.6 1.96e-03 - 1.00e+00 1.00e+00h 1 13 2.5060537e-08 0.00e+00 7.62e-08 -8.6 9.76e-04 - 1.00e+00 1.00e+00h 1 14 6.9068683e-09 0.00e+00 1.81e-08 -8.6 4.76e-04 - 1.00e+00 1.00e+00h 1 15 2.4098945e-09 0.00e+00 3.70e-09 -8.6 2.15e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 15 (scaled) (unscaled) Objective...............: 2.4098945059785058e-09 2.4098945059785058e-09 Dual infeasibility......: 3.7025984853523812e-09 3.7025984853523812e-09 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 4.8200273946044563e-09 4.8200273946044563e-09 Overall NLP error.......: 4.8200273946044563e-09 4.8200273946044563e-09 Number of objective function evaluations = 16 Number of objective gradient evaluations = 16 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 16 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 16 Number of Lagrangian Hessian evaluations = 15 Total seconds in IPOPT = 0.006 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 31.00us ( 1.94us) 30.90us ( 1.93us) 16 nlp_g | 53.00us ( 3.31us) 44.22us ( 2.76us) 16 nlp_grad_f | 40.00us ( 2.35us) 38.14us ( 2.24us) 17 nlp_hess_l | 47.00us ( 3.13us) 46.74us ( 3.12us) 15 nlp_jac_g | 32.00us ( 1.88us) 31.08us ( 1.83us) 17 total | 6.12ms ( 6.12ms) 6.12ms ( 6.12ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.3382755e-02 0.00e+00 2.06e-01 -1.7 5.50e-01 - 1.00e+00 1.00e+00h 1 3 7.8199926e-03 0.00e+00 2.64e-02 -1.7 8.54e-01 - 1.00e+00 1.00e+00h 1 4 2.2667217e-03 0.00e+00 4.45e-03 -2.5 3.04e-01 - 1.00e+00 1.00e+00h 1 5 4.8629617e-04 0.00e+00 2.13e-03 -3.8 1.54e-01 - 1.00e+00 1.00e+00h 1 6 9.4861390e-05 0.00e+00 4.67e-04 -3.8 7.77e-02 - 1.00e+00 1.00e+00h 1 7 8.7855125e-06 0.00e+00 1.45e-04 -5.7 4.28e-02 - 1.00e+00 1.00e+00h 1 8 2.6103864e-07 0.00e+00 1.89e-05 -5.7 1.57e-02 - 1.00e+00 1.00e+00h 1 9 6.9704935e-09 0.00e+00 5.74e-07 -5.7 2.74e-03 - 1.00e+00 1.00e+00h 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 10 4.0026777e-13 0.00e+00 2.19e-08 -8.6 5.25e-04 - 1.00e+00 1.00e+00h 1 11 9.0466243e-15 0.00e+00 9.08e-13 -8.6 3.44e-06 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 11 (scaled) (unscaled) Objective...............: 9.0466243246771345e-15 9.0466243246771345e-15 Dual infeasibility......: 9.0786374495489244e-13 9.0786374495489244e-13 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.5064681925437888e-09 2.5064681925437888e-09 Overall NLP error.......: 2.5064681925437888e-09 2.5064681925437888e-09 Number of objective function evaluations = 12 Number of objective gradient evaluations = 12 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 12 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 12 Number of Lagrangian Hessian evaluations = 11 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 25.00us ( 2.08us) 23.86us ( 1.99us) 12 nlp_g | 40.00us ( 3.33us) 32.37us ( 2.70us) 12 nlp_grad_f | 30.00us ( 2.31us) 27.75us ( 2.13us) 13 nlp_hess_l | 34.00us ( 3.09us) 34.00us ( 3.09us) 11 nlp_jac_g | 24.00us ( 1.85us) 23.15us ( 1.78us) 13 total | 4.89ms ( 4.89ms) 4.89ms ( 4.89ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.2833890e-02 0.00e+00 2.08e-01 -1.7 5.51e-01 - 1.00e+00 1.00e+00h 1 3 7.2830726e-03 0.00e+00 2.75e-02 -1.7 8.65e-01 - 1.00e+00 1.00e+00h 1 4 1.8599287e-03 0.00e+00 4.70e-03 -2.5 3.15e-01 - 1.00e+00 1.00e+00h 1 5 3.1254511e-04 0.00e+00 2.08e-03 -3.8 1.55e-01 - 1.00e+00 1.00e+00h 1 6 3.9273057e-05 0.00e+00 3.96e-04 -3.8 7.30e-02 - 1.00e+00 1.00e+00h 1 7 1.1323346e-06 0.00e+00 8.48e-05 -5.7 3.32e-02 - 1.00e+00 1.00e+00h 1 8 5.3143263e-09 0.00e+00 3.03e-06 -5.7 6.41e-03 - 1.00e+00 1.00e+00h 1 9 6.6123263e-14 0.00e+00 1.66e-08 -8.6 4.65e-04 - 1.00e+00 1.00e+00h 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 10 2.2607847e-15 0.00e+00 1.35e-13 -8.6 1.36e-06 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 10 (scaled) (unscaled) Objective...............: 2.2607846751301537e-15 2.2607846751301537e-15 Dual infeasibility......: 1.3533781753801507e-13 1.3533781753801507e-13 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.5059874535616747e-09 2.5059874535616747e-09 Overall NLP error.......: 2.5059874535616747e-09 2.5059874535616747e-09 Number of objective function evaluations = 11 Number of objective gradient evaluations = 11 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 11 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 11 Number of Lagrangian Hessian evaluations = 10 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 25.00us ( 2.27us) 24.01us ( 2.18us) 11 nlp_g | 37.00us ( 3.36us) 30.84us ( 2.80us) 11 nlp_grad_f | 28.00us ( 2.33us) 25.96us ( 2.16us) 12 nlp_hess_l | 32.00us ( 3.20us) 31.38us ( 3.14us) 10 nlp_jac_g | 23.00us ( 1.92us) 21.16us ( 1.76us) 12 total | 4.51ms ( 4.51ms) 4.51ms ( 4.51ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.2328535e-02 0.00e+00 2.09e-01 -1.7 5.52e-01 - 1.00e+00 1.00e+00h 1 3 6.8156322e-03 0.00e+00 2.84e-02 -1.7 8.76e-01 - 1.00e+00 1.00e+00h 1 4 1.5388433e-03 0.00e+00 4.89e-03 -2.5 3.25e-01 - 1.00e+00 1.00e+00h 1 5 2.0218974e-04 0.00e+00 1.98e-03 -3.8 1.55e-01 - 1.00e+00 1.00e+00h 1 6 1.6754549e-05 0.00e+00 3.08e-04 -3.8 6.55e-02 - 1.00e+00 1.00e+00h 1 7 1.5219076e-07 0.00e+00 4.26e-05 -5.7 2.38e-02 - 1.00e+00 1.00e+00h 1 8 7.1653837e-10 0.00e+00 4.00e-07 -5.7 2.37e-03 - 1.00e+00 1.00e+00h 1 9 2.6541777e-15 0.00e+00 2.27e-09 -8.6 1.70e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 9 (scaled) (unscaled) Objective...............: 2.6541777156111496e-15 2.6541777156111496e-15 Dual infeasibility......: 2.2689809148682812e-09 2.2689809148682812e-09 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 3.9219928248582801e-09 3.9219928248582801e-09 Overall NLP error.......: 3.9219928248582801e-09 3.9219928248582801e-09 Number of objective function evaluations = 10 Number of objective gradient evaluations = 10 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 10 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 10 Number of Lagrangian Hessian evaluations = 9 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 20.00us ( 2.00us) 20.47us ( 2.05us) 10 nlp_g | 33.00us ( 3.30us) 26.64us ( 2.66us) 10 nlp_grad_f | 24.00us ( 2.18us) 25.19us ( 2.29us) 11 nlp_hess_l | 29.00us ( 3.22us) 28.46us ( 3.16us) 9 nlp_jac_g | 20.00us ( 1.82us) 19.27us ( 1.75us) 11 total | 4.21ms ( 4.21ms) 4.21ms ( 4.21ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.1861727e-02 0.00e+00 2.10e-01 -1.7 5.53e-01 - 1.00e+00 1.00e+00h 1 3 6.4061795e-03 0.00e+00 2.93e-02 -1.7 8.86e-01 - 1.00e+00 1.00e+00h 1 4 1.2836965e-03 0.00e+00 5.03e-03 -2.5 3.34e-01 - 1.00e+00 1.00e+00h 1 5 1.3213997e-04 0.00e+00 1.85e-03 -3.8 1.52e-01 - 1.00e+00 1.00e+00h 1 6 7.6262603e-06 0.00e+00 2.26e-04 -3.8 5.71e-02 - 1.00e+00 1.00e+00h 1 7 2.4998766e-08 0.00e+00 2.10e-05 -5.7 1.68e-02 - 1.00e+00 1.00e+00h 1 8 3.1987638e-10 0.00e+00 5.87e-08 -5.7 9.25e-04 - 1.00e+00 1.00e+00h 1 9 9.4051883e-16 0.00e+00 1.02e-09 -8.6 1.13e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 9 (scaled) (unscaled) Objective...............: 9.4051882503475303e-16 9.4051882503475303e-16 Dual infeasibility......: 1.0186468605667904e-09 1.0186468605667904e-09 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 3.1423839562517952e-09 3.1423839562517952e-09 Overall NLP error.......: 3.1423839562517952e-09 3.1423839562517952e-09 Number of objective function evaluations = 10 Number of objective gradient evaluations = 10 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 10 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 10 Number of Lagrangian Hessian evaluations = 9 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 21.00us ( 2.10us) 20.38us ( 2.04us) 10 nlp_g | 36.00us ( 3.60us) 27.36us ( 2.74us) 10 nlp_grad_f | 25.00us ( 2.27us) 26.59us ( 2.42us) 11 nlp_hess_l | 29.00us ( 3.22us) 28.22us ( 3.14us) 9 nlp_jac_g | 21.00us ( 1.91us) 18.91us ( 1.72us) 11 total | 4.18ms ( 4.18ms) 4.18ms ( 4.18ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.1429229e-02 0.00e+00 2.10e-01 -1.7 5.54e-01 - 1.00e+00 1.00e+00h 1 3 6.0454626e-03 0.00e+00 3.00e-02 -1.7 8.95e-01 - 1.00e+00 1.00e+00h 1 4 1.0795087e-03 0.00e+00 5.13e-03 -2.5 3.41e-01 - 1.00e+00 1.00e+00h 1 5 8.7482132e-05 0.00e+00 1.71e-03 -3.8 1.49e-01 - 1.00e+00 1.00e+00h 1 6 3.7871010e-06 0.00e+00 1.60e-04 -3.8 4.90e-02 - 1.00e+00 1.00e+00h 1 7 5.4814828e-09 0.00e+00 1.08e-05 -5.7 1.21e-02 - 1.00e+00 1.00e+00h 1 8 1.9757079e-10 0.00e+00 1.06e-08 -5.7 3.99e-04 - 1.00e+00 1.00e+00h 1 9 5.0788853e-16 0.00e+00 6.30e-10 -8.6 8.88e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 9 (scaled) (unscaled) Objective...............: 5.0788852844357805e-16 5.0788852844357805e-16 Dual infeasibility......: 6.3001010769284050e-10 6.3001010769284050e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.8996408826546640e-09 2.8996408826546640e-09 Overall NLP error.......: 2.8996408826546640e-09 2.8996408826546640e-09 Number of objective function evaluations = 10 Number of objective gradient evaluations = 10 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 10 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 10 Number of Lagrangian Hessian evaluations = 9 Total seconds in IPOPT = 0.004 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 21.00us ( 2.10us) 20.34us ( 2.03us) 10 nlp_g | 31.00us ( 3.10us) 26.72us ( 2.67us) 10 nlp_grad_f | 27.00us ( 2.45us) 25.54us ( 2.32us) 11 nlp_hess_l | 33.00us ( 3.67us) 30.62us ( 3.40us) 9 nlp_jac_g | 23.00us ( 2.09us) 19.91us ( 1.81us) 11 total | 4.22ms ( 4.22ms) 4.22ms ( 4.22ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.1027401e-02 0.00e+00 2.11e-01 -1.7 5.55e-01 - 1.00e+00 1.00e+00h 1 3 5.7259771e-03 0.00e+00 3.07e-02 -1.7 9.03e-01 - 1.00e+00 1.00e+00h 1 4 9.1491524e-04 0.00e+00 5.19e-03 -2.5 3.46e-01 - 1.00e+00 1.00e+00h 1 5 5.8779922e-05 0.00e+00 1.56e-03 -3.8 1.45e-01 - 1.00e+00 1.00e+00h 1 6 2.0698707e-06 0.00e+00 1.12e-04 -3.8 4.16e-02 - 1.00e+00 1.00e+00h 1 7 1.6411495e-09 0.00e+00 6.05e-06 -5.7 9.04e-03 - 1.00e+00 1.00e+00h 1 8 1.5104441e-15 0.00e+00 4.89e-09 -8.6 2.67e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 1.5104441121569591e-15 1.5104441121569591e-15 Dual infeasibility......: 4.8852512565929027e-09 4.8852512565929027e-09 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 5.4929464869459015e-09 5.4929464869459015e-09 Overall NLP error.......: 5.4929464869459015e-09 5.4929464869459015e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 20.00us ( 2.22us) 18.32us ( 2.04us) 9 nlp_g | 28.00us ( 3.11us) 24.25us ( 2.69us) 9 nlp_grad_f | 23.00us ( 2.30us) 22.80us ( 2.28us) 10 nlp_hess_l | 27.00us ( 3.38us) 25.84us ( 3.23us) 8 nlp_jac_g | 20.00us ( 2.00us) 17.06us ( 1.71us) 10 total | 3.90ms ( 3.90ms) 3.91ms ( 3.91ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.0653100e-02 0.00e+00 2.12e-01 -1.7 5.56e-01 - 1.00e+00 1.00e+00h 1 3 5.4415923e-03 0.00e+00 3.13e-02 -1.7 9.10e-01 - 1.00e+00 1.00e+00h 1 4 7.8126920e-04 0.00e+00 5.22e-03 -2.5 3.51e-01 - 1.00e+00 1.00e+00h 1 5 4.0130268e-05 0.00e+00 1.41e-03 -3.8 1.40e-01 - 1.00e+00 1.00e+00h 1 6 1.2419257e-06 0.00e+00 7.73e-05 -3.8 3.52e-02 - 1.00e+00 1.00e+00h 1 7 6.5078116e-10 0.00e+00 3.68e-06 -5.7 7.03e-03 - 1.00e+00 1.00e+00h 1 8 4.6942794e-16 0.00e+00 1.94e-09 -8.6 1.68e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 4.6942793688164477e-16 4.6942793688164477e-16 Dual infeasibility......: 1.9424394977504803e-09 1.9424394977504803e-09 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 3.6946208020933589e-09 3.6946208020933589e-09 Overall NLP error.......: 3.6946208020933589e-09 3.6946208020933589e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 20.00us ( 2.22us) 19.46us ( 2.16us) 9 nlp_g | 31.00us ( 3.44us) 23.75us ( 2.64us) 9 nlp_grad_f | 23.00us ( 2.30us) 22.39us ( 2.24us) 10 nlp_hess_l | 27.00us ( 3.38us) 26.23us ( 3.28us) 8 nlp_jac_g | 19.00us ( 1.90us) 17.91us ( 1.79us) 10 total | 3.95ms ( 3.95ms) 3.95ms ( 3.95ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 5.0303596e-02 0.00e+00 2.12e-01 -1.7 5.57e-01 - 1.00e+00 1.00e+00h 1 3 5.1872652e-03 0.00e+00 3.19e-02 -1.7 9.17e-01 - 1.00e+00 1.00e+00h 1 4 6.7196566e-04 0.00e+00 5.23e-03 -2.5 3.55e-01 - 1.00e+00 1.00e+00h 1 5 2.7855751e-05 0.00e+00 1.27e-03 -3.8 1.35e-01 - 1.00e+00 1.00e+00h 1 6 8.0983086e-07 0.00e+00 5.36e-05 -3.8 2.97e-02 - 1.00e+00 1.00e+00h 1 7 3.2246843e-10 0.00e+00 2.43e-06 -5.7 5.68e-03 - 1.00e+00 1.00e+00h 1 8 2.4062498e-16 0.00e+00 9.67e-10 -8.6 1.18e-04 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 2.4062498476545355e-16 2.4062498476545355e-16 Dual infeasibility......: 9.6688372355952227e-10 9.6688372355952227e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 3.0985707245007653e-09 3.0985707245007653e-09 Overall NLP error.......: 3.0985707245007653e-09 3.0985707245007653e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 21.00us ( 2.33us) 18.81us ( 2.09us) 9 nlp_g | 31.00us ( 3.44us) 24.25us ( 2.69us) 9 nlp_grad_f | 24.00us ( 2.40us) 22.15us ( 2.22us) 10 nlp_hess_l | 26.00us ( 3.25us) 26.03us ( 3.25us) 8 nlp_jac_g | 18.00us ( 1.80us) 17.43us ( 1.74us) 10 total | 3.85ms ( 3.85ms) 3.85ms ( 3.85ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 4.9976509e-02 0.00e+00 2.13e-01 -1.7 5.58e-01 - 1.00e+00 1.00e+00h 1 3 4.9588208e-03 0.00e+00 3.23e-02 -1.7 9.23e-01 - 1.00e+00 1.00e+00h 1 4 5.8193506e-04 0.00e+00 5.22e-03 -2.5 3.59e-01 - 1.00e+00 1.00e+00h 1 5 1.9662481e-05 0.00e+00 1.15e-03 -3.8 1.30e-01 - 1.00e+00 1.00e+00h 1 6 5.6628358e-07 0.00e+00 3.74e-05 -3.8 2.52e-02 - 1.00e+00 1.00e+00h 1 7 1.8801878e-10 0.00e+00 1.71e-06 -5.7 4.74e-03 - 1.00e+00 1.00e+00h 1 8 1.5648994e-16 0.00e+00 5.67e-10 -8.6 8.98e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 1.5648994401963879e-16 1.5648994401963879e-16 Dual infeasibility......: 5.6658446296596025e-10 5.6658446296596025e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.8538211966995104e-09 2.8538211966995104e-09 Overall NLP error.......: 2.8538211966995104e-09 2.8538211966995104e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 15.00us ( 1.67us) 17.73us ( 1.97us) 9 nlp_g | 29.00us ( 3.22us) 23.01us ( 2.56us) 9 nlp_grad_f | 23.00us ( 2.30us) 22.68us ( 2.27us) 10 nlp_hess_l | 25.00us ( 3.12us) 25.24us ( 3.15us) 8 nlp_jac_g | 19.00us ( 1.90us) 16.95us ( 1.70us) 10 total | 3.88ms ( 3.88ms) 3.88ms ( 3.88ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 4.9669752e-02 0.00e+00 2.14e-01 -1.7 5.59e-01 - 1.00e+00 1.00e+00h 1 3 4.7527812e-03 0.00e+00 3.28e-02 -1.7 9.29e-01 - 1.00e+00 1.00e+00h 1 4 5.0726523e-04 0.00e+00 5.19e-03 -2.5 3.62e-01 - 1.00e+00 1.00e+00h 1 5 1.4111911e-05 0.00e+00 1.03e-03 -3.8 1.25e-01 - 1.00e+00 1.00e+00h 1 6 4.1893115e-07 0.00e+00 2.63e-05 -3.8 2.15e-02 - 1.00e+00 1.00e+00h 1 7 1.2290102e-10 0.00e+00 1.27e-06 -5.7 4.07e-03 - 1.00e+00 1.00e+00h 1 8 1.1429223e-16 0.00e+00 3.72e-10 -8.6 7.24e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 1.1429222975431541e-16 1.1429222975431541e-16 Dual infeasibility......: 3.7210581262012894e-10 3.7210581262012894e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.7347766265729349e-09 2.7347766265729349e-09 Overall NLP error.......: 2.7347766265729349e-09 2.7347766265729349e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 21.00us ( 2.33us) 19.32us ( 2.15us) 9 nlp_g | 47.00us ( 5.22us) 41.55us ( 4.62us) 9 nlp_grad_f | 24.00us ( 2.40us) 23.27us ( 2.33us) 10 nlp_hess_l | 29.00us ( 3.62us) 27.27us ( 3.41us) 8 nlp_jac_g | 17.00us ( 1.70us) 17.83us ( 1.78us) 10 total | 3.89ms ( 3.89ms) 3.89ms ( 3.89ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 4.9381490e-02 0.00e+00 2.14e-01 -1.7 5.59e-01 - 1.00e+00 1.00e+00h 1 3 4.5662323e-03 0.00e+00 3.32e-02 -1.7 9.35e-01 - 1.00e+00 1.00e+00h 1 4 4.4491969e-04 0.00e+00 5.15e-03 -2.5 3.64e-01 - 1.00e+00 1.00e+00h 1 5 1.0294433e-05 0.00e+00 9.28e-04 -3.8 1.20e-01 - 1.00e+00 1.00e+00h 1 6 3.2399690e-07 0.00e+00 1.87e-05 -3.8 1.84e-02 - 1.00e+00 1.00e+00h 1 7 8.7014412e-11 0.00e+00 9.89e-07 -5.7 3.58e-03 - 1.00e+00 1.00e+00h 1 8 8.8912522e-17 0.00e+00 2.65e-10 -8.6 6.07e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 8.8912522344570490e-17 8.8912522344570490e-17 Dual infeasibility......: 2.6454817415251347e-10 2.6454817415251347e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.6688523639630481e-09 2.6688523639630481e-09 Overall NLP error.......: 2.6688523639630481e-09 2.6688523639630481e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 20.00us ( 2.22us) 18.68us ( 2.08us) 9 nlp_g | 29.00us ( 3.22us) 24.59us ( 2.73us) 9 nlp_grad_f | 24.00us ( 2.40us) 22.92us ( 2.29us) 10 nlp_hess_l | 27.00us ( 3.37us) 27.16us ( 3.40us) 8 nlp_jac_g | 19.00us ( 1.90us) 17.86us ( 1.79us) 10 total | 3.90ms ( 3.90ms) 3.89ms ( 3.89ms) 1 This is Ipopt version 3.14.11, running with linear solver MUMPS 5.4.1. Number of nonzeros in equality constraint Jacobian...: 0 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 3 Total number of variables............................: 2 variables with only lower bounds: 0 variables with lower and upper bounds: 0 variables with only upper bounds: 0 Total number of equality constraints.................: 0 Total number of inequality constraints...............: 1 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 1.0000000e+00 0.00e+00 2.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 3.1250000e-01 0.00e+00 5.00e-01 -1.0 5.00e-01 - 1.00e+00 1.00e+00f 1 2 4.9110102e-02 0.00e+00 2.14e-01 -1.7 5.60e-01 - 1.00e+00 1.00e+00h 1 3 4.3967182e-03 0.00e+00 3.35e-02 -1.7 9.40e-01 - 1.00e+00 1.00e+00h 1 4 3.9252745e-04 0.00e+00 5.11e-03 -2.5 3.66e-01 - 1.00e+00 1.00e+00h 1 5 7.6289532e-06 0.00e+00 8.35e-04 -3.8 1.15e-01 - 1.00e+00 1.00e+00h 1 6 2.5942225e-07 0.00e+00 1.35e-05 -3.8 1.58e-02 - 1.00e+00 1.00e+00h 1 7 6.5197585e-11 0.00e+00 7.95e-07 -5.7 3.20e-03 - 1.00e+00 1.00e+00h 1 8 7.1902281e-17 0.00e+00 1.99e-10 -8.6 5.25e-05 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 8 (scaled) (unscaled) Objective...............: 7.1902281402064665e-17 7.1902281402064665e-17 Dual infeasibility......: 1.9892612672036513e-10 1.9892612672036513e-10 Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00 Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00 Complementarity.........: 2.6285802469938070e-09 2.6285802469938070e-09 Overall NLP error.......: 2.6285802469938070e-09 2.6285802469938070e-09 Number of objective function evaluations = 9 Number of objective gradient evaluations = 9 Number of equality constraint evaluations = 0 Number of inequality constraint evaluations = 9 Number of equality constraint Jacobian evaluations = 0 Number of inequality constraint Jacobian evaluations = 9 Number of Lagrangian Hessian evaluations = 8 Total seconds in IPOPT = 0.003 EXIT: Optimal Solution Found. solver_ipopt_Nlp1 : t_proc (avg) t_wall (avg) n_eval nlp_f | 19.00us ( 2.11us) 19.47us ( 2.16us) 9 nlp_g | 30.00us ( 3.33us) 24.70us ( 2.74us) 9 nlp_grad_f | 24.00us ( 2.40us) 23.04us ( 2.30us) 10 nlp_hess_l | 27.00us ( 3.37us) 27.03us ( 3.38us) 8 nlp_jac_g | 18.00us ( 1.80us) 18.01us ( 1.80us) 10 total | 3.89ms ( 3.89ms) 3.89ms ( 3.89ms) 1 .. GENERATED FROM PYTHON SOURCE LINES 101-104 In the figure we plot the value of the optimal value :math:`f(x^\star; r)` as a function of the parameter :math:`r`, and the tangent line at each point is computed via the corresponding optimal multiplier :math:`\lambda^\star(r)`. .. GENERATED FROM PYTHON SOURCE LINES 104-115 .. code-block:: Python ts = np.linspace(-0.02, 0.02) fig, ax = plt.subplots(constrained_layout=True) ax.plot(r_values, f_values, "o") for r_value, f_value, lam_value in zip(r_values, f_values, lam_values): ax.plot(r_value + ts, -lam_value * ts + f_value, "r-") ax.set_xlabel("Value of r") ax.set_ylabel("Objective value at solution") plt.show() .. image-sg:: /auto_examples/images/sphx_glr_rosenbrock_002.png :alt: rosenbrock :srcset: /auto_examples/images/sphx_glr_rosenbrock_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.377 seconds) .. _sphx_glr_download_auto_examples_rosenbrock.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: rosenbrock.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: rosenbrock.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: rosenbrock.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_