typedef boost::mpl::vector roboptim::Problem< F, boost::mpl::vector<> >::constraintsList_t
typedef F roboptim::Problem< F, boost::mpl::vector<> >::function_t
Function type.
typedef function_t::value_type roboptim::Problem< F, boost::mpl::vector<> >::value_type
typedef function_t::vector_t roboptim::Problem< F, boost::mpl::vector<> >::vector_t
Vector type.
typedef function_t::argument_t roboptim::Problem< F, boost::mpl::vector<> >::argument_t
Argument type.
typedef function_t::size_type roboptim::Problem< F, boost::mpl::vector<> >::size_type
Size type.
typedef boost::optional< argument_t > roboptim::Problem< F, boost::mpl::vector<> >::startingPoint_t
Optional vector defines a starting point.
typedef function_t::interval_t roboptim::Problem< F, boost::mpl::vector<> >::interval_t
typedef function_t::intervals_t roboptim::Problem< F, boost::mpl::vector<> >::intervals_t
typedef std::vector< value_type > roboptim::Problem< F, boost::mpl::vector<> >::scaling_t
Scaling vector.
typedef scaling_t scales_t roboptim::Problem< F, boost::mpl::vector<> >::ROBOPTIM_CORE_DEPRECATED
Scaling vector (deprecated typedef).
typedef function_t::names_t roboptim::Problem< F, boost::mpl::vector<> >::names_t
Vector of names (e.g. for arguments).
typedef detail::list_converter < CLIST >::type roboptim::Problem< F, CLIST >::constraintsList_t
Constraints types list.
typedef F roboptim::Problem< F, CLIST >::function_t
Function type.
typedef detail::shared_ptr_variant < constraintsList_t >::type roboptim::Problem< F, CLIST >::constraint_t
Constraint's type.
typedef function_t::value_type roboptim::Problem< F, CLIST >::value_type
Import function's value_type type.
typedef function_t::vector_t roboptim::Problem< F, CLIST >::vector_t
Vector type.
typedef function_t::argument_t roboptim::Problem< F, CLIST >::argument_t
Argument type.
typedef function_t::size_type roboptim::Problem< F, CLIST >::size_type
Size type.
typedef std::vector< constraint_t > roboptim::Problem< F, CLIST >::constraints_t
Constraints are represented as a vector of constraints.
typedef boost::optional< argument_t > roboptim::Problem< F, CLIST >::startingPoint_t
Optional vector defines a starting point.
typedef function_t::interval_t roboptim::Problem< F, CLIST >::interval_t
Interval type (e.g. for bounds).
typedef function_t::intervals_t roboptim::Problem< F, CLIST >::intervals_t
Intervals type.
typedef std::vector< value_type > roboptim::Problem< F, CLIST >::scaling_t
Scaling vector.
typedef scaling_t scales_t roboptim::Problem< F, CLIST >::ROBOPTIM_CORE_DEPRECATED
Scaling vector (deprecated typedef)
typedef function_t::names_t roboptim::Problem< F, CLIST >::names_t
Vector of names (e.g. for arguments).
typedef std::vector< intervals_t > roboptim::Problem< F, CLIST >::intervalsVect_t
Vector of interval vectors.
typedef std::vector< scaling_t > roboptim::Problem< F, CLIST >::scalingVect_t
Vector of scaling vectors.
typedef scalingVect_t scalesVect_t roboptim::Problem< F, CLIST >::ROBOPTIM_CORE_DEPRECATED
Vector of scaling vectors (deprecated typedef).
std::ostream & roboptim::Problem< F, boost::mpl::vector<> >::print (std::ostream &o) const
Display the problem on the specified output stream.
std::ostream & roboptim::Problem< F, CLIST >::print (std::ostream &o) const
Display the problem on the specified output stream.
template<typename F >
std::ostream & roboptim::operator<< (std::ostream &o, const Problem < F, boost::mpl::vector<> > &pb)
Override operator<< to handle problem display.
template<typename F , typename CLIST >
std::ostream & roboptim::operator<< (std::ostream &o, const Problem < F, CLIST > &pb)
Override operator<< to handle problem display.
template<typename F >
std::ostream & roboptim::operator<< (std::ostream &o, const StateParameter < F > ¶meter)
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 ¶meter)
Override operator<< to display `‘parameters’' objects.
const constraints_t & roboptim::Problem< F, CLIST >::constraints () const
Retrieve constraints.
template<typename C >
void roboptim::Problem< F, CLIST >::addConstraint (boost::shared_ptr< C > constraint, interval_t interval, value_type scale=1.)
Add a constraint to the problem.
template<typename C >
void roboptim::Problem< F, CLIST >::addConstraint (boost::shared_ptr< C > constraint, intervals_t intervals, scaling_t scaling)
Add a constraint to the problem.
const intervalsVect_t & roboptim::Problem< F, CLIST >::boundsVector () const
Retrieve constraints bounds vector.
const scalingVect_t & roboptim::Problem< F, CLIST >::scalingVector () const
Retrieve constraints scaling vector.
const scalesVect_t & roboptim::Problem< F, CLIST >::scalesVector () const ROBOPTIM_CORE_DEPRECATED
Retrieve constraints scaling vector (deprecated version).
Optimization problem without constraints.
An optimization problem is defined as:
a cost function ( )
a set of intervals and scale factors for arguments.
The goal of the optimization process is finding a point which minimizes the cost function
To use the class, one has to instantiate a problem with a reference to a cost function. method: a reference to a function and an interval is needed.
The cost function is immutable.
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 derivable function can be inserted in a problem which expects a derivable function.
Template Parameters
Optimization problem.
An optimization problem is defined as:
a cost function ( )
one or more constraints functions, ( ) associated with an interval and a scale,
a set of intervals and scale factors for arguments.
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 reference to a function and an interval is needed.
The cost function is immutable.
Constraints are stored as a Boost.Variant of smart pointers (i.e. more precisely using a boost::shared_ptr) representing all the different possibles constraint types.
It is recommended to add a constraint using the following syntax:
problem.addConstraint<C> (boost::make_shared<MyFunction> (...), ...);
where C is the constraint type and MyFunction 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
F function type
CLIST type list satisfying MPL's sequence concept
◆ argument_t [1/2]
template<typename F >
typedef function_t::argument_t roboptim::Problem < F, boost::mpl::vector<> >::argument_t
◆ argument_t [2/2]
template<typename F , typename CLIST >
◆ constraint_t
template<typename F , typename CLIST >
Constraint's type.
Generate a Boost.Variant of shared pointers from the static constraints types list.
◆ constraints_t
template<typename F , typename CLIST >
Constraints are represented as a vector of constraints.
◆ constraintsList_t [1/2]
template<typename F >
typedef boost::mpl::vector roboptim::Problem < F, boost::mpl::vector<> >::constraintsList_t
◆ constraintsList_t [2/2]
template<typename F , typename CLIST >
Constraints types list.
CLIST is converted to a boost::mpl::vector to ensure a similar behavior for codes using different random access sequences (vector, list, etc.).
◆ function_t [1/2]
Function type.
This has to be either Function or one of its sub-classes.
◆ function_t [2/2]
template<typename F , typename CLIST >
Function type.
This has to be either Function or one of its sub-classes.
◆ interval_t [1/2]
template<typename F >
typedef function_t::interval_t roboptim::Problem < F, boost::mpl::vector<> >::interval_t
◆ interval_t [2/2]
template<typename F , typename CLIST >
Interval type (e.g. for bounds).
◆ intervals_t [1/2]
template<typename F >
typedef function_t::intervals_t roboptim::Problem < F, boost::mpl::vector<> >::intervals_t
◆ intervals_t [2/2]
template<typename F , typename CLIST >
◆ intervalsVect_t
template<typename F , typename CLIST >
Vector of interval vectors.
This type is used to take into account the fact that constraints can have output values in .
If , then the associated interval vector contains only one element of interval_t type.
◆ names_t [1/2]
Vector of names (e.g. for arguments).
◆ names_t [2/2]
template<typename F , typename CLIST >
Vector of names (e.g. for arguments).
◆ ROBOPTIM_CORE_DEPRECATED [1/3]
Scaling vector (deprecated typedef).
◆ ROBOPTIM_CORE_DEPRECATED [2/3]
template<typename F , typename CLIST >
Scaling vector (deprecated typedef)
◆ ROBOPTIM_CORE_DEPRECATED [3/3]
template<typename F , typename CLIST >
Vector of scaling vectors (deprecated typedef).
◆ scaling_t [1/2]
◆ scaling_t [2/2]
template<typename F , typename CLIST >
◆ scalingVect_t
template<typename F , typename CLIST >
Vector of scaling vectors.
This type is used to take into account the fact that constraints can have output values in .
If , then the associated scaling vector contains only one element of scaling_t type.
◆ size_type [1/2]
template<typename F >
typedef function_t::size_type roboptim::Problem < F, boost::mpl::vector<> >::size_type
◆ size_type [2/2]
template<typename F , typename CLIST >
◆ startingPoint_t [1/2]
Optional vector defines a starting point.
◆ startingPoint_t [2/2]
template<typename F , typename CLIST >
Optional vector defines a starting point.
◆ value_type [1/2]
template<typename F >
typedef function_t::value_type roboptim::Problem < F, boost::mpl::vector<> >::value_type
◆ value_type [2/2]
template<typename F , typename CLIST >
Import function's value_type type.
◆ vector_t [1/2]
◆ vector_t [2/2]
template<typename F , typename CLIST >
◆ addConstraint() [1/2]
template<typename F , typename CLIST >
template<typename C >
Add a constraint to the problem.
Useful only when , use addConstraint (boost::shared_ptr<C> constraint, intervals_t intervals, scaling_t scaling) instead.
Parameters
constraint the constraint that will be added
interval interval in which the constraint is satisfied
scale constraint scale
Template Parameters
C constraint type (has to be in CLIST)
Exceptions
References ASSERT_CONSTRAINT_TYPE .
◆ addConstraint() [2/2]
template<typename F , typename CLIST >
template<typename C >
Add a constraint to the problem.
The constraint can be multidimensional.
Parameters
constraint the constraint that will be added
intervals interval vector in which the constraint is satisfied
scaling constraint scaling
Template Parameters
C constraint type (has to be in CLIST)
Exceptions
References ASSERT_CONSTRAINT_TYPE , and ROBOPTIM_DEBUG_ONLY .
◆ argumentBounds() [1/4]
Retrieve arguments bounds.
Arguments bounds define in which interval each argument is valid.
Returns arguments bounds
◆ argumentBounds() [2/4]
template<typename F , typename CLIST >
Retrieve arguments bounds.
Arguments bounds define in which interval each argument is valid.
Returns arguments bounds
◆ argumentBounds() [3/4]
Retrieve arguments bounds.
Arguments bounds define in which interval each argument is valid.
Returns arguments bounds
◆ argumentBounds() [4/4]
template<typename F , typename CLIST >
Retrieve arguments bounds.
Arguments bounds define in which interval each argument is valid.
Returns arguments bounds
◆ argumentNames() [1/4]
Retrieve arguments names.
Arguments names define a name for each argument. This is particularly useful when logging data. Note: memory is not allocated by default since this is optional.
Returns arguments names
◆ argumentNames() [2/4]
template<typename F , typename CLIST >
Retrieve arguments names.
Arguments names define a name for each argument. This is particularly useful when logging data.
Returns arguments names
◆ argumentNames() [3/4]
Retrieve arguments names.
Arguments names define a name for each argument. This is particularly useful when logging data. Note: memory is not allocated by default since this is optional.
Returns arguments names
◆ argumentNames() [4/4]
template<typename F , typename CLIST >
Retrieve arguments names.
Arguments names define a name for each argument. This is particularly useful when logging data.
Returns arguments names
◆ argumentScales() [1/4]
template<typename F >
const Problem < F, boost::mpl::vector<> >::scales_t & roboptim::Problem < F, boost::mpl::vector<> >::argumentScales
(
)
const
Retrieve arguments scaling (deprecated version).
◆ argumentScales() [2/4]
template<typename F , typename CLIST >
Retrieve arguments scaling (deprecated version).
◆ argumentScales() [3/4]
Retrieve arguments scaling (deprecated version).
◆ argumentScales() [4/4]
template<typename F , typename CLIST >
Retrieve arguments scaling (deprecated version).
◆ argumentScaling() [1/4]
Retrieve arguments scaling.
Arguments scaling define which scale factor is applied for each argument.
Returns arguments scaling
◆ argumentScaling() [2/4]
template<typename F , typename CLIST >
Retrieve arguments scaling.
Arguments scaling define which scale factor is applied for each argument.
Returns arguments scaling
◆ argumentScaling() [3/4]
Retrieve arguments scaling.
Arguments scaling define which scale factor is applied for each argument.
Returns arguments scaling
◆ argumentScaling() [4/4]
template<typename F , typename CLIST >
Retrieve arguments scaling.
Arguments scaling define which scale factor is applied for each argument.
Returns arguments scaling
◆ boundsVector()
template<typename F , typename CLIST >
Retrieve constraints bounds vector.
Returns constraints bounds vector
◆ constraints()
template<typename F , typename CLIST >
Retrieve constraints.
Returns constraints
◆ function() [1/2]
Retrieve cost function.
Returns cost function
◆ function() [2/2]
template<typename F , typename CLIST >
Retrieve cost function.
Returns cost function
◆ operator<<() [1/5]
std::ostream & roboptim::operator<<
(
std::ostream & o ,
const Parameter & parameter )
◆ operator<<() [2/5]
template<typename F >
std::ostream & roboptim::operator<<
(
std::ostream & o ,
const Problem < F, boost::mpl::vector<> > & pb )
Override operator<< to handle problem display.
Parameters
o output stream used for display
pb problem to be displayed
Returns output stream
◆ operator<<() [3/5]
template<typename F , typename CLIST >
std::ostream & roboptim::operator<<
(
std::ostream & o ,
const Problem < F, CLIST > & pb )
◆ operator<<() [4/5]
template<typename P >
std::ostream & roboptim::operator<<
(
std::ostream & o ,
const SolverState < P > & state )
Override operator<< to display `‘parameters’' objects.
Parameters
o output stream used for display
state solver state to display
Template Parameters
Returns output stream
References roboptim::SolverState< P >::print() .
◆ operator<<() [5/5]
template<typename F >
std::ostream & roboptim::operator<<
(
std::ostream & o ,
const StateParameter < F > & parameter )
Override operator<< to display `‘parameters’' objects.
Parameters
o output stream used for display
parameter parameter to display
Template Parameters
Returns output stream
References roboptim::StateParameter< F >::print() .
◆ print() [1/2]
template<typename F >
std::ostream & roboptim::Problem < F, boost::mpl::vector<> >::print
(
std::ostream & o )
const
◆ print() [2/2]
template<typename F , typename CLIST >
◆ Problem() [1/6]
Precondition costfunction
◆ Problem() [2/6]
template<typename F , typename CLIST >
Precondition costfunction
Parameters
◆ Problem() [3/6]
◆ Problem() [4/6]
template<typename F , typename CLIST >
Copy constructor.
Parameters
◆ Problem() [5/6]
template<typename F >
template<typename F_ >
Copy constructor (convert from another class of problem).
◆ Problem() [6/6]
template<typename F , typename CLIST >
template<typename F_ , typename CLIST_ >
Copy constructor (convert from another class of problem).
Parameters
pb problem to copy and convert.
◆ scalesVector()
template<typename F , typename CLIST >
Retrieve constraints scaling vector (deprecated version).
◆ scalingVector()
template<typename F , typename CLIST >
Retrieve constraints scaling vector.
Returns constraints scaling vector
◆ startingPoint() [1/4]
Set the initial guess.
Returns reference on the initial guess
Exceptions
◆ startingPoint() [2/4]
template<typename F , typename CLIST >
Set the initial guess.
Returns reference on the initial guess
Exceptions
◆ startingPoint() [3/4]
Get the initial guess.
Returns reference on the initial guess
Exceptions
◆ startingPoint() [4/4]
template<typename F , typename CLIST >
Get the initial guess.
Returns reference on the initial guess
Exceptions
◆ ~Problem() [1/2]
Virtual destructor.
One may want to inherit from Problem to provide extra information to a solver plugin.
◆ ~Problem() [2/2]
template<typename F , typename CLIST >
Virtual destructor.
One may want to inherit from Problem to provide extra information to a solver plugin.
◆ Problem [1/2]
template<typename F >
template<typename F_ , typename CLIST_ >
◆ Problem [2/2]
template<typename F , typename CLIST >
template<typename F_ , typename CLIST_ >