|
DART 6.12.2
|
#include <Problem.hpp>
Public Member Functions | |
| Problem (std::size_t _dim=0) | |
| Constructor. | |
| virtual | ~Problem ()=default |
| Destructor. | |
| void | setDimension (std::size_t _dim) |
| Set dimension. | |
| std::size_t | getDimension () const |
| Get dimension. | |
| void | setInitialGuess (const Eigen::VectorXd &_initGuess) |
| Set initial guess for opimization parameters. | |
| const Eigen::VectorXd & | getInitialGuess () const |
| Set initial guess for opimization parameters. | |
| void | addSeed (const Eigen::VectorXd &_seed) |
| Add a seed for the Solver to use as a hint for the neighborhood of the solution. | |
| Eigen::VectorXd & | getSeed (std::size_t _index) |
| Get a mutable reference of the seed for the specified index. | |
| const Eigen::VectorXd & | getSeed (std::size_t _index) const |
| An immutable version of getSeed(std::size_t) | |
| std::vector< Eigen::VectorXd > & | getSeeds () |
| Get a mutable reference to the full vector of seeds that this Problem currently contains. | |
| const std::vector< Eigen::VectorXd > & | getSeeds () const |
| An immutable version of getSeeds() | |
| void | clearAllSeeds () |
| Clear the seeds that this Problem currently contains. | |
| void | setLowerBounds (const Eigen::VectorXd &_lb) |
| Set lower bounds for optimization parameters. | |
| const Eigen::VectorXd & | getLowerBounds () const |
| Get lower bounds for optimization parameters. | |
| void | setUpperBounds (const Eigen::VectorXd &_ub) |
| Set upper bounds for optimization parameters. | |
| const Eigen::VectorXd & | getUpperBounds () const |
| Get upper bounds for optimization parameters. | |
| void | setObjective (FunctionPtr _obj) |
| Set minimum objective function. | |
| FunctionPtr | getObjective () const |
| Get objective function. | |
| void | addEqConstraint (FunctionPtr _eqConst) |
| Add equality constraint. | |
| void | addIneqConstraint (FunctionPtr _ineqConst) |
| Add inequality constraint. | |
| std::size_t | getNumEqConstraints () const |
| Get number of equality constraints. | |
| std::size_t | getNumIneqConstraints () const |
| Get number of inequality constraints. | |
| FunctionPtr | getEqConstraint (std::size_t _idx) const |
| Get equality constraint. | |
| FunctionPtr | getIneqConstraint (std::size_t _idx) const |
| Get inequality constraint. | |
| void | removeEqConstraint (FunctionPtr _eqConst) |
| Remove equality constraint. | |
| void | removeIneqConstraint (FunctionPtr _ineqConst) |
| Remove inequality constraint. | |
| void | removeAllEqConstraints () |
| Remove all equality constraints. | |
| void | removeAllIneqConstraints () |
| Remove all inequality constraints. | |
| void | setOptimumValue (double _val) |
| Set optimum value of the objective function. | |
| double | getOptimumValue () const |
| Get optimum value of the objective function. | |
| void | setOptimalSolution (const Eigen::VectorXd &_optParam) |
| Set optimal solution. This function called by Solver. | |
| const Eigen::VectorXd & | getOptimalSolution () |
| Get optimal solution. | |
Protected Attributes | |
| std::size_t | mDimension |
| Dimension of this problem. | |
| Eigen::VectorXd | mInitialGuess |
| Initial guess for optimization parameters. | |
| std::vector< Eigen::VectorXd > | mSeeds |
| Additional guess hints for the Solver. | |
| Eigen::VectorXd | mLowerBounds |
| Lower bounds for optimization parameters. | |
| Eigen::VectorXd | mUpperBounds |
| Upper bounds for optimization parameters. | |
| FunctionPtr | mObjective |
| Objective function. | |
| std::vector< FunctionPtr > | mEqConstraints |
| Equality constraint functions. | |
| std::vector< FunctionPtr > | mIneqConstraints |
| Inequality constraint functions. | |
| double | mOptimumValue |
| Optimal objective value. | |
| Eigen::VectorXd | mOptimalSolution |
| Optimal solution. | |
class Problem
|
explicit |
Constructor.
|
virtualdefault |
Destructor.
| void dart::optimizer::Problem::addEqConstraint | ( | FunctionPtr | _eqConst | ) |
Add equality constraint.
| void dart::optimizer::Problem::addIneqConstraint | ( | FunctionPtr | _ineqConst | ) |
Add inequality constraint.
Inequality constraints must evaluate to LESS THAN or equal to zero (within some tolerance) to be satisfied.
| void dart::optimizer::Problem::addSeed | ( | const Eigen::VectorXd & | _seed | ) |
Add a seed for the Solver to use as a hint for the neighborhood of the solution.
| void dart::optimizer::Problem::clearAllSeeds | ( | ) |
Clear the seeds that this Problem currently contains.
| std::size_t dart::optimizer::Problem::getDimension | ( | ) | const |
Get dimension.
| FunctionPtr dart::optimizer::Problem::getEqConstraint | ( | std::size_t | _idx | ) | const |
Get equality constraint.
| FunctionPtr dart::optimizer::Problem::getIneqConstraint | ( | std::size_t | _idx | ) | const |
Get inequality constraint.
| const Eigen::VectorXd & dart::optimizer::Problem::getInitialGuess | ( | ) | const |
Set initial guess for opimization parameters.
| const Eigen::VectorXd & dart::optimizer::Problem::getLowerBounds | ( | ) | const |
Get lower bounds for optimization parameters.
| std::size_t dart::optimizer::Problem::getNumEqConstraints | ( | ) | const |
Get number of equality constraints.
| std::size_t dart::optimizer::Problem::getNumIneqConstraints | ( | ) | const |
Get number of inequality constraints.
| FunctionPtr dart::optimizer::Problem::getObjective | ( | ) | const |
Get objective function.
| const Eigen::VectorXd & dart::optimizer::Problem::getOptimalSolution | ( | ) |
Get optimal solution.
| double dart::optimizer::Problem::getOptimumValue | ( | ) | const |
Get optimum value of the objective function.
| Eigen::VectorXd & dart::optimizer::Problem::getSeed | ( | std::size_t | _index | ) |
Get a mutable reference of the seed for the specified index.
If an out-of-bounds index is provided a warning will print, and a reference to the initial guess will be returned instead.
| const Eigen::VectorXd & dart::optimizer::Problem::getSeed | ( | std::size_t | _index | ) | const |
An immutable version of getSeed(std::size_t)
| std::vector< Eigen::VectorXd > & dart::optimizer::Problem::getSeeds | ( | ) |
Get a mutable reference to the full vector of seeds that this Problem currently contains.
| const std::vector< Eigen::VectorXd > & dart::optimizer::Problem::getSeeds | ( | ) | const |
An immutable version of getSeeds()
| const Eigen::VectorXd & dart::optimizer::Problem::getUpperBounds | ( | ) | const |
Get upper bounds for optimization parameters.
| void dart::optimizer::Problem::removeAllEqConstraints | ( | ) |
Remove all equality constraints.
| void dart::optimizer::Problem::removeAllIneqConstraints | ( | ) |
Remove all inequality constraints.
| void dart::optimizer::Problem::removeEqConstraint | ( | FunctionPtr | _eqConst | ) |
Remove equality constraint.
| void dart::optimizer::Problem::removeIneqConstraint | ( | FunctionPtr | _ineqConst | ) |
Remove inequality constraint.
| void dart::optimizer::Problem::setDimension | ( | std::size_t | _dim | ) |
Set dimension.
Note: Changing the dimension will clear out the initial guess and any seeds that have been added.
| void dart::optimizer::Problem::setInitialGuess | ( | const Eigen::VectorXd & | _initGuess | ) |
Set initial guess for opimization parameters.
| void dart::optimizer::Problem::setLowerBounds | ( | const Eigen::VectorXd & | _lb | ) |
Set lower bounds for optimization parameters.
| void dart::optimizer::Problem::setObjective | ( | FunctionPtr | _obj | ) |
Set minimum objective function.
| void dart::optimizer::Problem::setOptimalSolution | ( | const Eigen::VectorXd & | _optParam | ) |
Set optimal solution. This function called by Solver.
| void dart::optimizer::Problem::setOptimumValue | ( | double | _val | ) |
Set optimum value of the objective function.
This function called by Solver.
| void dart::optimizer::Problem::setUpperBounds | ( | const Eigen::VectorXd & | _ub | ) |
Set upper bounds for optimization parameters.
|
protected |
Dimension of this problem.
|
protected |
Equality constraint functions.
|
protected |
Inequality constraint functions.
|
protected |
Initial guess for optimization parameters.
|
protected |
Lower bounds for optimization parameters.
|
protected |
Objective function.
|
protected |
Optimal solution.
|
protected |
Optimal objective value.
|
protected |
Additional guess hints for the Solver.
|
protected |
Upper bounds for optimization parameters.