FAQ: how to pass options to solvers - casadi/casadi GitHub Wiki
Options for nonlinear programming solvers are passed in the form of a (possibly nested) dictionary (Python) or struct (Matlab).
Using plain casadi:
solver = nlpsol('solver_name','ipopt',nlp,options)
Using Opti:
opti.solver('ipopt',options)
Python example:
options = {"print_time": False, "ipopt": {"max_iter": 10}} # alternative 1
options = {"print_time": False, "ipopt.maxiter": 10} # alternative 2
According to taste, you can do other alternatives such as:
options = {}
options["print_time"] = False
ipopt_options = {}
ipopt_options["max_iter"] = 10
options["ipopt"] = ipopt_options
Matlab example:
options = struct('print_time, false, 'ipopt', struct('max_iter', 10)) % alternative 1
options = struct; % alternative 2
options.print_time = false;
options.ipopt.max_iter = 10;
print_time is an example of a an option that is universal among all solver. Available options can be found in tabular form in help(casadi.nlpsol) (Python)/help casadi.nlpsol (Matlab) or in the C++ API docs (solvers pane) linked to at docs.casadi.org
There are a few options that are specific to a solver, but still defined at CasADi level (not part of 'ipopt' sub-option) found at the same resource as above.
The bulk of solver-specific options are only defined by the solver and not listed in tables in CasADi documentation.
For example, max_iter can be found at https://coin-or.github.io/Ipopt/OPTIONS.html