Shark machine learning library
About Shark
News!
Contribute
Credits and copyright
Downloads
Getting Started
Installation
Using the docs
Documentation
Tutorials
Quick references
Class list
Global functions
FAQ
Showroom
include
shark
Algorithms
DirectSearch
RealCodedNSGAIII.h
Go to the documentation of this file.
1
/*!
2
*
3
*
4
* \brief RealCodedNSGAIIII.h
5
*
6
*
7
*
8
* \author O.Krause
9
* \date 2017
10
*
11
*
12
* \par Copyright 1995-2017 Shark Development Team
13
*
14
* <BR><HR>
15
* This file is part of Shark.
16
* <http://shark-ml.org/>
17
*
18
* Shark is free software: you can redistribute it and/or modify
19
* it under the terms of the GNU Lesser General Public License as published
20
* by the Free Software Foundation, either version 3 of the License, or
21
* (at your option) any later version.
22
*
23
* Shark is distributed in the hope that it will be useful,
24
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
* GNU Lesser General Public License for more details.
27
*
28
* You should have received a copy of the GNU Lesser General Public License
29
* along with Shark. If not, see <http://www.gnu.org/licenses/>.
30
*
31
*/
32
#ifndef SHARK_ALGORITHMS_DIRECT_SEARCH_REAL_CODED_NSGA_III_H
33
#define SHARK_ALGORITHMS_DIRECT_SEARCH_REAL_CODED_NSGA_III_H
34
35
// MOO specific stuff
36
#include <
shark/Algorithms/DirectSearch/Operators/Indicators/NSGA3Indicator.h
>
37
#include <
shark/Algorithms/DirectSearch/RealCodedNSGAII.h
>
38
39
40
namespace
shark
{
41
42
/// \brief Implements the NSGA-III
43
///
44
/// The NSGAIII works similar to the NSGAII except that the crowding distance is replaced by its own,
45
/// reference point based indicator.
46
///
47
/// Please see the following papers for further reference:
48
/// Deb, Kalyanmoy, and Himanshu Jain.
49
/// "An evolutionary many-objective optimization algorithm using
50
/// reference-point-based nondominated sorting approach,
51
/// part I: Solving problems with box constraints."
52
/// IEEE Trans. Evolutionary Computation 18.4 (2014): 577-601.
53
class
RealCodedNSGAIII
:
public
IndicatorBasedRealCodedNSGAII
<NSGA3Indicator>{
54
typedef
IndicatorBasedRealCodedNSGAII<NSGA3Indicator>
base
;
55
public
:
56
57
/// \brief Default c'tor.
58
RealCodedNSGAIII
(random::rng_type& rng =
random::globalRng
)
59
: base(rng){}
60
61
std::string
name
()
const
{
62
return
"RealCodedNSGAIII"
;
63
}
64
protected
:
65
void
doInit
(
66
std::vector<SearchPointType>
const
& initialSearchPoints,
67
std::vector<ResultType>
const
& functionValues,
68
RealVector
const
& lowerBounds,
69
RealVector
const
& upperBounds,
70
std::size_t
mu
,
71
double
nm
,
72
double
nc
,
73
double
crossover_prob,
74
std::vector<Preference>
const
& indicatorPreferences = std::vector<Preference>()
75
){
76
// Do the regular initialization.
77
base::doInit
(
78
initialSearchPoints,
79
functionValues,
80
lowerBounds,
81
upperBounds,
82
mu,
83
nm,
84
nc,
85
crossover_prob);
86
// Make sure that the indicator respects our preference points if they
87
// are set.
88
indicator
().
init
(functionValues.front().size(),
mu
, *
mpe_rng
,
89
indicatorPreferences);
90
}
91
};
92
93
}
94
#endif