Replies: 1 comment 24 replies
-
Since this is using CppAD's interface to Ipopt, you may want to try with the CppAD project. |
Beta Was this translation helpful? Give feedback.
24 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone! I am trying to use the Idopt to solve the optimal question of the trajectory planning using C++ under the system Ubuntu20.04. And here is my code.
Code:
Result:
The solver will work and show the following information:
This is Ipopt version 3.14.14, running with linear solver ma27.
Number of nonzeros in equality constraint Jacobian...: 532336
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 301476
Total number of variables............................: 776
variables with only lower bounds: 0
variables with lower and upper bounds: 776
variables with only upper bounds: 0
Total number of equality constraints.................: 686
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
60 0.0000000e+00 1.02e-02 3.68e+00 -1.7 1.86e+00 - 4.49e-01 2.02e-01f 1
61 0.0000000e+00 5.60e-03 2.27e+00 -1.7 1.30e+00 - 3.91e-01 5.19e-01f 1
62 0.0000000e+00 7.51e-03 1.38e-01 -1.7 8.30e-01 - 1.00e+00 1.00e+00f 1
63 0.0000000e+00 1.42e-05 1.53e-03 -2.5 3.78e-02 - 1.00e+00 1.00e+00h 1
64 0.0000000e+00 5.34e-07 1.92e-05 -3.8 8.91e-03 - 1.00e+00 1.00e+00h 1
65 0.0000000e+00 1.11e-07 1.25e-06 -5.7 1.60e-03 - 1.00e+00 1.00e+00h 1
66 0.0000000e+00 1.49e-09 1.87e-09 -8.6 1.84e-04 - 1.00e+00 1.00e+00h 1
Number of Iterations....: 66
Objective...............: 0.0000000000000000e+00 0.0000000000000000e+00
Dual infeasibility......: 1.8730592004475365e-09 1.8730592004475365e-09
Constraint violation....: 6.8723325320688692e-10 1.4871727599397033e-09
Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00
Complementarity.........: 3.4296130568355177e-09 3.4296130568355177e-09
Overall NLP error.......: 3.4296130568355177e-09 3.4296130568355177e-09
Number of objective function evaluations = 67
Number of objective gradient evaluations = 67
Number of equality constraint evaluations = 67
Number of inequality constraint evaluations = 0
Number of equality constraint Jacobian evaluations = 67
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations = 66
Total seconds in IPOPT = 136.355
EXIT: Optimal Solution Found.
And then I have encountered with the following question:
When I set the variable N under 64, like 60 or 61 or 62 , it will solve the problem as above and give the optimal result. However, once i set the N over 64, it will definitely show the "segmentation fault" without any other information of the fault and stop the program. I don't know the reason of it.Any ideas of how to get around this issue? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions