rename files
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1754 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
31066ad27b
commit
0720d5f05d
14 changed files with 144 additions and 68 deletions
|
|
@ -51,13 +51,13 @@ SET (TEST_LIST
|
|||
t-moSolVectorTabuList
|
||||
t-moBestImprAspiration
|
||||
t-moSimpleHCexplorer
|
||||
t-moSimpleHCneutralExplorer
|
||||
t-moHCneutralExplorer
|
||||
t-moFirstImprExplorer
|
||||
t-moRandomBestHCexplorer
|
||||
t-moNeutralHCexplorer
|
||||
t-moFirstImprHCexplorer
|
||||
t-moRandomWalkExplorer
|
||||
t-moMetropolisHastingExplorer
|
||||
t-moRandomNeutralWalkExplorer
|
||||
t-moTSExplorer
|
||||
t-moTSexplorer
|
||||
t-moForwardVariableNeighborhood
|
||||
t-moSolComparator
|
||||
t-moDummyEval
|
||||
|
|
@ -74,6 +74,7 @@ SET (TEST_LIST
|
|||
t-moSA
|
||||
t-moLocalSearch
|
||||
t-moILSexplorer
|
||||
t-moSimpleHC
|
||||
)
|
||||
|
||||
FOREACH (test ${TEST_LIST})
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
#include <comparator/moNeighborComparator.h>
|
||||
#include <comparator/moSolNeighborComparator.h>
|
||||
#include <explorer/moFirstImprExplorer.h>
|
||||
#include <explorer/moFirstImprHCexplorer.h>
|
||||
#include "moTestClass.h"
|
||||
|
||||
#include <iostream>
|
||||
|
|
@ -38,7 +38,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
int main() {
|
||||
|
||||
std::cout << "[t-moFirstImprExplorer] => START" << std::endl;
|
||||
std::cout << "[t-moFirstImprHCexplorer] => START" << std::endl;
|
||||
|
||||
//Instanciation
|
||||
eoBit<eoMinimizingFitness> sol(4, true);
|
||||
|
|
@ -48,7 +48,7 @@ int main() {
|
|||
moNeighborComparator<bitNeighbor> ncomp;
|
||||
moSolNeighborComparator<bitNeighbor> sncomp;
|
||||
|
||||
moFirstImprExplorer<bitNeighbor> test(nh, eval, ncomp, sncomp);
|
||||
moFirstImprHCexplorer<bitNeighbor> test(nh, eval, ncomp, sncomp);
|
||||
|
||||
//on verifie qu'on améliore peut continuer à explorer tant qu'on améliore la solution
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ int main() {
|
|||
assert(sol.fitness()==0);
|
||||
assert(!test.isContinue(sol));
|
||||
|
||||
std::cout << "[t-moFirstImprExplorer] => OK" << std::endl;
|
||||
std::cout << "[t-moFirstImprHCexplorer] => OK" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
<t-moHCneutralExplorer.cpp>
|
||||
<t-moNeutralHCexplorer.cpp>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
|
@ -29,7 +29,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
#include <comparator/moNeighborComparator.h>
|
||||
#include <comparator/moSolNeighborComparator.h>
|
||||
#include <explorer/moHCneutralExplorer.h>
|
||||
#include <explorer/moNeutralHCexplorer.h>
|
||||
#include "moTestClass.h"
|
||||
|
||||
#include <iostream>
|
||||
|
|
@ -38,7 +38,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
int main() {
|
||||
|
||||
std::cout << "[t-moHCneutralExplorer] => START" << std::endl;
|
||||
std::cout << "[t-moNeutralHCexplorer] => START" << std::endl;
|
||||
|
||||
//Instanciation
|
||||
eoBit<eoMinimizingFitness> sol(4, true);
|
||||
|
|
@ -48,7 +48,7 @@ int main() {
|
|||
moNeighborComparator<bitNeighbor> ncomp;
|
||||
moSolNeighborComparator<bitNeighbor> sncomp;
|
||||
|
||||
moHCneutralExplorer<bitNeighbor> test(nh, eval, ncomp, sncomp,3);
|
||||
moNeutralHCexplorer<bitNeighbor> test(nh, eval, ncomp, sncomp,3);
|
||||
|
||||
//on verifie qu'on ameliore bien la solution et que l'exploration dure 3 itérations
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ int main() {
|
|||
|
||||
|
||||
|
||||
std::cout << "[t-moHCneutralExplorer] => OK" << std::endl;
|
||||
std::cout << "[t-moNeutralHCexplorer] => OK" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
#include <comparator/moNeighborComparator.h>
|
||||
#include <comparator/moSolNeighborComparator.h>
|
||||
#include <explorer/moRandomBestHCExplorer.h>
|
||||
#include <explorer/moRandomBestHCexplorer.h>
|
||||
#include "moTestClass.h"
|
||||
|
||||
#include <iostream>
|
||||
|
|
@ -38,7 +38,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
int main() {
|
||||
|
||||
std::cout << "[t-moRandomBestHCExplorer] => START" << std::endl;
|
||||
std::cout << "[t-moRandomBestHCexplorer] => START" << std::endl;
|
||||
|
||||
//instanciation
|
||||
eoBit<eoMinimizingFitness> sol(4, true);
|
||||
|
|
@ -48,7 +48,7 @@ int main() {
|
|||
moNeighborComparator<bitNeighbor> ncomp;
|
||||
moSolNeighborComparator<bitNeighbor> sncomp;
|
||||
|
||||
moRandomBestHCExplorer<bitNeighbor> test(nh, eval, ncomp, sncomp);
|
||||
moRandomBestHCexplorer<bitNeighbor> test(nh, eval, ncomp, sncomp);
|
||||
|
||||
//test qu'on ameliore bien a chaque itération
|
||||
test.initParam(sol);
|
||||
|
|
@ -94,7 +94,7 @@ int main() {
|
|||
test.updateParam(sol);
|
||||
|
||||
|
||||
std::cout << "[t-moRandomBestHCExplorer] => OK" << std::endl;
|
||||
std::cout << "[t-moRandomBestHCexplorer] => OK" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
65
trunk/paradiseo-mo/test/t-moSimpleHC.cpp
Normal file
65
trunk/paradiseo-mo/test/t-moSimpleHC.cpp
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
<t-moSimpleHC.cpp>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
||||
This software is governed by the CeCILL license under French law and
|
||||
abiding by the rules of distribution of free software. You can ue,
|
||||
modify and/ or redistribute the software under the terms of the CeCILL
|
||||
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||
"http://www.cecill.info".
|
||||
|
||||
In this respect, the user's attention is drawn to the risks associated
|
||||
with loading, using, modifying and/or developing or reproducing the
|
||||
software by the user in light of its specific status of free software,
|
||||
that may mean that it is complicated to manipulate, and that also
|
||||
therefore means that it is reserved for developers and experienced
|
||||
professionals having in-depth computer knowledge. Users are therefore
|
||||
encouraged to load and test the software's suitability as regards their
|
||||
requirements in conditions enabling the security of their systems and/or
|
||||
data to be ensured and, more generally, to use and operate it in the
|
||||
same conditions as regards security.
|
||||
The fact that you are presently reading this means that you have had
|
||||
knowledge of the CeCILL license and that you accept its terms.
|
||||
|
||||
ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
|
||||
#include <algo/moSimpleHC.h>
|
||||
#include "moTestClass.h"
|
||||
#include <problems/eval/oneMaxFullEval.h>
|
||||
#include <continuator/moTrueContinuator.h>
|
||||
#include <comparator/moSolNeighborComparator.h>
|
||||
|
||||
|
||||
int main(){
|
||||
|
||||
std::cout << "[t-moSimpleHC] => START" << std::endl;
|
||||
|
||||
bitNeighborhood nh(4);
|
||||
oneMaxFullEval<bitVector> fullEval;
|
||||
evalOneMax eval(4);
|
||||
|
||||
//test first constructor
|
||||
moSimpleHC<bitNeighbor> test1(nh, fullEval, eval);
|
||||
|
||||
//test second constructor
|
||||
moTrueContinuator<bitNeighbor> cont;
|
||||
moSimpleHC<bitNeighbor> test2(nh, fullEval, eval, cont);
|
||||
|
||||
//test third constructor
|
||||
moSolNeighborComparator<bitNeighbor> sncomp;
|
||||
moNeighborComparator<bitNeighbor> ncomp;
|
||||
moSimpleHC<bitNeighbor> test3(nh, fullEval, eval, cont, ncomp, sncomp);
|
||||
|
||||
std::cout << "[t-moSimpleHC] => OK" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
<t-moTSExplorer.cpp>
|
||||
<t-moTSexplorer.cpp>
|
||||
Copyright (C) DOLPHIN Project-Team, INRIA Lille - Nord Europe, 2006-2010
|
||||
|
||||
Sébastien Verel, Arnaud Liefooghe, Jérémie Humeau
|
||||
|
|
@ -31,7 +31,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
#include <memory/moDummyIntensification.h>
|
||||
#include <memory/moDummyDiversification.h>
|
||||
#include <memory/moBestImprAspiration.h>
|
||||
#include <explorer/moTSExplorer.h>
|
||||
#include <explorer/moTSexplorer.h>
|
||||
#include "moTestClass.h"
|
||||
|
||||
#include <iostream>
|
||||
|
|
@ -40,7 +40,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
int main() {
|
||||
|
||||
std::cout << "[t-moTSExplorer] => START" << std::endl;
|
||||
std::cout << "[t-moTSexplorer] => START" << std::endl;
|
||||
|
||||
//instansiation
|
||||
eoBit<eoMinimizingFitness> sol(4, true);
|
||||
|
|
@ -55,8 +55,8 @@ int main() {
|
|||
moSolVectorTabuList<bitNeighbor> tabuList(4,0);
|
||||
moBestImprAspiration<bitNeighbor> aspir;
|
||||
|
||||
moTSExplorer<bitNeighbor> test(nh, eval, ncomp, sncomp, tabuList, intens, diver, aspir);
|
||||
moTSExplorer<bitNeighbor> test2(emptyNH, eval, ncomp, sncomp, tabuList, intens, diver, aspir);
|
||||
moTSexplorer<bitNeighbor> test(nh, eval, ncomp, sncomp, tabuList, intens, diver, aspir);
|
||||
moTSexplorer<bitNeighbor> test2(emptyNH, eval, ncomp, sncomp, tabuList, intens, diver, aspir);
|
||||
|
||||
//test d'un voisinage vide
|
||||
test2.initParam(sol);
|
||||
|
|
@ -130,7 +130,7 @@ int main() {
|
|||
bitNeighborhood nh2(2);
|
||||
evalOneMax eval2(2);
|
||||
|
||||
moTSExplorer<bitNeighbor> test3(nh2, eval2, ncomp, sncomp, tabuList, intens, diver, aspir);
|
||||
moTSexplorer<bitNeighbor> test3(nh2, eval2, ncomp, sncomp, tabuList, intens, diver, aspir);
|
||||
|
||||
test3.initParam(sol2);
|
||||
test3(sol2);
|
||||
|
|
@ -158,7 +158,7 @@ int main() {
|
|||
assert(!test3.accept(sol2));
|
||||
|
||||
|
||||
std::cout << "[t-moTSExplorer] => OK" << std::endl;
|
||||
std::cout << "[t-moTSexplorer] => OK" << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue