Stores options for multiple solvers.
This interface does not do any verification of solver parameters. It does not even verify that the specified solver exists. Use this only when you have particular knowledge of what solver is being invoked, and exactly what tuning is required.
Supported solver names/options:
"SNOPT" – Parameter names and values as specified in SNOPT User's Guide section 7.7 "Description of the optional parameters", used as described in section 7.5 for snSet(). The SNOPT user guide can be obtained from https://web.stanford.edu/group/SOL/guides/sndoc7.pdf
"IPOPT" – Parameter names and values as specified in IPOPT users guide section "Options Reference" http://www.coin-or.org/Ipopt/documentation/node40.html
"GUROBI" – Parameter name and values as specified in Gurobi Reference Manual, section 10.2 "Parameter Descriptions" https://www.gurobi.com/documentation/9.0/refman/parameters.html
"SCS" – Parameter name and values as specified in the struct SCS_SETTINGS in SCS header file https://github.com/cvxgrp/scs/blob/master/include/scs.h Note that the SCS code on github master might be more up-to-date than the version used in Drake.
"MOSEK" – Parameter name and values as specified in Mosek Reference https://docs.mosek.com/9.2/capi/parameters.html
|
| SolverOptions ()=default |
|
void | SetOption (const SolverId &solver_id, const std::string &solver_option, double option_value) |
|
void | SetOption (const SolverId &solver_id, const std::string &solver_option, int option_value) |
|
void | SetOption (const SolverId &solver_id, const std::string &solver_option, const std::string &option_value) |
|
void | SetOption (CommonSolverOption key, const std::variant< double, int, std::string > &value) |
| Set common options for all solvers supporting that option (for example, printing the progress in each iteration). More...
|
|
const std::unordered_map< std::string, double > & | GetOptionsDouble (const SolverId &solver_id) const |
|
const std::unordered_map< std::string, int > & | GetOptionsInt (const SolverId &solver_id) const |
|
const std::unordered_map< std::string, std::string > & | GetOptionsStr (const SolverId &solver_id) const |
|
const std::unordered_map< CommonSolverOption, std::variant< double, int, std::string > > & | common_solver_options () const |
| Gets the common options for all solvers. More...
|
|
template<typename T > |
const std::unordered_map< std::string, T > & | GetOptions (const SolverId &solver_id) const |
|
std::unordered_set< SolverId > | GetSolverIds () const |
| Returns the IDs that have any option set. More...
|
|
void | Merge (const SolverOptions &other) |
| Merges the other solver options into this. More...
|
|
bool | operator== (const SolverOptions &other) const |
| Returns true if this and other have exactly the same solvers, with exactly the same keys and values for the options for each solver. More...
|
|
bool | operator!= (const SolverOptions &other) const |
| Negate operator==. More...
|
|
void | CheckOptionKeysForSolver (const SolverId &solver_id, const std::unordered_set< std::string > &allowable_double_keys, const std::unordered_set< std::string > &allowable_int_keys, const std::unordered_set< std::string > &allowable_str_keys) const |
| Check if for a given solver_id, the option keys are included in double_keys, int_keys and str_keys. More...
|
|
|
| SolverOptions (const SolverOptions &)=default |
|
SolverOptions & | operator= (const SolverOptions &)=default |
|
| SolverOptions (SolverOptions &&)=default |
|
SolverOptions & | operator= (SolverOptions &&)=default |
|