Implements the RVEA algorithm. More...
#include <shark/Algorithms/DirectSearch/RVEA.h>
Public Member Functions | |
SHARK_EXPORT_SYMBOL | RVEA (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 () |
double | alpha () const |
double & | alpha () |
double | adaptationFrequency () const |
double & | adaptationFrequency () |
std::size_t | mu () const |
Size of parent population and number of reference vectors. More... | |
std::size_t | numInitPoints () const |
Returns the number of points this method requires for initialisation. More... | |
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. More... | |
template<typename Archive > | |
void | serialize (Archive &archive) |
SHARK_EXPORT_SYMBOL void | init (ObjectiveFunctionType const &function, std::vector< SearchPointType > const &initialSearchPoints) |
Initialize the optimizer for the supplied objective function using a set of initialisation points. More... | |
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 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. 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 () | |
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< IndividualType > | generateOffspring () 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< IndividualType > | m_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, ResultType > | ObjectiveFunctionType |
typedef TypedFlags< Feature > | Features |
typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
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
|
protected |
SHARK_EXPORT_SYMBOL shark::RVEA::RVEA | ( | random::rng_type & | rng = random::globalRng | ) |
|
inline |
Definition at line 96 of file RVEA.h.
Referenced by willAdaptReferenceVectors().
|
protected |
|
protected |
|
virtual |
Initialize the optimizer for the supplied objective function using a set of initialisation points.
Most single objective algorithms only require a single point. However multi-objective algorithms need a set of initialisation points. The number of points required should be numInitPoints(). Otherwise the algorithm might use heuristics to generate additional points if needed.
Be aware that function.init() has to be called before calling this function!
[in] | function | The objective function to initialize for. |
[in] | initPoints | points used for initialisation. Should be at least numInitPoints(). |
Implements shark::AbstractOptimizer< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >.
Referenced by serialize().
|
inline |
|
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.
|
inlinevirtual |
returns the name of the object
Reimplemented from shark::INameable.
|
inline |
Definition at line 80 of file RVEA.h.
References shark::SimulatedBinaryCrossover< PointType >::m_nc.
|
inline |
Definition at line 84 of file RVEA.h.
References shark::SimulatedBinaryCrossover< PointType >::m_nc.
|
inline |
Definition at line 72 of file RVEA.h.
References shark::PolynomialMutator::m_nm.
|
inline |
Definition at line 76 of file RVEA.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< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >.
|
inline |
Definition at line 163 of file RVEA.h.
References init(), shark::AbstractMultiObjectiveOptimizer< RealVector >::m_best, m_parents, S, SHARK_EXPORT_SYMBOL, step(), and suggestMu().
|
virtual |
Carry out one step of the optimizer for the supplied objective function.
[in] | function | The objective function to initialize for. |
Implements shark::AbstractOptimizer< RealVector, RealVector, std::vector< ResultSet< RealVector, RealVector > > >.
Referenced by serialize().
|
static |
Referenced by serialize().
|
protected |
|
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 156 of file RVEA.h.
References adaptationFrequency().
|
protected |
Definition at line 213 of file RVEA.h.
Referenced by serialize().