From 0d3580ae2da1e86dc6128d3b8affb712c47139fb Mon Sep 17 00:00:00 2001 From: AI Xin Date: Sun, 8 May 2022 18:59:34 +0800 Subject: [PATCH 1/5] add mo tutorial doc in Markdown format The original tutorial link[http://paradiseo.gforge.inria.fr/index.php?n=Doc.Tutorials] is broken. I found the archive from here: https://web.archive.org/web/20210119160107/http://paradiseo.gforge.inria.fr/index.php?n=Doc.Tutorials --- mo/tutorial/Lesson1/README.md | 448 ++++++++++++++++++ mo/tutorial/Lesson1/schemaLS.jpg | Bin 0 -> 30185 bytes mo/tutorial/Lesson2/README.md | 124 +++++ mo/tutorial/Lesson3/README.md | 110 +++++ mo/tutorial/Lesson4/README.md | 67 +++ mo/tutorial/Lesson5/README.md | 64 +++ mo/tutorial/Lesson6/README.md | 250 ++++++++++ .../Lesson6/multimodalFitnessLandscape.jpg | Bin 0 -> 19455 bytes mo/tutorial/Lesson7/README.md | 60 +++ 9 files changed, 1123 insertions(+) create mode 100644 mo/tutorial/Lesson1/README.md create mode 100755 mo/tutorial/Lesson1/schemaLS.jpg create mode 100644 mo/tutorial/Lesson2/README.md create mode 100644 mo/tutorial/Lesson3/README.md create mode 100644 mo/tutorial/Lesson4/README.md create mode 100644 mo/tutorial/Lesson5/README.md create mode 100644 mo/tutorial/Lesson6/README.md create mode 100755 mo/tutorial/Lesson6/multimodalFitnessLandscape.jpg create mode 100644 mo/tutorial/Lesson7/README.md diff --git a/mo/tutorial/Lesson1/README.md b/mo/tutorial/Lesson1/README.md new file mode 100644 index 000000000..466986cd3 --- /dev/null +++ b/mo/tutorial/Lesson1/README.md @@ -0,0 +1,448 @@ +# How to implement your first hill-climber algorithm? +This lesson will let you +* Run your first simple Hill-Climber within MO library +* Learn the main principles of MO +* Browse through the code of these algorithm +* Run other kind of Hill-Climbers: first-improvment, random best, neutral hill-climbers. +* Design your own evaluation functions +* Add your own stopping criteria + +## 1. I want to run my first hill-climber! +If you followed the the Install instructions, all examples would be compiled. If it is not the case, refer to the above instructions. + +You can run your hill-climber. From the "build/mo/tutorial/Lesson1" directory, type: +```shell +./lesson1_simpleHC -V=20 +``` +Great! A very simple hill-climber had solved the oneMax problem (which maximizes the number of ones in the bit string) for the bit strings of size 20. On your output screen, you can see on the first line the random initial solution, and the second line, the final solution which is (I hope) the bit string of size 20 with all ones. For example: +```text +initial: 6 20 00010000011000100101 +final: 20 20 11111111111111111111 +``` +The first number is the fitness of the solution, the second the size of the bit string and following all the bits of the solution. + +## 2. The main principles of MO +In MO a local search is defined by this schema: + +![](./schemaLS.jpg) + +At each iteration, from the current solution: +* Generate neighbors from the neighborhood and evaluate them +* Select a neighbor +* Decide to replace solution by the selected neighbor + +Like in paradisEO-eo, MO separates the representation-dependent part (represention of solution, neighbor, evaluation) from the generic part (the order of neighbors generation, selection, replacement, etc.). + +So, to define a local search, it is necessary to define: +* the solution representation, +* the neighbor representation, +* the evaluation function of a solution, +* the evaluation function of a neighbor, +* the neighborhood (generation of the neighbors) + +If you can define the representation-dependent part of your problem, you can use all local search algorithms from MO (Hill-climbing, simulated annealing, tabu search, iterated local search, variable neighborhood search, and more) and even combined them with evolutionary algorithms ! + +Of course a lot of classical representations, neighborhoods and problems are already defined in MO. They will be explained all along this tutorial. +Let's first have a look on the oneMax problem solved by a simple Hill-Climber algorithm defined as follows: +```text +Choose randomly initial solution x +Do + best <- first neighbor of x + For all y in the neighborhood of x + If (f(y) > f(best)) + best <- y + endif + endfor + If (f(x) < f(best)) + x <- best + continue <- true + else + continue <- false + endif + While continue == true +``` + +The simple HC stops on local optima when no improvement can not be made. + +## 3. Browsing the code + +Now let's have a look on the code. All the elements of the simple HC are already defined in the MO framework, and the code only puts all this bricks together. The code following the previous general principles. It defines the solution and neighbor representation, the solution and neighbor evaluation, the neighborhood, and the local search used. +Please, open the file "mo/tutorial/Lesson1/lesson1_simpleHC.cpp", and follow me in the code: + +### 1. The includes part: + +The general includes for the c++ stdlib streams: +```c++ +#include +#include +#include +#include +#include +``` + +This includes for eo which contains all include files of EO: +```c++ +#include +``` + +The first line to include the bit string representation defined in eo, and the second one to include the bit string neighbor representation. All classical problem-dependent part of MO are defined in the sub-directory "problems". How to define your representation is explained in EO tutorial, and how to design your neighbor will be explain in the next lesson 2. Here just use it. +```c++ +#include +#include +``` + +This includes the evaluation function of a solution (full evaluation), the incremental evaluation of a neighbor for the oneMax problem, and a possible evaluation of neighbor using the full evaluation. You will learn at the end how to define your evaluations. +```c++ +#include +#include +#include +``` + +This neighborhood visits all bit string at Hamming distance 1 in increasing order of bit index from bit 0 to bit vecSize-1. All the neighborhoods are included in the "neighborhood" directory. +```c++ +#include +``` + +Now we can include the simple hill-climbing local search. All local search algorithms are included in the "algo" directory. +```c++ +#include +``` + +### 2. The typedef part: + +EO can apply an evolutionary algorithm on any type of solution. So, all EO classes are parametrized by the type of solutions, and it is useful to use a synonym (with a typedef) of the solution's type. +MO can apply an local search algorithm on any type of solution and neighbor. So, for the same reason, all classes of MO are parametrized by the neighbor's type. In the neighbor class, the solution's type is defined. More precision on the neighbor design will be given in the lesson 2. +Here the solution representation is a bit string and the neighbor representation is related to a bit string solution and Hamming distance 1 (only 1 bit can be flipped), both using an "unsigned int" fitness value. +```c++ +typedef eoBit Indi; +typedef moBitNeighbor Neighbor; +``` + +### 3. Object definition part: + +Follows the main function "main_function" where all useful objects are defined.\\ +First, a code to parse the command line and a file. It gives the value of the random seed and the size of bit string. The lesson 3 of EO tutorial gives more precision on this code. Here we have only to understand that the variables "seed" and "vecSize" are initialized. +```c++ +eoParser parser(argc, argv); + +eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); +parser.processParam( seedParam ); +unsigned seed = seedParam.value(); + +// length of the bit string +eoValueParam vecSizeParam(8, "vecSize", "Genotype size", 'V'); +parser.processParam( vecSizeParam, "Representation" ); +unsigned vecSize = vecSizeParam.value(); +(...) +``` + +To seed the random seed (see lesson 1 of EO tutorial for more precision): +```c++ +rng.reseed(seed); +``` + +The definition the initialization of solutions is not defined is MO but in EO. The "eoInitFixedLength" is a class that makes a random intialization of bit string of a given length. Each bit is true with 1/2 rate. You can see the lesson 1 of EO tutorial lesson 1 for more precision. +```c++ +eoUniformGenerator uGen; +eoInitFixedLength random(vecSize, uGen); +``` + +The fitness function of the oneMax problem is the number of 1 in the bit string. It is already defined in MO: +```c++ +oneMaxFullEval fullEval; +``` + +A neighbor is not necessary a modified copy of the solution. But often a neighbor defines how to move, i.e. how to modify a solution to compute the neighbor. For example, for the bit string, a neighbor indicates which bit is flipped. +In the same way, it is often possible to define the incremental evaluation of a neighbor knowing the modification (the move). +The incremental evaluation for the oneMax problem is already defined and adds +1 or -1 at the fitness value according to the flipped bit. +```c++ +moOneMaxIncrEval neighborEval; +``` + +When the incremental evaluation can not be defined. The neighbor can be evaluated with the full evaluation. First the solution is modified on the neighbor, than the full evaluation is computed on it and then the solution is move back. This is done by the class "moFullEvalByModif". If you want you to test it comment the line with moOneMaxIncrEval and uncomment the line with moFullEvalByCopy: +```c++ +// moFullEvalByModif neighborEval(fullEval); +``` + +For the simple hill-climbing, all the neighbors are explored in increasing order of their bit flip. So, you can use the class "moOrderNeighborhood" where the size of the neighborhood has to be precise in the constructor: +```c++ +moOrderNeighborhood neighborhood(vecSize); +``` + +All representation-dependent part is now defined, so the simple Hill-Climbing can be defined. The constructor needs the neighborhood, the solution and neighbor evaluations. The solution and neighbor representation are defined by the template of the class: +```c++ +moSimpleHC hc(neighborhood, fullEval, neighborEval); + +``` + +### 4. The execution of hill-climbing part: + +Always in the "main_function" function, it is the execution part. +In MO, the local search algorithm never initializes the solution. It must be made outside the local search algorithm. This allows to combine local search algorithms with evolutionary algorithms or with others local search algorithms. +Now apply your local search on the solution as follows: +```c++ +// The current solution +Indi solution; + +// random initialization +random(solution); + +// Evaluation of the intial solution: +// can be evaluated here, or else it will be done at the beginning of the local search +fullEval(solution); + +// output: the initial solution +std::cout << "initial: " << solution << std::endl ; + +// apply the local search on the solution ! +hc(solution); + +// output: the final solution +std::cout << "final: " << solution << std::endl ; +``` + +The main line is "hc(solution)" which apply the local search on the solution. +Easy, isn't it? + +## 4. Others hill-climbing algorithms + +You may think that the simple hill-climbing is not the hill-climbing you need because you don't want to explore all the neighborhood or because there is several solutions with the same fitness value. + +You may want to implement the first improvement hill-climbing defined as follows: +```text +Choose randomly initial solution x +Do + y <- not visited random neighbor of x + If (f(x) < f(y)) + x <- y + else + y.visited <- true + endif + While number of non visited neighbor of x > 0 +``` + +In the first improvement HC, if the fitness of a random neighbor is higher than the current fitness, the neighbor is selected. And this hill-climber stops on local optima when no more fitness improvement can be made in the neighborhood. + +To implement the first improvement HC, you have to change only 2 lines in the previous code. +The one to change the neighborhood generation: +```c++ +moRndWithoutReplNeighborhood neighborhood(vecSize); +``` +In this neighborhood, the neighbors are generated in an randomly order (not from 0 to vecSize-1) without replacement which means that the neighbors are generated only once. + +And of course, the other one to change the local search algorithm: +```c++ +moFirstImprHC hc(neighborhood, fullEval, neighborEval); +``` + +The corresponding include files have to be changed too. See and run the code "mo/tutorial/Lesson1/lesson1_firstImprHC.cpp". + +For a hill-climbing which takes care on the solutions with equal fitness value such as this one: +```text +Choose randomly initial solution x +Do + bestVect <- [ first neighbor of x ] + For all y in the neighborhood of x + If (f(y) > f(bestVect.first)) + bestVect <- [ y ] + else if (f(y) == f(bestVect.first) and y != bestVect.first) + bestVect.push_back(y) + endif + endfor + If (f(x) < f(bestVect.first)) + x <- choose randomly a solution from bestVect + continue <- true + else + continue <- false + endif + While continue == true +``` + +You only have to change the local search algorithm by (see the code in mo/tutorial/Lesson1/lesson1_randomBestHC.cpp) : +```c++ +moRandomBestHC hc(neighborhood, fullEval, neighborEval); +``` + +Easy, isn't it? + +And if you don't want that your hill-climber stops if there is some solution with the same fitness in the neighborhood like this: +```text +nbStep <- 0 +Choose randomly initial solution x +Do + bestVect <- [ first neighbor of x ] + For all y in the neighborhood of x + If (f(y) > f(bestVect.first)) + bestVect <- [ y ] + else if (f(y) == f(bestVect.first)) + bestVect.push_back(y) + endif + endfor + If (f(x) <= f(bestVect.first)) + x <- choose randomly a solution from bestVect + continue <- true + else + continue <- false + endif + nbStep <- nbStep + 1 + While continue == true and nbStep > nbStepMax +``` + +This hill-climber stops on strict local optima, but not plateau which are local optima. So, another parameter is need to stop the algorithm (nbStepMax). Then you only have to change the local search algorithm by (see the code in Lesson1/lesson1_neutralHC.cpp) : +```c++ +moNeutralHC hc(neighborhood, fullEval, neighborEval, nbStepMax); +``` + +Easy, isn't it? + +## 5. Define your evaluation + +### 1. Evaluation of solutions: +You can learn to define your fitness function in the EO tutorial lesson 1. But let's me shortly explain how to do. +You have to define a class inherited from the "eoEvalFunc". For example, the oneMaxFullEval is defined as follows: +```c++ +#include +template< class EOT > +class oneMaxFullEval : public eoEvalFunc +{ +public: + + /** + * Count the number of 1 in a bitString + * @param _sol the solution to evaluate + */ + void operator() (EOT& _solution) { + unsigned int sum = 0; + for (unsigned int i = 0; i < _solution.size(); i++) + sum += _solution[i]; + _solution.fitness(sum); + } +}; +``` + +The file "eoEvalFunc.h" must be included at the begining. The class "oneMaxFullEval" inherits from the "eoEvalFunc" class. Like all class in EO, the classes are templatized by the solution type "EOT". +EO uses a functor style: the fitness function is computed in the method "operator()(EOT& _sol)". Do what you want to compute the fitness value in this method, and puts the fitness value in the solution at the end by using its method "fitness": +```c++ +_solution.fitness( fitnessValue ); +``` + +The "eoBit" class is vector of boolean. The size of the vector is obtained by the method "size()": +```c++ +_solution.size() +``` +and the value of the ith bit is given by the classical method "operator[]": +```c++ +_solution[i] +``` +The fitness value of a solution can be obtained with the method "fitness()": +```c++ +_solution.fitness() +``` + +### 2. Evaluation of neighbors: +MO uses the same idea to evaluate a neighbor. You have to define a class which inherits from "moEval" class. For example, the oneMaxIncrEval is defined as follows: +```c++ +#include +template< class Neighbor > +class moOneMaxIncrEval : public moEval +{ +public: + + typedef typename Neighbor::EOT EOT; + + /* + * incremental evaluation of the neighbor for the oneMax problem + * @param _solution the solution to move (bit string) + * @param _neighbor the neighbor to consider (of type moBitNeigbor) + */ + virtual void operator()(EOT & _solution, Neighbor & _neighbor) { + if (_solution[_neighbor.index()] == 0) + _neighbor.fitness(_solution.fitness() + 1); + else + _neighbor.fitness(_solution.fitness() - 1); + } +}; + +``` + +The file "moEval.h" must be included at the begining. All class to define evalutation function are in the "eval" directory of MO. The class "oneMaxIncrEval" inherits from the "moEval" class. Like all class in MO, the classes are templatized by the neighbor's type "Neighbor". +A typedef is defined to easily have access to the solution type "EOT". The solution type is the type "EOT" in the class of Neighbor: +```c++ +typedef typename Neighbor::EOT EOT; +``` + +MO also uses a functor style: the evaluation function is computed in the method "operator()(EOT& _solution, Neighbor & _neighbor)" which depends on the current solution and its neighbor to consider. Do what you want to compute the fitness value of the neighbor in this method, and puts the fitness value in the neighbor by using its method "fitness": +```c++ +_neighbor.fitness( fitnessValue ); +``` + +The "moBitNeighbor" has a method "index()" which gives the number of flipped bit. When the flipped bit of the solution is set to "0" the number of 1 in the neighbor is increased by one, and decreased by one otherwise. +When it is possible the incremental evaluation of neighbor gives a better complexity. For example the full evaluation needs vecSize comparisons, and the incremental evaluation only one comparison. +This prototypical example helps you to define your own solution and neighbor evaluations ! + +### 6. Use your stopping criteria + +All local search algorithms have their own stopping criteria, but it is possible to add other stopping criteria. The predefined stopping criteria you can add are: +* stop on the number of iterations +* stop on the number of full evaluation +* stop on the number of neighbor evaluation +* stop on the fitness value reached +* stop on a time limit + +All criteria inherit from the class "moContinuator" in the directory "continuator". To use one of them, you have to include the correct file, to define your object from the class and add the continuator to the local search constructor. +For example, to add a maximum number of iteration to your simple hill-climber. First include the correct file: +```c++ +#include +``` + +Define an object from the class: +```c++ +moIterContinuator continuator(iterMax); +``` + +And add the continuator in the constructor of the HC: +```c++ +moSimpleHC hc(neighborhood, fullEval, neighborEval, continuator); +``` + +Examples on all continuators are given in the source codes "lesson1_iterContinuator.cpp", "lesson1_fitContinuator.cpp", "lesson1_fullevalContinuator.cpp", "lesson1_evalContinuator.cpp". + +It is also possible to combine several continuators with the class "moCombinedContinuator.h" as follows: +```c++ +moIterContinuator iterCont(iterMax); +moFitContinuator fitCont(fitnessMax); +moFullEvalContinuator fullevalCont(fullEval, fullevalMax); +moNeighborEvalContinuator evalCont(neighborEval, evalMax); + +moCombinedContinuator continuator(iterCont); +continuator.add(fitCont); +continuator.add(fullevalCont); +continuator.add(evalCont); +``` + +The local search stops when one of the continuators is false. +Easy, isn't it? + +Of course, you can define your own continuator. You must inherit your own class from the "moContinuator" class. Then 2 methods must be defined: +* the test method: + ```c++ + virtual bool operator()(EOT & _solution) + ``` + + The returned value is true when the local search can continue for the next iteration, and false otherwise. + +* the intialisation method: + ```c++ + virtual void init(EOT & _solution) + ``` + Something you want to initialize before starting the local search (for example a counter). + The predefined continuator can help you to define your own continuator. Have fun now! + +## 7. Exercices + +1. Define the evaluation function and the incremental evaluation of the Royal Road problem. And run a first-improvement hill-climber on it! + + The Royal Road is defined in this paper: + "[The Royal Road for Genetic Algorithms: Fitness Landscapes and GA Performance](http://web.cecs.pdx.edu/~mm/handbook-of-ec-rr.pdf)" Mitchell, Forerest, Holland. + +2. Define the evaluation function and the incremental evaluation of the MAX-SAT problem. And run a first-improvement hill-climber on it! \ No newline at end of file diff --git a/mo/tutorial/Lesson1/schemaLS.jpg b/mo/tutorial/Lesson1/schemaLS.jpg new file mode 100755 index 0000000000000000000000000000000000000000..701b9dc7f855c517e2468ba19164aec92f0a8efb GIT binary patch literal 30185 zcmb@tQ*F?e<#(6vE;lEW6 zYt*P(v+AKnVa>TdS3iFPkU`>7;s6K;2!Q0j3i#Xri2T?3AC><={zm}+Ie+#6P~ZUb z5MxjfBmhVh2q+YY&p`ko00IC70f2=1x8VP;z`-NH!hC^({tEfu05)U*;0qK00vZw$ z0tyNW2JmkzG|U%R00bO73Mv{p0tS#6lZ2ERi;R^;$N-yL*rn~C7v4WO2$=tk`41Wz z>Yo=J1mwS7K9ql*00<~ZXlN*Cgn!cm{!IY+AL>6uVmNeWAq)~l15y?TAZC0%tFVZ& zp`(97{U4)%f}78Ez_di0`ck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UKF zCSc27QGm6)FfNP)?L}J`Um9*C3=7R5E*WSo(V@DhbD7e(-b#F$TuqyJ`RK0pQSiHm z)G4XbWxGi8iT>xp3hm5Ut4sI>kgEIg8eVk8Nya3EoioA&nL?oGxdR6DgzZk*3rdWII2OYy_^P85*mo z283QS)U4LDU*RIXXRE_7g-JO?DI{Zv-ZjmEfR)to=*na{vP~Jeq@%aU)cdA*aHB)} zR!KO;%x3hS69H?AZp_qxgSg-@o?i@^D@BfMP4JX_a{B}Ya_6icYvZcW_(sL(6FaJm z{sHI`1uB3SWI?V*r~Bo%Q4?Q{NruL6V&CDWqEftF+DC`@tTRa-LzbPFM1#H;_6a8| z&-lWmcN_6FJ0X7W^xb~a&1_>Wwg;{|3_-_|H(a3|IfB5{C_L| E3-^Z@egFUf literal 0 HcmV?d00001 diff --git a/mo/tutorial/Lesson2/README.md b/mo/tutorial/Lesson2/README.md new file mode 100644 index 000000000..8d5d8aba0 --- /dev/null +++ b/mo/tutorial/Lesson2/README.md @@ -0,0 +1,124 @@ +# How to implement and use neighborhoods +In this lesson, you will learn how to implement a neighbor, neighborhood and the evaluation function. Two ways will be show, one generic and one using an indexed neighborhoods. As an example, it will be illustrated on the Queens problem. + +1. Classical neighborhoods (example with a swap operator) +2. Indexed neighbordhoods (example with a shift operator) +3. Evaluation of neighbors +4. Exercise + +## 1. Classical neighborhoods (example with a swap operator) + +### Implementation +To implement a neighborhood for your problem, you must have a class that inherits from "moNeighborhood" and a class that inherits from "moNeighbor" for the corresponding neighbors. As a consequence, in the neighborhood class, you have to implement the following methods: + +hasNeighbor (test if there is at least one valid neighbor) +init (init the first neighbor) +cont (test if there is again a valid neighbor) +next (compute the next valid neighbor) +And in the neighbor class: + +move (how to apply the move corresponding to the neighbor on a solution) +### Example +In the "paradiseo-mo/src/problems/permutation" directory, classical neighborhood and neighbor for swap operator (moSwapNeighborhood.h and moSwapNeighbor.h) are defined. Some methods are specific to the swap operator and you can see a "move_back" methods that is explained at the end of this tutorial. + +In "mo/tutorial/Lesson2" directory, open the source file "testNeighborhood.cpp". You can see how to use this first neighborhood... + +After inclusion, useful types are defined for more lisibility: + +Define type of representation +```c++ +typedef eoInt Queen; +``` +Define type of a swap neighbor +```c++ +typedef moSwapNeighbor swapNeighbor; +``` +Define type of the swap neighborhood +```c++ +typedef moSwapNeighborhood swapNeighborhood; +``` +And in the "main" fonction, a neighborhood, a solution and a neighbor are declared: +```c++ +swapNeighborhood swapNH; +Queen solution; +swapNeighbor n1; +``` + +Then they are used to explore and print all the neighbors of the neighborhood for a Queen problem of size 8 (swapEval is the evaluation function declared previously) +```c++ +swapNH.init(solution, n1); +swapEval(solution,n1); +n1.print(); +while(swapNH.cont(solution)){ + swapNH.next(solution, n1); + swapEval(solution,n1); + n1.print(); +} +``` + +You can run the executable on the lesson 2 directory and see the output (the beginning). + +## 2. Indexed neighbordhoods (example with a shift operator) + +### Implementation +Three indexed neighborhoods are already defined in Paradiseo-MO. To use them you have to know the size of your neighborhoods and define a mapping that associates a neighbor from a known key, in your class neighbor. This neighbor must inherit from "moIndexNeighbor". + +### Example +In the mo/src/problems/permutation" directory, a neighbor for shift operator (moShiftNeighbor.h) is defined. In this class, the mapping is done in the method "translate". + +After inclusion useful types are defined for more lisibility: + +Define type of a shift neighbor +```c++ +typedef moShiftNeighbor shiftNeighbor; +``` +Define three different indexed neighborhoods for shift operator +```c++ +typedef moOrderNeighborhood orderShiftNeighborhood; +typedef moRndWithoutReplNeighborhood rndWithoutReplShiftNeighborhood; +typedef moRndWithReplNeighborhood rndWithReplShiftNeighborhood; +``` + +And in the "main" fonction, a shift neighbor and the three indexed neighborhoods are declared: +```c++ +shiftNeighbor n2; +orderShiftNeighborhood orderShiftNH(pow(vecSize-1, 2)); +rndWithoutReplShiftNeighborhood rndNoReplShiftNH(pow(vecSize-1, 2)); +rndWithReplShiftNeighborhood rndReplShiftNH(pow(vecSize-1, 2)); +``` + +Exploration of the neighborhoods is done like with a classical neighborhood. + +You can run the executable on the lesson 2 directory and see the output. + +## 3. Evaluation of neighbors + +There are three ways to evaluate a neighbor: + +1. Incremental evaluation +2. Full evaluation by modification +3. Full evaluation by copy + +In terms of performance, it is more efficient to use incremental evaluation and if it cannot be defined, full evaluation by modification is better than that one by copy. + +### Incremental evaluation +To implement an incremental evaluation, you have to create a class which inherits of "**moEval**". So you have to define the method: +```c++ +void operator()(EOT&, Neighbor&){ ... } +``` +EOT and Neighbor are respectively the templates for a solution and a neighbor. + +### Full evaluation +The two full evaluations are already defined in Paradiseo-MO. The full evaluation by modification applies the move on the initial solution, evaluates the obtained solution and affects the fitness value to the neighbor. Then the "moveBack" is applied to come back to the initial solution. On the other hand, the full evaluation by copy applies the move on a temporary copy of the solution, evaluates it and affects the fitness value to the neighbor. + +To use these evaluations, you need your classical full evaluation function ("eoEvalFunc") in the constructors: +```c++ +moFullEvalByCopy(eoEvalFunc& _eval) +moFullEvalByModif(eoEvalFunc& _eval) +``` + +Be carefull, if you want to use the class "moFullEvalByModif", your neighbor must be "backable" and so it has to inherit of the class "**moBackableNeighbor**" and consequently to have a method "moveBack". + +## 4. Exercise + +Try to define an indexed swap neighbor like in the file "moShiftNeighbor.h". Then explore and print the neighborhood randomly. \ No newline at end of file diff --git a/mo/tutorial/Lesson3/README.md b/mo/tutorial/Lesson3/README.md new file mode 100644 index 000000000..ea68ad686 --- /dev/null +++ b/mo/tutorial/Lesson3/README.md @@ -0,0 +1,110 @@ +# Lesson3 - How to use Simulated Annealing and Checkpointing +In this lesson, a simple simulated annealing is presented, using an order neighborhood based on a shift operator, to solve the Queen problem. Then, a checkpoint will be used to save some informations during the search. + +1. Simulating Annealing on the Queen problem. +2. Checkpointing +3. Avalaible statistics in MO +4. Exercise + +## 1. Simulating Annealing (example on the Queen problem) + +First you have to define the representation of a Queen, how to initialize and evaluate it. So you have to declare three classes: +```c++ +queenFullEval fullEval; +eoInitPermutation init(vecSize); +Queen solution1; +``` + +Then, you have to ramdomly intialize and evaluate the solution: +```c++ +init(solution1); +fullEval(solution1); +``` + +Let see the most simple constructor of a Simulated Annealing (in algo/moSA.h). You need three parameters: +* a neighborhood +* a full evaluation function (declared before) +* a neighbor's evaluation function +```c++ +moFullEvalByCopy shiftEval(fullEval); +rndShiftNeighborhood rndShiftNH(pow(vecSize-1, 2)); +``` + +You can now declare the Simulated Annealing: +```c++ +moSA localSearch1(rndShiftNH, fullEval, shiftEval); +``` +This simple constructor uses by default three components: +* moSimpleCoolingSchedule (with default parameters) +* moSolNeighborComparator +* moTrueContinuator + +More flexible constructors exist in which you can change these components. In the following, the "moTrueContinuator" is replaced by a "moCheckpoint". + +You can try this first algorithm with different problem sizes (use parameter file or the option --vecSize=X on command line to execute "testSimulatedAnnealing"). It prints the initial and final solution1. + +## 2. Checkpointing (example on the Queen problem) + +The class "moCheckpoint" inherits of the abstract class "moContinuator" and allows to incorporate one or many "moContinuator" classes (Composite pattern). It also allows to incorporate many "eoMonitor", "eoUpdater" and "moStatBase" classes. + +Here, an example of checkpointing is presented, including: +* a continuator returning always true (moTrueContinuator) +* a monitor saving information in a file (eoFileMonitor) +* an updater using the file monitor with a determinated frequency (moCounterMonitorSaver) +* a very simple statistical operator giving only the fitness of the current solution (moFitnessStat) + +First, you have to define the "moTrueContinuator" and build the "moCheckpoint": +```c++ +moTrueContinuator continuator; +moCheckpoint checkpoint(continuator); +``` + +Then, create the "moFitnessStat" and add it in the checkpoint: +```c++ +moFitnessStat fitStat; +checkpoint.add(fitStat); +``` + +Finally, create the "eoFileMonitor" to write fitness values in the file fitness.out and the "moCounterMonitorSaver" to use the file monitor only for each 100 iterations. +```c++ +eoFileMonitor monitor("fitness.out", ""); +moCounterMonitorSaver countMon(100, monitor); +checkpoint.add(countMon); +monitor.add(fitStat); +``` + +So you can create a Simulated Annealing with this checkpoint: +```c++ +moSA localSearch2(rndShiftNH, fullEval, shiftEval, coolingSchedule, solComparator, checkpoint); +``` + +Try this second algorithm with different problem sizes (use parameter file or the option --vecSize=X on command line to execute "testSimulatedAnnealing"). It prints the initial and final solution2 and you can see the evolution of fitness values in the file fitness.out (only 1 value each 100 iterations). + +## 3. Avalaible statistics + +A lot of statistics are avalaible to have informations during the search: + +* moCounterStat +* moMinusOneCounterStat +* moStatFromStat +* moFitnessStat +* moNbInfNeighborStat +* moNbSupNeighborStat +* moNeutralDegreeNeighborStat +* moSizeNeighborStat +* moNeighborhoodStat +* moDistanceStat +* moSolutionStat +* moBestSoFarStat +* moSecondMomentNeighborStat +* moMaxNeighborStat +* moMinNeighborStat +* moNeighborBestStat +* moNeighborFitnessStat +* moAverageFitnessNeighborStat +* moStdFitnessNeighborStat + +## 4. Exercise + +1. Try to add the cooling schedule parameters into the parameters file. Then, try the simulated annealing with different parameters to see theirs impacts on the search. +2. Add an existed operator (in continuator directory) to print the solution each 100 iterations. \ No newline at end of file diff --git a/mo/tutorial/Lesson4/README.md b/mo/tutorial/Lesson4/README.md new file mode 100644 index 000000000..c416fbd1a --- /dev/null +++ b/mo/tutorial/Lesson4/README.md @@ -0,0 +1,67 @@ +# How to use Tabu Search +In this lesson, a simple tabu search is presented, using an order neighborhood based on a shift operator, to solve the Queen problem. +1. Tabu Search on the Queen problem. +2. Exercise + +## 1. Tabu Search (example on the Queen problem) + +First you have to define the representation of a Queen, how to initialize and how to evaluate it. So you have to declare three classes: +```c++ +queenFullEval fullEval; +eoInitPermutation init(vecSize); +Queen sol1; +``` + +Then, you have to ramdomly intialize a solution: +```c++ +init(sol1); +fullEval(sol1); +``` + +Let see the most simple constructor of a Tabu Search (in mo/src/algo/moTS.h). You need five parameters: + +* a neighborhood +```c++ +orderShiftNeighborhood orderShiftNH(pow(vecSize-1, 2)); +``` +* a full evaluation function (declared before) +* a neighbor evaluation function* +```c++ +moFullEvalByCopy shiftEval(fullEval); +``` +* a time limit for the search (in seconds) +* a size for the tabu list + +You can now declare the Tabu Search: +```c++ +moTS localSearch1(orderShiftNH, fullEval, shiftEval, 2, 7); +// 2 is the time limit, 7 is the size of the tabu List +``` + +This simple constructor uses by default seven components: +* moTimeContinuator +* moNeighborComparator +* moSolNeighborComparator +* moNeighborVectorTabuList +* moDummyIntensification +* moDummyDiversification +* moBestImprAspiration + +More flexible constructors exist as you can change these components: +```c++ +moNeighborVectorTabuList tl(sizeTabuList,0); +moTS localSearch2(orderShiftNH, fullEval, shiftEval, 3, tl); +// 3 is the time limit +``` +In this one, the tabuList has been specified. +```c++ +moTS localSearch3(orderShiftNH, fullEval, shiftEval, + comparator, solComparator, continuator, tl, inten, div, asp); +``` +In this one, comparators, continuator, tabu list, intensification strategy, diversification strategy and aspiration criteria have been specified. + +You can test these three algorithms by changing problem sizes, time limit and the size of tabu list (use parameters file or the option --vecSize=X, --timeLimit=Y and --sizeTabuList=Z on command line to execute "testSimpleTS"). It prints the initial and final solutions. + +## 2. Exercise + +1. Try to implement and use a diversification strategy in 'testSimpleTS". You can also use a predifined strategy: moMonOpDiversification (in "memory" directory) \ No newline at end of file diff --git a/mo/tutorial/Lesson5/README.md b/mo/tutorial/Lesson5/README.md new file mode 100644 index 000000000..8a684df71 --- /dev/null +++ b/mo/tutorial/Lesson5/README.md @@ -0,0 +1,64 @@ +# How to use Iterated Local Search +In this lesson, an Iterated Local Search is presented. The Tabu Search of the Lesson 4 is used with an order neighborhood based on a shift operator, to solve the Queen problem. + +1. Iterated Tabu Search on the Queen problem. +2. Exercise + +## 1. Iterated Tabu Search (example on the Queen problem) + +As in Lesson 4, you have to define a Solution, the method to initialize and evaluate it. Then you have to define a Tabu Search. + +Declaration of the Tabu Search: +```c++ +moTS ts(orderShiftNH, fullEval, shiftEval, 1, 7); +``` + +To use a simple Iterated Local Search, a mutation operator is needed. So the swap mutation defined in EO is used: +```c++ +eoSwapMutation mut; +``` + +Now, a simple Iterated Tabu Search can be declared as follow: +```c++ +moILS localSearch1(ts, fullEval, mut, 3); +``` +This constructor has got 4 parameters: +1. a local search (ts) +2. a full evaluation function (fullEval) +3. a mutation operator (mut) +4. a number of iterations (3) + +**localSearch1** performs the Tabu Search 3 times. The first solution of each iteration(except the first one) is obtained by applying the mutation operator on the last visited solution. + +A constructor allows to specify the continuator. **_Be carefull_**, the continuator must be templatized by a "moDummyNeighbor": +```c++ +moIterContinuator > cont(4, false); +``` +The explorer of the Iterated local search don't use its own neighborhood. Here, the neighborhood of the Tabu Search is used. But to respect the conception, we create a "moDummyNeighbor" using as template for Iterated Local Search. + +An Iterated Tabu Search with this continuator can be declared as: +```c++ +moILS localSearch2(ts, fullEval, mut, cont); +``` + +A general constructor is available allowing to specify the perturbation operator and the acceptance criteria. First, you have to declare a perturbation operator: +```c++ +moMonOpPerturb perturb(mut, fullEval); +``` +And, the acceptance criteria: +```c++ +moSolComparator solComp; +moBetterAcceptCrit accept(solComp); +``` +Finally, the Iterated Local Search can be declared as: +```c++ +moILS localSearch3(ts, fullEval, cont, perturb, accept); +``` + +You can test these three algorithms by changing problem sizes(use parameter file or the option --vecSize=X on command line to execute "testILS"). It prints the initial and the final solutions. + +## 2. Exercise + +* Try to implement an Iterated Hill Climbing on the Queen problem with these caracteristics: + 1. Hill Climbing with a "moShiftNeighborhood" and a "moTrueContinuator" + 2. Iterated Local Search using a "moIterContinuator" and a "moNeighborhoodPerturb" with a "moSwapNeighborhood". \ No newline at end of file diff --git a/mo/tutorial/Lesson6/README.md b/mo/tutorial/Lesson6/README.md new file mode 100644 index 000000000..e8f4ba747 --- /dev/null +++ b/mo/tutorial/Lesson6/README.md @@ -0,0 +1,250 @@ +# How to perform a fitness analysis? + +![](multimodalFitnessLandscape.jpg) + +A lot of tools to perform the fitness landscapes analysis are defined in paradisEO-MO: +* Density Of States +* Fitness Distance Correlation +* Autocorrelation length and autocorrelation functions +* Sampling the local optima by adaptive walks +* Neutral degree distribution +* Evolvability of neutral networks by neutral walks +* Fitness Cloud + +With the same code (and effort ;-) ), you can make an apriori study of your problem with fitness landscapes analysis and use efficient solution-based metaheuristics. You can also make an aposteriori fitness landscapes analysis of your problem to explain why your metaheuristics works or not. + +This lesson will let you: +* Use the fitness analysis tools of MO library +* Learn to perform your own fitness landscapes analysis + +In lesson 1, you have learnt to define the fitness function. In lesson 2, you have learn to define a neighbor and a neighborhoods. This lesson will used those previous lessons. + +This tutorial is made to learn how to perform a fitness landscapes analysis with paradisEO-MO. It is not a course to learn fitness landscapes analysis. You can find some information about fitness landscapes analysis here: [tutorial GECCO 09 (pdf)](http://www.i3s.unice.fr/~verel/talks/tutorialFitnessLandscapes_gecco2009.pdf) or [tutorial WCCI-CEC 10 (pdf)](http://www.i3s.unice.fr/~verel/talks/tutorialCEC2010.pdf) + +## 1. I want to compute the Fitness Distance Correlation (FDC)! + +You can compute the FDC. From the "paradiseo-mo/build/tutorial/Lesson6" directory, type: +```shell +./fdc -V=20 -n=500 +``` + +Great! You have sample fitness and distance to global optimum of 500 random solutions on the oneMax problem (which maximizes the number of ones in the bit string) for the bit strings of size 20. On your output screen, you can see the fitness and distance of the first and last solution of the sample. For example: +```text +First values: +Fitness 8 +Distance 12 +Last values: +Fitness 6 +Distance 14 +``` + +In the file "out.dat", you have all the sample. First column is the fitness and the second column is the distance to global optimum of the 500 solutions. + +After you can compute the correlation coefficient with your best statistical software such as R (with this small script) or excel with this help (import data and correlation) or with this small awk script. + +I found -1 with my sample which means that it is very easy function, isn't it? + +## 2. The main principles of fitness landscapes analysis with MO + +The fitness landscapes analysis is based on a sampling of the search space. During this sampling, data are collected, and then some statistics can be computed to deduce the structure of the search space. + +The class to define a sampling is moSampling in the directory mo/src/sampling. All classes of the standard tools of fitness landscapes analysis inherit from this class (see documentation): +* moDensityOfStatesSampling : density of states (distribution of fitness values) +* moAutocorrelationSampling : autocorrelation length and functions +* moFDCsampling : fitness distance correlation +* moHillClimberSampling : adaptive walks +* moNeutralDegreeSampling : neutral degree +* moNeutralWalkSampling : evolvability of neutral networks +* moFitnessCloudSampling : evolvability of the operator, and the neighborhood + +The constructor of moSampling is: +```c++ +moSampling (eoInit< EOT > &_init, moLocalSearch< Neighbor > &_localSearch, moStat< EOT, ValueType > &_stat, bool _monitoring=true) +``` + +As usual in paradiseo, EOT is the typedef of the solution, and Neighbor is the typedef of the neighbor (see lesson 1). This constructor needs an initialization methods (see tutorial on paradiseo-eo), a local search which perform the sampling of the search space (see previous lessons to define it), and a object which able to compute a statistic. At each iteration of the local search, the given statistic is computed, and is saved if boolean monitoring is true. + +The statistics inherit from the class moStat. The include file can be found in mo/src/continuator directory. The pre-defined statistics are: +* moFitnessStat : the fitness of the current solution +* moDistanceStat : the distance between the current solution and a given solution +* moSolutionStat : the current solution +* moCounterStat : the number of iterations +* moBestSoFarStat : the best current solution found +* moNeighborBestStat : best fitness over k neighbors +* moNeighborhoodStat : to compute the statistics from the neighbors solutions : + * moAverageFitnessNeighborStat : average fitness in the neighborhood + * moStdFitnessNeighborStat : standard deviation of fitness + * moMaxNeighborStat : maximum fitness + * moMinNeighborStat : minimum fitness + * moSecondMomentNeighborStat : average and standard deviation + * moSizeNeighborStat : size of the neighborhood + * moNeutralDegreeNeighborStat : number of neighbors with equal fitness + * moNbInfNeighborStat : number of neighbors with lower fitness + * moNbSupNeighborStat : number of neighbor with higher fitness + +All those statistics can be used in the sampling. Of course you can define your own statistic class. Several statistics can be collected at each iteration: use the method add of the class moSampling to collect another statistic. + +For standard tools of fitness landscapes analysis, there is no need to give the sampling method, and the statistics objects. You only have to give which is specific to your problem such as the initialization method, the fitness function, the neighborhood, or the evaluation function of a neighbor. + +## 3. Browsing the code + +Please, open the file "mo/tutorial/Lesson6/fdc.cpp", and follow me in the code: + +### 1. The includes part: + +The general includes for the c++ stdlib streams: +```c++ +#include +#include +#include +#include +#include +``` + +This includes for eo which contains all include files of EO: +```c++ +#include +``` + +The first line to include the bit string representation defined in eo, and the second one to include the bit string neighbor representation. All classical problem-dependent part of MO are defined in the sub-directory "problems". How to define your representation is explained in EO tutorial, and how to design your neighbor is explained in the lesson 2. Here just use it. +```c++ +#include +#include +``` + +This includes the evaluation function of a solution (full evaluation). There is no evaluation function for the neighbor because there is no need in FDC. Some others tools such as autocorrelation neighbor evaluation is defined such as the lesson 1. +```c++ +#include +``` + +The fitness distance correlation is the correlation between the fitness of solution and the distance to global optimum (or at least to some best known solution). So, this include file uses the Hamming distance. +```c++ +#include +``` + +Now we can include the FDC tool. +```c++ +#include +``` + +### 2. The typedef part: + +EO can apply an evolutionary algorithm on any type of solution. So, all EO classes are parametrized by the type of solutions, and it is useful to use a synonym (with a typedef) of the solution's type. +MO can apply an local search algorithm on any type of solution and neighbor. So, for the same reason, all classes of MO are parametrized by the neighbor's type. In the neighbor class, the solution's type is defined. More precision on the neighbor design will be given in the lesson 2. +Here the solution representation is a bit string and the neighbor representation is related to a bit string solution and Hamming distance 1 (only 1 bit can be flipped), both using an "unsigned int" fitness value. +```c++ +typedef eoBit Indi; +typedef moBitNeighbor Neighbor; +``` + +### 3. Object definition part: + +Follows the main function "main_function" where all useful objects are defined.\\ +First, a code to parse the command line and a file. It gives the value of the random seed and the size of bit string. The lesson 3 of EO tutorial gives more precision on this code. Here we have only to understand that the variables "seed" and "vecSize" are initialized. +```c++ +eoParser parser(argc, argv); + +eoValueParam seedParam(time(0), "seed", "Random number seed", 'S'); +parser.processParam( seedParam ); +unsigned seed = seedParam.value(); + +// length of the bit string +eoValueParam vecSizeParam(20, "vecSize", "Genotype size", 'V'); +parser.processParam( vecSizeParam, "Representation" ); +unsigned vecSize = vecSizeParam.value(); + +// the number of solution sampled +eoValueParam solParam(100, "nbSol", "Number of random solution", 'n'); +parser.processParam( solParam, "Representation" ); +unsigned nbSol = solParam.value(); + +// the name of the output file +string str_out = "out.dat"; // default value +eoValueParam outParam(str_out.c_str(), "out", "Output file of the sampling", 'o'); +``` + +To seed the random seed (see lesson 1 of EO tutorial for more precision): +```c++ +rng.reseed(seed); +``` + +The definition the initialization of solutions is not defined is MO but in EO. The "eoInitFixedLength" is a class that makes a random intialization of bit string of a given length. Each bit is true with 1/2 rate. You can see the lesson 1 of EO tutorial lesson 1 for more precision. +```c++ +eoUniformGenerator uGen; +eoInitFixedLength random(vecSize, uGen); +``` + +The fitness function of the oneMax problem is the number of 1 in the bit string. It is already defined in MO: +```c++ +oneMaxFullEval fullEval; +``` + +The distance used is the classical Hamming distance: +```c++ +eoHammingDistance distance; +``` + +For this analysis, the best solution is needed: the solution with all 1s. +```c++ +Indi bestSolution(vecSize, true); // global optimum +``` + +All representation-dependent part is now defined, so the FDC sampling can be defined. The constructor needs the initialization, the fitness function, the distance used, the reference solution, and the size of the sample: +```c++ +moFDCsampling sampling(random, fullEval, distance, bestSolution, nbSol); +``` + +### 4. The execution of sampling part: + +Now apply your sampling as follows: +```c++ +sampling(); +``` + +This sampling uses the initialization method to define a pure random search, and at each iteration the fitness and the distance are computed. + +4. The export part: + +To export your sample into a file: +```c++ +sampling.fileExport(str_out); +``` + +The first column of the file is the fitness and the second the distance from the global optimum. + +Maybe you may want to read the data from your c++ code. So it is possible to export the data into a vector: +```c++ +const std::vector & fitnessValues = sampling.getValues(0); +const std::vector & distValues = sampling.getValues(1); +``` + +Note that the indexes of the statistics (here 0 and 1) are in the same order of the declaration with the constructor and the "add" method of moSampling. + +After you can use the vector as you want: +```c++ +std::cout << "Fitness " << fitnessValues[0] << std::endl; +std::cout << "First values:" << std::endl; +std::cout << "Distance " << distValues[0] << std::endl; + +std::cout << "Last values:" << std::endl; +std::cout << "Fitness " << fitnessValues[fitnessValues.size() - 1] << std::endl; +std::cout << "Distance " << distValues[distValues.size() - 1] << std::endl; + +``` + +Easy, isn't it? + +## 4. Others fitness landscapes tools + +The other tools can be used in the same way. For each tool, an example has been made. Please read the code of: + +* densityOfStates.cpp : density of states example +* autocorrelation.cpp : autocorrelation length and functions +* adaptiveWalks.cpp : sampling by hill-climbings, length of adaptative walks +* fdc.cpp : ;-) +* fitnessCloud.cpp : bivariate density of fitness of solutions and fitness of neighbors +* neutralDegree.cpp : number of neighbor with the same fitness +* neutralWalk.cpp : evolvability of the neutral networks +* sampling.cpp : general sampling method + +If you have some questions or remarks, please contact us! sebastien.verel aaattt unice.fr or member of the development team. \ No newline at end of file diff --git a/mo/tutorial/Lesson6/multimodalFitnessLandscape.jpg b/mo/tutorial/Lesson6/multimodalFitnessLandscape.jpg new file mode 100755 index 0000000000000000000000000000000000000000..ad3b52ce09369b311417fc897bd6f3558978b935 GIT binary patch literal 19455 zcmdqJcR*9k);AguP?~fQkY1H4RRKXdh!mxF5vd_WdXNB0?^U|ed+(u!-kWp@Jrt!U zpb(^e@j2yt&U^2<@Bep_o&DQ0Yt~w`X7}1%QKt15m?$05?c{ zR&_;1OPyERD(Wwku?YYGKDpJqcTTvh0079@-BtCKys?q73G3~z09?Rb00{satgPMM z$?NF6_=BCn&NhF}{~1o_09Z}{z_h?0UjLc)zh2?LwQ;k?Qgvbvu$TKgcK`rK7>lWa zdao3*SP6^oTEBDs6R(HGkKejkgRnRX0Js(O&%D@Z0FA1RvyH2RHLI$tl{c%7E7;b- z>F>J!Z|Q${{IB7UZT>-Y^75}TaCVEy&Mm<>bWrSCSj6tBsqDtEbIdK>*0f1ESAFBqtezvMIDRzvGJF-t}6Oi{16*YKW8Z}<=84mR)3UwK^s9$4CcK+ z0tE02R}1e8=L^pZ9|+G1=U~xZ9D@h%yLZVk0j`z~))TQPEWbaJ|H1p;dH>?_N2`Bu zw#G{TZ(6!z)Bb4xcOB)idO88@u(2TQ;qX_w+dnn4!fNRTaL4}IV$+-f0)H=&t#cg1 zzv;XItba7L3Dr9Nn{*p2=YLt~U$Wm|IsLKR9}9Y7u@m;n2JlCVf9dc?(!WaQh)w;! z+G42(pl$d5E_D{K$!wZr0Qx^{^A^jK6`=T6dENu8{>t&6Hu`(rfd4Je4x8g2SAVGg zQP2O=qSk+x|96XE>5Z}F_?H#`l)@e>+ZAhBE9~e0mg7&`aKK~6dxWQs_ZaU9fE7<3 zPaN+Vp2lBT4vS>*l&~q%crO6@SUns7UVrK0hUMafy~bMmZ`}Ua*bVTfl-QPsV+yba zINYoQJ}5&RYykjG%|CYu;0^#EhZ1lLi*Wwj?>Gzq{J$^&@EnKn-}n^{?>}j90f0~k z0Ny`oO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m^v=I)v!6eU-B;&d3g(?4G7<>GcR(Mn!j0?u6a3rI#%F z)Fx8U9k^9S%EYb4Nd$nlW{Uewp~Cg61z6N?aM(4V2ZK>D*GsCtH)+a|*51i;U-tUv zNcnS(EUQAiLk5h%v0+%8{kY^tCy?yJHr9F^GGHgyem2)I*bfOPH2KLTK zUl$6uXj)6e4W~`p^xc%~0$wFDb5)MU7qt=d8%tI}b4EXh?M%Z|ip7Hu?IQ4BuJ~KA z8r;Xh-(*?bCu~Qs$1*y0jCQ1QreZJpEnBVoF zA;`e+3(24;S|kiJmZka8ard|^x%BDrlqQCwjGW`$m^--ltG1uw1;-&kSR2(?*IuI# zmrfBA#bFLx8h;uJJh?T)VtP?8a zDa!Tf{na1qA%ui4Zk~tEc$!K}Zj_sFozU9mUeN$oBX|iA{JwC$)#wUzr6IYlzU~g3Y@Fv~-UT}9&rqLn zhTWbf-lO%l8tGK^TUr}fsw)y+ug{F)@$8^pi5r;i0eRWI$0QMY7k;3@=<$cb|IYvB Hjd#BT_^tD& literal 0 HcmV?d00001 diff --git a/mo/tutorial/Lesson7/README.md b/mo/tutorial/Lesson7/README.md new file mode 100644 index 000000000..5f493a130 --- /dev/null +++ b/mo/tutorial/Lesson7/README.md @@ -0,0 +1,60 @@ +# How to hybrid an evolutionary algorithm and a local search +In this lesson, a hybridization between an evolutionary algorithm(EA) and a local search is presented. It will be illustrated by an example on the Queen problem. Here, the hybridization consists in replacing the mutation operator of the EA by a first improvement hill climber. + +1. hybridization +2. Exercise + +## 1. Hybridization (example on the Queen problem) + +First, you have to define the represenation of a Queen, how to initialize and how to evaluate a population of solutions: +```c++ +queenFullEval fullEval; + +eoInitPermutation init(vecSize); + +eoPop pop; +Queen tmp; +for(unsigned int i=0; i<20; i++){ //population size is fixed to 20 + init(tmp); + fullEval(tmp); + pop.push_back(tmp); +} +``` + +As in previous lessons, a local search is declared (first improvement hill climber): +```c++ +moFullEvalByCopy shiftEval(fullEval); + +orderShiftNeighborhood orderShiftNH(pow(vecSize-1, 2)); + +moFirstImprHC hc(orderShiftNH, fullEval, shiftEval); +``` +To hybrid this local search with an EA, you just have to use it instead of a classical mutation: +```c++ +eoOrderXover cross; +eoSGATransform transform(cross, 0.3, hc, 0.7); // cross and mutation probabilities are fixed +``` + +Others components of the "eoEasyEA" have to be declared: +```c++ +eoGenContinue EAcont(50); //nb generations is fixed to 50 +eoDetTournamentSelect selectOne(2); //size of tournament is fixed to 2 +eoSelectMany select(selectOne, 1); //rate of selection is fixed to 1 +eoGenerationalReplacement repl; +``` +More details are available in EO lessons. + +Finally, the hybrid algorithm is declared as: +```c++ +eoEasyEA hybridAlgo(EAcont, fullEval, select, transform, repl); +``` +and should be applied on the population with: +```c++ +hybridAlgo(pop); +``` + +You can test this hybrid algorithm by changing problem size (use parameters file or the option --vecSize=X on command line to execute "hybridAlgo"). It prints the initial and final population. + +## 2. Exercise + +Try to use a hybridization at the checkpointing step rather than at the mutation step. You have to implement an "eoUpdater" which applies a local search. This updater should be added in a "eoCheckpoint". \ No newline at end of file From 023cb45ca54768c5972cbd574eba5bf5e2544f00 Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 31 Aug 2022 23:46:46 +0200 Subject: [PATCH 2/5] fix logo display in readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 59ded2801..686b08334 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ It focus on the efficiency of the implementation of solvers, by providing: - tools for ***automated design and selection*** of algorithms, - a focus on ***speed*** and several ***parallelization*** options. -![Paradiseo logo](https://github.com/nojhan/paradiseo/blob/master/website/paradiseo_logo_200px_dark.png) +
+ Paradiseo logo +
# Quick Start From c2f2e635c8072b926710c93e62505b377ad4d882 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 31 Jan 2022 20:14:38 +0100 Subject: [PATCH 3/5] fix Ubuntu-related memory allocation bug --- eo/contrib/irace/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eo/contrib/irace/CMakeLists.txt b/eo/contrib/irace/CMakeLists.txt index 1c713bf5b..bee473be7 100644 --- a/eo/contrib/irace/CMakeLists.txt +++ b/eo/contrib/irace/CMakeLists.txt @@ -70,10 +70,9 @@ endif() ###################################################################################### add_executable(fastga fastga.cpp) -# target_link_libraries(fastga ${PARADISEO_LIBRARIES} ${IOH_LIBRARY} stdc++fs) -target_link_libraries(fastga ${PARADISEO_LIBRARIES} fmt) +# Link to stdc++fs at the end because of an Ubuntu bug, see: https://stackoverflow.com/a/57760267 +target_link_libraries(fastga ${PARADISEO_LIBRARIES} fmt stdc++fs) add_executable(onlymutga onlymutga.cpp) -# target_link_libraries(onlymutga ${PARADISEO_LIBRARIES} ${IOH_LIBRARY} stdc++fs) target_link_libraries(onlymutga ${PARADISEO_LIBRARIES} fmt) From 80140ddcc34bf0ec165aea01a0d097240d837a29 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 31 Jan 2022 22:33:36 +0100 Subject: [PATCH 4/5] feat: add an eoForgeMap Same features than an eoForgeVector, but allowing to bind a string name to the instance. --- eo/src/eoForge.h | 138 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 133 insertions(+), 5 deletions(-) diff --git a/eo/src/eoForge.h b/eo/src/eoForge.h index bc2dbb67d..6fcccf811 100644 --- a/eo/src/eoForge.h +++ b/eo/src/eoForge.h @@ -192,13 +192,13 @@ class eoForgeOperator : public eoForgeInterface * with different parametrization (or not). * * @warning When passing a reference (as it is often the case within ParadisEO), - * it is MANDATORY to wrap it in `std::ref`, or else it will default to use copy. - * This is is a source of bug which your compiler will to detect and that would - * disable any link between operators. + * it is MANDATORY to wrap it in `std::ref`, or else it will default to use copy. + * This is is a source of bug which your compiler will fail to detect and that would + * disable any link between operators. * * @warning You may want to enable instantiation cache to grab some performances. - * The default is set to disable the cache, because its use with operators - * which hold a state will lead to unwanted behaviour. + * The default is set to disable the cache, because its use with operators + * which hold a state will lead to unwanted behaviour. * * @code eoForgeVector> factories(false); @@ -320,6 +320,134 @@ class eoForgeVector : public std::vector*> bool _no_cache; }; +/** A map holding an operator (with deferred instantiation) at a given name. + * + * @note You can actually store several instances of the same class, + * with different parametrization (or not). + * + * @warning When passing a reference (as it is often the case within ParadisEO), + * it is MANDATORY to wrap it in `std::ref`, or else it will default to use copy. + * This is is a source of bug which your compiler will fail to detect and that would + * disable any link between operators. + * + * @warning You may want to enable instantiation cache to grab some performances. + * The default is set to disable the cache, because its use with operators + * which hold a state will lead to unwanted behaviour. + * + * @code + eoForgeMap> factories(false); + + // Capture constructor's parameters and defer instantiation. + factories.add>(1); + factories.setup>(0, 5); // Edit + + // Actually instantiate. + eoSelect& op = factories.instantiate(0); + + // Call. + op(); + * @endcode + * + * @ingroup Foundry + */ +template +class eoForgeMap : public std::map*> +{ + public: + using Interface = Itf; + + /** Default constructor do not cache instantiations. + * + * @warning + * You most probably want to disable caching for operators that hold a state. + * If you enable the cache, the last used instantiation will be used, + * at its last state. + * For example, continuators should most probably not be cached, + * as they very often hold a state in the form of a counter. + * At the end of a search, the continuator will be in the end state, + * and thus always ask for a stop. + * Reusing an instance in this state will de facto disable further searches. + * + * @param always_reinstantiate If false, will enable cache for the forges in this container. + */ + eoForgeMap( bool always_reinstantiate = true ) : + _no_cache(always_reinstantiate) + { } + + /** instantiate the operator managed at the given name. + */ + Itf& instantiate(const std::string& name) + { + return this->at(name)->instantiate(_no_cache); + } + + /** Add an operator to the list. + * + * @warning When passing a reference (as it is often the case within ParadisEO), + * it is MANDATORY to wrap it in `std::ref`, or else it will default to use copy. + * This is is a source of bug which your compiler will to detect and that would + * disable any link between operators. + * + */ + template + void add(const std::string& name, Args... args) + { + // We decay all args to ensure storing everything by value within the forge. + // The references should thus be wrapped in a std::ref. + auto pfo = new eoForgeOperator...>( + std::forward(args)...); + this->insert({name, pfo}); + } + + /** Specialization for operators with empty constructors. + */ + template + void add(const std::string& name) + { + eoForgeInterface* pfo = new eoForgeOperator; + this->insert({name, pfo}); + } + + /** Change the set up arguments to the constructor. + * + * @warning When passing a reference (as it is often the case within ParadisEO), + * it is MANDATORY to wrap it in `std::ref`, or else it will default to use copy. + * This is is a source of bug which your compiler will to detect and that would + * disable any link between operators. + * + * @warning The operator at `name` should have been added with eoForgeMap::add already.. + */ + template + void setup(const std::string& name, Args... args) + { + delete this->at(name); // Silent on nullptr. + auto pfo = new eoForgeOperator...>( + std::forward(args)...); + this->emplace({name, pfo}); + } + + /** Specialization for empty constructors. + */ + template + void setup(const std::string& name) + { + delete this->at(name); + auto pfo = new eoForgeOperator; + this->emplace({name, pfo}); + } + + virtual ~eoForgeMap() + { + for(auto kv : *this) { + delete kv.second; + } + } + + protected: + bool _no_cache; +}; + + /** A range holding a parameter value at a given index. * * This is essential a scalar numerical parameter, with bounds check From c2a3ed4e7f67772afb37ea325c9ef80fca2b008d Mon Sep 17 00:00:00 2001 From: nojhan Date: Sat, 10 Sep 2022 06:26:34 +0200 Subject: [PATCH 5/5] fix(mo): comment out unused parameters Removes -Wunused-parameters warnings. --- mo/src/acceptCrit/moAlwaysAcceptCrit.h | 2 +- mo/src/algo/eoDummyMonOp.h | 2 +- mo/src/continuator/moAverageFitnessNeighborStat.h | 4 ++-- mo/src/continuator/moBestNoImproveContinuator.h | 2 +- mo/src/continuator/moBooleanStat.h | 4 ++-- mo/src/continuator/moContinuator.h | 4 ++-- mo/src/continuator/moCounterStat.h | 4 ++-- mo/src/continuator/moEvalsContinuator.h | 4 ++-- mo/src/continuator/moFullEvalContinuator.h | 4 ++-- mo/src/continuator/moIterContinuator.h | 4 ++-- mo/src/continuator/moMaxNeighborStat.h | 4 ++-- mo/src/continuator/moMedianNeighborStat.h | 4 ++-- mo/src/continuator/moMinNeighborStat.h | 4 ++-- mo/src/continuator/moMinusOneCounterStat.h | 4 ++-- mo/src/continuator/moNbInfNeighborStat.h | 4 ++-- mo/src/continuator/moNbSupNeighborStat.h | 4 ++-- mo/src/continuator/moNeighborEvalContinuator.h | 4 ++-- mo/src/continuator/moNeutralDegreeNeighborStat.h | 4 ++-- mo/src/continuator/moQ1NeighborStat.h | 4 ++-- mo/src/continuator/moQ3NeighborStat.h | 4 ++-- mo/src/continuator/moSecondMomentNeighborStat.h | 4 ++-- mo/src/continuator/moSizeNeighborStat.h | 4 ++-- mo/src/continuator/moSolutionStat.h | 2 +- mo/src/continuator/moStatFromStat.h | 4 ++-- mo/src/continuator/moStdFitnessNeighborStat.h | 4 ++-- mo/src/continuator/moTimeContinuator.h | 4 ++-- mo/src/continuator/moTrueContinuator.h | 4 ++-- mo/src/continuator/moUnsignedStat.h | 4 ++-- mo/src/continuator/moValueStat.h | 4 ++-- mo/src/continuator/moVectorMonitor.h | 2 +- mo/src/coolingSchedule/moDynSpanCoolingSchedule.h | 4 ++-- mo/src/coolingSchedule/moSimpleCoolingSchedule.h | 4 ++-- mo/src/eval/moDoubleIncrEvaluation.h | 2 +- mo/src/eval/moDummyEval.h | 2 +- mo/src/explorer/moDummyExplorer.h | 14 +++++++------- mo/src/explorer/moFirstImprHCexplorer.h | 8 ++++---- mo/src/explorer/moILSexplorer.h | 4 ++-- mo/src/explorer/moMetropolisHastingExplorer.h | 8 ++++---- mo/src/explorer/moNeutralHCexplorer.h | 2 +- mo/src/explorer/moRandomBestHCexplorer.h | 8 ++++---- mo/src/explorer/moRandomNeutralWalkExplorer.h | 8 ++++---- mo/src/explorer/moRandomSearchExplorer.h | 12 ++++++------ mo/src/explorer/moRandomWalkExplorer.h | 8 ++++---- mo/src/explorer/moSAexplorer.h | 6 +++--- mo/src/explorer/moSimpleHCexplorer.h | 8 ++++---- mo/src/explorer/moTSexplorer.h | 4 ++-- mo/src/explorer/moVNSexplorer.h | 2 +- mo/src/memory/moBestImprAspiration.h | 4 ++-- mo/src/memory/moCountMoveMemory.h | 6 +++--- mo/src/memory/moDummyMemory.h | 6 +++--- mo/src/memory/moIndexedVectorTabuList.h | 8 ++++---- mo/src/memory/moNeighborVectorTabuList.h | 8 ++++---- mo/src/memory/moRndIndexedVectorTabuList.h | 2 +- mo/src/memory/moSolVectorTabuList.h | 6 +++--- mo/src/neighborhood/moBackwardVectorVNSelection.h | 6 +++--- mo/src/neighborhood/moDummyNeighbor.h | 2 +- mo/src/neighborhood/moDummyNeighborhood.h | 8 ++++---- mo/src/neighborhood/moForwardVectorVNSelection.h | 6 +++--- mo/src/neighborhood/moIndexNeighbor.h | 2 +- mo/src/neighborhood/moNeighbor.h | 2 +- mo/src/neighborhood/moOrderNeighborhood.h | 4 ++-- mo/src/neighborhood/moRndVectorVNSelection.h | 6 +++--- mo/src/neighborhood/moRndWithReplNeighborhood.h | 4 ++-- mo/src/neighborhood/moRndWithoutReplNeighborhood.h | 4 ++-- mo/src/perturb/moNeighborhoodPerturb.h | 4 ++-- .../bitString/moBitsWithReplNeighborhood.h | 6 +++--- .../bitString/moBitsWithoutReplNeighborhood.h | 6 +++--- mo/src/problems/permutation/moSwapNeighborhood.h | 2 +- .../problems/permutation/moTwoOptExNeighborhood.h | 2 +- 69 files changed, 159 insertions(+), 159 deletions(-) diff --git a/mo/src/acceptCrit/moAlwaysAcceptCrit.h b/mo/src/acceptCrit/moAlwaysAcceptCrit.h index 777ef0b18..ef2541d2f 100644 --- a/mo/src/acceptCrit/moAlwaysAcceptCrit.h +++ b/mo/src/acceptCrit/moAlwaysAcceptCrit.h @@ -48,7 +48,7 @@ public: * @param _sol2 the new solution after local search * @return always true */ - bool operator()(EOT& _sol1, EOT& _sol2) { + bool operator()(EOT& /*_sol1*/, EOT& /*_sol2*/) { return true; } diff --git a/mo/src/algo/eoDummyMonOp.h b/mo/src/algo/eoDummyMonOp.h index dba88fa7f..bdb303844 100644 --- a/mo/src/algo/eoDummyMonOp.h +++ b/mo/src/algo/eoDummyMonOp.h @@ -47,7 +47,7 @@ public: * Do nothing on the solution * @param _solution the related solution */ - virtual bool operator()(EOT & _solution) { + virtual bool operator()(EOT & /*_solution*/) { return true; } }; diff --git a/mo/src/continuator/moAverageFitnessNeighborStat.h b/mo/src/continuator/moAverageFitnessNeighborStat.h index 7d12abc0a..130b96663 100644 --- a/mo/src/continuator/moAverageFitnessNeighborStat.h +++ b/mo/src/continuator/moAverageFitnessNeighborStat.h @@ -61,7 +61,7 @@ public : * Set the average of fitness in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getMean(); } @@ -69,7 +69,7 @@ public : * Set the average of fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getMean(); } diff --git a/mo/src/continuator/moBestNoImproveContinuator.h b/mo/src/continuator/moBestNoImproveContinuator.h index 86981bef4..d772180f3 100644 --- a/mo/src/continuator/moBestNoImproveContinuator.h +++ b/mo/src/continuator/moBestNoImproveContinuator.h @@ -93,7 +93,7 @@ public: * reset the counter of iteration * @param _solution a solution */ - virtual void init(EOT & _solution) { + virtual void init(EOT & /*_solution*/) { cpt = 0; } diff --git a/mo/src/continuator/moBooleanStat.h b/mo/src/continuator/moBooleanStat.h index a098efc23..10fa7008e 100644 --- a/mo/src/continuator/moBooleanStat.h +++ b/mo/src/continuator/moBooleanStat.h @@ -56,7 +56,7 @@ public : * Init the number of iteration * @param _sol a solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = *b; } @@ -64,7 +64,7 @@ public : * Set the number of iteration * @param _sol a solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = *b; } diff --git a/mo/src/continuator/moContinuator.h b/mo/src/continuator/moContinuator.h index cec268038..a58cad718 100644 --- a/mo/src/continuator/moContinuator.h +++ b/mo/src/continuator/moContinuator.h @@ -52,13 +52,13 @@ public: * Init Continuator parameters * @param _solution the related solution */ - virtual void init(EOT& _solution) {}; + virtual void init(EOT& /*_solution*/) {}; /** * Last Call to terminate the checkpoint * @param _solution the related solution */ - virtual void lastCall(EOT& _solution) {}; + virtual void lastCall(EOT& /*_solution*/) {}; }; #endif diff --git a/mo/src/continuator/moCounterStat.h b/mo/src/continuator/moCounterStat.h index 85534e67e..14b062784 100644 --- a/mo/src/continuator/moCounterStat.h +++ b/mo/src/continuator/moCounterStat.h @@ -56,7 +56,7 @@ public : * Init the number of iteration * @param _sol a solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = 0; } @@ -64,7 +64,7 @@ public : * Set the number of iteration * @param _sol a solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = value() + 1; } diff --git a/mo/src/continuator/moEvalsContinuator.h b/mo/src/continuator/moEvalsContinuator.h index 1a020da6c..7c9f4e902 100644 --- a/mo/src/continuator/moEvalsContinuator.h +++ b/mo/src/continuator/moEvalsContinuator.h @@ -65,7 +65,7 @@ public: * @param _solution a solution * @return true if number of evaluations < maxEvals */ - virtual bool operator()(EOT & _solution) { + virtual bool operator()(EOT & /*_solution*/) { return (fullEval.value() + neighborEval.value() - nbEval_start < maxEvals); } @@ -73,7 +73,7 @@ public: * Reset the number of evaluations * @param _solution a solution */ - virtual void init(EOT & _solution) { + virtual void init(EOT & /*_solution*/) { if (restartCounter) nbEval_start = fullEval.value() + neighborEval.value(); else diff --git a/mo/src/continuator/moFullEvalContinuator.h b/mo/src/continuator/moFullEvalContinuator.h index 5239c1dea..bf9a9ea96 100644 --- a/mo/src/continuator/moFullEvalContinuator.h +++ b/mo/src/continuator/moFullEvalContinuator.h @@ -63,7 +63,7 @@ public: * @param _solution a solution * @return true if number of evaluations < maxFullEval */ - virtual bool operator()(EOT & _solution) { + virtual bool operator()(EOT & /*_solution*/) { return (eval.value() - nbEval_start < maxFullEval); } @@ -71,7 +71,7 @@ public: * Reset the number of evaluations * @param _solution a solution */ - virtual void init(EOT & _solution) { + virtual void init(EOT & /*_solution*/) { if (restartCounter) nbEval_start = eval.value(); else diff --git a/mo/src/continuator/moIterContinuator.h b/mo/src/continuator/moIterContinuator.h index f10db39f5..f9400254c 100644 --- a/mo/src/continuator/moIterContinuator.h +++ b/mo/src/continuator/moIterContinuator.h @@ -52,7 +52,7 @@ public: *@param _solution a solution *@return true if counter < maxIter */ - virtual bool operator()(EOT & _solution) { + virtual bool operator()(EOT & /*_solution*/) { bool res; cpt++; res = (cpt < maxIter); @@ -65,7 +65,7 @@ public: * reset the counter of iteration * @param _solution a solution */ - virtual void init(EOT & _solution) { + virtual void init(EOT & /*_solution*/) { cpt = 0; } diff --git a/mo/src/continuator/moMaxNeighborStat.h b/mo/src/continuator/moMaxNeighborStat.h index f0b165d72..94f9cc137 100644 --- a/mo/src/continuator/moMaxNeighborStat.h +++ b/mo/src/continuator/moMaxNeighborStat.h @@ -62,7 +62,7 @@ public : * Set the max fitness in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getMax(); } @@ -70,7 +70,7 @@ public : * Set the max fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getMax(); } diff --git a/mo/src/continuator/moMedianNeighborStat.h b/mo/src/continuator/moMedianNeighborStat.h index 4c3cfb8f2..241c1adce 100644 --- a/mo/src/continuator/moMedianNeighborStat.h +++ b/mo/src/continuator/moMedianNeighborStat.h @@ -63,7 +63,7 @@ public : * Set the median fitness in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getMedian(); } @@ -71,7 +71,7 @@ public : * Set the median fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getMedian(); } diff --git a/mo/src/continuator/moMinNeighborStat.h b/mo/src/continuator/moMinNeighborStat.h index bd1cae1f9..f77d91973 100644 --- a/mo/src/continuator/moMinNeighborStat.h +++ b/mo/src/continuator/moMinNeighborStat.h @@ -62,7 +62,7 @@ public : * Set the worst fitness in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getMin(); } @@ -70,7 +70,7 @@ public : * Set the worst fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getMin(); } diff --git a/mo/src/continuator/moMinusOneCounterStat.h b/mo/src/continuator/moMinusOneCounterStat.h index dfb9be881..0d6fd1f3a 100644 --- a/mo/src/continuator/moMinusOneCounterStat.h +++ b/mo/src/continuator/moMinusOneCounterStat.h @@ -58,7 +58,7 @@ public : * Init the number of iteration * @param _sol a solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { counter = 0; value() = 0; } @@ -67,7 +67,7 @@ public : * Set the number of iteration * @param _sol a solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { counter++; if (counter > 0) value() = counter - 1; diff --git a/mo/src/continuator/moNbInfNeighborStat.h b/mo/src/continuator/moNbInfNeighborStat.h index e3bc27bb7..5699b5268 100644 --- a/mo/src/continuator/moNbInfNeighborStat.h +++ b/mo/src/continuator/moNbInfNeighborStat.h @@ -63,7 +63,7 @@ public : * Set the number of solutions in the neighborhood with (strictly) lower fitness than the current solution * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getNbInf(); } @@ -71,7 +71,7 @@ public : * Set the number of solutions in the neighborhood with (strictly) lower fitness than the current solution * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getNbInf(); } diff --git a/mo/src/continuator/moNbSupNeighborStat.h b/mo/src/continuator/moNbSupNeighborStat.h index 8febf94f8..d81e07591 100644 --- a/mo/src/continuator/moNbSupNeighborStat.h +++ b/mo/src/continuator/moNbSupNeighborStat.h @@ -63,7 +63,7 @@ public : * Set the number of solutions in the neighborhood with better fitness than the current solution * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getNbSup(); } @@ -71,7 +71,7 @@ public : * Set the number of solutions in the neighborhood with better fitness than the current solution * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getNbSup(); } diff --git a/mo/src/continuator/moNeighborEvalContinuator.h b/mo/src/continuator/moNeighborEvalContinuator.h index ba3a41a9d..bcfd0563a 100644 --- a/mo/src/continuator/moNeighborEvalContinuator.h +++ b/mo/src/continuator/moNeighborEvalContinuator.h @@ -61,7 +61,7 @@ public: * @param _solution a solution * @return true if number of evaluations < maxNeighborEval */ - virtual bool operator()(EOT & _solution) { + virtual bool operator()(EOT & /*_solution*/) { return (eval.value() - nbEval_start < maxNeighborEval); } @@ -69,7 +69,7 @@ public: * Reset the number of evaluations * @param _solution a solution */ - virtual void init(EOT & _solution) { + virtual void init(EOT & /*_solution*/) { if (restartCounter) nbEval_start = eval.value(); else diff --git a/mo/src/continuator/moNeutralDegreeNeighborStat.h b/mo/src/continuator/moNeutralDegreeNeighborStat.h index d46e99475..1cbe47321 100644 --- a/mo/src/continuator/moNeutralDegreeNeighborStat.h +++ b/mo/src/continuator/moNeutralDegreeNeighborStat.h @@ -63,7 +63,7 @@ public : * Set the neutral degree of the solution which is the number of solutions in the neighborhood with equals fitness * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getNbEqual(); } @@ -71,7 +71,7 @@ public : * Set the neutral degree of the solution which is the number of solutions in the neighborhood with equals fitness * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getNbEqual(); } diff --git a/mo/src/continuator/moQ1NeighborStat.h b/mo/src/continuator/moQ1NeighborStat.h index 4d74be68d..2ee9bd294 100644 --- a/mo/src/continuator/moQ1NeighborStat.h +++ b/mo/src/continuator/moQ1NeighborStat.h @@ -63,7 +63,7 @@ public : * Set the first quartile of fitness in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getQ1(); } @@ -71,7 +71,7 @@ public : * Set the first quartile of fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getQ1(); } diff --git a/mo/src/continuator/moQ3NeighborStat.h b/mo/src/continuator/moQ3NeighborStat.h index 50426e65f..7e4768e57 100644 --- a/mo/src/continuator/moQ3NeighborStat.h +++ b/mo/src/continuator/moQ3NeighborStat.h @@ -63,7 +63,7 @@ public : * Set the third quartile of fitness in the neighborhood * @param _sol the third solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getQ3(); } @@ -71,7 +71,7 @@ public : * Set the third quartile of fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getQ3(); } diff --git a/mo/src/continuator/moSecondMomentNeighborStat.h b/mo/src/continuator/moSecondMomentNeighborStat.h index 7c3a08fff..ba99c6d48 100644 --- a/mo/src/continuator/moSecondMomentNeighborStat.h +++ b/mo/src/continuator/moSecondMomentNeighborStat.h @@ -61,7 +61,7 @@ public : * Set the average and the standard deviation of fitness in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value().first = nhStat.getMean(); value().second = nhStat.getSD(); } @@ -70,7 +70,7 @@ public : * Set the average and the standard deviation of fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value().first = nhStat.getMean(); value().second = nhStat.getSD(); } diff --git a/mo/src/continuator/moSizeNeighborStat.h b/mo/src/continuator/moSizeNeighborStat.h index 1a5b5b123..5ac3caf19 100644 --- a/mo/src/continuator/moSizeNeighborStat.h +++ b/mo/src/continuator/moSizeNeighborStat.h @@ -62,7 +62,7 @@ public : * Set the number of solutions in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getSize(); } @@ -70,7 +70,7 @@ public : * Set the number of solutions in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getSize(); } diff --git a/mo/src/continuator/moSolutionStat.h b/mo/src/continuator/moSolutionStat.h index 93c4f57f5..90baafd44 100644 --- a/mo/src/continuator/moSolutionStat.h +++ b/mo/src/continuator/moSolutionStat.h @@ -52,7 +52,7 @@ public : * Constructor * @param _description a description of the parameter */ - moSolutionStat(std::string _description = "solution"): + moSolutionStat(std::string /*_description */= "solution"): moStat(EOT(), "fitness solution") { } /** diff --git a/mo/src/continuator/moStatFromStat.h b/mo/src/continuator/moStatFromStat.h index 962106eb0..2dea43ce1 100644 --- a/mo/src/continuator/moStatFromStat.h +++ b/mo/src/continuator/moStatFromStat.h @@ -57,7 +57,7 @@ public : * The value of this stat is a copy of the value of the initial stat * @param _sol a solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = stat.value(); } @@ -65,7 +65,7 @@ public : * The value of this stat is a copy of the value of the initial stat * @param _sol a solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = stat.value(); } diff --git a/mo/src/continuator/moStdFitnessNeighborStat.h b/mo/src/continuator/moStdFitnessNeighborStat.h index 649308f74..5e4098a8d 100644 --- a/mo/src/continuator/moStdFitnessNeighborStat.h +++ b/mo/src/continuator/moStdFitnessNeighborStat.h @@ -61,7 +61,7 @@ public : * Set the average and the standard deviation of fitness in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = nhStat.getSD(); } @@ -69,7 +69,7 @@ public : * Set the average and the standard deviation of fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = nhStat.getSD(); } diff --git a/mo/src/continuator/moTimeContinuator.h b/mo/src/continuator/moTimeContinuator.h index 513928000..172fec933 100644 --- a/mo/src/continuator/moTimeContinuator.h +++ b/mo/src/continuator/moTimeContinuator.h @@ -88,7 +88,7 @@ public: * Returns false when the running time is reached. * @param _sol the current solution */ - virtual bool operator() (EOT& _sol) + virtual bool operator() (EOT& /*_sol*/) { bool res; time_t elapsed = (time_t) difftime(time(NULL), start); @@ -102,7 +102,7 @@ public: * reset the start time * @param _solution a solution */ - virtual void init(EOT & _solution) { + virtual void init(EOT & /*_solution*/) { if (!external) start = time(NULL); } diff --git a/mo/src/continuator/moTrueContinuator.h b/mo/src/continuator/moTrueContinuator.h index 88feb91a3..020e138a5 100644 --- a/mo/src/continuator/moTrueContinuator.h +++ b/mo/src/continuator/moTrueContinuator.h @@ -53,7 +53,7 @@ public: * @param _solution a solution * @return always true */ - virtual bool operator()(EOT & _solution) { + virtual bool operator()(EOT & /*_solution*/) { return true; } @@ -61,7 +61,7 @@ public: * NOTHING TO DO * @param _solution a solution */ - virtual void init(EOT & _solution) {} + virtual void init(EOT & /*_solution*/) {} }; diff --git a/mo/src/continuator/moUnsignedStat.h b/mo/src/continuator/moUnsignedStat.h index c1f8342cd..8c5122539 100644 --- a/mo/src/continuator/moUnsignedStat.h +++ b/mo/src/continuator/moUnsignedStat.h @@ -56,7 +56,7 @@ public : * Init the number of iteration * @param _sol a solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value() = *b; } @@ -64,7 +64,7 @@ public : * Set the number of iteration * @param _sol a solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = *b; } diff --git a/mo/src/continuator/moValueStat.h b/mo/src/continuator/moValueStat.h index 0d8d8877d..1e9bf06a9 100644 --- a/mo/src/continuator/moValueStat.h +++ b/mo/src/continuator/moValueStat.h @@ -60,7 +60,7 @@ public : * Init the number of iteration * @param _sol a solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { if (restart) value_start = valueParam.value(); else @@ -73,7 +73,7 @@ public : * Set the number of iteration * @param _sol a solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value() = (double) (valueParam.value() - value_start); } diff --git a/mo/src/continuator/moVectorMonitor.h b/mo/src/continuator/moVectorMonitor.h index 67535219d..30c331771 100644 --- a/mo/src/continuator/moVectorMonitor.h +++ b/mo/src/continuator/moVectorMonitor.h @@ -126,7 +126,7 @@ public: * @param _param unvalid Parameter */ template - moVectorMonitor(eoValueParam & _param) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), intLongLongParam(NULL), eotParam(NULL) + moVectorMonitor(eoValueParam & /*_param*/) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), intLongLongParam(NULL), eotParam(NULL) { std::cerr << "Sorry the type can not be in a vector of moVectorMonitor" << std::endl; } diff --git a/mo/src/coolingSchedule/moDynSpanCoolingSchedule.h b/mo/src/coolingSchedule/moDynSpanCoolingSchedule.h index 34b386312..e92992e87 100644 --- a/mo/src/coolingSchedule/moDynSpanCoolingSchedule.h +++ b/mo/src/coolingSchedule/moDynSpanCoolingSchedule.h @@ -63,7 +63,7 @@ public: * Initial temperature * @param _solution initial solution */ - virtual double init(EOT & _solution) { + virtual double init(EOT & /*_solution*/) { // number of tries since the last temperature change spanTries = 0; @@ -105,7 +105,7 @@ public: * @param _temp current temperature * @return true if the search can continue */ - virtual bool operator()(double _temp) { + virtual bool operator()(double /*_temp*/) { return nbSpan <= nbSpanMax; } diff --git a/mo/src/coolingSchedule/moSimpleCoolingSchedule.h b/mo/src/coolingSchedule/moSimpleCoolingSchedule.h index 5ff4f4920..940dd258a 100644 --- a/mo/src/coolingSchedule/moSimpleCoolingSchedule.h +++ b/mo/src/coolingSchedule/moSimpleCoolingSchedule.h @@ -59,7 +59,7 @@ public: * @param _solution initial solution * @return the initial temperature */ - virtual double init(EOT & _solution) { + virtual double init(EOT & /*_solution*/) { // number of iteration with the same temperature step = 0; @@ -71,7 +71,7 @@ public: * @param _temp current temperature to update * @param _acceptedMove true when the move is accepted, false otherwise */ - virtual void update(double& _temp, bool _acceptedMove) { + virtual void update(double& _temp, bool /*_acceptedMove*/) { if (step >= span) { _temp *= alpha; step = 0; diff --git a/mo/src/eval/moDoubleIncrEvaluation.h b/mo/src/eval/moDoubleIncrEvaluation.h index c7027e2b8..2f1ac305c 100644 --- a/mo/src/eval/moDoubleIncrEvaluation.h +++ b/mo/src/eval/moDoubleIncrEvaluation.h @@ -85,7 +85,7 @@ public: * * @param _solution the current solution */ - virtual void operator()(EOT & _solution) { + virtual void operator()(EOT & /*_solution*/) { } /** the delta of fitness for each neighbors diff --git a/mo/src/eval/moDummyEval.h b/mo/src/eval/moDummyEval.h index 2809f12a3..ac855e0fc 100644 --- a/mo/src/eval/moDummyEval.h +++ b/mo/src/eval/moDummyEval.h @@ -46,7 +46,7 @@ public: * @param _sol unused solution * @param _n unused neighbor */ - void operator()(EOT& _sol, Neighbor& _n) {} + void operator()(EOT& /*_sol*/, Neighbor& /*_n*/) {} }; diff --git a/mo/src/explorer/moDummyExplorer.h b/mo/src/explorer/moDummyExplorer.h index 3d58dbb08..ae6a293cb 100644 --- a/mo/src/explorer/moDummyExplorer.h +++ b/mo/src/explorer/moDummyExplorer.h @@ -54,20 +54,20 @@ public: * NOTHING TO DO * @param _solution unused solution */ - void initParam (EOT& _solution) { } ; + void initParam (EOT& /*_solution*/) { } ; /** * NOTHING TO DO * @param _solution unused solution */ - void updateParam (EOT& _solution) { } ; + void updateParam (EOT& /*_solution*/) { } ; /** * NOTHING TO DO * @param _solution unused solution * @return always false */ - bool isContinue(EOT& _solution) { + bool isContinue(EOT& /*_solution*/) { return false; } ; @@ -75,14 +75,14 @@ public: * NOTHING TO DO * @param _solution unused solution */ - void move(EOT& _solution) { } ; + void move(EOT& /*_solution*/) { } ; /** * NOTHING TO DO * @param _solution unused solution * @return always false */ - virtual bool accept(EOT& _solution) { + virtual bool accept(EOT& /*_solution*/) { return false; } ; @@ -90,13 +90,13 @@ public: * NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT& _solution) { } ; + virtual void terminate(EOT& /*_solution*/) { } ; /** * NOTHING TO DO * @param _solution unused solution */ - void operator()(EOT & _solution) { } + void operator()(EOT & /*_solution*/) { } /** * Return the class name diff --git a/mo/src/explorer/moFirstImprHCexplorer.h b/mo/src/explorer/moFirstImprHCexplorer.h index e341908d3..530f2953a 100644 --- a/mo/src/explorer/moFirstImprHCexplorer.h +++ b/mo/src/explorer/moFirstImprHCexplorer.h @@ -85,19 +85,19 @@ public: * initParam: NOTHING TO DO * @param _solution unused solution */ - virtual void initParam(EOT & _solution) {}; + virtual void initParam(EOT & /*_solution*/) {}; /** * updateParam: NOTHING TO DO * @param _solution unused solution */ - virtual void updateParam(EOT & _solution) {}; + virtual void updateParam(EOT & /*_solution*/) {}; /** * terminate: NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Explore the neighborhood of a solution until an ameliorated neighbor is found @@ -135,7 +135,7 @@ public: * @param _solution the solution * @return true if an ameliorated neighbor was found */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { if (stop) return isAccept ; else diff --git a/mo/src/explorer/moILSexplorer.h b/mo/src/explorer/moILSexplorer.h index 761009005..49d74fea5 100644 --- a/mo/src/explorer/moILSexplorer.h +++ b/mo/src/explorer/moILSexplorer.h @@ -106,7 +106,7 @@ public: * terminate: NOTHING TO DO * @param _solution a solution (unused) */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Perturb and apply local search on a solution @@ -135,7 +135,7 @@ public: * @param _solution the solution * @return always true */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return true; }; diff --git a/mo/src/explorer/moMetropolisHastingExplorer.h b/mo/src/explorer/moMetropolisHastingExplorer.h index 1989ff1c3..ea0913f1e 100644 --- a/mo/src/explorer/moMetropolisHastingExplorer.h +++ b/mo/src/explorer/moMetropolisHastingExplorer.h @@ -85,7 +85,7 @@ public: * initialization of the number of step to be done * @param _solution unused solution */ - virtual void initParam(EOT & _solution) { + virtual void initParam(EOT & /*_solution*/) { step = 0; isAccept = true; }; @@ -94,7 +94,7 @@ public: * increase the number of step * @param _solution unused solution */ - virtual void updateParam(EOT & _solution) { + virtual void updateParam(EOT & /*_solution*/) { step++; }; @@ -102,7 +102,7 @@ public: * terminate: NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Explore the neighborhood of a solution @@ -128,7 +128,7 @@ public: * @param _solution the solution * @return true there is some steps to do */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return (step < nbStep) ; }; diff --git a/mo/src/explorer/moNeutralHCexplorer.h b/mo/src/explorer/moNeutralHCexplorer.h index 40443de40..2eefa797d 100644 --- a/mo/src/explorer/moNeutralHCexplorer.h +++ b/mo/src/explorer/moNeutralHCexplorer.h @@ -105,7 +105,7 @@ public: * @param _solution the solution * @return true there is some steps to do */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return (step < nbStep) && isAccept ; }; diff --git a/mo/src/explorer/moRandomBestHCexplorer.h b/mo/src/explorer/moRandomBestHCexplorer.h index e96f6673b..92e690e37 100644 --- a/mo/src/explorer/moRandomBestHCexplorer.h +++ b/mo/src/explorer/moRandomBestHCexplorer.h @@ -85,7 +85,7 @@ public: * empty the vector of best solutions * @param _solution unused solution */ - virtual void initParam(EOT & _solution) { + virtual void initParam(EOT & /*_solution*/) { // delete all the best solutions bestVector.clear(); }; @@ -94,7 +94,7 @@ public: * empty the vector of best solutions * @param _solution unused solution */ - virtual void updateParam(EOT & _solution) { + virtual void updateParam(EOT & /*_solution*/) { // delete all the best solutions bestVector.clear(); }; @@ -103,7 +103,7 @@ public: * terminate: NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Explore the neighborhood of a solution @@ -156,7 +156,7 @@ public: * @param _solution the solution * @return true if an ameliorated neighbor was be found */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return isAccept ; }; diff --git a/mo/src/explorer/moRandomNeutralWalkExplorer.h b/mo/src/explorer/moRandomNeutralWalkExplorer.h index 95995c753..e8f9713bf 100644 --- a/mo/src/explorer/moRandomNeutralWalkExplorer.h +++ b/mo/src/explorer/moRandomNeutralWalkExplorer.h @@ -87,7 +87,7 @@ public: * initialization of the number of step to be done * @param _solution unused solution */ - virtual void initParam(EOT & _solution) { + virtual void initParam(EOT & /*_solution*/) { step = 0; isAccept = true; }; @@ -96,7 +96,7 @@ public: * increase the number of step * @param _solution unused solution */ - virtual void updateParam(EOT & _solution) { + virtual void updateParam(EOT & /*_solution*/) { step++; }; @@ -104,7 +104,7 @@ public: * terminate: NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Explore the neighborhood of a solution @@ -142,7 +142,7 @@ public: * @param _solution the solution * @return true there is some steps to do */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return (step < nbStep) && isAccept ; }; diff --git a/mo/src/explorer/moRandomSearchExplorer.h b/mo/src/explorer/moRandomSearchExplorer.h index 0b09da1d9..f8b81d00c 100644 --- a/mo/src/explorer/moRandomSearchExplorer.h +++ b/mo/src/explorer/moRandomSearchExplorer.h @@ -74,7 +74,7 @@ public: * initialization of the number of step to be done * @param _solution unused solution */ - virtual void initParam(EOT & _solution) { + virtual void initParam(EOT & /*_solution*/) { step = 0; }; @@ -82,7 +82,7 @@ public: * increase the number of step * @param _solution unused solution */ - virtual void updateParam(EOT & _solution) { + virtual void updateParam(EOT & /*_solution*/) { step++; }; @@ -90,7 +90,7 @@ public: * terminate: NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Explore the neighborhood with only one random solution @@ -111,7 +111,7 @@ public: * @param _solution the solution * @return true there is some steps to do */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return (step < nbStep) ; }; @@ -119,7 +119,7 @@ public: * move the solution with the best neighbor * @param _solution the solution to move */ - virtual void move(EOT & _solution) { + virtual void move(EOT & /*_solution*/) { // the solution is already move. So nothing to do ! }; @@ -128,7 +128,7 @@ public: * @param _solution the solution * @return true if the best neighbor ameliorate the fitness */ - virtual bool accept(EOT & _solution) { + virtual bool accept(EOT & /*_solution*/) { return true; }; diff --git a/mo/src/explorer/moRandomWalkExplorer.h b/mo/src/explorer/moRandomWalkExplorer.h index 78f1be303..889382a2b 100644 --- a/mo/src/explorer/moRandomWalkExplorer.h +++ b/mo/src/explorer/moRandomWalkExplorer.h @@ -82,7 +82,7 @@ public: * initialization of the number of step to be done * @param _solution unused solution */ - virtual void initParam(EOT & _solution) { + virtual void initParam(EOT & /*_solution*/) { isAccept = true; }; @@ -90,14 +90,14 @@ public: * increase the number of step * @param _solution unused solution */ - virtual void updateParam(EOT & _solution) { + virtual void updateParam(EOT & /*_solution*/) { }; /** * terminate: NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Explore the neighborhood with only one random solution @@ -127,7 +127,7 @@ public: * @param _solution the solution * @return true there is some steps to do */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return isAccept ; }; diff --git a/mo/src/explorer/moSAexplorer.h b/mo/src/explorer/moSAexplorer.h index 08d859035..b774d5c57 100644 --- a/mo/src/explorer/moSAexplorer.h +++ b/mo/src/explorer/moSAexplorer.h @@ -95,7 +95,7 @@ public: * decrease the temperature if necessary * @param _solution unused solution */ - virtual void updateParam(EOT & _solution) { + virtual void updateParam(EOT & /*_solution*/) { coolingSchedule.update(temperature, this->moveApplied()); }; @@ -103,7 +103,7 @@ public: * terminate: NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Explore one random solution in the neighborhood @@ -129,7 +129,7 @@ public: * @param _solution the solution * @return true if the criteria from the cooling schedule is true */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return coolingSchedule(temperature); }; diff --git a/mo/src/explorer/moSimpleHCexplorer.h b/mo/src/explorer/moSimpleHCexplorer.h index b4f235ae8..ee1cded53 100644 --- a/mo/src/explorer/moSimpleHCexplorer.h +++ b/mo/src/explorer/moSimpleHCexplorer.h @@ -76,19 +76,19 @@ public: * initParam: NOTHING TO DO * @param _solution unused solution */ - virtual void initParam(EOT & _solution) {}; + virtual void initParam(EOT & /*_solution*/) {}; /** * updateParam: NOTHING TO DO * @param _solution unused solution */ - virtual void updateParam(EOT & _solution) {}; + virtual void updateParam(EOT & /*_solution*/) {}; /** * terminate: NOTHING TO DO * @param _solution unused solution */ - virtual void terminate(EOT & _solution) {}; + virtual void terminate(EOT & /*_solution*/) {}; /** * Explore the neighborhood of a solution @@ -130,7 +130,7 @@ public: * @param _solution the solution * @return true if an ameliorated neighbor was be found */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return isAccept ; }; diff --git a/mo/src/explorer/moTSexplorer.h b/mo/src/explorer/moTSexplorer.h index 062af93cc..8438d58af 100644 --- a/mo/src/explorer/moTSexplorer.h +++ b/mo/src/explorer/moTSexplorer.h @@ -195,7 +195,7 @@ public: * @param _solution the solution * @return true */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return true; }; @@ -204,7 +204,7 @@ public: * @param _solution the solution * @return true if the best neighbor ameliorate the fitness */ - virtual bool accept(EOT & _solution) { + virtual bool accept(EOT & /*_solution*/) { return isAccept; }; diff --git a/mo/src/explorer/moVNSexplorer.h b/mo/src/explorer/moVNSexplorer.h index 3c9c2ef27..b7633c26e 100644 --- a/mo/src/explorer/moVNSexplorer.h +++ b/mo/src/explorer/moVNSexplorer.h @@ -124,7 +124,7 @@ public: * @param _solution the solution * @return true if an ameliorated neighbor was be found */ - virtual bool isContinue(EOT & _solution) { + virtual bool isContinue(EOT & /*_solution*/) { return !stop; }; diff --git a/mo/src/memory/moBestImprAspiration.h b/mo/src/memory/moBestImprAspiration.h index 7187ef666..b83c5d527 100644 --- a/mo/src/memory/moBestImprAspiration.h +++ b/mo/src/memory/moBestImprAspiration.h @@ -56,7 +56,7 @@ public: * @param _sol a solution * @param _neighbor a neighbor */ - void update(EOT & _sol, Neighbor & _neighbor) { + void update(EOT & _sol, Neighbor & /*_neighbor*/) { if (bestFoundSoFar.fitness() < _sol.fitness()) bestFoundSoFar = _sol; } @@ -68,7 +68,7 @@ public: * @param _neighbor a neighbor * @return true if _neighbor fitness is better than the "bestFoundSoFar" */ - bool operator()(EOT & _sol, Neighbor & _neighbor) { + bool operator()(EOT & /*_sol*/, Neighbor & _neighbor) { return (bestFoundSoFar.fitness() < _neighbor.fitness()); } diff --git a/mo/src/memory/moCountMoveMemory.h b/mo/src/memory/moCountMoveMemory.h index 22cbba5fd..eb6ae6825 100644 --- a/mo/src/memory/moCountMoveMemory.h +++ b/mo/src/memory/moCountMoveMemory.h @@ -45,7 +45,7 @@ public: * Init all the counters * @param _sol unused solution */ - void init(EOT & _sol) { + void init(EOT & /*_sol*/) { nbMove=0; nbNoMove=0; counter=0; @@ -55,7 +55,7 @@ public: * @param _sol unused solution * @param _neighbor unused neighbor */ - void add(EOT & _sol, Neighbor & _neighbor) { + void add(EOT & /*_sol*/, Neighbor & /*_neighbor*/) { nbMove++; counter=0; } @@ -64,7 +64,7 @@ public: * @param _sol unused solution * @param _neighbor unused neighbor */ - void update(EOT & _sol, Neighbor & _neighbor) { + void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) { nbNoMove++; counter++; } diff --git a/mo/src/memory/moDummyMemory.h b/mo/src/memory/moDummyMemory.h index c927a30f0..f176cb1bc 100644 --- a/mo/src/memory/moDummyMemory.h +++ b/mo/src/memory/moDummyMemory.h @@ -44,17 +44,17 @@ public: /** * Init : NOTHIING TO DO */ - void init(EOT & _sol) {} + void init(EOT & /*_sol*/) {} /** * Add : NOTHIING TO DO */ - void add(EOT & _sol, Neighbor & _neighbor) {} + void add(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {} /** * Update : NOTHIING TO DO */ - void update(EOT & _sol, Neighbor & _neighbor) {} + void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) {} /** * ClearMemory : NOTHIING TO DO diff --git a/mo/src/memory/moIndexedVectorTabuList.h b/mo/src/memory/moIndexedVectorTabuList.h index e1ea94492..b56742602 100644 --- a/mo/src/memory/moIndexedVectorTabuList.h +++ b/mo/src/memory/moIndexedVectorTabuList.h @@ -73,7 +73,7 @@ public: * init the tabuList by clearing the memory * @param _sol the current solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { clearMemory(); } @@ -83,7 +83,7 @@ public: * @param _sol unused solution * @param _neighbor the current neighbor */ - virtual void add(EOT & _sol, Neighbor & _neighbor) { + virtual void add(EOT & /*_sol*/, Neighbor & _neighbor) { if (_neighbor.index() < maxSize) { if (robust) // random value between min and max @@ -98,7 +98,7 @@ public: * @param _sol unused solution * @param _neighbor unused neighbor */ - virtual void update(EOT & _sol, Neighbor & _neighbor) { + virtual void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) { for (unsigned int i = 0; i < maxSize; i++) if (tabuList[i] > 0) tabuList[i]--; @@ -110,7 +110,7 @@ public: * @param _neighbor the current neighbor * @return true if tabuList contains _sol */ - virtual bool check(EOT & _sol, Neighbor & _neighbor) { + virtual bool check(EOT & /*_sol*/, Neighbor & _neighbor) { return (tabuList[_neighbor.index()] > 0); } diff --git a/mo/src/memory/moNeighborVectorTabuList.h b/mo/src/memory/moNeighborVectorTabuList.h index dbf8edb0f..5e8f8eec7 100644 --- a/mo/src/memory/moNeighborVectorTabuList.h +++ b/mo/src/memory/moNeighborVectorTabuList.h @@ -57,7 +57,7 @@ public: * init the tabuList by clearing the memory * @param _sol the current solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { clearMemory(); } @@ -67,7 +67,7 @@ public: * @param _sol unused solution * @param _neighbor the current neighbor */ - virtual void add(EOT & _sol, Neighbor & _neighbor) { + virtual void add(EOT & /*_sol*/, Neighbor & _neighbor) { if (tabuList.size() < maxSize) { std::pair tmp; @@ -87,7 +87,7 @@ public: * @param _sol unused solution * @param _neighbor unused neighbor */ - virtual void update(EOT & _sol, Neighbor & _neighbor) { + virtual void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) { if (howlong > 0) for (unsigned int i=0; i 0) @@ -100,7 +100,7 @@ public: * @param _neighbor the current neighbor * @return true if tabuList contains _sol */ - virtual bool check(EOT & _sol, Neighbor & _neighbor) { + virtual bool check(EOT & /*_sol*/, Neighbor & _neighbor) { for (unsigned int i=0; i 0 && tabuList[i].second > 0 && tabuList[i].first.equals(_neighbor)) || (howlong==0 && tabuList[i].first.equals(_neighbor))) return true; diff --git a/mo/src/memory/moRndIndexedVectorTabuList.h b/mo/src/memory/moRndIndexedVectorTabuList.h index 82ffc0e04..dd6f11765 100644 --- a/mo/src/memory/moRndIndexedVectorTabuList.h +++ b/mo/src/memory/moRndIndexedVectorTabuList.h @@ -67,7 +67,7 @@ public: * @param _sol unused solution * @param _neighbor the current neighbor */ - virtual void add(EOT & _sol, Neighbor & _neighbor) { + virtual void add(EOT & /*_sol*/, Neighbor & _neighbor) { if (_neighbor.index() < maxSize) tabuList[_neighbor.index()] = howlong + rng.uniform(howlongRnd) ; } diff --git a/mo/src/memory/moSolVectorTabuList.h b/mo/src/memory/moSolVectorTabuList.h index ba72ccc43..31c57c0f6 100644 --- a/mo/src/memory/moSolVectorTabuList.h +++ b/mo/src/memory/moSolVectorTabuList.h @@ -57,7 +57,7 @@ public: * init the tabuList by clearing the memory * @param _sol the current solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { clearMemory(); } @@ -67,7 +67,7 @@ public: * @param _sol the current solution * @param _neighbor unused neighbor */ - virtual void add(EOT & _sol, Neighbor & _neighbor) { + virtual void add(EOT & _sol, Neighbor & /*_neighbor*/) { if (tabuList.size() < maxSize) { std::pair tmp; @@ -87,7 +87,7 @@ public: * @param _sol the current solution * @param _neighbor the current neighbor (unused) */ - virtual void update(EOT & _sol, Neighbor & _neighbor) { + virtual void update(EOT & /*_sol*/, Neighbor & /*_neighbor*/) { if (howlong > 0) for (unsigned int i=0; i 0) diff --git a/mo/src/neighborhood/moBackwardVectorVNSelection.h b/mo/src/neighborhood/moBackwardVectorVNSelection.h index b3050c439..a47b31e30 100644 --- a/mo/src/neighborhood/moBackwardVectorVNSelection.h +++ b/mo/src/neighborhood/moBackwardVectorVNSelection.h @@ -69,7 +69,7 @@ public: * @param _solution the current solution * @return true if there is some heuristics */ - virtual bool cont(EOT& _solution){ + virtual bool cont(EOT& /*_solution*/){ return (cycle || (current > 0)); } @@ -78,7 +78,7 @@ public: * * @param _solution the current solution */ - virtual void init(EOT& _solution){ + virtual void init(EOT& /*_solution*/){ current = LSvector.size() - 1; } @@ -87,7 +87,7 @@ public: * * @param _solution the current solution */ - virtual void next(EOT& _solution){ + virtual void next(EOT& /*_solution*/){ current = (current + LSvector.size() -1) % LSvector.size(); } diff --git a/mo/src/neighborhood/moDummyNeighbor.h b/mo/src/neighborhood/moDummyNeighbor.h index a8cd01087..e68b2b079 100644 --- a/mo/src/neighborhood/moDummyNeighbor.h +++ b/mo/src/neighborhood/moDummyNeighbor.h @@ -43,6 +43,6 @@ public: * NOTHING TO DO * @param _solution the related solution */ - virtual void move(EOT& _solution) {} + virtual void move(EOT& /*_solution*/) {} }; #endif diff --git a/mo/src/neighborhood/moDummyNeighborhood.h b/mo/src/neighborhood/moDummyNeighborhood.h index 26c62163c..eda0ae490 100644 --- a/mo/src/neighborhood/moDummyNeighborhood.h +++ b/mo/src/neighborhood/moDummyNeighborhood.h @@ -46,7 +46,7 @@ public: * @param _solution unused solution * @return always false */ - virtual bool hasNeighbor(EOT & _solution) { + virtual bool hasNeighbor(EOT & /*_solution*/) { return false; } @@ -55,21 +55,21 @@ public: * @param _solution unused solution * @param _current unused neighbor */ - virtual void init(EOT & _solution, Neighbor & _current) {} + virtual void init(EOT & /*_solution*/, Neighbor & /*_current*/) {} /** * NOTHING TO DO * @param _solution unused solution * @param _current unused neighbor */ - virtual void next(EOT & _solution, Neighbor & _current) {} + virtual void next(EOT & /*_solution*/, Neighbor & /*_current*/) {} /** * NOTHING TO DO * @param _solution unused solution * @return always false */ - virtual bool cont(EOT & _solution) { + virtual bool cont(EOT & /*_solution*/) { return false; } diff --git a/mo/src/neighborhood/moForwardVectorVNSelection.h b/mo/src/neighborhood/moForwardVectorVNSelection.h index d7d3546cb..d469cf6be 100644 --- a/mo/src/neighborhood/moForwardVectorVNSelection.h +++ b/mo/src/neighborhood/moForwardVectorVNSelection.h @@ -69,7 +69,7 @@ public: * @param _solution the current solution * @return true if there is some heuristics */ - virtual bool cont(EOT& _solution){ + virtual bool cont(EOT& /*_solution*/){ return (cycle || (current <= (LSvector.size() - 2))); } @@ -78,7 +78,7 @@ public: * * @param _solution the current solution */ - virtual void init(EOT& _solution){ + virtual void init(EOT& /*_solution*/){ current = 0; } @@ -87,7 +87,7 @@ public: * * @param _solution the current solution */ - virtual void next(EOT& _solution){ + virtual void next(EOT& /*_solution*/){ current = (current + 1) % LSvector.size(); } diff --git a/mo/src/neighborhood/moIndexNeighbor.h b/mo/src/neighborhood/moIndexNeighbor.h index eaf302966..880c08812 100644 --- a/mo/src/neighborhood/moIndexNeighbor.h +++ b/mo/src/neighborhood/moIndexNeighbor.h @@ -109,7 +109,7 @@ public: * @param _solution solution from which the neighborhood is visited * @param _key index of the IndexNeighbor */ - virtual void index(EOT & _solution, unsigned int _key) { + virtual void index(EOT & /*_solution*/, unsigned int _key) { key = _key; } diff --git a/mo/src/neighborhood/moNeighbor.h b/mo/src/neighborhood/moNeighbor.h index 889dd6817..8186c2435 100644 --- a/mo/src/neighborhood/moNeighbor.h +++ b/mo/src/neighborhood/moNeighbor.h @@ -93,7 +93,7 @@ public: * @param _neighbor a neighbor * @return if _neighbor and this one are equals */ - virtual bool equals(moNeighbor & _neighbor) { + virtual bool equals(moNeighbor & /*_neighbor*/) { return false; } diff --git a/mo/src/neighborhood/moOrderNeighborhood.h b/mo/src/neighborhood/moOrderNeighborhood.h index 384d0dda7..316ba8cba 100644 --- a/mo/src/neighborhood/moOrderNeighborhood.h +++ b/mo/src/neighborhood/moOrderNeighborhood.h @@ -71,7 +71,7 @@ public: * @param _solution the solution to explore * @return true if the neighborhood was not empty */ - virtual bool hasNeighbor(EOT& _solution) { + virtual bool hasNeighbor(EOT& /*_solution*/) { return getNeighborhoodSize() > 0; } @@ -102,7 +102,7 @@ public: * @param _solution the solution to explore * @return true if there is again a neighbor to explore */ - virtual bool cont(EOT & _solution) { + virtual bool cont(EOT & /*_solution*/) { return (currentIndex < getNeighborhoodSize() - 1); } diff --git a/mo/src/neighborhood/moRndVectorVNSelection.h b/mo/src/neighborhood/moRndVectorVNSelection.h index a460f2d45..af4ab22dd 100644 --- a/mo/src/neighborhood/moRndVectorVNSelection.h +++ b/mo/src/neighborhood/moRndVectorVNSelection.h @@ -72,7 +72,7 @@ public: * @param _solution the current solution * @return true if there is some heuristics */ - virtual bool cont(EOT& _solution){ + virtual bool cont(EOT& /*_solution*/){ return ( cycle || (currentOrder <= (order.size() - 2)) ); } @@ -81,7 +81,7 @@ public: * * @param _solution the current solution */ - virtual void init(EOT& _solution) { + virtual void init(EOT& /*_solution*/) { if(order.size() == 0) for(unsigned int i = 0; i < LSvector.size(); i++) order.push_back(i); @@ -98,7 +98,7 @@ public: * * @param _solution the current solution */ - virtual void next(EOT& _solution){ + virtual void next(EOT& /*_solution*/){ currentOrder = (currentOrder + 1) % order.size(); current = order[currentOrder]; diff --git a/mo/src/neighborhood/moRndWithReplNeighborhood.h b/mo/src/neighborhood/moRndWithReplNeighborhood.h index 89537bf09..d66b72ac8 100644 --- a/mo/src/neighborhood/moRndWithReplNeighborhood.h +++ b/mo/src/neighborhood/moRndWithReplNeighborhood.h @@ -68,7 +68,7 @@ public: * @param _solution the solution to explore * @return true if the neighborhood was not empty */ - virtual bool hasNeighbor(EOT& _solution) { + virtual bool hasNeighbor(EOT& /*_solution*/) { return neighborhoodSize > 0; } @@ -97,7 +97,7 @@ public: * @param _solution the solution to explore * @return true if there is again a neighbor to explore */ - virtual bool cont(EOT & _solution) { + virtual bool cont(EOT & /*_solution*/) { if (maxNeighbors == 0) return neighborhoodSize > 0; else diff --git a/mo/src/neighborhood/moRndWithoutReplNeighborhood.h b/mo/src/neighborhood/moRndWithoutReplNeighborhood.h index e51c6d6e7..dfa057a28 100644 --- a/mo/src/neighborhood/moRndWithoutReplNeighborhood.h +++ b/mo/src/neighborhood/moRndWithoutReplNeighborhood.h @@ -69,7 +69,7 @@ public: * @param _solution the solution to explore * @return true if the neighborhood was not empty */ - virtual bool hasNeighbor(EOT& _solution) { + virtual bool hasNeighbor(EOT& /*_solution*/) { return neighborhoodSize > 0; } @@ -110,7 +110,7 @@ public: * @param _solution the solution to explore * @return true if there is again a neighbor to explore */ - virtual bool cont(EOT & _solution) { + virtual bool cont(EOT & /*_solution*/) { return (maxIndex > 0) ; } diff --git a/mo/src/perturb/moNeighborhoodPerturb.h b/mo/src/perturb/moNeighborhoodPerturb.h index 676f5a828..fe66bdbb9 100644 --- a/mo/src/perturb/moNeighborhoodPerturb.h +++ b/mo/src/perturb/moNeighborhoodPerturb.h @@ -79,7 +79,7 @@ public: * @param _sol the current solution * @param _neighbor unused neighbor (always empty) */ - virtual void add(EOT & _sol, Neighbor & _neighbor) { + virtual void add(EOT & _sol, Neighbor & /*_neighbor*/) { (*this).init(_sol); } @@ -88,7 +88,7 @@ public: * @param _sol the current solution * @param _neighbor unused neighbor (always empty) */ - virtual void update(EOT & _sol, Neighbor & _neighbor) { + virtual void update(EOT & _sol, Neighbor & /*_neighbor*/) { if (otherNeighborhood.cont(_sol)) otherNeighborhood.next(_sol, current); else diff --git a/mo/src/problems/bitString/moBitsWithReplNeighborhood.h b/mo/src/problems/bitString/moBitsWithReplNeighborhood.h index 8c833f1a2..34d2a9623 100644 --- a/mo/src/problems/bitString/moBitsWithReplNeighborhood.h +++ b/mo/src/problems/bitString/moBitsWithReplNeighborhood.h @@ -98,13 +98,13 @@ public: * @param _neighbor the first neighbor * @param _n Hamming distance of the neighbor */ - virtual void randomNeighbor(EOT & _solution, Neighbor & _neighbor, unsigned _n) { + virtual void randomNeighbor(EOT & /*_solution*/, Neighbor & _neighbor, unsigned _n) { _neighbor.bits.resize(_n); _neighbor.nBits = _n; unsigned i; unsigned b; - unsigned tmp; + // unsigned tmp; for(unsigned k = 0; k < _n; k++) { i = rng.random(length - k); @@ -167,7 +167,7 @@ public: * @param _solution the solution to explore * @return true if there is again a neighbor to explore: population size larger or equals than 1 */ - virtual bool cont(EOT & _solution) { + virtual bool cont(EOT & /*_solution*/) { return nNeighbors < sampleSize ; } diff --git a/mo/src/problems/bitString/moBitsWithoutReplNeighborhood.h b/mo/src/problems/bitString/moBitsWithoutReplNeighborhood.h index 4584a791a..34dad414f 100644 --- a/mo/src/problems/bitString/moBitsWithoutReplNeighborhood.h +++ b/mo/src/problems/bitString/moBitsWithoutReplNeighborhood.h @@ -142,7 +142,7 @@ public: * @param _solution the solution to explore * @param _neighbor the first neighbor */ - virtual void init(EOT & _solution, Neighbor & _neighbor) { + virtual void init(EOT & /*_solution*/, Neighbor & _neighbor) { maxIndex = neighborhoodSize ; unsigned i = rng.random(maxIndex); @@ -163,7 +163,7 @@ public: * @param _solution the solution to explore (population of solutions) * @param _neighbor the next neighbor which in order of distance */ - virtual void next(EOT & _solution, Neighbor & _neighbor) { + virtual void next(EOT & /*_solution*/, Neighbor & _neighbor) { unsigned i = rng.random(maxIndex); key = indexVector[i]; @@ -180,7 +180,7 @@ public: * @param _solution the solution to explore * @return true if there is again a neighbor to explore: population size larger or equals than 1 */ - virtual bool cont(EOT & _solution) { + virtual bool cont(EOT & /*_solution*/) { return neighborhoodSize - maxIndex < sampleSize ; } diff --git a/mo/src/problems/permutation/moSwapNeighborhood.h b/mo/src/problems/permutation/moSwapNeighborhood.h index 8354337e6..0ad0f1a2f 100644 --- a/mo/src/problems/permutation/moSwapNeighborhood.h +++ b/mo/src/problems/permutation/moSwapNeighborhood.h @@ -54,7 +54,7 @@ public: * @param _solution the solution to explore * @param _current the first neighbor */ - virtual void init(EOT& _solution, Neighbor& _current) { + virtual void init(EOT& /*_solution*/, Neighbor& _current) { indices.first=0; indices.second=1; _current.setIndices(0,1); diff --git a/mo/src/problems/permutation/moTwoOptExNeighborhood.h b/mo/src/problems/permutation/moTwoOptExNeighborhood.h index 9723946bb..886fbc3de 100755 --- a/mo/src/problems/permutation/moTwoOptExNeighborhood.h +++ b/mo/src/problems/permutation/moTwoOptExNeighborhood.h @@ -57,7 +57,7 @@ public: * @param _solution the solution to explore * @param _current the first neighbor */ - virtual void init(EOT& _solution, Neighbor& _current) { + virtual void init(EOT& /*_solution*/, Neighbor& _current) { indices.first=0; indices.second=1; _current.setIndices(0,1);