<div dir="ltr"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">Hello all,<br><br>I am using IPOPT implemented through OpenMDAO and am having some trouble understanding and controlling the stopping criteria.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">Here is what I'm experiencing specifically: Initially, IPOPT is able to find a solution that appears to be much better, although constraints are violated slightly (intuition tells me that adjusting a few parameters would likely bring it into the feasible region). From <a href="http://stackoverflow.com/questions/36907064/why-does-ipopt-evaluate-objective-function-despite-breaching-constraints" style="margin:0px;padding:0px;border:0px;color:rgb(0,89,153);text-decoration-line:none">this stackoverflow discussion</a> I understand that "linear or nonlinear equality or inequality constraint will not necessarily be satisfied until the solver has finished converging at the final iteration," so I would like to know if I can change tolerances such that the solver will begin to completely satisfy constraints sooner. Currently, nearly all evaluations are in the infeasible regime.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">I realize that this approach would result in a less optimal solution, but my function evaluations are quite computationally expensive so I'd like to be able to have some kind of control over exiting earlier but with feasible results. It is not clear to me when looking at <a href="https://www.coin-or.org/Ipopt/documentation/node42.html" rel="nofollow noreferrer" style="margin:0px;padding:0px;border:0px;color:rgb(0,89,153);text-decoration-line:none">IPOPT termination documentation</a> how this might be done. (<code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);white-space:pre-wrap">dual_inf_tol</code>?)</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">Here is some output of a not-yet-converged optimization in case that is helpful. Each of my parameters is on the order of approximately -30 to +30 and my constraints all have an upper bound of 1.0.<br></p><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41)"><code style="margin:0px;padding:0px;border:0px;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace,sans-serif;white-space:inherit">This is Ipopt version 3.11.7, running with linear solver ma27.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:      144
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:       12
                     variables with only lower bounds:        0
                variables with lower and upper bounds:       12
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:       12
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:       12

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  2.2773950e-10 4.72e-02 4.31e-01   0.0 0.00e+00    -  0.00e+00 0.00e+00   0
   1 -4.9176078e-05 4.70e-02 9.91e-02  -4.8 9.65e-02    -  9.86e-01 1.00e+00h  1
   2  2.1621729e-03 4.03e-02 1.12e-02  -2.8 8.31e-02    -  9.93e-01 1.00e+00h  1
   3  2.4150351e-03 3.95e-02 7.40e-01  -3.3 5.27e-02    -  1.00e+00 1.86e-01h  1
   4  1.3194689e-02 5.61e-03 3.60e-01  -3.4 4.16e-01    -  1.00e+00 1.00e+00h  1
   5  1.4923797e-02 5.70e-04 2.12e+00  -4.8 7.84e-02    -  1.00e+00 1.00e+00h  1
   6  1.1292725e-02 1.03e-02 6.11e-01  -4.3 1.28e-01    -  9.91e-01 1.00e+00h  1
   7 -3.0932752e-02 1.78e-01 2.37e-02  -2.7 4.93e+01    -  9.77e-01 3.04e-02f  1
   8 -1.0919263e-01 1.41e-01 1.83e-02  -3.7 6.55e+01    -  1.97e-01 2.13e-01h  1
   9 -1.0200310e-02 6.29e-02 2.12e-01  -1.0 8.84e+02    -  1.91e-01 3.11e-02f  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10  1.4379416e-02 7.83e-02 6.69e-02  -1.8 2.72e+01    -  5.78e-01 4.76e-01h  1
  11 -6.2485434e-02 3.98e-02 4.35e-02  -1.8 2.23e+01    -  6.03e-01 1.00e+00h  1
  12 -1.2862241e-01 1.22e-01 3.52e-03  -2.4 8.08e+00    -  1.00e+00 9.90e-01h  1
  13 -1.4931148e-01 1.03e-01 1.28e-01  -3.5 7.31e+00    -  8.14e-01 1.00e+00h  1
  14 -1.5628632e-01 1.73e-01 6.53e-02  -2.3 1.62e+01    -  1.00e+00 9.20e-01f  1
  15 -1.4969877e-01 2.81e-02 5.75e-02  -2.4 1.44e+01    -  1.00e+00 9.86e-01h  1
  16 -1.5014809e-01 1.13e-01 3.08e-02  -2.6 5.97e+00    -  9.57e-01 1.00e+00h  1
  17 -1.5492389e-01 1.97e-02 6.94e+00  -3.3 3.98e+00    -  9.91e-01 1.00e+00h  1
  18 -1.6660309e-01 5.33e-02 1.37e-02  -3.0 4.11e+00    -  9.90e-01 1.00e+00h  1
  19 -1.6258901e-01 2.00e-01 7.76e-02  -2.7 5.95e+01    -  1.00e+00 1.72e-01h  2
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  20 -1.8526459e-01 3.63e-01 3.54e-02  -2.7 2.48e+01    -  4.07e-01 1.00e+00h  1
  21 -1.7711436e-01 7.11e-02 1.58e-02  -3.1 1.31e+01    -  9.35e-01 1.00e+00h  1
  22 -1.7548211e-01 4.64e-02 1.90e-01  -3.1 6.76e+00    -  5.89e-01 1.00e+00h  1
  23 -1.8872718e-01 5.14e-01 5.11e-02  -2.7 8.01e+00    -  1.00e+00 9.03e-01h  1
  24 -2.2657415e-01 1.51e+00 4.27e-03  -2.8 4.58e+01    -  4.16e-01 7.23e-01h  1
  25 -2.1865212e-01 9.90e-01 1.52e+01  -2.8 1.94e+01    -  1.00e+00 4.04e-01h  1
  26 -2.1865639e-01 9.90e-01 1.52e+01  -2.2 2.05e+01    -  9.93e-01 3.40e-04h  6
  27 -2.1869343e-01 9.92e-01 1.51e+01  -3.3 2.94e+00    -  1.05e-02 1.05e-02s 16
  28 -2.1869424e-01 9.91e-01 2.56e+05  -3.1 5.56e+00    -  1.00e+00 1.06e-04h  1
  29r-2.1869424e-01 9.91e-01 6.51e+02   0.0 0.00e+00    -  0.00e+00 2.66e-07R  3
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  30r-2.1042636e-01 9.23e-01 1.85e+03   1.6 3.78e+02    -  1.00e+00 7.81e-04f  1
  31 -2.1041707e-01 9.23e-01 8.99e+02  -4.8 1.50e+01    -  3.50e-01 3.85e-04h  1
  32r-2.1041707e-01 9.23e-01 6.36e+02   1.2 0.00e+00    -  0.00e+00 4.82e-07R  4
  33r-8.8862276e-03 4.97e-01 6.37e+02   3.1 1.26e+03    -  1.07e-02 6.68e-03f  1
  34r-1.5970781e-02 5.08e-01 5.67e+02   1.4 1.32e+01    -  1.00e+00 4.22e-02f  1
  35  8.0787130e-04 9.17e-03 8.87e+01   1.1 1.88e+02    -  4.69e-02 1.25e-01f  1
  36 -2.3518550e-02 0.00e+00 1.37e+04   0.4 2.17e+00    -  3.97e-03 1.00e+00f  1
  37 -1.8805455e-02 0.00e+00 1.11e+00   0.4 9.51e-01    -  1.00e+00 1.00e+00h  1
  38 -1.7449909e-02 0.00e+00 3.81e-01  -0.3 1.72e+00    -  9.86e-01 1.00e+00f  1
  39 -2.3978737e-02 0.00e+00 2.15e-02  -1.0 3.61e+00    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  40 -2.4302684e-02 0.00e+00 1.38e-02  -3.1 3.49e-02    -  9.96e-01 1.00e+00h  1
  41 -2.5007489e-02 0.00e+00 2.59e-02  -4.3 2.59e-02    -  9.97e-01 1.00e+00h  1
  42 -2.5718840e-02 0.00e+00 2.61e-02  -5.9 2.61e-02    -  1.00e+00 1.00e+00h  1
  43 -2.6430293e-02 0.00e+00 2.61e-02  -7.3 2.61e-02    -  1.00e+00 1.00e+00h  1
  44 -7.4175847e-02 1.51e-02 2.61e-02  -5.3 2.96e+05    -  7.07e-06 5.89e-06f  1
  45 -1.3141330e-01 1.27e-01 2.61e-02  -7.4 3.72e+05    -  2.02e-05 1.13e-05f  1
  46 -1.5205276e-01 1.58e-01 2.61e-02  -7.4 2.22e+04    -  9.04e-04 1.16e-04f  1
  47 -1.7484215e-01 2.50e-01 2.60e-02  -7.4 2.76e+04    -  8.48e-04 2.40e-04f  1
  48 -1.8401410e-01 2.76e-01 2.60e-02  -7.4 3.18e+04    -  1.07e-03 6.43e-05f  1
  49 -1.9843226e-01 3.54e-01 2.60e-02  -5.1 2.08e+04    -  1.65e-03 2.72e-04f  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  50 -2.1122735e-01 9.43e-01 2.60e-02  -5.2 2.08e+04    -  3.03e-03 4.51e-04f  1
  51 -2.1122463e-01 9.43e-01 2.59e-02  -5.1 6.90e-01    -  6.08e-04 1.49e-04h  1
  52 -1.7577586e-01 5.51e-01 1.67e-01  -5.8 1.34e+00    -  1.00e+00 1.00e+00h  1
  53 -1.7055963e-01 5.20e-01 7.44e+00  -4.0 3.27e+00    -  2.92e-01 6.02e-02h  1
  54 -7.0194072e-02 2.42e-01 5.35e+03  -4.0 3.62e+00    -  8.83e-02 1.00e+00h  1
  55 -7.0281067e-02 2.43e-01 6.22e+00  -4.0 4.94e-02    -  4.30e-01 1.00e+00h  1
  56 -7.0328967e-02 2.45e-01 2.62e-02  -4.0 2.02e-03    -  1.00e+00 1.00e+00h  1
  57 -7.0328879e-02 2.45e-01 6.00e+00  -4.0 2.39e-01    -  1.00e+00 8.29e-05h  2
  58 -6.6871118e-02 2.29e-01 4.76e+00  -4.0 4.28e+00    -  5.76e-02 6.70e-02h  1
  59 -6.5418550e-02 2.23e-01 6.38e+00  -4.0 5.06e+00    -  1.00e+00 2.97e-02h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  60 -6.1144197e-02 1.94e-01 5.06e+00  -4.0 5.21e+00    -  1.00e+00 1.09e-01h  1
  61 -1.4374533e-01 6.24e-02 5.31e-01  -4.0 6.05e+00    -  1.32e-01 1.00e+00h  1
  62 -1.9075327e-01 1.76e-01 1.15e-01  -4.0 1.56e+01    -  7.66e-01 1.80e-01h  1
  63 -1.6009455e-01 1.04e-01 2.07e-02  -3.8 3.17e+00    -  1.00e+00 1.00e+00h  1
  64 -1.6095612e-01 1.54e-01 4.94e-03  -2.8 6.40e+00    -  1.00e+00 1.00e+00f  1
  65 -1.6644868e-01 1.13e-01 2.36e-02  -2.8 5.98e+00    -  1.00e+00 6.06e-01h  1
  66 -1.7023044e-01 1.14e-01 1.87e-02  -2.8 7.48e+00    -  1.00e+00 1.00e+00h  1
  67 -1.8720782e-01 1.65e-01 1.03e-03  -2.8 4.63e+00    -  1.00e+00 1.00e+00h  1</code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif">I am fairly new to IPOPT so feel free to correct me if it is clear I am misunderstanding anything or if the optimization is obviously not performing well (I have my suspicions...)</p><div><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px">Thank you,</span><br></div><div><span style="color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;font-size:15px">Austin</span></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div dir="ltr" style="color:rgb(136,136,136);font-size:12.8px"><b style="font-size:12.8px"><font color="#666666">Austin Herrema</font></b><br></div><div dir="ltr" style="color:rgb(136,136,136);font-size:12.8px"><div><font color="#999999">PhD Student | Graduate Research Assistant | Iowa State University</font></div><div><font color="#999999">Wind Energy Science, Engineering, and Policy | Mechanical Engineering</font></div></div></div></div></div>