| Issue 9: | passing options to IPOPT | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Thank you for providing this interface.
Do you have a way to pass options to IPOPT?
In my c++ driver code, I have the following lines:
------------------------------------------------------------
SmartPtr<IpoptApplication> app = IpoptApplicationFactory();
// Add options
double derivativetesttol = 1.0e-5;
app->Options()->SetStringValue("derivative_test","second-order");
app->Options()->SetStringValue("derivative_test_print_all","no");
app->Options()->SetNumericValue
("derivative_test_tol",derivativetesttol);
-----------------------------------------------------
Thanks.
Aug 18, 2010
Thank you r.w.lincoln for fixing a bug. I would like to invite you to be a contributor to this project so that you can merge your patches (if you want). Speaking of the issue, you can do it as lincoln suggested, so it is not really an issue. I will add some text to the pyipopt doucment though.
Status:
Invalid
Feb 26, 2014
Hi,
I have just started using pyipopt, however I have tried to minimize the output shown when solving a problem.
I have tried:
nlp.num_option('iprint', -1)
nlp.int_option('print_frequency_iter',+inf)
nlp.num_option('print_frequency_time',+inf)
but none of them seem to work.
Could you please help me find out what is is that I am doing wrong.
Thank you
|
The object returned by the create function has methods for setting the options. For example: nlp.int_option("max_iter", 20) nlp.num_option("tol", 1e-8) nlp.str_option("print_options_documentation", "yes") There is a bug in add_int_option that prevents options being set, it has been fixed here: http://github.com/b45ch1/pyipopt/commit/255b3145e4f46e443ee6c5eff23d1af4f9470728