from moeoFastNonDominantedSortingFitnessAssignment to moeoDominanceDepthFitnessAssignment
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1269 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
bc932bb89d
commit
b32c1704e8
9 changed files with 34 additions and 42 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* <moeoNSGA.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
* (C) OPAC Team, LIFL, 2002-2008
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
#include <eoSGAGenOp.h>
|
||||
#include <algo/moeoEA.h>
|
||||
#include <diversity/moeoFrontByFrontSharingDiversityAssignment.h>
|
||||
#include <fitness/moeoFastNonDominatedSortingFitnessAssignment.h>
|
||||
#include <fitness/moeoDominanceDepthFitnessAssignment.h>
|
||||
#include <replacement/moeoElitistReplacement.h>
|
||||
#include <selection/moeoDetTournamentSelect.h>
|
||||
|
||||
|
|
@ -204,7 +204,7 @@ protected:
|
|||
/** breeder */
|
||||
eoBreed < MOEOT > & breed;
|
||||
/** fitness assignment used in NSGA-II */
|
||||
moeoFastNonDominatedSortingFitnessAssignment < MOEOT > fitnessAssignment;
|
||||
moeoDominanceDepthFitnessAssignment < MOEOT > fitnessAssignment;
|
||||
/** diversity assignment used in NSGA-II */
|
||||
moeoFrontByFrontSharingDiversityAssignment < MOEOT > diversityAssignment;
|
||||
/** elitist replacement */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* <moeoNSGAII.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
* (C) OPAC Team, LIFL, 2002-2008
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
#include <eoSGAGenOp.h>
|
||||
#include <algo/moeoEA.h>
|
||||
#include <diversity/moeoFrontByFrontCrowdingDiversityAssignment.h>
|
||||
#include <fitness/moeoFastNonDominatedSortingFitnessAssignment.h>
|
||||
#include <fitness/moeoDominanceDepthFitnessAssignment.h>
|
||||
#include <replacement/moeoElitistReplacement.h>
|
||||
#include <selection/moeoDetTournamentSelect.h>
|
||||
|
||||
|
|
@ -198,8 +198,8 @@ protected:
|
|||
eoGeneralBreeder < MOEOT > genBreed;
|
||||
/** breeder */
|
||||
eoBreed < MOEOT > & breed;
|
||||
/** fitness assignment used in NSGA-II */
|
||||
moeoFastNonDominatedSortingFitnessAssignment < MOEOT > fitnessAssignment;
|
||||
/** fitness assignment used in NSGA */
|
||||
moeoDominanceDepthFitnessAssignment < MOEOT > fitnessAssignment;
|
||||
/** diversity assignment used in NSGA-II */
|
||||
moeoFrontByFrontCrowdingDiversityAssignment < MOEOT > diversityAssignment;
|
||||
/** elitist replacement */
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
#include <diversity/moeoFrontByFrontSharingDiversityAssignment.h>
|
||||
#include <fitness/moeoDummyFitnessAssignment.h>
|
||||
#include <fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h>
|
||||
#include <fitness/moeoFastNonDominatedSortingFitnessAssignment.h>
|
||||
#include <fitness/moeoDominanceDepthFitnessAssignment.h>
|
||||
#include <fitness/moeoFitnessAssignment.h>
|
||||
#include <metric/moeoAdditiveEpsilonBinaryMetric.h>
|
||||
#include <metric/moeoHypervolumeBinaryMetric.h>
|
||||
|
|
@ -93,8 +93,8 @@ moeoEA < MOEOT > & do_make_ea_moeo(eoParser & _parser, eoState & _state, eoEvalF
|
|||
|
||||
|
||||
/* the fitness assignment strategy */
|
||||
std::string & fitnessParam = _parser.createParam(std::string("FastNonDominatedSorting"), "fitness",
|
||||
"Fitness assignment scheme: Dummy, FastNonDominatedSorting or IndicatorBased", 'F',
|
||||
std::string & fitnessParam = _parser.createParam(std::string("DomDepth"), "fitness",
|
||||
"Fitness assignment scheme: Dummy, DomDepth or IndicatorBased", 'F',
|
||||
"Evolution Engine").value();
|
||||
std::string & indicatorParam = _parser.createParam(std::string("Epsilon"), "indicator",
|
||||
"Binary indicator for IndicatorBased: Epsilon, Hypervolume", 'i',
|
||||
|
|
@ -108,9 +108,9 @@ moeoEA < MOEOT > & do_make_ea_moeo(eoParser & _parser, eoState & _state, eoEvalF
|
|||
{
|
||||
fitnessAssignment = new moeoDummyFitnessAssignment < MOEOT> ();
|
||||
}
|
||||
else if (fitnessParam == std::string("FastNonDominatedSorting"))
|
||||
else if (fitnessParam == std::string("DomDepth"))
|
||||
{
|
||||
fitnessAssignment = new moeoFastNonDominatedSortingFitnessAssignment < MOEOT> ();
|
||||
fitnessAssignment = new moeoDominanceDepthFitnessAssignment < MOEOT> ();
|
||||
}
|
||||
else if (fitnessParam == std::string("IndicatorBased"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* <moeoFastNonDominatedSortingFitnessAssignment.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
* <moeoDominanceDepthFitnessAssignment.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
* (C) OPAC Team, LIFL, 2002-2008
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
|
|
@ -35,8 +35,8 @@
|
|||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef MOEOFASTNONDOMINATEDSORTINGFITNESSASSIGNMENT_H_
|
||||
#define MOEOFASTNONDOMINATEDSORTINGFITNESSASSIGNMENT_H_
|
||||
#ifndef MOEODOMINANCEDEPTHFITNESSASSIGNMENT_H_
|
||||
#define MOEODOMINANCEDEPTHFITNESSASSIGNMENT_H_
|
||||
|
||||
#include <vector>
|
||||
#include <eoPop.h>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
* This strategy is, for instance, used in NSGA and NSGA-II.
|
||||
*/
|
||||
template < class MOEOT >
|
||||
class moeoFastNonDominatedSortingFitnessAssignment : public moeoDominanceBasedFitnessAssignment < MOEOT >
|
||||
class moeoDominanceDepthFitnessAssignment : public moeoDominanceBasedFitnessAssignment < MOEOT >
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ class moeoFastNonDominatedSortingFitnessAssignment : public moeoDominanceBasedFi
|
|||
/**
|
||||
* Default ctor
|
||||
*/
|
||||
moeoFastNonDominatedSortingFitnessAssignment() : comparator(paretoComparator)
|
||||
moeoDominanceDepthFitnessAssignment() : comparator(paretoComparator)
|
||||
{}
|
||||
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ class moeoFastNonDominatedSortingFitnessAssignment : public moeoDominanceBasedFi
|
|||
* Ctor where you can choose your own way to compare objective vectors
|
||||
* @param _comparator the functor used to compare objective vectors
|
||||
*/
|
||||
moeoFastNonDominatedSortingFitnessAssignment(moeoObjectiveVectorComparator < ObjectiveVector > & _comparator) : comparator(_comparator)
|
||||
moeoDominanceDepthFitnessAssignment(moeoObjectiveVectorComparator < ObjectiveVector > & _comparator) : comparator(_comparator)
|
||||
{}
|
||||
|
||||
|
||||
|
|
@ -260,6 +260,6 @@ class moeoFastNonDominatedSortingFitnessAssignment : public moeoDominanceBasedFi
|
|||
}
|
||||
}
|
||||
|
||||
};
|
||||
} ;
|
||||
|
||||
#endif /*MOEOFASTNONDOMINATEDSORTINGFITNESSASSIGNMENT_H_*/
|
||||
#endif /*MOEODOMINANCEDEPTHFITNESSASSIGNMENT_H_*/
|
||||
|
|
@ -102,10 +102,10 @@
|
|||
#include <fitness/moeoDominanceBasedFitnessAssignment.h>
|
||||
#include <fitness/moeoDominanceCountFitnessAssignment.h>
|
||||
#include <fitness/moeoDominanceCountRankingFitnessAssignment.h>
|
||||
#include <fitness/moeoDominanceDepthFitnessAssignment.h>
|
||||
#include <fitness/moeoDominanceRankFitnessAssignment.h>
|
||||
#include <fitness/moeoDummyFitnessAssignment.h>
|
||||
#include <fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h>
|
||||
#include <fitness/moeoFastNonDominatedSortingFitnessAssignment.h>
|
||||
#include <fitness/moeoFitnessAssignment.h>
|
||||
#include <fitness/moeoIndicatorBasedFitnessAssignment.h>
|
||||
#include <fitness/moeoScalarFitnessAssignment.h>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ SET (TEST_LIST
|
|||
t-moeoFitnessThenDiversityComparator
|
||||
t-moeoAchievementFitnessAssignment
|
||||
t-moeoExpBinaryIndicatorBasedFitnessAssignment
|
||||
t-moeoFastNonDominatedSortingFitnessAssignment
|
||||
t-moeoCrowdingDiversityAssignment
|
||||
t-moeoSharingDiversityAssignment
|
||||
t-moeoIBEA
|
||||
|
|
@ -56,6 +55,7 @@ SET (TEST_LIST
|
|||
t-moeoDominanceCountFitnessAssignment
|
||||
t-moeoDominanceRankFitnessAssignment
|
||||
t-moeoDominanceCountRankingFitnessAssignment
|
||||
t-moeoDominanceDepthFitnessAssignment
|
||||
t-moeoNearestNeighborDiversityAssignment
|
||||
t-moeoSPEA2Archive
|
||||
t-moeoSPEA2
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* <t-moeoFastNonDominatedSortingFitnessAssignment.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
* <t-moeoDominanceDepthFitnessAssignment.cpp>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
* (C) OPAC Team, LIFL, 2002-2008
|
||||
*
|
||||
* Arnaud Liefooghe
|
||||
*
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
// t-moeoFastNonDominatedSortingFitnessAssignment.cpp
|
||||
// t-moeoDominanceDepthFitnessAssignment.cpp
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <eo>
|
||||
|
|
@ -67,7 +67,7 @@ typedef MOEO < ObjectiveVector, double, double > Solution;
|
|||
|
||||
int main()
|
||||
{
|
||||
std::cout << "[moeoFastNonDominatedSortingFitnessAssignment]\t=>\t";
|
||||
std::cout << "[moeoDominanceDepthFitnessAssignment]\t=>\t";
|
||||
|
||||
// objective vectors
|
||||
ObjectiveVector obj0, obj1, obj2, obj3, obj4, obj5;
|
||||
|
|
@ -95,7 +95,7 @@ int main()
|
|||
pop[5].objectiveVector(obj5); // class 1
|
||||
|
||||
// fitness assignment
|
||||
moeoFastNonDominatedSortingFitnessAssignment< Solution > fitnessAssignment;
|
||||
moeoDominanceDepthFitnessAssignment< Solution > fitnessAssignment;
|
||||
fitnessAssignment(pop);
|
||||
|
||||
// pop[0]
|
||||
|
|
@ -100,7 +100,7 @@ int main()
|
|||
eoRealInitBounded < Solution > init(bounds);
|
||||
eoPop < Solution > pop(20, init);
|
||||
eoGenContinue < Solution > term(20);
|
||||
moeoFastNonDominatedSortingFitnessAssignment < Solution > fitnessAssignment;
|
||||
moeoDominanceDepthFitnessAssignment < Solution > fitnessAssignment;
|
||||
moeoFrontByFrontCrowdingDiversityAssignment < Solution > diversityAssignment;
|
||||
moeoFitnessThenDiversityComparator < Solution > comparator;
|
||||
moeoDetTournamentSelect < Solution > selectOne(comparator, 2);
|
||||
|
|
|
|||
|
|
@ -46,14 +46,6 @@
|
|||
#include <make_op_FlowShop.h>
|
||||
// how to initialize the population
|
||||
#include <do/make_pop.h>
|
||||
// the stopping criterion
|
||||
#include <do/make_continue_moeo.h>
|
||||
// outputs (stats, population dumps, ...)
|
||||
#include <do/make_checkpoint_moeo.h>
|
||||
// evolution engine (selection and replacement)
|
||||
#include <do/make_ea_moeo.h>
|
||||
// simple call to the algo
|
||||
#include <do/make_run.h>
|
||||
// checks for help demand, and writes the status file and make_help; in libutils
|
||||
void make_help(eoParser & _parser);
|
||||
// definition of the representation
|
||||
|
|
@ -96,7 +88,7 @@ int main(int argc, char* argv[])
|
|||
moeoArchiveUpdater < FlowShop > updater(arch, pop);
|
||||
checkpoint.add(updater);
|
||||
// fitness assignment
|
||||
moeoFastNonDominatedSortingFitnessAssignment <FlowShop> fitnessAssignment;
|
||||
moeoDominanceDepthFitnessAssignment <FlowShop> fitnessAssignment;
|
||||
// diversity preservation
|
||||
moeoFrontByFrontCrowdingDiversityAssignment <FlowShop> diversityAssignment;
|
||||
// comparator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue