Implements the SMS-EMOA. More...
#include <shark/Algorithms/DirectSearch/SMS-EMOA.h>
Public Member Functions | |
SMSEMOA (random::rng_type &rng=random::globalRng) | |
std::string | name () const |
returns the name of the object | |
double | crossoverProbability () const |
Returns the probability that crossover is applied. | |
double | nm () const |
double | nc () const |
unsigned int | mu () const |
unsigned int & | mu () |
std::size_t | numInitPoints () const |
Returns the number of points this method requires for initialisation. | |
HypervolumeIndicator & | indicator () |
HypervolumeIndicator const & | indicator () const |
void | read (InArchive &archive) |
Read the component from the supplied archive. | |
void | write (OutArchive &archive) const |
Write the component to the supplied archive. | |
void | init (ObjectiveFunctionType const &function, std::vector< SearchPointType > const &initialSearchPoints) |
Initializes the algorithm for the supplied objective function. | |
void | step (ObjectiveFunctionType const &function) |
Executes one iteration of the algorithm. | |
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 Features & | features () 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. | |
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 () | |
Protected Types | |
typedef shark::Individual< RealVector, RealVector > | IndividualType |
The individual type of the SMS-EMOA. | |
Protected Member Functions | |
void | doInit (std::vector< SearchPointType > const &initialSearchPoints, std::vector< ResultType > const &functionValues, RealVector const &lowerBounds, RealVector const &upperBounds, std::size_t mu, double nm, double nc, double crossover_prob) |
std::vector< IndividualType > | generateOffspring () const |
void | updatePopulation (std::vector< IndividualType > const &offspring) |
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< IndividualType > | m_parents |
Population of size \(\mu + 1\). | |
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, ResultType > | ObjectiveFunctionType |
typedef TypedFlags< Feature > | Features |
typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
Implements the SMS-EMOA.
Please see the following paper for further reference:
Definition at line 59 of file SMS-EMOA.h.
|
protected |
The individual type of the SMS-EMOA.
Definition at line 175 of file SMS-EMOA.h.
|
inline |
Definition at line 61 of file SMS-EMOA.h.
References shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >::m_features, shark::SimulatedBinaryCrossover< PointType >::m_nc, and shark::PolynomialMutator::m_nm.
|
inline |
Returns the probability that crossover is applied.
Definition at line 74 of file SMS-EMOA.h.
Referenced by init().
|
inlineprotected |
Definition at line 177 of file SMS-EMOA.h.
References shark::random::discrete(), shark::PolynomialMutator::init(), shark::SimulatedBinaryCrossover< PointType >::init(), shark::AbstractMultiObjectiveOptimizer< RealVector >::m_best, shark::SimulatedBinaryCrossover< PointType >::m_nc, shark::PolynomialMutator::m_nm, m_parents, mu(), nc(), nm(), and SIZE_CHECK.
Referenced by init().
|
inlineprotected |
|
inline |
Definition at line 98 of file SMS-EMOA.h.
References shark::IndicatorBasedSelection< Indicator >::indicator().
|
inline |
Definition at line 101 of file SMS-EMOA.h.
References shark::IndicatorBasedSelection< Indicator >::indicator().
|
inline |
Initializes the algorithm for the supplied objective function.
[in] | function | The objective function. |
[in] | initialSearchPoints | A set of intiial search points. |
Definition at line 133 of file SMS-EMOA.h.
References shark::AbstractOptimizer< PointType, ResultT, SolutionTypeT >::checkFeatures(), crossoverProbability(), doInit(), shark::AbstractObjectiveFunction< PointType, ResultT >::eval(), shark::AbstractObjectiveFunction< PointType, ResultT >::getConstraintHandler(), shark::AbstractObjectiveFunction< PointType, ResultT >::hasConstraintHandler(), shark::AbstractObjectiveFunction< PointType, ResultT >::isFeasible(), shark::BoxConstraintHandler< Vector >::lower(), mu(), nc(), nm(), shark::AbstractObjectiveFunction< PointType, ResultT >::numberOfVariables(), and SHARK_RUNTIME_CHECK.
|
inline |
Definition at line 90 of file SMS-EMOA.h.
|
inline |
Definition at line 86 of file SMS-EMOA.h.
Referenced by doInit(), generateOffspring(), init(), and updatePopulation().
|
inlinevirtual |
returns the name of the object
Reimplemented from shark::INameable.
Definition at line 69 of file SMS-EMOA.h.
|
inline |
Definition at line 82 of file SMS-EMOA.h.
References shark::SimulatedBinaryCrossover< PointType >::m_nc.
|
inline |
Definition at line 78 of file SMS-EMOA.h.
References shark::PolynomialMutator::m_nm.
|
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 94 of file SMS-EMOA.h.
|
inlinevirtual |
Read the component from the supplied archive.
[in,out] | archive | The archive to read from. |
Reimplemented from shark::ISerializable.
Definition at line 105 of file SMS-EMOA.h.
References shark::AbstractMultiObjectiveOptimizer< RealVector >::m_best, and m_parents.
|
inline |
Executes one iteration of the algorithm.
[in] | function | The function to iterate upon. |
Definition at line 167 of file SMS-EMOA.h.
References generateOffspring(), and updatePopulation().
|
inlineprotected |
Definition at line 228 of file SMS-EMOA.h.
References shark::AbstractMultiObjectiveOptimizer< RealVector >::m_best, m_parents, and mu().
Referenced by step().
|
inlinevirtual |
Write the component to the supplied archive.
[in,out] | archive | The archive to write to. |
Reimplemented from shark::ISerializable.
Definition at line 115 of file SMS-EMOA.h.
References shark::AbstractMultiObjectiveOptimizer< RealVector >::m_best, and m_parents.
|
protected |
Population of size \(\mu + 1\).
Definition at line 246 of file SMS-EMOA.h.
Referenced by doInit(), generateOffspring(), read(), updatePopulation(), and write().