An implementation of SolverInterface for the commercially-licensed MOSEK (TM) solver (https://www.mosek.com/).
Drake downloads and builds MOSEK™ automatically, but to enable it you must set the location of your license file as described in the documentation at https://drake-mit-edu.ezproxy.canberra.edu.au/bazel.html#mosek.
The MOSEKLM_LICENSE_FILE environment variable controls whether or not SolverInterface::enabled() returns true. Iff it is set to any non-empty value, then the solver is enabled; otherwise, the solver is not enabled.
- Note
- MOSEK™ only cares about the initial guess of integer variables. The initial guess of continuous variables are not passed to MOSEK™. If all the integer variables are set to some integer values, then MOSEK™ will be forced to compute the remaining continuous variable values as the initial guess. (MOSEK™ might change the values of the integer/binary variables in the subsequent iterations.) If the specified integer solution is infeasible or incomplete, MOSEK™ will simply ignore it. For more details, check https://docs.mosek.com/10.1/capi/tutorial-mio-shared.html?highlight=initial
MOSEK™ supports many solver parameters. You can refer to the full list of parameters in https://docs.mosek.com/10.1/capi/param-groups.html#doc-param-groups. On top of these parameters, we also provide the following additional parameters
|
| MosekSolver () |
|
| ~MosekSolver () final |
|
MathematicalProgramResult | Solve (const MathematicalProgram &prog, const std::optional< Eigen::VectorXd > &initial_guess=std::nullopt, const std::optional< SolverOptions > &solver_options=std::nullopt) const |
| Like SolverInterface::Solve(), but the result is a return value instead of an output argument. More...
|
|
void | Solve (const MathematicalProgram &, const std::optional< Eigen::VectorXd > &, const std::optional< SolverOptions > &, MathematicalProgramResult *) const override |
|
|
| MosekSolver (const MosekSolver &)=delete |
|
MosekSolver & | operator= (const MosekSolver &)=delete |
|
| MosekSolver (MosekSolver &&)=delete |
|
MosekSolver & | operator= (MosekSolver &&)=delete |
|
| ~SolverBase () override |
|
MathematicalProgramResult | Solve (const MathematicalProgram &prog, const std::optional< Eigen::VectorXd > &initial_guess=std::nullopt, const std::optional< SolverOptions > &solver_options=std::nullopt) const |
| Like SolverInterface::Solve(), but the result is a return value instead of an output argument. More...
|
|
void | Solve (const MathematicalProgram &, const std::optional< Eigen::VectorXd > &, const std::optional< SolverOptions > &, MathematicalProgramResult *) const override |
| Solves an optimization program with optional initial guess and solver options. More...
|
|
bool | available () const override |
| Returns true iff support for this solver has been compiled into Drake. More...
|
|
bool | enabled () const override |
| Returns true iff this solver is properly configured for use at runtime. More...
|
|
SolverId | solver_id () const final |
| Returns the identifier of this solver. More...
|
|
bool | AreProgramAttributesSatisfied (const MathematicalProgram &) const override |
| Returns true iff the program's attributes are compatible with this solver's capabilities. More...
|
|
std::string | ExplainUnsatisfiedProgramAttributes (const MathematicalProgram &) const override |
| Describes the reasons (if any) why the program is incompatible with this solver's capabilities. More...
|
|
| SolverBase (const SolverBase &)=delete |
|
SolverBase & | operator= (const SolverBase &)=delete |
|
| SolverBase (SolverBase &&)=delete |
|
SolverBase & | operator= (SolverBase &&)=delete |
|
virtual | ~SolverInterface () |
|
| SolverInterface (const SolverInterface &)=delete |
|
SolverInterface & | operator= (const SolverInterface &)=delete |
|
| SolverInterface (SolverInterface &&)=delete |
|
SolverInterface & | operator= (SolverInterface &&)=delete |
|