coin-or/Ipopt

Specifying options for ipopt

bharswami opened this issue · 3 comments

Hi Stefan,
How do I specify options like "tol", "print_level", to ipopt in C++? It is easily done in Matlab. What function calls do I need to give ?
I saw app->Options()->SetNumericValue etc. in the example. Is that it? Could you specifically give the commands for the important options?

Yes, that's the function. As in the C++ example:

// Change some options
// Note: The following choices are only examples, they might not be
// suitable for your optimization problem.
app->Options()->SetNumericValue("tol", 3.82e-6);
app->Options()->SetStringValue("mu_strategy", "adaptive");

Use SetIntegerValue for print_level.

The program keeps returning the exit_status as -11 (Invalid Problem Definition). Any idea what could be a possible cause for this? I have set bounds for x_l,x_u,g_l,g_u.
When I give app->Options()->SetIntegerValue("print_level", 5), the debugger keeps throwing an access violation.

Maybe inconsistent bounds or constraint sides.