Solves a nonlinear program via the projected gradient descent algorithm.
The gradient is determined by differentiation of the costs, or the user can supply a custom gradient function. The projection step is itself an optimization problem in general, but the user can supply a custom projection function. The user can also specify a specific solver interface to be used to solve the projection problem.
The solver terminates if
- the projection step fails to find a feasible solution,
- the 2-norm distance between subsequent iterates is less than the user-specified tolerance (see ConvergenceTolOptionName), or
- a maximum number of iterations have been run (see MaxIterationsOptionName).
- Warning
- This feature is considered to be experimental and may change or be removed at any time, without any deprecation notice ahead of time.
|
| ProjectedGradientDescentSolver () |
|
| ~ProjectedGradientDescentSolver () final |
|
void | SetCustomGradientFunction (const std::function< Eigen::VectorXd(const Eigen::VectorXd &)> &custom_gradient_function) |
| Specify a custom gradient function. More...
|
|
void | SetCustomProjectionFunction (const std::function< bool(const Eigen::VectorXd &, Eigen::VectorXd *)> &custom_projection_function) |
| Specify a custom projection function. More...
|
|
void | SetProjectionSolverInterface (const SolverInterface *projection_solver_interface) |
| Specify a solver interface to be used when solving the L2 projection onto the feasible set of the MathematicalProgram it's being used to solve. More...
|
|
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 |
|
|
| ProjectedGradientDescentSolver (const ProjectedGradientDescentSolver &)=delete |
|
ProjectedGradientDescentSolver & | operator= (const ProjectedGradientDescentSolver &)=delete |
|
| ProjectedGradientDescentSolver (ProjectedGradientDescentSolver &&)=delete |
|
ProjectedGradientDescentSolver & | operator= (ProjectedGradientDescentSolver &&)=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 |
|