Dear all,
First of all, I would like to thank the CasADi developers for your great work with CasADi.
I am currently trying to solve a dynamic optimization problem using direct collocation in CasADi version 3.3.0, MatlabR2014b- version. While using IPOPT to solve the resulting NLP, I get the following message after 40 iterations:
39 -1.3410974e+00 3.37e+01 2.89e+08 2.8 1.24e+05 - 1.82e-04 3.29e-05h 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
40r-1.3410974e+00 3.37e+01 1.00e+03 2.8 0.00e+00 - 0.00e+00 1.66e-07R 2
CasADi - 2018-01-19 10:57:59 WARNING("solver:nlp_g failed: NaN detected for output g, at (row 1006, col 0).") [.../casadi/core/oracle_function.cpp:249]
Warning: Cutting back alpha due to evaluation error
CasADi - 2018-01-19 10:57:59 WARNING("solver:nlp_g failed: NaN detected for output g, at (row 1006, col 0).") [.../casadi/core/oracle_function.cpp:249]
This warning message persists until IPOPT stops and says it could not find a solution.
Now, I am trying to figure out which constraint is actually causing the problem by looking at (row 1006, col 0). I have the following questions:
1. Which object's row and column is CasADi referring to? Is it the vector of the constraints g (i.e. collocation and continuity constraints)? Is it the jacobian matrix?
2. How is the indexing done on the rows of this object (constraint g or jacobian) in CasADi's matlab version? Does the row indexing start from 0 or 1? That is, is it [0 1 2 ... 1006] or [1 2 ... 1006]?
I would be very grateful if you can help me. Thanks!