Multi-objective Evolutionary Algorithm by Decomposition Generational (GMOEA/D-DE)#

class moead_gen#

Generational Multi Objective Evolutionary Algorithms by Decomposition (the DE variant)

../../../_images/moead.png

Here the MOEA/D-DE algorithm is adapted into a version which only updates the population on a generational basis. Rather than constructing a new candidate and evaluating its fitness one-by-one across the population, the new candidate population is created at once at the beginning of a generation, and then the fitness of each candidate is evaluated either in parallel with a bfe or in series. While this sacrifices the immediate sensitivity of the original MOEA/D-DE to changes in the population, it does allow for easy parallelizability. This variant can employ a bfe to make several fitness evaluations simultaneously, and should be used for expensive fitness functions.

See also

pagmo::moead for the implementation of non-generational MOEA/D-DE

Public Types

typedef std::tuple<unsigned, unsigned long long, double, vector_double> log_line_type#

Single entry of the log (gen, fevals, adf, ideal_point)

typedef std::vector<log_line_type> log_type#

The log.

Public Functions

moead_gen(unsigned gen = 1u, std::string weight_generation = "grid", std::string decomposition = "tchebycheff", population::size_type neighbours = 20u, double CR = 1.0, double F = 0.5, double eta_m = 20., double realb = 0.9, unsigned limit = 2u, bool preserve_diversity = true, unsigned seed = pagmo::random_device::next())#

Constructor.

Constructs Generational MOEA/D-DE

Parameters
  • gen – number of generations

  • weight_generation – method used to generate the weights, one of “grid”, “low discrepancy” or “random”

  • decomposition – decomposition method: one of “weighted”, “tchebycheff” or “bi”

  • neighbours – size of the weight’s neighborhood

  • CR – crossover parameter in the Differential Evolution operator

  • F – parameter for the Differential Evolution operator

  • eta_m – distribution index used by the polynomial mutation

  • realb – chance that the neighbourhood is considered at each generation, rather than the whole population (only if preserve_diversity is true)

  • limit – maximum number of copies reinserted in the population (only if m_preserve_diversity is true)

  • preserve_diversity – when true activates the two diversity preservation mechanisms described in Li, Hui, and Qingfu Zhang paper

  • seed – seed used by the internal random number generator (default is random)

Throws

value_error – if gen is negative, weight_generation is not one of the allowed types, realb,cr or f are not in [1.0] or m_eta is < 0, if neighbours is <2

population evolve(population) const#

Algorithm evolve method.

Evolves the population for the requested number of generations.

Parameters

pop – population to be evolved

Returns

evolved population

void set_seed(unsigned)#

Sets the seed.

Parameters

seed – the seed controlling the algorithm stochastic behaviour

inline unsigned get_seed() const#

Gets the seed.

Returns

the seed controlling the algorithm stochastic behaviour

inline void set_verbosity(unsigned level)#

Sets the algorithm verbosity.

Sets the verbosity level of the screen output and of the log returned by get_log(). level can be:

  • 0: no verbosity

  • >0: will print and log one line each level generations.

Example (verbosity 1):

Gen:        Fevals:           ADF:        ideal1:        ideal2:
  1              0        24.9576       0.117748        2.77748
  2             40        19.2461      0.0238826        2.51403
  3             80        12.4375      0.0238826        2.51403
  4            120        9.08406     0.00389182        2.51403
  5            160        7.10407       0.002065        2.51403
  6            200        6.11242     0.00205598        2.51403
  7            240        8.79749     0.00205598        2.25538
  8            280        7.23155    7.33914e-05        2.25538
  9            320        6.83249    7.33914e-05        2.25538
 10            360        6.55125    7.33914e-05        2.25538
Gen, is the generation number, Fevals the number of function evaluation used. ADF is the Average Decomposed Fitness, that is the average across all decomposed problem of the single objective decomposed fitness along the corresponding direction. The ideal point of the current population follows cropped to its 5th component.

Parameters

level – verbosity level

inline unsigned get_verbosity() const#

Gets the verbosity level.

Returns

the verbosity level

void set_bfe(const bfe &b)#

Sets the batch function evaluation scheme.

Parameters

b – batch function evaluation object

inline unsigned get_gen() const#

Gets the generations.

Returns

the number of generations to evolve for

inline std::string get_name() const#

Algorithm name.

One of the optional methods of any user-defined algorithm (UDA).

Returns

a string containing the algorithm name

std::string get_extra_info() const#

Extra info.

One of the optional methods of any user-defined algorithm (UDA).

Returns

a string containing extra info on the algorithm

inline const log_type &get_log() const#

Get log.

A log containing relevant quantities monitoring the last call to evolve. Each element of the returned std::vector is a moead_gen::log_line_type containing: Gen, Fevals, ADR, ideal_point as described in moead_gen::set_verbosity

Returns

an std::vector of moead_gen::log_line_type containing the logged values Gen, Fevals, ADR, ideal_point