ObjectiveFunctionT< T > Class Template Reference

Single- or multi-objective fitness function on an arbitrary search space. More...

#include <ObjectiveFunction.h>

Inheritance diagram for ObjectiveFunctionT< T >:
ObjectiveFunction

List of all members.

Public Member Functions

 ObjectiveFunctionT (ConstraintHandler< T > *constrainthandler=NULL)
 Constructor.
 ~ObjectiveFunctionT ()
 Descructor.
bool isFeasible (const T &point) const
 check the feasibility of point
bool closestFeasible (T &point) const
 Replace point with the closest feasible point.
virtual void result (const T &point, std::vector< double > &value)=0
 objective function evaluation
double operator() (const T &point)
 objective function evaluation in the single objective case
virtual bool ProposeStartingPoint (T &point) const
 The objective function can propose a (random) starting point for optimization runs.
const ConstraintHandler< T > * getConstraintHandler () const
 return the constraint handler or NULL

Protected Attributes

ConstraintHandler< T > * constrainthandler
 registered constraint handler or NULL

Detailed Description

template<class T>
class ObjectiveFunctionT< T >

Single- or multi-objective fitness function on an arbitrary search space.

The template class ObjectiveFunctionT is the base class of all objective function implementations. Its template parameter defines the search space or domain of the function. The image can consist of the reals for a standard single objective task, or of a real vector space for multi-objective problems.
Constraints handling is also incorporated at this level. It is possible to check the feasibility of a search point. As an option the objective function can support the search algorithm by providing the closest feasible point for a non-feasible candidate.
Some standard benchmark problems come with a fixed distribution of starting points for the search algorithm. This feature is also supported, but it remains optional.

Definition at line 220 of file ObjectiveFunction.h.


Constructor & Destructor Documentation

template<class T>
ObjectiveFunctionT< T >::ObjectiveFunctionT ( ConstraintHandler< T > *  constrainthandler = NULL  )  [inline]

Constructor.

Definition at line 223 of file ObjectiveFunction.h.

template<class T>
ObjectiveFunctionT< T >::~ObjectiveFunctionT (  )  [inline]

Descructor.

Definition at line 229 of file ObjectiveFunction.h.


Member Function Documentation

template<class T>
bool ObjectiveFunctionT< T >::closestFeasible ( T &  point  )  const [inline]

Replace point with the closest feasible point.

Return false if this operation is not supported.

Definition at line 240 of file ObjectiveFunction.h.

template<class T>
const ConstraintHandler<T>* ObjectiveFunctionT< T >::getConstraintHandler (  )  const [inline]

return the constraint handler or NULL

Definition at line 268 of file ObjectiveFunction.h.

template<class T>
bool ObjectiveFunctionT< T >::isFeasible ( const T &  point  )  const [inline]

check the feasibility of point

Definition at line 232 of file ObjectiveFunction.h.

template<class T>
double ObjectiveFunctionT< T >::operator() ( const T &  point  )  [inline]

objective function evaluation in the single objective case

Reimplemented in ObjectiveFunctionVS< double >.

Definition at line 250 of file ObjectiveFunction.h.

template<class T>
virtual bool ObjectiveFunctionT< T >::ProposeStartingPoint ( T &  point  )  const [inline, virtual]

The objective function can propose a (random) starting point for optimization runs.

This is useful for some standard benchmarks. If the function returns false, then no starting point is proposed, such that subclasses are not forced to provide this information.

Reimplemented in BhinKorn, Schaffer, ZDT1, ZDT2, ZDT3, ZDT4, ZDT5, ZDT6, IHR1, IHR2, IHR3, IHR6, ZZJ07_F1, ZZJ07_F2, ZZJ07_F3, ZZJ07_F4, ZZJ07_F5, ZZJ07_F6, ZZJ07_F7, ZZJ07_F8, ZZJ07_F9, ZZJ07_F10, LZ06_F1, LZ06_F2, LZ07_F1, LZ07_F2, LZ07_F3, LZ07_F4, LZ07_F5, LZ07_F6, LZ07_F7, LZ07_F8, LZ07_F9, ELLIBase, ELLI1, ELLI2, CIGTABBase, CIGTAB1, CIGTAB2, DTLZ1, DTLZ2, DTLZ3, DTLZ4, DTLZ5, DTLZ6, DTLZ7, Superspheres, ObjectiveFunctionVS< T >, TransformedObjectiveFunction, Sphere, NoisySphere, Ackley, Rastrigin, Griewangk, Rosenbrock, DiffPow, Schwefel, SchwefelEllipsoid, RandomFitness, ObjectiveFunctionVS< long >, and ObjectiveFunctionVS< double >.

Definition at line 262 of file ObjectiveFunction.h.


Member Data Documentation


The documentation for this class was generated from the following file: