New config of Paradiseo with Cmake 2.6
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1347 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
aa8109322c
commit
712e8d6cfa
84 changed files with 1468 additions and 739 deletions
|
|
@ -49,13 +49,11 @@
|
|||
#include <utils/eoState.h>
|
||||
#include <metric/moeoContributionMetric.h>
|
||||
#include <metric/moeoEntropyMetric.h>
|
||||
#include <metric/moeoHyperVolumeDifferenceMetric.h>
|
||||
#include <metric/moeoVecVsVecMultiplicativeEpsilonBinaryMetric.h>
|
||||
#include <metric/moeoVecVsVecAdditiveEpsilonBinaryMetric.h>
|
||||
#include <utils/moeoArchiveUpdater.h>
|
||||
#include <utils/moeoArchiveObjectiveVectorSavingUpdater.h>
|
||||
#include <utils/moeoBinaryMetricSavingUpdater.h>
|
||||
|
||||
|
||||
bool testDirRes(std::string _dirName, bool _erase);
|
||||
|
||||
/**
|
||||
|
|
@ -197,57 +195,6 @@ eoCheckPoint < MOEOT > & do_make_checkpoint_moeo (eoParser & _parser, eoState &
|
|||
_state.storeFunctor(entropy_updater);
|
||||
checkpoint.add(*entropy_updater);
|
||||
}
|
||||
|
||||
// store the hyperVolume of the non-dominated solutions
|
||||
bool hyp = _parser.getORcreateParam(false, "hyperVolume", "Store the hyperVolume of the archive at each gen.", '\0', "Output").value();
|
||||
if (hyp)
|
||||
{
|
||||
if (! dirOK )
|
||||
dirOK = testDirRes(dirName, eraseParam.value()); // TRUE
|
||||
#ifdef _MSVC
|
||||
std::string stmp = dirName + "\hyperVolume";
|
||||
#else
|
||||
std::string stmp = dirName + "/hyperVolume";
|
||||
#endif
|
||||
moeoHyperVolumeDifferenceMetric < ObjectiveVector > * hyperVolume = new moeoHyperVolumeDifferenceMetric < ObjectiveVector >(true, 1.1);
|
||||
moeoBinaryMetricSavingUpdater < MOEOT > * hyperVolume_updater = new moeoBinaryMetricSavingUpdater < MOEOT > (*hyperVolume, _archive, stmp);
|
||||
_state.storeFunctor(hyperVolume_updater);
|
||||
checkpoint.add(*hyperVolume_updater);
|
||||
}
|
||||
|
||||
// store the Multiplicative Epsilon of the non-dominated solutions
|
||||
bool multeps = _parser.getORcreateParam(false, "multEpsilon", "Store the Multiplicative Epsilon of the archive at each gen.", '\0', "Output").value();
|
||||
if (multeps)
|
||||
{
|
||||
if (! dirOK )
|
||||
dirOK = testDirRes(dirName, eraseParam.value()); // TRUE
|
||||
#ifdef _MSVC
|
||||
std::string stmp = dirName + "\multepsilon";
|
||||
#else
|
||||
std::string stmp = dirName + "/multepsilon";
|
||||
#endif
|
||||
moeoVecVsVecMultiplicativeEpsilonBinaryMetric < ObjectiveVector > * multepsilon = new moeoVecVsVecMultiplicativeEpsilonBinaryMetric < ObjectiveVector >;
|
||||
moeoBinaryMetricSavingUpdater < MOEOT > * multepsilon_updater = new moeoBinaryMetricSavingUpdater < MOEOT > (*multepsilon, _archive, stmp);
|
||||
_state.storeFunctor(multepsilon_updater);
|
||||
checkpoint.add(*multepsilon_updater);
|
||||
}
|
||||
|
||||
// store the Additive Epsilon of the non-dominated solutions
|
||||
bool addeps = _parser.getORcreateParam(false, "addEpsilon", "Store the Additive Epsilon of the archive at each gen.", '\0', "Output").value();
|
||||
if (addeps)
|
||||
{
|
||||
if (! dirOK )
|
||||
dirOK = testDirRes(dirName, eraseParam.value()); // TRUE
|
||||
#ifdef _MSVC
|
||||
std::string stmp = dirName + "\addepsilon";
|
||||
#else
|
||||
std::string stmp = dirName + "/addepsilon";
|
||||
#endif
|
||||
moeoVecVsVecAdditiveEpsilonBinaryMetric < ObjectiveVector > * addepsilon = new moeoVecVsVecAdditiveEpsilonBinaryMetric < ObjectiveVector >;
|
||||
moeoBinaryMetricSavingUpdater < MOEOT > * addepsilon_updater = new moeoBinaryMetricSavingUpdater < MOEOT > (*addepsilon, _archive, stmp);
|
||||
_state.storeFunctor(addepsilon_updater);
|
||||
checkpoint.add(*addepsilon_updater);
|
||||
}
|
||||
|
||||
// and that's it for the (control and) output
|
||||
return checkpoint;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@
|
|||
#include <diversity/moeoDummyDiversityAssignment.h>
|
||||
#include <diversity/moeoFrontByFrontCrowdingDiversityAssignment.h>
|
||||
#include <diversity/moeoFrontByFrontSharingDiversityAssignment.h>
|
||||
#include <diversity/moeoNearestNeighborDiversityAssignment.h>
|
||||
#include <fitness/moeoDummyFitnessAssignment.h>
|
||||
#include <fitness/moeoExpBinaryIndicatorBasedFitnessAssignment.h>
|
||||
#include <fitness/moeoDominanceDepthFitnessAssignment.h>
|
||||
|
|
@ -95,7 +94,7 @@ moeoEA < MOEOT > & do_make_ea_moeo(eoParser & _parser, eoState & _state, eoEvalF
|
|||
|
||||
/* the fitness assignment strategy */
|
||||
std::string & fitnessParam = _parser.createParam(std::string("DomDepth"), "fitness",
|
||||
"Fitness assignment scheme: Dummy, DomDepth, DomCount, DomRank, DomCountRanking or IndicatorBased", 'F',
|
||||
"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',
|
||||
|
|
@ -113,18 +112,6 @@ moeoEA < MOEOT > & do_make_ea_moeo(eoParser & _parser, eoState & _state, eoEvalF
|
|||
{
|
||||
fitnessAssignment = new moeoDominanceDepthFitnessAssignment < MOEOT> ();
|
||||
}
|
||||
else if (fitnessParam == std::string("DomCount"))
|
||||
{
|
||||
fitnessAssignment = new moeoDominanceCountFitnessAssignment < MOEOT> ();
|
||||
}
|
||||
else if (fitnessParam == std::string("DomRank"))
|
||||
{
|
||||
fitnessAssignment = new moeoDominanceRankFitnessAssignment < MOEOT> ();
|
||||
}
|
||||
else if (fitnessParam == std::string("DomCountRanking"))
|
||||
{
|
||||
fitnessAssignment = new moeoDominanceCountRankingFitnessAssignment < MOEOT> ();
|
||||
}
|
||||
else if (fitnessParam == std::string("IndicatorBased"))
|
||||
{
|
||||
// metric
|
||||
|
|
@ -154,7 +141,7 @@ moeoEA < MOEOT > & do_make_ea_moeo(eoParser & _parser, eoState & _state, eoEvalF
|
|||
|
||||
/* the diversity assignment strategy */
|
||||
eoValueParam<eoParamParamType> & diversityParam = _parser.createParam(eoParamParamType("Dummy"), "diversity",
|
||||
"Diversity assignment scheme: Dummy, Sharing(nicheSize), NearestNeighbor(k) or Crowding", 'D', "Evolution Engine");
|
||||
"Diversity assignment scheme: Dummy, Sharing(nicheSize) or Crowding", 'D', "Evolution Engine");
|
||||
eoParamParamType & diversityParamValue = diversityParam.value();
|
||||
moeoDiversityAssignment < MOEOT > * diversityAssignment;
|
||||
if (diversityParamValue.first == std::string("Dummy"))
|
||||
|
|
@ -176,21 +163,6 @@ moeoEA < MOEOT > & do_make_ea_moeo(eoParser & _parser, eoState & _state, eoEvalF
|
|||
}
|
||||
diversityAssignment = new moeoFrontByFrontSharingDiversityAssignment < MOEOT> (nicheSize);
|
||||
}
|
||||
else if (diversityParamValue.first == std::string("NearestNeighbor"))
|
||||
{
|
||||
unsigned int k;
|
||||
if (!diversityParamValue.second.size()) // no parameter added
|
||||
{
|
||||
std::cerr << "WARNING, no k-th distance for Sharing, using 1" << std::endl;
|
||||
k = 1;
|
||||
diversityParamValue.second.push_back(std::string("1"));
|
||||
}
|
||||
else
|
||||
{
|
||||
k = atoi(diversityParamValue.second[0].c_str());
|
||||
}
|
||||
diversityAssignment = new moeoNearestNeighborDiversityAssignment < MOEOT> (k);
|
||||
}
|
||||
else if (diversityParamValue.first == std::string("Crowding"))
|
||||
{
|
||||
diversityAssignment = new moeoFrontByFrontCrowdingDiversityAssignment < MOEOT> ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue