-
When I was solving a problem, I found that if I change the print_Level, whether to do derivative_test, or whether to redirect the results to a specific file can affect the solution results. Sometimes it can even affect whether the solution can be successfully solved. I guess these types of operations can affect the runtime, which may be the reason for the impact on the solution results. May I ask if this is related to my code writing or is there a problem with IPOPT itself? If there are some mistakes in my code, which part may causes this situation? How to solve it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If Ipopt stops on a timelimit, then you may of course get different end results when repeating the runs. But everything before the timelimit is reached should be unaffected. Enabling the derivate tests means additional calls to your function/Jacobian/Hessian evaluation routines. You need to make sure that calls to these routines do not affect subsequent calls. Changes to a print_level or so should not have any effect. Getting different results in this case is sometimes a symptom of using uninitialized memory somewhere. You may want to run under a tool like valgrind to check this. |
Beta Was this translation helpful? Give feedback.
If Ipopt stops on a timelimit, then you may of course get different end results when repeating the runs. But everything before the timelimit is reached should be unaffected.
Enabling the derivate tests means additional calls to your function/Jacobian/Hessian evaluation routines. You need to make sure that calls to these routines do not affect subsequent calls.
Changes to a print_level or so should not have any effect. Getting different results in this case is sometimes a symptom of using uninitialized memory somewhere. You may want to run under a tool like valgrind to check this.