An implementation of SolverInterface for the commercially-licensed SNOPT solver (https://ccom.ucsd.edu/~optimizers/solvers/snopt/).
Builds of Drake from source do not compile SNOPT by default, so therefore SolverInterface::available() will return false. You must opt-in to build SNOPT per the documentation at https://drake.mit.edu/bazel.html#snopt.
Drake's pre-compiled binary releases do incorporate SNOPT, so therefore SolverInterface::available() will return true. Thanks to Philip E. Gill and Elizabeth Wong for their kind support.
There is no license configuration required to use SNOPT, but you may set the environtment variable DRAKE_SNOPT_SOLVER_ENABLED
to "0" to force-disable SNOPT, in which case SolverInterface::enabled() will return false.
|
| SnoptSolver () |
|
| ~SnoptSolver () 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 |
|
|
| SnoptSolver (const SnoptSolver &)=delete |
|
SnoptSolver & | operator= (const SnoptSolver &)=delete |
|
| SnoptSolver (SnoptSolver &&)=delete |
|
SnoptSolver & | operator= (SnoptSolver &&)=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 |
|