All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Optimization problems

Optimization problem. More...

Classes

class  roboptim::Problem< T >
 
class  roboptim::ResultWithWarnings
 Warnings have been merged to Result to simplify the API. More...
 
class  roboptim::Result
 Represents the solution of an optimization problem. More...
 
class  roboptim::SolverError
 Base exception class for solving errors. More...
 
class  roboptim::SolverFactory< S >
 Define a solver factory that instanciate the plug-ins. More...
 
struct  roboptim::StateParameter< F >
 Solver state parameters type. More...
 
class  roboptim::SolverState< P >
 State of the solver. More...
 
class  roboptim::SolverWarning
 Exception used for non-critical errors during optimization. More...
 
struct  roboptim::Parameter
 Solver parameter type. More...
 
class  roboptim::Solver< T >
 Solver for a specific problem class. More...
 

Functions

template<typename F >
std::ostream & roboptim::operator<< (std::ostream &o, const StateParameter< F > &parameter)
 Override operator<< to display ``parameters'' objects. More...
 
template<typename P >
std::ostream & roboptim::operator<< (std::ostream &o, const SolverState< P > &state)
 Override operator<< to display ``parameters'' objects. More...
 
ROBOPTIM_CORE_DLLAPI std::ostream & roboptim::operator<< (std::ostream &o, const SolverWarning &w)
 Override operator<< to handle warning display. More...
 
ROBOPTIM_CORE_DLLAPI std::ostream & roboptim::operator<< (std::ostream &o, const Parameter &parameter)
 Override operator<< to display ``parameters'' objects. More...
 

Detailed Description

Optimization problem.

An optimization problem is defined as:

The goal of the optimization process is finding a point which minimizes the cost function and which respects the constraints (i.e. the result of some functions is inside of specific interval).

To use the class, one has to instantiate a problem with a reference to a cost function. Then, constraints can be added through the addConstraint method: a shared pointer to a function and an interval is needed.

The cost function is immutable.

Constraints are stored in a vector of smart pointers to function objects.

To add a constraint, use the following syntax:

problem.addConstraint (boost::make_shared<MyFunction> (...), ...);

where MyFunction is the function type.

Unlike other classes which just copy functions, pointers are used here in order to allow sub-classes of constraints to be inserted in the problem. For instance, a twice-differentiable function can be inserted in a problem which expects a differentiable function.

Template Parameters
Tmatrix type

Function Documentation

std::ostream & roboptim::operator<< ( std::ostream &  o,
const SolverWarning &  w 
)

Override operator<< to handle warning display.

Parameters
ooutput stream used for display
wwarning to be displayed
Returns
output stream

References roboptim::SolverWarning::print().

std::ostream & roboptim::operator<< ( std::ostream &  o,
const Parameter &  parameter 
)

Override operator<< to display ``parameters'' objects.

Parameters
ooutput stream used for display
parameterparameter
Returns
output stream

References roboptim::Parameter::description, and roboptim::Parameter::value.

template<typename F >
std::ostream & roboptim::operator<< ( std::ostream &  o,
const StateParameter< F > &  parameter 
)

Override operator<< to display ``parameters'' objects.

Parameters
ooutput stream used for display
parameterparameter to display
Template Parameters
Ffunction type.
Returns
output stream
template<typename P >
std::ostream & roboptim::operator<< ( std::ostream &  o,
const SolverState< P > &  state 
)

Override operator<< to display ``parameters'' objects.

Parameters
ooutput stream used for display
statesolver state to display
Template Parameters
Pproblem type.
Returns
output stream