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 | |
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 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. | |
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< IndividualType > | generateOffspring () 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< IndividualType > | m_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, 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 95 of file RVEA.h.
Referenced by willAdaptReferenceVectors().
|
protected |
|
protected |
SHARK_EXPORT_SYMBOL void shark::RVEA::init | ( | ObjectiveFunctionType const & | function, |
std::vector< SearchPointType > const & | initialSearchPoints | ||
) |
|
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 83 of file RVEA.h.
References shark::SimulatedBinaryCrossover< PointType >::m_nc.
|
inline |
Definition at line 79 of file RVEA.h.
References shark::SimulatedBinaryCrossover< PointType >::m_nc.
|
inline |
Definition at line 75 of file RVEA.h.
References shark::PolynomialMutator::m_nm.
|
inline |
Definition at line 71 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< PointType, ResultT, SolutionTypeT >.
|
inline |
Definition at line 162 of file RVEA.h.
References shark::AbstractMultiObjectiveOptimizer< RealVector >::m_best, m_parents, and S.
SHARK_EXPORT_SYMBOL void shark::RVEA::step | ( | ObjectiveFunctionType const & | function | ) |
|
static |
|
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 155 of file RVEA.h.
References adaptationFrequency().
|
protected |
Definition at line 212 of file RVEA.h.
Referenced by serialize().