diff --git a/contribution/branches/MOLS/src2/moeoExhaustiveNeighborhoodExplorer.h b/contribution/branches/MOLS/src2/moeoExhaustiveNeighborhoodExplorer.h index b444f2009..5fba4ab55 100644 --- a/contribution/branches/MOLS/src2/moeoExhaustiveNeighborhoodExplorer.h +++ b/contribution/branches/MOLS/src2/moeoExhaustiveNeighborhoodExplorer.h @@ -63,7 +63,7 @@ public: moMoveIncrEval < Move, ObjectiveVector > & _incrEval) : moveInit(_moveInit), nextMove(_nextMove), incrEval(_incrEval){} - void operator()(eoPop < MOEOT > & _src, std::vector & _select, eoPop < MOEOT > & _dest) + void operator()(eoPop < MOEOT > & _src, std::vector < unsigned int> _select, eoPop < MOEOT > & _dest) { for(unsigned int i=0; i<_select.size(); i++) explore(_src, _select[i], _dest); diff --git a/contribution/branches/MOLS/src2/moeoNumberUnvisitedSelect.h b/contribution/branches/MOLS/src2/moeoNumberUnvisitedSelect.h index bf53dd1bf..1657a68dc 100644 --- a/contribution/branches/MOLS/src2/moeoNumberUnvisitedSelect.h +++ b/contribution/branches/MOLS/src2/moeoNumberUnvisitedSelect.h @@ -63,7 +63,7 @@ public: if (_src[i].flag() == 0) res.push_back(i); } - if(_number < res.size()){ + if(number < res.size()){ UF_random_generator rndGen; std::random_shuffle(res.begin(), res.end(), rndGen); res.resize(number); diff --git a/contribution/branches/MOLS/src2/moeoPopNeighborhoodExplorer.h b/contribution/branches/MOLS/src2/moeoPopNeighborhoodExplorer.h index 67f8d29d3..10119183d 100755 --- a/contribution/branches/MOLS/src2/moeoPopNeighborhoodExplorer.h +++ b/contribution/branches/MOLS/src2/moeoPopNeighborhoodExplorer.h @@ -46,6 +46,11 @@ * TODO */ template < class Move > -class moeoPopNeighborhoodExplorer{}; +class moeoPopNeighborhoodExplorer{ + +public: + virtual void operator()(eoPop < typename Move::EOType > &, std::vector , eoPop < typename Move::EOType > &) = 0; + +}; #endif /*MOEONEIGHBORHOODEXPLORER_H_*/ diff --git a/contribution/branches/MOLS/src2/moeoRestartLS.h b/contribution/branches/MOLS/src2/moeoRestartLS.h index e178bc261..9ed8ef8d1 100755 --- a/contribution/branches/MOLS/src2/moeoRestartLS.h +++ b/contribution/branches/MOLS/src2/moeoRestartLS.h @@ -45,6 +45,7 @@ #include #include #include +#include template < class Move > class moeoRestartLS : public moeoPopLS < Move > @@ -58,7 +59,7 @@ public: eoEvalFunc < MOEOT > & _eval, eoContinue < MOEOT > & _continuator, moeoPopNeighborhoodExplorer < Move > & _explorer, - moeoUnivisitedSelection < Move > & _select, + moeoUnvisitedSelect < Move > & _select, moeoArchive < MOEOT > & _globalArchive, std::string _fileName) : init(_init), eval(_eval), continuator(_continuator), ls(continuator, _eval, internalArchive, _explorer, _select), globalArchive(_globalArchive), fileName(_fileName), count(0) {} diff --git a/contribution/branches/MOLS/src2/moeoSubNeighborhoodExplorer.h b/contribution/branches/MOLS/src2/moeoSubNeighborhoodExplorer.h index 2874bfe3f..fb42d8914 100644 --- a/contribution/branches/MOLS/src2/moeoSubNeighborhoodExplorer.h +++ b/contribution/branches/MOLS/src2/moeoSubNeighborhoodExplorer.h @@ -64,7 +64,7 @@ public: unsigned int _number) : moveInit(_moveInit), nextMove(_nextMove), incrEval(_incrEval), number(_number){} - void operator()(eoPop < MOEOT > & _src, std::vector & _select, eoPop < MOEOT > & _dest) + void operator()(eoPop < MOEOT > & _src, std::vector _select, eoPop < MOEOT > & _dest) { if(number > 0){ for(unsigned int i=0; i<_select.size(); i++) @@ -74,7 +74,7 @@ public: private: - void explore(eoPop < MOEOT > & _src, unsigned int _i, eoPop < MOEOT > & _dest, unsigned int _number) + void explore(eoPop < MOEOT > & _src, unsigned int _i, eoPop < MOEOT > & _dest) { unsigned int tmp = number; moveInit(move, _src[_i]); diff --git a/contribution/branches/MOLS/src2/moeoUnifiedDominanceBasedLS.h b/contribution/branches/MOLS/src2/moeoUnifiedDominanceBasedLS.h index 8e1d47d16..c412e22f6 100755 --- a/contribution/branches/MOLS/src2/moeoUnifiedDominanceBasedLS.h +++ b/contribution/branches/MOLS/src2/moeoUnifiedDominanceBasedLS.h @@ -43,6 +43,7 @@ #include #include #include +#include template < class Move > class moeoUnifiedDominanceBasedLS : public moeoPopLS < Move > @@ -56,7 +57,7 @@ public: eoContinue < MOEOT > & _continuator, eoEvalFunc < MOEOT > & _eval, moeoArchive < MOEOT > & _archive, - moeoPopNeighborhoodExplorer < Move > & _explorer + moeoPopNeighborhoodExplorer < Move > & _explorer, moeoUnvisitedSelect < Move > & _select) : continuator(_continuator), loopEval(_eval), popEval(loopEval), archive(_archive), explorer(_explorer), select(_select) {} @@ -76,6 +77,7 @@ public: //selection des individus non visités à explorer selectionVector = select(archive); //exploration + //explorer(archive, selectionVector, tmp_pop); explorer(archive, selectionVector, tmp_pop); //mise à jour de la pop ou archive archive(tmp_pop); diff --git a/contribution/branches/MOLS/src2/moeoUnvisitedSelect.h b/contribution/branches/MOLS/src2/moeoUnvisitedSelect.h index e563c2343..8070a8125 100644 --- a/contribution/branches/MOLS/src2/moeoUnvisitedSelect.h +++ b/contribution/branches/MOLS/src2/moeoUnvisitedSelect.h @@ -46,6 +46,6 @@ * TODO */ template < class Move > -class moeoUnvisitedSelect{}; +class moeoUnvisitedSelect: public eoUF < eoPop < typename Move::EOType> &, std::vector< unsigned int > >{}; #endif /*MOEOUNVISITEDSELECT_H_*/