Wrap CSDP solver such that it can solve a drake::solvers::MathematicalProgram.
- Note
- CSDP doesn't accept free variables, while drake::solvers::MathematicalProgram does. In order to convert MathematicalProgram into CSDP format, we provide several approaches to remove free variables. You can set the approach through
"drake::RemoveFreeVariableMethod",
auto result = solver.
Solve(prog, std::nullopt, solver_options);
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.
CsdpSolver(const CsdpSolver &)=delete
@ kNullspace
Approach 2, reformulate the dual problem by considering the nullspace of the linear constraint in the...
Definition sdpa_free_format.h:472
Stores options for multiple solvers.
Definition solver_options.h:60
void SetOption(const SolverId &solver_id, std::string key, OptionValue value)
Sets a solver option for a specific solver.
For more details, check out RemoveFreeVariableMethod.
#include <drake/solvers/csdp_solver.h>
|
| | SolverBase (const SolverId &id, std::function< bool()> available, std::function< bool()> enabled, std::function< bool(const MathematicalProgram &)> are_satisfied, std::function< std::string(const MathematicalProgram &)> explain_unsatisfied=nullptr) |
| | Constructs a SolverBase with the given default implementations of the solver_id(), available(), enabled(), AreProgramAttributesSatisfied(), and ExplainUnsatisfiedProgramAttributes() methods.
|
| virtual void | DoSolve (const MathematicalProgram &prog, const Eigen::VectorXd &initial_guess, const SolverOptions &merged_options, MathematicalProgramResult *result) const |
| | Hook for subclasses to implement Solve.
|
| | SolverInterface () |
◆ Details
◆ CsdpSolver() [1/3]
◆ CsdpSolver() [2/3]
◆ CsdpSolver() [3/3]
◆ ~CsdpSolver()
◆ id()
◆ is_available()
◆ is_enabled()
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ProgramAttributesSatisfied()
◆ Solve() [1/2]
Solves an optimization program with optional initial guess and solver options.
Note that these initial guess and solver options are not written to prog. If the prog has set an initial guess, and initial_guess is set, then initial_guess takes priority. If the prog has set an option for a solver, and solver_options contains a different value for the same option on the same solver, then solver_options takes priority. Derived implementations of this interface may elect to throw std::exception for badly formed programs.
Implements SolverInterface.
◆ Solve() [2/2]
The documentation for this class was generated from the following file: