Drake
NloptSolver Class Reference

#include <drake/solvers/nlopt_solver.h>

Public Member Functions

 NloptSolver ()=default
 
 ~NloptSolver () override=default
 
bool available () const override
 Returns true iff this solver was enabled at compile-time. More...
 
SolutionResult Solve (MathematicalProgram &prog) const override
 Sets values for the decision variables on the given MathematicalProgram prog, or: More...
 
void Solve (const MathematicalProgram &, const optional< Eigen::VectorXd > &, const optional< SolverOptions > &, MathematicalProgramResult *) const override
 Solves an optimization program with optional initial guess and solver options. More...
 
SolverId solver_id () const override
 Returns the identifier of this solver. More...
 
bool AreProgramAttributesSatisfied (const MathematicalProgram &prog) const override
 Returns true if the program attributes are satisfied by the solver's capability. More...
 
Does not allow copy, move, or assignment
 NloptSolver (const NloptSolver &)=delete
 
NloptSolveroperator= (const NloptSolver &)=delete
 
 NloptSolver (NloptSolver &&)=delete
 
NloptSolveroperator= (NloptSolver &&)=delete
 
- Public Member Functions inherited from MathematicalProgramSolverInterface
 MathematicalProgramSolverInterface ()=default
 
virtual ~MathematicalProgramSolverInterface ()=default
 
 MathematicalProgramSolverInterface (const MathematicalProgramSolverInterface &)=delete
 
MathematicalProgramSolverInterfaceoperator= (const MathematicalProgramSolverInterface &)=delete
 
 MathematicalProgramSolverInterface (MathematicalProgramSolverInterface &&)=delete
 
MathematicalProgramSolverInterfaceoperator= (MathematicalProgramSolverInterface &&)=delete
 

Static Public Member Functions

static bool is_available ()
 
static SolverId id ()
 
static bool ProgramAttributesSatisfied (const MathematicalProgram &prog)
 

Constructor & Destructor Documentation

◆ NloptSolver() [1/3]

NloptSolver ( const NloptSolver )
delete

◆ NloptSolver() [2/3]

NloptSolver ( NloptSolver &&  )
delete

◆ NloptSolver() [3/3]

NloptSolver ( )
default

◆ ~NloptSolver()

~NloptSolver ( )
overridedefault

Member Function Documentation

◆ AreProgramAttributesSatisfied()

bool AreProgramAttributesSatisfied ( const MathematicalProgram prog) const
overridevirtual

Returns true if the program attributes are satisfied by the solver's capability.

Implements MathematicalProgramSolverInterface.

◆ available()

bool available ( ) const
inlineoverridevirtual

Returns true iff this solver was enabled at compile-time.

Implements MathematicalProgramSolverInterface.

◆ id()

◆ is_available()

bool is_available ( )
static

◆ operator=() [1/2]

NloptSolver& operator= ( NloptSolver &&  )
delete

◆ operator=() [2/2]

NloptSolver& operator= ( const NloptSolver )
delete

◆ ProgramAttributesSatisfied()

bool ProgramAttributesSatisfied ( const MathematicalProgram prog)
static

◆ Solve() [1/2]

SolutionResult Solve ( MathematicalProgram prog) const
overridevirtual

Sets values for the decision variables on the given MathematicalProgram prog, or:

  • If no solver is available, throws std::runtime_error
  • If the solver returns an error, returns a nonzero SolutionResult.

Implements MathematicalProgramSolverInterface.

◆ Solve() [2/2]

void Solve ( const MathematicalProgram prog,
const optional< Eigen::VectorXd > &  initial_guess,
const optional< SolverOptions > &  solver_options,
MathematicalProgramResult result 
) const
inlineoverridevirtual

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 option for a solver, and solver_options contains a different value for the same option on the same solver, then solver_options takes priority.

Implements MathematicalProgramSolverInterface.

◆ solver_id()

SolverId solver_id ( ) const
overridevirtual

Returns the identifier of this solver.

Implements MathematicalProgramSolverInterface.


The documentation for this class was generated from the following files: