Optimization problems

Optimization problem. More...

Classes

class  roboptim::Problem< T >
class  roboptim::ResultWithWarnings
 Represents the solution of an optimization problem when errors occurred during the solving process. 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.
template<typename P >
std::ostream & roboptim::operator<< (std::ostream &o, const SolverState< P > &state)
 Override operator<< to display ``parameters'' objects.
ROBOPTIM_DLLAPI std::ostream & roboptim::operator<< (std::ostream &o, const Parameter &parameter)
 Override operator<< to display ``parameters'' objects.

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

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
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 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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines