33 #ifndef DART_OPTIMIZER_NLOPT_NLOPTSOLVER_HPP_
34 #define DART_OPTIMIZER_NLOPT_NLOPTSOLVER_HPP_
52 nlopt::algorithm _alg = nlopt::LN_COBYLA);
56 nlopt::algorithm _alg = nlopt::LN_COBYLA);
62 bool solve()
override;
68 std::string
getType()
const override;
71 std::shared_ptr<Solver>
clone()
const override;
101 std::unique_ptr<nlopt::opt>
mOpt;
107 std::vector<double>
mX;
class NloptSolver
Definition: NloptSolver.hpp:47
std::string getType() const override
Get the type (implementation) of this Solver.
Definition: NloptSolver.cpp:191
nlopt::algorithm getAlgorithm() const
Get the algorithm that is to be used by the nlopt solver.
Definition: NloptSolver.cpp:223
Eigen::VectorXd getLastConfiguration() const
Definition: NloptSolver.cpp:185
void setAlgorithm(nlopt::algorithm _alg)
Set the algorithm that is to be used by the nlopt solver.
Definition: NloptSolver.cpp:217
std::shared_ptr< Solver > clone() const override
Create an identical clone of this Solver.
Definition: NloptSolver.cpp:197
std::unique_ptr< nlopt::opt > mOpt
NLOPT data structure.
Definition: NloptSolver.hpp:101
std::vector< double > mX
Optimization parameters.
Definition: NloptSolver.hpp:107
NloptSolver(const Solver::Properties &_properties=Solver::Properties(), nlopt::algorithm _alg=nlopt::LN_COBYLA)
Default Constructor.
Definition: NloptSolver.cpp:48
void copy(const NloptSolver &_other)
Copy the Properties of another NloptSolver.
Definition: NloptSolver.cpp:203
static double _nlopt_func(unsigned _n, const double *_x, double *_gradient, void *_func_data)
Wrapping function for nlopt callback function, nlopt_func.
Definition: NloptSolver.cpp:229
double mMinF
Optimum value of the objective function.
Definition: NloptSolver.hpp:110
nlopt::algorithm mAlg
Algorithm to be used by the nlopt::opt.
Definition: NloptSolver.hpp:104
bool solve() override
Solve optimization problem.
Definition: NloptSolver.cpp:92
virtual ~NloptSolver()
Destructor.
Definition: NloptSolver.cpp:70
static void _nlopt_mfunc(unsigned _m, double *_result, unsigned _n, const double *_x, double *_gradient, void *_func_data)
Wrapping function for nlopt callback function, nlopt_mfunc.
Definition: NloptSolver.cpp:248
NloptSolver & operator=(const NloptSolver &_other)
Copy the Properties of another NloptSolver.
Definition: NloptSolver.cpp:210
Abstract class that provides a common interface for different Solvers.
Definition: Solver.hpp:53
Definition: BulletCollisionDetector.cpp:63
The Solver::Properties class contains Solver parameters that are common to all Solver types.
Definition: Solver.hpp:61