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:
liefooga 2008-11-27 14:33:11 +00:00
commit b32c1704e8
9 changed files with 34 additions and 42 deletions

View file

@ -1,7 +1,7 @@
/* /*
* <moeoNSGA.h> * <moeoNSGA.h>
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
* (C) OPAC Team, LIFL, 2002-2007 * (C) OPAC Team, LIFL, 2002-2008
* *
* Arnaud Liefooghe * Arnaud Liefooghe
* *
@ -48,7 +48,7 @@
#include <eoSGAGenOp.h> #include <eoSGAGenOp.h>
#include <algo/moeoEA.h> #include <algo/moeoEA.h>
#include <diversity/moeoFrontByFrontSharingDiversityAssignment.h> #include <diversity/moeoFrontByFrontSharingDiversityAssignment.h>
#include <fitness/moeoFastNonDominatedSortingFitnessAssignment.h> #include <fitness/moeoDominanceDepthFitnessAssignment.h>
#include <replacement/moeoElitistReplacement.h> #include <replacement/moeoElitistReplacement.h>
#include <selection/moeoDetTournamentSelect.h> #include <selection/moeoDetTournamentSelect.h>
@ -204,7 +204,7 @@ protected:
/** breeder */ /** breeder */
eoBreed < MOEOT > & breed; eoBreed < MOEOT > & breed;
/** fitness assignment used in NSGA-II */ /** fitness assignment used in NSGA-II */
moeoFastNonDominatedSortingFitnessAssignment < MOEOT > fitnessAssignment; moeoDominanceDepthFitnessAssignment < MOEOT > fitnessAssignment;
/** diversity assignment used in NSGA-II */ /** diversity assignment used in NSGA-II */
moeoFrontByFrontSharingDiversityAssignment < MOEOT > diversityAssignment; moeoFrontByFrontSharingDiversityAssignment < MOEOT > diversityAssignment;
/** elitist replacement */ /** elitist replacement */

View file

@ -1,7 +1,7 @@
/* /*
* <moeoNSGAII.h> * <moeoNSGAII.h>
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
* (C) OPAC Team, LIFL, 2002-2007 * (C) OPAC Team, LIFL, 2002-2008
* *
* Arnaud Liefooghe * Arnaud Liefooghe
* *
@ -49,7 +49,7 @@
#include <eoSGAGenOp.h> #include <eoSGAGenOp.h>
#include <algo/moeoEA.h> #include <algo/moeoEA.h>
#include <diversity/moeoFrontByFrontCrowdingDiversityAssignment.h> #include <diversity/moeoFrontByFrontCrowdingDiversityAssignment.h>
#include <fitness/moeoFastNonDominatedSortingFitnessAssignment.h> #include <fitness/moeoDominanceDepthFitnessAssignment.h>
#include <replacement/moeoElitistReplacement.h> #include <replacement/moeoElitistReplacement.h>
#include <selection/moeoDetTournamentSelect.h> #include <selection/moeoDetTournamentSelect.h>
@ -198,8 +198,8 @@ protected:
eoGeneralBreeder < MOEOT > genBreed; eoGeneralBreeder < MOEOT > genBreed;
/** breeder */ /** breeder */
eoBreed < MOEOT > & breed; eoBreed < MOEOT > & breed;
/** fitness assignment used in NSGA-II */ /** fitness assignment used in NSGA */
moeoFastNonDominatedSortingFitnessAssignment < MOEOT > fitnessAssignment; moeoDominanceDepthFitnessAssignment < MOEOT > fitnessAssignment;
/** diversity assignment used in NSGA-II */ /** diversity assignment used in NSGA-II */
moeoFrontByFrontCrowdingDiversityAssignment < MOEOT > diversityAssignment; moeoFrontByFrontCrowdingDiversityAssignment < MOEOT > diversityAssignment;
/** elitist replacement */ /** elitist replacement */

View file

@ -59,7 +59,7 @@
#include <diversity/moeoFrontByFrontSharingDiversityAssignment.h> #include <diversity/moeoFrontByFrontSharingDiversityAssignment.h>
#include <fitness/moeoDummyFitnessAssignment.h> #include <fitness/moeoDummyFitnessAssignment.h>
#include <fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h> #include <fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h>
#include <fitness/moeoFastNonDominatedSortingFitnessAssignment.h> #include <fitness/moeoDominanceDepthFitnessAssignment.h>
#include <fitness/moeoFitnessAssignment.h> #include <fitness/moeoFitnessAssignment.h>
#include <metric/moeoAdditiveEpsilonBinaryMetric.h> #include <metric/moeoAdditiveEpsilonBinaryMetric.h>
#include <metric/moeoHypervolumeBinaryMetric.h> #include <metric/moeoHypervolumeBinaryMetric.h>
@ -93,8 +93,8 @@ moeoEA < MOEOT > & do_make_ea_moeo(eoParser & _parser, eoState & _state, eoEvalF
/* the fitness assignment strategy */ /* the fitness assignment strategy */
std::string & fitnessParam = _parser.createParam(std::string("FastNonDominatedSorting"), "fitness", std::string & fitnessParam = _parser.createParam(std::string("DomDepth"), "fitness",
"Fitness assignment scheme: Dummy, FastNonDominatedSorting or IndicatorBased", 'F', "Fitness assignment scheme: Dummy, DomDepth or IndicatorBased", 'F',
"Evolution Engine").value(); "Evolution Engine").value();
std::string & indicatorParam = _parser.createParam(std::string("Epsilon"), "indicator", std::string & indicatorParam = _parser.createParam(std::string("Epsilon"), "indicator",
"Binary indicator for IndicatorBased: Epsilon, Hypervolume", 'i', "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> (); 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")) else if (fitnessParam == std::string("IndicatorBased"))
{ {

View file

@ -1,7 +1,7 @@
/* /*
* <moeoFastNonDominatedSortingFitnessAssignment.h> * <moeoDominanceDepthFitnessAssignment.h>
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
* (C) OPAC Team, LIFL, 2002-2007 * (C) OPAC Team, LIFL, 2002-2008
* *
* Arnaud Liefooghe * Arnaud Liefooghe
* *
@ -35,8 +35,8 @@
*/ */
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifndef MOEOFASTNONDOMINATEDSORTINGFITNESSASSIGNMENT_H_ #ifndef MOEODOMINANCEDEPTHFITNESSASSIGNMENT_H_
#define MOEOFASTNONDOMINATEDSORTINGFITNESSASSIGNMENT_H_ #define MOEODOMINANCEDEPTHFITNESSASSIGNMENT_H_
#include <vector> #include <vector>
#include <eoPop.h> #include <eoPop.h>
@ -54,7 +54,7 @@
* This strategy is, for instance, used in NSGA and NSGA-II. * This strategy is, for instance, used in NSGA and NSGA-II.
*/ */
template < class MOEOT > template < class MOEOT >
class moeoFastNonDominatedSortingFitnessAssignment : public moeoDominanceBasedFitnessAssignment < MOEOT > class moeoDominanceDepthFitnessAssignment : public moeoDominanceBasedFitnessAssignment < MOEOT >
{ {
public: public:
@ -65,7 +65,7 @@ class moeoFastNonDominatedSortingFitnessAssignment : public moeoDominanceBasedFi
/** /**
* Default ctor * 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 * Ctor where you can choose your own way to compare objective vectors
* @param _comparator the functor used 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_*/

View file

@ -102,10 +102,10 @@
#include <fitness/moeoDominanceBasedFitnessAssignment.h> #include <fitness/moeoDominanceBasedFitnessAssignment.h>
#include <fitness/moeoDominanceCountFitnessAssignment.h> #include <fitness/moeoDominanceCountFitnessAssignment.h>
#include <fitness/moeoDominanceCountRankingFitnessAssignment.h> #include <fitness/moeoDominanceCountRankingFitnessAssignment.h>
#include <fitness/moeoDominanceDepthFitnessAssignment.h>
#include <fitness/moeoDominanceRankFitnessAssignment.h> #include <fitness/moeoDominanceRankFitnessAssignment.h>
#include <fitness/moeoDummyFitnessAssignment.h> #include <fitness/moeoDummyFitnessAssignment.h>
#include <fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h> #include <fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h>
#include <fitness/moeoFastNonDominatedSortingFitnessAssignment.h>
#include <fitness/moeoFitnessAssignment.h> #include <fitness/moeoFitnessAssignment.h>
#include <fitness/moeoIndicatorBasedFitnessAssignment.h> #include <fitness/moeoIndicatorBasedFitnessAssignment.h>
#include <fitness/moeoScalarFitnessAssignment.h> #include <fitness/moeoScalarFitnessAssignment.h>

View file

@ -44,7 +44,6 @@ SET (TEST_LIST
t-moeoFitnessThenDiversityComparator t-moeoFitnessThenDiversityComparator
t-moeoAchievementFitnessAssignment t-moeoAchievementFitnessAssignment
t-moeoExpBinaryIndicatorBasedFitnessAssignment t-moeoExpBinaryIndicatorBasedFitnessAssignment
t-moeoFastNonDominatedSortingFitnessAssignment
t-moeoCrowdingDiversityAssignment t-moeoCrowdingDiversityAssignment
t-moeoSharingDiversityAssignment t-moeoSharingDiversityAssignment
t-moeoIBEA t-moeoIBEA
@ -56,6 +55,7 @@ SET (TEST_LIST
t-moeoDominanceCountFitnessAssignment t-moeoDominanceCountFitnessAssignment
t-moeoDominanceRankFitnessAssignment t-moeoDominanceRankFitnessAssignment
t-moeoDominanceCountRankingFitnessAssignment t-moeoDominanceCountRankingFitnessAssignment
t-moeoDominanceDepthFitnessAssignment
t-moeoNearestNeighborDiversityAssignment t-moeoNearestNeighborDiversityAssignment
t-moeoSPEA2Archive t-moeoSPEA2Archive
t-moeoSPEA2 t-moeoSPEA2

View file

@ -1,7 +1,7 @@
/* /*
* <t-moeoFastNonDominatedSortingFitnessAssignment.cpp> * <t-moeoDominanceDepthFitnessAssignment.cpp>
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007 * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
* (C) OPAC Team, LIFL, 2002-2007 * (C) OPAC Team, LIFL, 2002-2008
* *
* Arnaud Liefooghe * Arnaud Liefooghe
* *
@ -34,7 +34,7 @@
* *
*/ */
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// t-moeoFastNonDominatedSortingFitnessAssignment.cpp // t-moeoDominanceDepthFitnessAssignment.cpp
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include <eo> #include <eo>
@ -67,7 +67,7 @@ typedef MOEO < ObjectiveVector, double, double > Solution;
int main() int main()
{ {
std::cout << "[moeoFastNonDominatedSortingFitnessAssignment]\t=>\t"; std::cout << "[moeoDominanceDepthFitnessAssignment]\t=>\t";
// objective vectors // objective vectors
ObjectiveVector obj0, obj1, obj2, obj3, obj4, obj5; ObjectiveVector obj0, obj1, obj2, obj3, obj4, obj5;
@ -95,7 +95,7 @@ int main()
pop[5].objectiveVector(obj5); // class 1 pop[5].objectiveVector(obj5); // class 1
// fitness assignment // fitness assignment
moeoFastNonDominatedSortingFitnessAssignment< Solution > fitnessAssignment; moeoDominanceDepthFitnessAssignment< Solution > fitnessAssignment;
fitnessAssignment(pop); fitnessAssignment(pop);
// pop[0] // pop[0]

View file

@ -100,7 +100,7 @@ int main()
eoRealInitBounded < Solution > init(bounds); eoRealInitBounded < Solution > init(bounds);
eoPop < Solution > pop(20, init); eoPop < Solution > pop(20, init);
eoGenContinue < Solution > term(20); eoGenContinue < Solution > term(20);
moeoFastNonDominatedSortingFitnessAssignment < Solution > fitnessAssignment; moeoDominanceDepthFitnessAssignment < Solution > fitnessAssignment;
moeoFrontByFrontCrowdingDiversityAssignment < Solution > diversityAssignment; moeoFrontByFrontCrowdingDiversityAssignment < Solution > diversityAssignment;
moeoFitnessThenDiversityComparator < Solution > comparator; moeoFitnessThenDiversityComparator < Solution > comparator;
moeoDetTournamentSelect < Solution > selectOne(comparator, 2); moeoDetTournamentSelect < Solution > selectOne(comparator, 2);

View file

@ -46,14 +46,6 @@
#include <make_op_FlowShop.h> #include <make_op_FlowShop.h>
// how to initialize the population // how to initialize the population
#include <do/make_pop.h> #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 // checks for help demand, and writes the status file and make_help; in libutils
void make_help(eoParser & _parser); void make_help(eoParser & _parser);
// definition of the representation // definition of the representation
@ -96,7 +88,7 @@ int main(int argc, char* argv[])
moeoArchiveUpdater < FlowShop > updater(arch, pop); moeoArchiveUpdater < FlowShop > updater(arch, pop);
checkpoint.add(updater); checkpoint.add(updater);
// fitness assignment // fitness assignment
moeoFastNonDominatedSortingFitnessAssignment <FlowShop> fitnessAssignment; moeoDominanceDepthFitnessAssignment <FlowShop> fitnessAssignment;
// diversity preservation // diversity preservation
moeoFrontByFrontCrowdingDiversityAssignment <FlowShop> diversityAssignment; moeoFrontByFrontCrowdingDiversityAssignment <FlowShop> diversityAssignment;
// comparator // comparator