From 5f9689fc2376603e6505c5ec2ac7d0b0dc81a576 Mon Sep 17 00:00:00 2001 From: Arnaud Liefooghe Date: Mon, 6 Oct 2014 14:51:37 +0200 Subject: [PATCH] hypervolume pointers + doc --- eo/src/es/eoNormalMutation.h | 2 +- eo/test/t-eoParallel.cpp | 2 ++ mo/src/problems/permutation/moTwoOptExNeighbor.h | 2 +- moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h | 4 ++-- moeo/src/metric/moeoHyperVolumeMetric.h | 4 ++-- moeo/src/moeo | 2 +- moeo/src/selection/moeoRouletteSelect.h | 2 +- moeo/test/t-moeo2DMinHypervolumeArchive.cpp | 2 ++ 8 files changed, 12 insertions(+), 8 deletions(-) diff --git a/eo/src/es/eoNormalMutation.h b/eo/src/es/eoNormalMutation.h index 96dcf54c2..fd3916c22 100644 --- a/eo/src/es/eoNormalMutation.h +++ b/eo/src/es/eoNormalMutation.h @@ -138,7 +138,7 @@ public: * @param _p_change the probability to change a given coordinate */ eoNormalMutation(eoRealVectorBounds & _bounds, - double _sigma, const double& _p_change = 1.0): + double & _sigma, const double& _p_change = 1.0): sigma(_sigma), bounds(_bounds), p_change(_p_change) {} /** The class name */ diff --git a/eo/test/t-eoParallel.cpp b/eo/test/t-eoParallel.cpp index ef03f0c30..1609c9924 100644 --- a/eo/test/t-eoParallel.cpp +++ b/eo/test/t-eoParallel.cpp @@ -2,7 +2,9 @@ // t-eoParallel.cpp //----------------------------------------------------------------------------- +#ifdef ENABLE_OPENMP #include +#endif #include #include diff --git a/mo/src/problems/permutation/moTwoOptExNeighbor.h b/mo/src/problems/permutation/moTwoOptExNeighbor.h index ed7198574..ae82fd45d 100755 --- a/mo/src/problems/permutation/moTwoOptExNeighbor.h +++ b/mo/src/problems/permutation/moTwoOptExNeighbor.h @@ -86,7 +86,7 @@ public: virtual bool equals(moTwoOptExNeighbor & _neighbor) { unsigned f, s; _neighbor.getIndices(f, s); - return ((indices.first == f) && (indices.second == s) || (indices.first == s) && (indices.second == f)); + return (((indices.first == f) && (indices.second == s)) || ((indices.first == s) && (indices.second == f))); } /** diff --git a/moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h b/moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h index 6aad16fe2..c781b9a92 100644 --- a/moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h +++ b/moeo/src/fitness/moeoDominanceDepthFitnessAssignment.h @@ -211,7 +211,7 @@ private: std::sort(sortedptrpop.begin(), sortedptrpop.end(), cmp); - // + /* std::cout << std::endl << "sorted pop" << std::endl; std::cout << "====================" << std::endl; for(unsigned int i=0; i<_pop.size(); i++) @@ -219,7 +219,7 @@ private: std::cout << i << " : " << (*sortedptrpop[i]) << std::endl; } std::cout << "====================" << std::endl; - // + */ // compute an upper bound on the second objective (1) double max_obj1 = std::numeric_limits::min(); diff --git a/moeo/src/metric/moeoHyperVolumeMetric.h b/moeo/src/metric/moeoHyperVolumeMetric.h index 99f132131..b79dbc558 100644 --- a/moeo/src/metric/moeoHyperVolumeMetric.h +++ b/moeo/src/metric/moeoHyperVolumeMetric.h @@ -42,8 +42,8 @@ #include /** - * The contribution metric evaluates the proportion of non-dominated solutions given by a Pareto set relatively to another Pareto set - * (Meunier, Talbi, Reininger: 'A multiobjective genetic algorithm for radio network optimization', in Proc. of the 2000 Congress on Evolutionary Computation, IEEE Press, pp. 317-324) + * The hypervolume metric evaluates the multi-dimensional area (hypervolume) enclosed by set of objective vectors and a reference point + * (E. Zitzler and L. Thiele. Multiobjective evolutionary algorithms: A comparative case study and the strength pareto approach. IEEE Transactions on Evolutionary Computation, 3(4):257–271, 1999) */ template < class ObjectiveVector > class moeoHyperVolumeMetric : public moeoVectorUnaryMetric < ObjectiveVector , double > diff --git a/moeo/src/moeo b/moeo/src/moeo index 3b310d64f..4a7908913 100644 --- a/moeo/src/moeo +++ b/moeo/src/moeo @@ -57,7 +57,7 @@ #include #include -#include +//#include #include #include #include diff --git a/moeo/src/selection/moeoRouletteSelect.h b/moeo/src/selection/moeoRouletteSelect.h index fb34259e7..3a293b151 100644 --- a/moeo/src/selection/moeoRouletteSelect.h +++ b/moeo/src/selection/moeoRouletteSelect.h @@ -80,7 +80,7 @@ class moeoRouletteSelect:public moeoSelectOne < MOEOT > protected: /** size */ - unsigned int & tSize; + unsigned int tSize; }; diff --git a/moeo/test/t-moeo2DMinHypervolumeArchive.cpp b/moeo/test/t-moeo2DMinHypervolumeArchive.cpp index f90b9940b..994a9a4ea 100644 --- a/moeo/test/t-moeo2DMinHypervolumeArchive.cpp +++ b/moeo/test/t-moeo2DMinHypervolumeArchive.cpp @@ -41,6 +41,8 @@ #include #include +#include + //----------------------------------------------------------------------------- class ObjectiveVectorTraits : public moeoObjectiveVectorTraits