shark::MOEAD Class Reference

Implements the MOEA/D algorithm. More...

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

+ Inheritance diagram for shark::MOEAD:

Public Member Functions

SHARK_EXPORT_SYMBOL MOEAD (random::rng_type &rng=random::globalRng)
 
std::string name () const
 returns the name of the object More...
 
double crossoverProbability () const
 
double & crossoverProbability ()
 
double nm () const
 
double & nm ()
 
double nc () const
 
double & nc ()
 
std::size_t mu () const
 
std::size_t & mu ()
 
std::size_t numInitPoints () const
 The number of points used for initialization of the algorithm. More...
 
std::size_t neighbourhoodSize () const
 
std::size_t & neighbourhoodSize ()
 
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)
 Carry out one step of the optimizer for the supplied objective function. More...
 
- Public Member Functions inherited from shark::AbstractMultiObjectiveOptimizer< RealVector >
SolutionType const & solution () const
 Accesses the current approximation of the Pareto-set and -front, respectively. More...
 
- Public Member Functions inherited from shark::AbstractOptimizer< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >
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. More...
 
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. More...
 
- Public Member Functions inherited from shark::INameable
virtual ~INameable ()
 
- Public Member Functions inherited from shark::ISerializable
virtual ~ISerializable ()
 Virtual d'tor. More...
 
virtual void read (InArchive &archive)
 Read the component from the supplied archive. More...
 
virtual void write (OutArchive &archive) const
 Write the component to the supplied archive. More...
 
void load (InArchive &archive, unsigned int version)
 Versioned loading of components, calls read(...). More...
 
void save (OutArchive &archive, unsigned int version) const
 Versioned storing of components, calls write(...). More...
 
 BOOST_SERIALIZATION_SPLIT_MEMBER ()
 

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 mu, double const nm, double const nc, double const crossover_prob, std::size_t const neighbourhoodSize, std::vector< Preference > const &weightVectorPreferences=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< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >
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. More...
 

Protected Attributes

std::vector< IndividualTypem_parents
 
- Protected Attributes inherited from shark::AbstractMultiObjectiveOptimizer< RealVector >
SolutionType m_best
 The current Pareto-set/-front. More...
 
- Protected Attributes inherited from shark::AbstractOptimizer< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >
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< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >
enum  Feature
 Models features that the optimizer requires from the objective function. More...
 
typedef RealVector SearchPointType
 
typedef RealVector ResultType
 
typedef std::vector< ResultSet< RealVector, RealVector > > SolutionType
 
typedef AbstractObjectiveFunction< RealVector, ResultTypeObjectiveFunctionType
 
typedef TypedFlags< FeatureFeatures
 
typedef TypedFeatureNotAvailableException< FeatureFeatureNotAvailableException
 

Detailed Description

Implements the MOEA/D algorithm.

Implementation of the MOEA/D algorithm from the following paper: Q. Zhang and H. Li, MOEA/D: a multi-objective evolutionary algorithm based on decomposition, IEEE Transactions on Evolutionary Computation, vol. 11, no. 6, pp. 712 - 731, 2007 DOI: 10.1109/TEVC.2007.892759

Definition at line 53 of file MOEAD.h.

Member Typedef Documentation

◆ IndividualType

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

Definition at line 130 of file MOEAD.h.

Constructor & Destructor Documentation

◆ MOEAD()

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

Member Function Documentation

◆ crossoverProbability() [1/2]

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

Definition at line 62 of file MOEAD.h.

◆ crossoverProbability() [2/2]

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

Definition at line 66 of file MOEAD.h.

◆ doInit()

SHARK_EXPORT_SYMBOL void shark::MOEAD::doInit ( std::vector< SearchPointType > const &  initialSearchPoints,
std::vector< ResultType > const &  functionValues,
RealVector const &  lowerBounds,
RealVector const &  upperBounds,
std::size_t const  mu,
double const  nm,
double const  nc,
double const  crossover_prob,
std::size_t const  neighbourhoodSize,
std::vector< Preference > const &  weightVectorPreferences = std::vector< Preference >() 
)
protected

◆ generateOffspring()

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

◆ init()

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

Referenced by serialize().

◆ mu() [1/2]

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

Definition at line 86 of file MOEAD.h.

◆ mu() [2/2]

std::size_t& shark::MOEAD::mu ( )
inline

Definition at line 90 of file MOEAD.h.

◆ name()

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

returns the name of the object

Reimplemented from shark::INameable.

Definition at line 58 of file MOEAD.h.

◆ nc() [1/2]

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

Definition at line 78 of file MOEAD.h.

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

◆ nc() [2/2]

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

Definition at line 82 of file MOEAD.h.

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

◆ neighbourhoodSize() [1/2]

std::size_t shark::MOEAD::neighbourhoodSize ( ) const
inline

Definition at line 99 of file MOEAD.h.

◆ neighbourhoodSize() [2/2]

std::size_t& shark::MOEAD::neighbourhoodSize ( )
inline

Definition at line 103 of file MOEAD.h.

◆ nm() [1/2]

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

Definition at line 70 of file MOEAD.h.

References shark::PolynomialMutator::m_nm.

◆ nm() [2/2]

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

Definition at line 74 of file MOEAD.h.

References shark::PolynomialMutator::m_nm.

◆ numInitPoints()

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

The number of points used for initialization of the algorithm.

Implements shark::AbstractOptimizer< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >.

Definition at line 95 of file MOEAD.h.

◆ serialize()

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

◆ step()

SHARK_EXPORT_SYMBOL void shark::MOEAD::step ( ObjectiveFunctionType const &  function)
virtual

Carry out one step of the optimizer for the supplied objective function.

Parameters
[in]functionThe objective function to initialize for.

Implements shark::AbstractOptimizer< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >.

Referenced by serialize().

◆ updatePopulation()

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

Member Data Documentation

◆ m_parents

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

Definition at line 147 of file MOEAD.h.

Referenced by serialize().


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