[Ipopt] A question about precision

darknesswind darknesswind at qq.com
Tue Oct 29 05:27:29 EDT 2013


Hello! We just used very general example, but without the right result.
How can we improve it?

#Define variables, with bounds
var x1 >= 0;
var x2 >= 0;

#objective function
minimize objf: x1 * x2;

#constaints
NONE

Normally, the objective value should equel to 0, because both of two variables can equal to 0.
But we observed that the minimize variable value only get to 0.000050405560745489 in function eval_f(...),
and the objective value just is 2.54072E-09.

#Here is our relative option setting list
List of options:

                                    Name   Value                # times used
                 accept_every_trial_step = no                        1
                acceptable_compl_inf_tol = 1e-006                    1
              acceptable_constr_viol_tol = 1e-006                    1
               acceptable_obj_change_tol = 1e-020                    1
                          acceptable_tol = 0.0001                    1
                  bound_mult_init_method = mu-based                  1
                      bound_relax_factor = 0                         2
                           compl_inf_tol = 1e-008                    2
                         constr_viol_tol = 1e-008                    2
                            dual_inf_tol = 1e-008                    1
                        file_print_level = 12                        1
                   hessian_approximation = limited-memory            4
                            max_cpu_time = 1.79769e+308              1
                                max_iter = 2147483647                1
                                 max_soc = 4                         1
                                  mu_max = 1e+020                    1
                             mu_max_fact = 1e+008                    1
                                  mu_min = 1e-020                    1
                               mu_oracle = quality-function          2
                             mu_strategy = adaptive                  2
                     nlp_lower_bound_inf = -2e+024                   1
                      nlp_scaling_method = gradient-based            1
                     nlp_upper_bound_inf = 2e+024                    1
                      obj_scaling_factor = 1                         1
                             output_file = ipopt.out                 1
                                     tol = 1e-006                    2
         watchdog_shortened_iter_trigger = 10                        1
                 watchdog_trial_iter_max = 3                         1

########################################
The output with default level is here:

This is Ipopt version 3.11.1, running with linear solver mumps.

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

Total number of variables............................:        2
                     variables with only lower bounds:        2
                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 1.0000000e-004 0.00e+000 9.99e+000   0.0 0.00e+000    -  0.00e+000 0.00e+000   0
   1 1.0224810e-002 0.00e+000 9.12e-006  -0.0 9.11e-002    -  1.00e+000 1.00e+000f  1
   2 8.2828361e-003 0.00e+000 8.18e-008  -2.1 1.01e-002    -  1.00e+000 1.00e+000f  1
   3 2.4571876e-003 0.00e+000 7.40e-009  -3.1 4.14e-002    -  1.00e+000 1.00e+000f  1
   4 6.2440136e-004 0.00e+000 2.01e-010  -4.7 2.46e-002    -  1.00e+000 1.00e+000f  1
   5 1.6632570e-004 0.00e+000 2.01e-010  -4.7 1.21e-002    -  1.00e+000 1.00e+000f  1
   6 4.1626583e-005 0.00e+000 9.03e-013  -7.0 6.44e-003    -  1.00e+000 1.00e+000f  1
   7 1.0406667e-005 0.00e+000 4.14e-016 -10.4 3.23e-003    -  1.00e+000 1.00e+000f  1
   8 2.6016718e-006 0.00e+000 1.06e-016 -11.0 1.61e-003    -  1.00e+000 1.00e+000f  1
   9 6.5041926e-007 0.00e+000 2.65e-017 -11.6 8.06e-004    -  1.00e+000 1.00e+000f  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10 1.6260514e-007 0.00e+000 6.99e-018 -12.2 4.03e-004    -  1.00e+000 1.00e+000f  1
  11 4.0651366e-008 0.00e+000 1.68e-018 -12.8 2.02e-004    -  1.00e+000 1.00e+000f  1
  12 1.0162862e-008 0.00e+000 7.18e-019 -13.4 1.01e-004    -  1.00e+000 1.00e+000f  1
  13 2.5407206e-009 0.00e+000 8.13e-020 -14.0 5.04e-005    -  1.00e+000 1.00e+000f  1

Number of Iterations....: 13

                                   (scaled)                 (unscaled)
Objective...............:  2.5407205540671768e-009   2.5407205540671768e-009
Dual infeasibility......:  8.1315162936412833e-020   8.1315162936412833e-020
Constraint violation....:  0.0000000000000000e+000   0.0000000000000000e+000
Complementarity.........:  2.5407205540671810e-009   2.5407205540671810e-009
Overall NLP error.......:  2.5407205540671810e-009   2.5407205540671810e-009


Number of objective function evaluations             = 14
Number of objective gradient evaluations             = 14
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             = 0
Total CPU secs in IPOPT (w/o function evaluations)   =      0.492
Total CPU secs in NLP function evaluations           =      0.056

EXIT: Optimal Solution Found.

#########################
We will be appreciative of your answer.



More information about the Ipopt mailing list