I am trying to solve a NMHE problem using IPOPT from CasADi with a DAE system formulated in IDAS.
On some occasions, I get the messages below. The DAE constraints are met for the starting values for the NLP, this is occuring during optimization, like in the example below at iteration 41.. There, I would expect IPOPT to provide consistent initial conditions to IDAS?
I tried to modify the 'abstol' option as mentioned in some other posts, but this only changes the number of the iteration when this happens.
(BTW: how can I find the default options using the Matlab interface? - they are not in the documentation nor does the command integratorobj.print_options reveal more than a description with only very few default values included...)
M.
**************************************************
*** Solving the Primal Dual System for Iteration 41:
**************************************************
Number of doubles for MUMPS to hold factorization (INFO(9)) = 7545
Number of integers for MUMPS to hold factorization (INFO(10)) = 4838
Factorization successful.
Number of trial factorizations performed: 1
Perturbation parameters: delta_x=0.000000e+000 delta_s=0.000000e+000
delta_c=0.000000e+000 delta_d=0.000000e+000
residual_ratio = 2.200487e-015
Factorization successful.
residual_ratio = 1.395430e-016
**************************************************
*** Finding Acceptable Trial Point for Iteration 41:
**************************************************
--> Starting line search in iteration 41 <--
The current filter has 13 entries.
minimal step size ALPHA_MIN = 5.000000E-007
Starting checks for alpha (primal) = 9.90e-001
Checking acceptability for trial step size alpha_primal_test=9.899651e-001:
New values of barrier function = 5.6332457451514649e+008 (reference 9.9809704976545751e+007):
New values of constraint violation = 8.0199822100085257e+003 (reference 1.2788838596531691e+003):
Checking sufficient reduction...
Failed...
Trying second order correction number 1
Factorization successful.
Checking acceptability for trial step size alpha_primal_test=9.899651e-001:
New values of barrier function = 3.1323885040622228e+008 (reference 9.9809704976545751e+007):
New values of constraint violation = 1.1722834531783469e+003 (reference 1.2788838596531691e+003):
Checking sufficient reduction...
Succeeded...
Checking filter acceptability...
Succeeded...
Second order correction step accepted with 1 corrections.
**************************************************
*** Update HessianMatrix for Iteration 42:
**************************************************
The linesearch algorithm failed with too small a step.
CasADi - WARNING("solver:nlp_hess_l failed:Error in Function::operator() for 'nlp_hess_l' [MXFunction] at .../casadi/core/function.cpp:1368:
Error in Function::operator() for 'adj1_F' [MXFunction] at .../casadi/core/function.cpp:1368:
Error in Function::operator() for 'asens1_F' [IdasInterface] at .../casadi/core/function.cpp:1368:
.../casadi/interfaces/sundials/idas_interface.cpp:569: IDACalcICB returned "IDA_LINESEARCH_FAIL". Consult IDAS documentation.") [.../casadi/core/oracle_function.cpp:223]
Number of Iterations....: 42
Number of objective function evaluations = 58
Number of objective gradient evaluations = 22
Number of equality constraint evaluations = 58
Number of inequality constraint evaluations = 0
Number of equality constraint Jacobian evaluations = 44
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations = 43
Total CPU secs in IPOPT (w/o function evaluations) = 0.085
Total CPU secs in NLP function evaluations = 1.926
EXIT: Invalid number in NLP function or derivative detected.