Drake
MosekSolver Class Reference

#include <drake/solvers/mosek_solver.h>

Inheritance diagram for MosekSolver:
[legend]
Collaboration diagram for MosekSolver:
[legend]

Public Member Functions

 MosekSolver ()=default
 
 ~MosekSolver () override=default
 
bool available () const override
 Defined true if Mosek was included during compilation, false otherwise. More...
 
SolutionResult Solve (MathematicalProgram &prog) const override
 Sets values for the decision variables on the given MathematicalProgram prog, or: More...
 
SolverId solver_id () const override
 Returns the identifier of this solver. More...
 
Does not allow copy, move, or assignment
 MosekSolver (const MosekSolver &)=delete
 
MosekSolveroperator= (const MosekSolver &)=delete
 
 MosekSolver (MosekSolver &&)=delete
 
MosekSolveroperator= (MosekSolver &&)=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 SolverId id ()
 
static std::shared_ptr< License > AcquireLicense ()
 This acquires a MOSEK license environment shared among all MosekSolver instances; the environment will stay valid as long as at least one shared_ptr returned by this function is alive. More...
 

Constructor & Destructor Documentation

MosekSolver ( const MosekSolver )
delete
MosekSolver ( MosekSolver &&  )
delete
MosekSolver ( )
default
~MosekSolver ( )
overridedefault

Member Function Documentation

shared_ptr< MosekSolver::License > AcquireLicense ( )
static

This acquires a MOSEK license environment shared among all MosekSolver instances; the environment will stay valid as long as at least one shared_ptr returned by this function is alive.

Call this ONLY if you must use different MathematicalProgram instances at different instances in time, and repeatedly acquiring the license is costly (e.g., requires contacting a license server).

Returns
A shared pointer to a license environment that will stay valid as long as any shared_ptr returned by this function is alive. If MOSEK is not available in your build, this will return a null (empty) shared_ptr.
Exceptions
std::runtime_errorif MOSEK is available but a license cannot be obtained.

Here is the caller graph for this function:

bool available ( ) const
overridevirtual

Defined true if Mosek was included during compilation, false otherwise.

Implements MathematicalProgramSolverInterface.

SolverId id ( )
static
Returns
same as MathematicalProgramSolverInterface::solver_id()

Here is the call graph for this function:

Here is the caller graph for this function:

MosekSolver& operator= ( MosekSolver &&  )
delete
MosekSolver& operator= ( const MosekSolver )
delete
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.

Here is the call graph for this function:

SolverId solver_id ( ) const
overridevirtual

Returns the identifier of this solver.

Implements MathematicalProgramSolverInterface.

Here is the call graph for this function:


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