title: AMPL IPOPT gives wrong optimal solution while solve result is "solved"
body: <p>I am trying to solve a very simple optimization problem in AMPL with IPOPT as follow:</p>
  
  <pre><code>var x1 &gt;= 0 ;
  minimize obj: -(x1^2)+x1;
  </code></pre>
  
  <p>obviously the problem is unbounded. but IPOPT gives me:</p>
  
  <pre><code>******************************************************************************
  This program contains Ipopt, a library for large-scale nonlinear optimization.
  Ipopt is released as open source code under the Eclipse Public License (EPL).
       For more information visit http://projects.coin-or.org/Ipopt
  ******************************************************************************
  
  This is Ipopt version 3.12.4, running with linear solver mumps.
  NOTE: Other linear solvers might be more efficient (see Ipopt documentation).
  
  Number of nonzeros in equality constraint Jacobian...:        0
  Number of nonzeros in inequality constraint Jacobian.:        0
  Number of nonzeros in Lagrangian Hessian.............:        1
  
  Total number of variables............................:        1
                   variables with only lower bounds:        1
              variables with lower and upper bounds:        0
                   variables with only upper bounds:        0
  Total number of equality constraints.................:        0
  Total number of inequality constraints...............:        0
      inequality constraints with only lower bounds:        0
  inequality constraints with lower and upper bounds:        0
      inequality constraints with only upper bounds:        0
  
  iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  0  9.8999902e-03 0.00e+00 2.00e-02  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0
  1  1.5346023e-04 0.00e+00 1.50e-09  -3.8 9.85e-03    -  1.00e+00 1.00e+00f  1
  2  1.7888952e-06 0.00e+00 1.84e-11  -5.7 1.52e-04    -  1.00e+00 1.00e+00f  1
  3 -7.5005506e-09 0.00e+00 2.51e-14  -8.6 1.80e-06    -  1.00e+00 1.00e+00f  1
  
  Number of Iterations....: 3
  
                                 (scaled)                 (unscaled)
  Objective...............:  -7.5005505996934397e-09   -7.5005505996934397e-09
  Dual infeasibility......:   2.5091040356528538e-14    2.5091040356528538e-14
  Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00
  Complementarity.........:   2.4994494940593761e-09    2.4994494940593761e-09
  Overall NLP error.......:   2.4994494940593761e-09    2.4994494940593761e-09
  
  
  Number of objective function evaluations             = 4
  Number of objective gradient evaluations             = 4
  Number of equality constraint evaluations            = 0
  Number of inequality constraint evaluations          = 0
  Number of equality constraint Jacobian evaluations   = 0
  Number of inequality constraint Jacobian evaluations = 0
  Number of Lagrangian Hessian evaluations             = 3
  Total CPU secs in IPOPT (w/o function evaluations)   =      0.001
  Total CPU secs in NLP function evaluations           =      0.000
  
  EXIT: Optimal Solution Found.
  
  Ipopt 3.12.4: Optimal Solution Found
  
  suffix ipopt_zU_out OUT;
  suffix ipopt_zL_out OUT;
  ampl: display x1;
  x1 = 0
  </code></pre>
  
  <p>when I change the solver to Gurobi, it gives this message:</p>
  
  <pre><code> Gurobi 6.5.0: unbounded; variable.unbdd returned.
  </code></pre>
  
  <p>which is what I expected.
  I can not understand why it happens and now I don't know if I need to check it for all the problem that I am trying to solve to not converging to the the wrong optimal solution. As it is a super simple example it is a little bit strange.</p>
  
  <p>I would appreciate if anybody can help me with this.</p>
  
  <p>Thanks</p>