Implements the RVEA algorithm. More...

#include <shark/Algorithms/DirectSearch/RVEA.h>

+ Inheritance diagram for shark::RVEA:

Public Member Functions

SHARK_EXPORT_SYMBOL RVEA (random::rng_type &rng=random::globalRng)
 
std::string name () const
 returns the name of the object
 
double crossoverProbability () const
 
double & crossoverProbability ()
 
double nm () const
 
double & nm ()
 
double nc () const
 
double & nc ()
 
double alpha () const
 
double & alpha ()
 
double adaptationFrequency () const
 
double & adaptationFrequency ()
 
std::size_t mu () const
 Size of parent population and number of reference vectors.
 
std::size_t numInitPoints () const
 Returns the number of points this method requires for initialisation.
 
std::size_t approxMu () const
 
std::size_t & approxMu ()
 
RealMatrix referenceVectors () const
 
RealMatrix & referenceVectors ()
 
RealMatrix initialReferenceVectors () const
 
std::size_t maxIterations () const
 
std::size_t & maxIterations ()
 
bool willAdaptReferenceVectors () const
 True if the reference vectors will be adapted.
 
template<typename Archive >
void serialize (Archive &archive)
 
SHARK_EXPORT_SYMBOL void init (ObjectiveFunctionType const &function, std::vector< SearchPointType > const &initialSearchPoints)
 
SHARK_EXPORT_SYMBOL void step (ObjectiveFunctionType const &function)
 
- Public Member Functions inherited from shark::AbstractMultiObjectiveOptimizer< RealVector >
SolutionType const & solution () const
 Accesses the current approximation of the Pareto-set and -front, respectively.
 
- Public Member Functions inherited from shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >
const Featuresfeatures () const
 
virtual void updateFeatures ()
 
bool requiresValue () const
 
bool requiresFirstDerivative () const
 
bool requiresSecondDerivative () const
 
bool canSolveConstrained () const
 
bool requiresClosestFeasible () const
 
virtual ~AbstractOptimizer ()
 
virtual void init (ObjectiveFunctionType const &function)
 Initialize the optimizer for the supplied objective function.
 
virtual void init (ObjectiveFunctionType const &function, std::vector< SearchPointType > const &initPoints)=0
 Initialize the optimizer for the supplied objective function using a set of initialisation points.
 
virtual void step (ObjectiveFunctionType const &function)=0
 Carry out one step of the optimizer for the supplied objective function.
 
- Public Member Functions inherited from shark::INameable
virtual ~INameable ()
 
- Public Member Functions inherited from shark::ISerializable
virtual ~ISerializable ()
 Virtual d'tor.
 
virtual void read (InArchive &archive)
 Read the component from the supplied archive.
 
virtual void write (OutArchive &archive) const
 Write the component to the supplied archive.
 
void load (InArchive &archive, unsigned int version)
 Versioned loading of components, calls read(...).
 
void save (OutArchive &archive, unsigned int version) const
 Versioned storing of components, calls write(...).
 
 BOOST_SERIALIZATION_SPLIT_MEMBER ()
 

Static Public Member Functions

static SHARK_EXPORT_SYMBOL std::size_t suggestMu (std::size_t n, std::size_t const approx_mu)
 

Protected Types

typedef shark::Individual< RealVector, RealVector > IndividualType
 

Protected Member Functions

SHARK_EXPORT_SYMBOL void doInit (std::vector< SearchPointType > const &initialSearchPoints, std::vector< ResultType > const &functionValues, RealVector const &lowerBounds, RealVector const &upperBounds, std::size_t const approx_mu, double const nm, double const nc, double const crossover_prob, double const alph, double const fr, std::size_t const max_iterations, std::vector< Preference > const &referenceVectorsPreferences=std::vector< Preference >())
 
SHARK_EXPORT_SYMBOL std::vector< IndividualTypegenerateOffspring () const
 
SHARK_EXPORT_SYMBOL void updatePopulation (std::vector< IndividualType > const &offspringvec)
 
- Protected Member Functions inherited from shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >
void checkFeatures (ObjectiveFunctionType const &objectiveFunction)
 Convenience function that checks whether the features of the supplied objective function match with the required features of the optimizer.
 

Protected Attributes

std::vector< IndividualTypem_parents
 
- Protected Attributes inherited from shark::AbstractMultiObjectiveOptimizer< RealVector >
SolutionType m_best
 The current Pareto-set/-front.
 
- Protected Attributes inherited from shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >
Features m_features
 

Additional Inherited Members

- Public Types inherited from shark::AbstractMultiObjectiveOptimizer< RealVector >
typedef super::SearchPointType SearchPointType
 
typedef super::SolutionType SolutionType
 
typedef super::ObjectiveFunctionType ObjectiveFunctionType
 
- Public Types inherited from shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >
enum  Feature {
  REQUIRES_VALUE = 1 , REQUIRES_FIRST_DERIVATIVE = 2 , REQUIRES_SECOND_DERIVATIVE = 4 , CAN_SOLVE_CONSTRAINED = 8 ,
  REQUIRES_CLOSEST_FEASIBLE = 16
}
 Models features that the optimizer requires from the objective function. More...
 
typedef PointType SearchPointType
 
typedef ResultT ResultType
 
typedef SolutionTypeT SolutionType
 
typedef AbstractObjectiveFunction< PointType, ResultTypeObjectiveFunctionType
 
typedef TypedFlags< FeatureFeatures
 
typedef TypedFeatureNotAvailableException< FeatureFeatureNotAvailableException
 

Detailed Description

Implements the RVEA algorithm.

Implementation of the RVEA algorithm from the following paper: R. Cheng, Y. Jin, M. Olhofer, and B. Sendhoff, “A reference vector guided evolutionary algorithm for many-objective optimization,” IEEE Transactions on Evolutionary Computation, Vol 20, Issue 5, October 2016 http://dx.doi.org/10.1109/TEVC.2016.2519378

Definition at line 54 of file RVEA.h.

Member Typedef Documentation

◆ IndividualType

typedef shark::Individual<RealVector, RealVector> shark::RVEA::IndividualType
protected

Definition at line 191 of file RVEA.h.

Constructor & Destructor Documentation

◆ RVEA()

SHARK_EXPORT_SYMBOL shark::RVEA::RVEA ( random::rng_type &  rng = random::globalRng)

Member Function Documentation

◆ adaptationFrequency() [1/2]

double & shark::RVEA::adaptationFrequency ( )
inline

Definition at line 99 of file RVEA.h.

◆ adaptationFrequency() [2/2]

double shark::RVEA::adaptationFrequency ( ) const
inline

Definition at line 95 of file RVEA.h.

Referenced by willAdaptReferenceVectors().

◆ alpha() [1/2]

double & shark::RVEA::alpha ( )
inline

Definition at line 91 of file RVEA.h.

◆ alpha() [2/2]

double shark::RVEA::alpha ( ) const
inline

Definition at line 87 of file RVEA.h.

◆ approxMu() [1/2]

std::size_t & shark::RVEA::approxMu ( )
inline

Definition at line 124 of file RVEA.h.

◆ approxMu() [2/2]

std::size_t shark::RVEA::approxMu ( ) const
inline

Definition at line 120 of file RVEA.h.

◆ crossoverProbability() [1/2]

double & shark::RVEA::crossoverProbability ( )
inline

Definition at line 67 of file RVEA.h.

◆ crossoverProbability() [2/2]

double shark::RVEA::crossoverProbability ( ) const
inline

Definition at line 63 of file RVEA.h.

◆ doInit()

SHARK_EXPORT_SYMBOL void shark::RVEA::doInit ( std::vector< SearchPointType > const &  initialSearchPoints,
std::vector< ResultType > const &  functionValues,
RealVector const &  lowerBounds,
RealVector const &  upperBounds,
std::size_t const  approx_mu,
double const  nm,
double const  nc,
double const  crossover_prob,
double const  alph,
double const  fr,
std::size_t const  max_iterations,
std::vector< Preference > const &  referenceVectorsPreferences = std::vector< Preference >() 
)
protected

◆ generateOffspring()

SHARK_EXPORT_SYMBOL std::vector< IndividualType > shark::RVEA::generateOffspring ( ) const
protected

◆ init()

SHARK_EXPORT_SYMBOL void shark::RVEA::init ( ObjectiveFunctionType const &  function,
std::vector< SearchPointType > const &  initialSearchPoints 
)

◆ initialReferenceVectors()

RealMatrix shark::RVEA::initialReferenceVectors ( ) const
inline

Definition at line 136 of file RVEA.h.

◆ maxIterations() [1/2]

std::size_t & shark::RVEA::maxIterations ( )
inline

Definition at line 144 of file RVEA.h.

◆ maxIterations() [2/2]

std::size_t shark::RVEA::maxIterations ( ) const
inline

Definition at line 140 of file RVEA.h.

◆ mu()

std::size_t shark::RVEA::mu ( ) const
inline

Size of parent population and number of reference vectors.

In the RVEA algorithm, the exact mu value is determined by the simplex-lattice design (Lattice.h), so the user cannot set it directly. Instead, one must set the approxMu() value, which will be used as a parameter in the lattice. If one wants to know the exact mu value, set approxMu() to RVEA::suggestMu(n, m) where n is the objective dimension and m is the approximate mu. Then the actual mu value will not be changed in the initialization.

Definition at line 112 of file RVEA.h.

◆ name()

std::string shark::RVEA::name ( ) const
inlinevirtual

returns the name of the object

Reimplemented from shark::INameable.

Definition at line 59 of file RVEA.h.

◆ nc() [1/2]

double & shark::RVEA::nc ( )
inline

Definition at line 83 of file RVEA.h.

References shark::SimulatedBinaryCrossover< PointType >::m_nc.

◆ nc() [2/2]

double shark::RVEA::nc ( ) const
inline

Definition at line 79 of file RVEA.h.

References shark::SimulatedBinaryCrossover< PointType >::m_nc.

◆ nm() [1/2]

double & shark::RVEA::nm ( )
inline

Definition at line 75 of file RVEA.h.

References shark::PolynomialMutator::m_nm.

◆ nm() [2/2]

double shark::RVEA::nm ( ) const
inline

Definition at line 71 of file RVEA.h.

References shark::PolynomialMutator::m_nm.

◆ numInitPoints()

std::size_t shark::RVEA::numInitPoints ( ) const
inlinevirtual

Returns the number of points this method requires for initialisation.

The number of points supplied is allowed to be smaller, however in this case the optimizer will resort to techniques generating additional points if needed.

Implements shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >.

Definition at line 116 of file RVEA.h.

◆ referenceVectors() [1/2]

RealMatrix & shark::RVEA::referenceVectors ( )
inline

Definition at line 132 of file RVEA.h.

◆ referenceVectors() [2/2]

RealMatrix shark::RVEA::referenceVectors ( ) const
inline

Definition at line 128 of file RVEA.h.

◆ serialize()

template<typename Archive >
void shark::RVEA::serialize ( Archive &  archive)
inline

◆ step()

SHARK_EXPORT_SYMBOL void shark::RVEA::step ( ObjectiveFunctionType const &  function)

◆ suggestMu()

static SHARK_EXPORT_SYMBOL std::size_t shark::RVEA::suggestMu ( std::size_t  n,
std::size_t const  approx_mu 
)
static

◆ updatePopulation()

SHARK_EXPORT_SYMBOL void shark::RVEA::updatePopulation ( std::vector< IndividualType > const &  offspringvec)
protected

◆ willAdaptReferenceVectors()

bool shark::RVEA::willAdaptReferenceVectors ( ) const
inline

True if the reference vectors will be adapted.

Returns true if the algorithm will adapt the unit reference vectors in the current iteration. This is controlled by the adaptationFreqency() parameter; a value of, e.g., 0.2 will make the algorithm readapt reference vectors every 20% of the iteration. Running the algorithm for 1000 iterations will then make it readapt on iteration 0, 200, 400, etc.

Definition at line 155 of file RVEA.h.

References adaptationFrequency().

Member Data Documentation

◆ m_parents

std::vector<IndividualType> shark::RVEA::m_parents
protected

Definition at line 212 of file RVEA.h.

Referenced by serialize().


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