Parcourir la source

Merge branch 'release/v0.1.5'

Jérôme BUISINE il y a 4 ans
Parent
commit
b6215098b0
97 fichiers modifiés avec 3921 ajouts et 391 suppressions
  1. 3 1
      .gitignore
  2. 0 3
      .vscode/settings.json
  3. 2 2
      README.md
  4. 0 85
      checkpoints.csv
  5. BIN
      docs/build/doctrees/environment.pickle
  6. BIN
      docs/build/doctrees/macop.doctree
  7. BIN
      docs/build/doctrees/macop/macop.algorithms.Algorithm.doctree
  8. BIN
      docs/build/doctrees/macop/macop.algorithms.IteratedLocalSearch.doctree
  9. BIN
      docs/build/doctrees/macop/macop.algorithms.LocalSearch.doctree
  10. BIN
      docs/build/doctrees/macop/macop.checkpoints.BasicCheckpoint.doctree
  11. BIN
      docs/build/doctrees/macop/macop.checkpoints.Checkpoint.doctree
  12. BIN
      docs/build/doctrees/macop/macop.evaluators.EvaluatorExample.doctree
  13. BIN
      docs/build/doctrees/macop/macop.operators.Operator.doctree
  14. BIN
      docs/build/doctrees/macop/macop.operators.crossovers.Crossover.doctree
  15. BIN
      docs/build/doctrees/macop/macop.operators.crossovers.RandomSplitCrossover.doctree
  16. BIN
      docs/build/doctrees/macop/macop.operators.crossovers.SimpleCrossover.doctree
  17. BIN
      docs/build/doctrees/macop/macop.operators.mutators.Mutation.doctree
  18. BIN
      docs/build/doctrees/macop/macop.operators.mutators.SimpleBinaryMutation.doctree
  19. BIN
      docs/build/doctrees/macop/macop.operators.mutators.SimpleMutation.doctree
  20. BIN
      docs/build/doctrees/macop/macop.operators.policies.Policy.doctree
  21. BIN
      docs/build/doctrees/macop/macop.operators.policies.RandomPolicy.doctree
  22. BIN
      docs/build/doctrees/macop/macop.solutions.BinarySolution.doctree
  23. BIN
      docs/build/doctrees/macop/macop.solutions.CombinatoryIntegerSolution.doctree
  24. BIN
      docs/build/doctrees/macop/macop.solutions.IntegerSolution.doctree
  25. BIN
      docs/build/doctrees/macop/macop.solutions.Solution.doctree
  26. 1 1
      docs/build/html/.buildinfo
  27. 14 2
      docs/build/html/_modules/index.html
  28. 27 14
      docs/build/html/_modules/macop/algorithms/Algorithm.html
  29. 3 3
      docs/build/html/_modules/macop/algorithms/IteratedLocalSearch.html
  30. 3 3
      docs/build/html/_modules/macop/algorithms/LocalSearch.html
  31. 20 5
      docs/build/html/_modules/macop/checkpoints/BasicCheckpoint.html
  32. 4 4
      docs/build/html/_modules/macop/checkpoints/Checkpoint.html
  33. 215 0
      docs/build/html/_modules/macop/evaluators/EvaluatorExample.html
  34. 16 10
      docs/build/html/_modules/macop/operators/Operator.html
  35. 213 0
      docs/build/html/_modules/macop/operators/crossovers/Crossover.html
  36. 243 0
      docs/build/html/_modules/macop/operators/crossovers/RandomSplitCrossover.html
  37. 243 0
      docs/build/html/_modules/macop/operators/crossovers/SimpleCrossover.html
  38. 213 0
      docs/build/html/_modules/macop/operators/mutators/Mutation.html
  39. 239 0
      docs/build/html/_modules/macop/operators/mutators/SimpleBinaryMutation.html
  40. 244 0
      docs/build/html/_modules/macop/operators/mutators/SimpleMutation.html
  41. 253 0
      docs/build/html/_modules/macop/operators/policies/Policy.html
  42. 219 0
      docs/build/html/_modules/macop/operators/policies/RandomPolicy.html
  43. 245 0
      docs/build/html/_modules/macop/solutions/BinarySolution.html
  44. 246 0
      docs/build/html/_modules/macop/solutions/CombinatoryIntegerSolution.html
  45. 246 0
      docs/build/html/_modules/macop/solutions/IntegerSolution.html
  46. 1 1
      docs/build/html/_static/documentation_options.js
  47. 2 2
      docs/build/html/contributing.html
  48. 2 2
      docs/build/html/description.html
  49. 2 2
      docs/build/html/examples.html
  50. 133 29
      docs/build/html/genindex.html
  51. 2 2
      docs/build/html/index.html
  52. 17 17
      docs/build/html/macop.html
  53. 38 38
      docs/build/html/macop/macop.algorithms.Algorithm.html
  54. 10 16
      docs/build/html/macop/macop.algorithms.IteratedLocalSearch.html
  55. 7 10
      docs/build/html/macop/macop.algorithms.LocalSearch.html
  56. 26 6
      docs/build/html/macop/macop.checkpoints.BasicCheckpoint.html
  57. 3 3
      docs/build/html/macop/macop.checkpoints.Checkpoint.html
  58. 19 4
      docs/build/html/macop/macop.evaluators.EvaluatorExample.html
  59. 41 6
      docs/build/html/macop/macop.operators.Operator.html
  60. 31 4
      docs/build/html/macop/macop.operators.crossovers.Crossover.html
  61. 31 4
      docs/build/html/macop/macop.operators.crossovers.RandomSplitCrossover.html
  62. 31 4
      docs/build/html/macop/macop.operators.crossovers.SimpleCrossover.html
  63. 31 4
      docs/build/html/macop/macop.operators.mutators.Mutation.html
  64. 31 4
      docs/build/html/macop/macop.operators.mutators.SimpleBinaryMutation.html
  65. 31 4
      docs/build/html/macop/macop.operators.mutators.SimpleMutation.html
  66. 51 4
      docs/build/html/macop/macop.operators.policies.Policy.html
  67. 31 4
      docs/build/html/macop/macop.operators.policies.RandomPolicy.html
  68. 43 4
      docs/build/html/macop/macop.solutions.BinarySolution.html
  69. 43 4
      docs/build/html/macop/macop.solutions.CombinatoryIntegerSolution.html
  70. 43 4
      docs/build/html/macop/macop.solutions.IntegerSolution.html
  71. 3 2
      docs/build/html/macop/macop.solutions.Solution.html
  72. BIN
      docs/build/html/objects.inv
  73. 2 2
      docs/build/html/py-modindex.html
  74. 2 2
      docs/build/html/search.html
  75. 1 1
      docs/build/html/searchindex.js
  76. 2 2
      docs/source/conf.py
  77. 25 12
      macop/algorithms/Algorithm.py
  78. 1 1
      macop/algorithms/IteratedLocalSearch.py
  79. 1 1
      macop/algorithms/LocalSearch.py
  80. 17 2
      macop/checkpoints/BasicCheckpoint.py
  81. 2 2
      macop/checkpoints/Checkpoint.py
  82. 14 2
      macop/evaluators/EvaluatorExample.py
  83. 11 5
      macop/operators/Operator.py
  84. 10 0
      macop/operators/crossovers/Crossover.py
  85. 20 4
      macop/operators/crossovers/RandomSplitCrossover.py
  86. 16 0
      macop/operators/crossovers/SimpleCrossover.py
  87. 7 0
      macop/operators/mutators/Mutation.py
  88. 20 4
      macop/operators/mutators/SimpleBinaryMutation.py
  89. 20 4
      macop/operators/mutators/SimpleMutation.py
  90. 32 7
      macop/operators/policies/Policy.py
  91. 11 0
      macop/operators/policies/RandomPolicy.py
  92. 20 6
      macop/solutions/BinarySolution.py
  93. 20 5
      macop/solutions/CombinatoryIntegerSolution.py
  94. 20 5
      macop/solutions/IntegerSolution.py
  95. 25 4
      macop/solutions/Solution.py
  96. 6 2
      mainExample.py
  97. 1 1
      setup.py

+ 3 - 1
.gitignore

@@ -59,5 +59,7 @@ docs/_build/
 target/
 
 example.log
-checkpoint.csv
+checkpoints.csv
 !docs/build
+.vscode
+.python-version

+ 0 - 3
.vscode/settings.json

@@ -1,3 +0,0 @@
-{
-    "python.pythonPath": "/home/jbuisine/.pyenv/versions/3.6.0/bin/python"
-}

+ 2 - 2
README.md

@@ -1,6 +1,6 @@
 # Minimalist And Customizable Optimization Package
 
-![](https://github.com/jbuisine/macop/workflows/build/badge.svg) ![](https://img.shields.io/pypi/v/macop) ![](https://img.shields.io/pypi/dm/macop?style=plastic)
+![](https://github.com/jbuisine/macop/workflows/build/badge.svg) ![](https://img.shields.io/pypi/v/macop) ![](https://img.shields.io/pypi/dm/macop)
 
 <p align="center">
     <img src="https://github.com/jbuisine/macop/blob/master/logo_macop.png" alt="" width="50%">
@@ -25,7 +25,7 @@
 
 You can see an example of use in the `mainExample.py` python file.
 
-Fully documentation of package with examples is also available. 
+Fully documentation of package with examples is also [available](https://jbuisine.github.io/macop). 
 
 ## Add as dependency
 

+ 0 - 85
checkpoints.csv

@@ -1,85 +0,0 @@
-5;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-10;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-15;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-20;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-25;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-30;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-35;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-40;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-45;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-50;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-55;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-60;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-65;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-70;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-75;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-80;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-85;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-90;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-95;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-100;0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1;234;
-105;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-110;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-115;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-120;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-125;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-130;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-135;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-140;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-145;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-150;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-155;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-160;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-165;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-170;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-175;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-180;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-185;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-190;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-195;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-200;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-205;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-210;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-215;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-220;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-225;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-230;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-235;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-240;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-245;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-250;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-255;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-260;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-265;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-270;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-275;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-280;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-285;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-290;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-295;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-300;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-305;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-310;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-315;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-320;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-325;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-330;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-335;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-340;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-345;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-350;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-355;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-360;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-365;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-370;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-375;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-380;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-385;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-390;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-395;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-400;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-405;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-410;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-415;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-420;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;
-425;0 1 1 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1;386;

BIN
docs/build/doctrees/environment.pickle


BIN
docs/build/doctrees/macop.doctree


BIN
docs/build/doctrees/macop/macop.algorithms.Algorithm.doctree


BIN
docs/build/doctrees/macop/macop.algorithms.IteratedLocalSearch.doctree


BIN
docs/build/doctrees/macop/macop.algorithms.LocalSearch.doctree


BIN
docs/build/doctrees/macop/macop.checkpoints.BasicCheckpoint.doctree


BIN
docs/build/doctrees/macop/macop.checkpoints.Checkpoint.doctree


BIN
docs/build/doctrees/macop/macop.evaluators.EvaluatorExample.doctree


BIN
docs/build/doctrees/macop/macop.operators.Operator.doctree


BIN
docs/build/doctrees/macop/macop.operators.crossovers.Crossover.doctree


BIN
docs/build/doctrees/macop/macop.operators.crossovers.RandomSplitCrossover.doctree


BIN
docs/build/doctrees/macop/macop.operators.crossovers.SimpleCrossover.doctree


BIN
docs/build/doctrees/macop/macop.operators.mutators.Mutation.doctree


BIN
docs/build/doctrees/macop/macop.operators.mutators.SimpleBinaryMutation.doctree


BIN
docs/build/doctrees/macop/macop.operators.mutators.SimpleMutation.doctree


BIN
docs/build/doctrees/macop/macop.operators.policies.Policy.doctree


BIN
docs/build/doctrees/macop/macop.operators.policies.RandomPolicy.doctree


BIN
docs/build/doctrees/macop/macop.solutions.BinarySolution.doctree


BIN
docs/build/doctrees/macop/macop.solutions.CombinatoryIntegerSolution.doctree


BIN
docs/build/doctrees/macop/macop.solutions.IntegerSolution.doctree


BIN
docs/build/doctrees/macop/macop.solutions.Solution.doctree


+ 1 - 1
docs/build/html/.buildinfo

@@ -1,4 +1,4 @@
 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 04e5922602b763974593400001cb5c4b
+config: 4e8bf07509b52fff9583ca0872b8a0a1
 tags: 645f666f9bcd5a90fca523b33c5a78b7

+ 14 - 2
docs/build/html/_modules/index.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Overview: module code &mdash; macop v0.1.4 documentation</title>
+  <title>Overview: module code &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -154,7 +154,19 @@
 <li><a href="macop/algorithms/LocalSearch.html">macop.algorithms.LocalSearch</a></li>
 <li><a href="macop/checkpoints/BasicCheckpoint.html">macop.checkpoints.BasicCheckpoint</a></li>
 <li><a href="macop/checkpoints/Checkpoint.html">macop.checkpoints.Checkpoint</a></li>
+<li><a href="macop/evaluators/EvaluatorExample.html">macop.evaluators.EvaluatorExample</a></li>
 <li><a href="macop/operators/Operator.html">macop.operators.Operator</a></li>
+<li><a href="macop/operators/crossovers/Crossover.html">macop.operators.crossovers.Crossover</a></li>
+<li><a href="macop/operators/crossovers/RandomSplitCrossover.html">macop.operators.crossovers.RandomSplitCrossover</a></li>
+<li><a href="macop/operators/crossovers/SimpleCrossover.html">macop.operators.crossovers.SimpleCrossover</a></li>
+<li><a href="macop/operators/mutators/Mutation.html">macop.operators.mutators.Mutation</a></li>
+<li><a href="macop/operators/mutators/SimpleBinaryMutation.html">macop.operators.mutators.SimpleBinaryMutation</a></li>
+<li><a href="macop/operators/mutators/SimpleMutation.html">macop.operators.mutators.SimpleMutation</a></li>
+<li><a href="macop/operators/policies/Policy.html">macop.operators.policies.Policy</a></li>
+<li><a href="macop/operators/policies/RandomPolicy.html">macop.operators.policies.RandomPolicy</a></li>
+<li><a href="macop/solutions/BinarySolution.html">macop.solutions.BinarySolution</a></li>
+<li><a href="macop/solutions/CombinatoryIntegerSolution.html">macop.solutions.CombinatoryIntegerSolution</a></li>
+<li><a href="macop/solutions/IntegerSolution.html">macop.solutions.IntegerSolution</a></li>
 </ul>
 
            </div>

Fichier diff supprimé car celui-ci est trop grand
+ 27 - 14
docs/build/html/_modules/macop/algorithms/Algorithm.html


+ 3 - 3
docs/build/html/_modules/macop/algorithms/IteratedLocalSearch.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.algorithms.IteratedLocalSearch &mdash; macop v0.1.4 documentation</title>
+  <title>macop.algorithms.IteratedLocalSearch &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -180,7 +180,7 @@
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Run the iterated local search algorithm using local search (EvE compromise)</span>
 
-<span class="sd">        Attributes:</span>
+<span class="sd">        Args:</span>
 <span class="sd">            _evaluations: {int} -- number of global evaluations for ILS</span>
 <span class="sd">            _ls_evaluations: {int} -- number of Local search evaluations (default: 100)</span>
 

+ 3 - 3
docs/build/html/_modules/macop/algorithms/LocalSearch.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.algorithms.LocalSearch &mdash; macop v0.1.4 documentation</title>
+  <title>macop.algorithms.LocalSearch &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -179,7 +179,7 @@
         <span class="sd">&quot;&quot;&quot;</span>
 <span class="sd">        Run the local search algorithm</span>
 
-<span class="sd">        Attributes:</span>
+<span class="sd">        Args:</span>
 <span class="sd">            _evaluations: {int} -- number of Local search evaluations</span>
 <span class="sd">            </span>
 <span class="sd">        Returns:</span>

+ 20 - 5
docs/build/html/_modules/macop/checkpoints/BasicCheckpoint.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.checkpoints.BasicCheckpoint &mdash; macop v0.1.4 documentation</title>
+  <title>macop.checkpoints.BasicCheckpoint &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -151,7 +151,10 @@
            <div itemprop="articleBody">
             
   <h1>Source code for macop.checkpoints.BasicCheckpoint</h1><div class="highlight"><pre>
-<span></span><span class="c1"># main imports</span>
+<span></span><span class="sd">&quot;&quot;&quot;Basic Checkpoint class implementation</span>
+<span class="sd">&quot;&quot;&quot;</span>
+
+<span class="c1"># main imports</span>
 <span class="kn">import</span> <span class="nn">os</span>
 <span class="kn">import</span> <span class="nn">logging</span>
 <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
@@ -161,13 +164,23 @@
 
 
 <div class="viewcode-block" id="BasicCheckpoint"><a class="viewcode-back" href="../../../macop/macop.checkpoints.BasicCheckpoint.html#macop.checkpoints.BasicCheckpoint.BasicCheckpoint">[docs]</a><span class="k">class</span> <span class="nc">BasicCheckpoint</span><span class="p">(</span><span class="n">Checkpoint</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    BasicCheckpoint is used for loading previous computations and start again after loading checkpoit</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        algo: {Algorithm} -- main algorithm instance reference</span>
+<span class="sd">        every: {int} -- checkpoint frequency used (based on number of evaluations)</span>
+<span class="sd">        filepath: {str} -- file path where checkpoints will be saved</span>
+<span class="sd">    &quot;&quot;&quot;</span>
     <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_algo</span><span class="p">,</span> <span class="n">_every</span><span class="p">,</span> <span class="n">_filepath</span><span class="p">):</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">algo</span> <span class="o">=</span> <span class="n">_algo</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">every</span> <span class="o">=</span> <span class="n">_every</span>
         <span class="bp">self</span><span class="o">.</span><span class="n">filepath</span> <span class="o">=</span> <span class="n">_filepath</span>
 
 <div class="viewcode-block" id="BasicCheckpoint.run"><a class="viewcode-back" href="../../../macop/macop.checkpoints.BasicCheckpoint.html#macop.checkpoints.BasicCheckpoint.BasicCheckpoint.run">[docs]</a>    <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Check if necessary to do backup based on `every` variable</span>
+<span class="sd">        &quot;&quot;&quot;</span>
         <span class="c1"># get current best solution</span>
         <span class="n">solution</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">bestSolution</span>
 
@@ -199,7 +212,9 @@
                     <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">line</span><span class="p">)</span></div>
 
 <div class="viewcode-block" id="BasicCheckpoint.load"><a class="viewcode-back" href="../../../macop/macop.checkpoints.BasicCheckpoint.html#macop.checkpoints.BasicCheckpoint.BasicCheckpoint.load">[docs]</a>    <span class="k">def</span> <span class="nf">load</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
-
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Load last backup line of solution and set algorithm state (best solution and evaluations) at this backup</span>
+<span class="sd">        &quot;&quot;&quot;</span>
         <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">filepath</span><span class="p">):</span>
 
             <span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">&#39;Load best solution from last checkpoint&#39;</span><span class="p">)</span>

+ 4 - 4
docs/build/html/_modules/macop/checkpoints/Checkpoint.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.checkpoints.Checkpoint &mdash; macop v0.1.4 documentation</title>
+  <title>macop.checkpoints.Checkpoint &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -173,14 +173,14 @@
         <span class="bp">self</span><span class="o">.</span><span class="n">filepath</span> <span class="o">=</span> <span class="n">_filepath</span>
 
         <span class="c1"># build path if not already exists</span>
-        <span class="n">head</span><span class="p">,</span> <span class="n">tail</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">filepath</span><span class="p">)</span>
+        <span class="n">head</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">filepath</span><span class="p">)</span>
 
         <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">head</span><span class="p">):</span>
             <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">head</span><span class="p">)</span>
 
 <div class="viewcode-block" id="Checkpoint.run"><a class="viewcode-back" href="../../../macop/macop.checkpoints.Checkpoint.html#macop.checkpoints.Checkpoint.Checkpoint.run">[docs]</a>    <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Check if necessary to do backup based on `_every` variable</span>
+<span class="sd">        Check if necessary to do backup based on `every` variable</span>
 <span class="sd">        &quot;&quot;&quot;</span>
         <span class="k">pass</span></div>
 

+ 215 - 0
docs/build/html/_modules/macop/evaluators/EvaluatorExample.html

@@ -0,0 +1,215 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.evaluators.EvaluatorExample &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.evaluators.EvaluatorExample</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.evaluators.EvaluatorExample</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Python evaluator function example</span>
+<span class="sd">&quot;&quot;&quot;</span>
+
+
+<span class="c1"># evaluator example</span>
+<div class="viewcode-block" id="evaluatorExample"><a class="viewcode-back" href="../../../macop/macop.evaluators.EvaluatorExample.html#macop.evaluators.EvaluatorExample.evaluatorExample">[docs]</a><span class="k">def</span> <span class="nf">evaluatorExample</span><span class="p">(</span><span class="n">_solution</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Evaluator&#39;s example of solution to compute fitness</span>
+
+<span class="sd">    Args:</span>
+<span class="sd">        _solution: {Solution} -- solution to evaluate</span>
+
+<span class="sd">    Returns:</span>
+<span class="sd">        {float} -- fitness score of solution</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+    <span class="n">fitness</span> <span class="o">=</span> <span class="mi">0</span>
+    <span class="k">for</span> <span class="n">index</span><span class="p">,</span> <span class="n">elem</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">_solution</span><span class="o">.</span><span class="n">data</span><span class="p">):</span>
+        <span class="n">fitness</span> <span class="o">=</span> <span class="n">fitness</span> <span class="o">+</span> <span class="p">(</span><span class="n">elem</span> <span class="o">*</span> <span class="n">index</span><span class="p">)</span>
+
+    <span class="k">return</span> <span class="n">fitness</span></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 16 - 10
docs/build/html/_modules/macop/operators/Operator.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.operators.Operator &mdash; macop v0.1.4 documentation</title>
+  <title>macop.operators.Operator &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -151,39 +151,45 @@
            <div itemprop="articleBody">
             
   <h1>Source code for macop.operators.Operator</h1><div class="highlight"><pre>
-<span></span><span class="c1"># main imports</span>
+<span></span><span class="sd">&quot;&quot;&quot;Abstract Operator class</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># main imports</span>
 <span class="kn">from</span> <span class="nn">enum</span> <span class="kn">import</span> <span class="n">Enum</span>
 
 
 <span class="c1"># enumeration which stores kind of operator</span>
 <div class="viewcode-block" id="KindOperator"><a class="viewcode-back" href="../../../macop/macop.operators.Operator.html#macop.operators.Operator.KindOperator">[docs]</a><span class="k">class</span> <span class="nc">KindOperator</span><span class="p">(</span><span class="n">Enum</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Enum in order to recognize kind of operators</span>
+<span class="sd">    &quot;&quot;&quot;</span>
     <span class="n">MUTATOR</span> <span class="o">=</span> <span class="mi">1</span>
     <span class="n">CROSSOVER</span> <span class="o">=</span> <span class="mi">2</span></div>
 
 
-<span class="k">class</span> <span class="nc">Operator</span><span class="p">():</span>
+<div class="viewcode-block" id="Operator"><a class="viewcode-back" href="../../../macop/macop.operators.Operator.html#macop.operators.Operator.Operator">[docs]</a><span class="k">class</span> <span class="nc">Operator</span><span class="p">():</span>
+    <span class="sd">&quot;&quot;&quot;Abstract Operator class which enables to update solution applying operator (computation)</span>
+<span class="sd">    &quot;&quot;&quot;</span>
     <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
         <span class="k">pass</span>
 
-    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">solution</span><span class="p">):</span>
+<div class="viewcode-block" id="Operator.apply"><a class="viewcode-back" href="../../../macop/macop.operators.Operator.html#macop.operators.Operator.Operator.apply">[docs]</a>    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_solution</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;Apply the current operator transformation</span>
 
 <span class="sd">        Args:</span>
-<span class="sd">            solution (Solution): Solution instance</span>
+<span class="sd">            _solution: {Solution} -- Solution instance</span>
 
 <span class="sd">        Raises:</span>
 <span class="sd">            NotImplementedError: if method not implemented into child class</span>
 <span class="sd">        &quot;&quot;&quot;</span>
-        <span class="k">raise</span> <span class="ne">NotImplementedError</span>
+        <span class="k">raise</span> <span class="ne">NotImplementedError</span></div>
 
-    <span class="k">def</span> <span class="nf">setAlgo</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">algo</span><span class="p">):</span>
+<div class="viewcode-block" id="Operator.setAlgo"><a class="viewcode-back" href="../../../macop/macop.operators.Operator.html#macop.operators.Operator.Operator.setAlgo">[docs]</a>    <span class="k">def</span> <span class="nf">setAlgo</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_algo</span><span class="p">):</span>
         <span class="sd">&quot;&quot;&quot;Keep into operator reference of the whole algorithm</span>
 <span class="sd">           The reason is to better manage operator instance</span>
 
 <span class="sd">        Args:</span>
-<span class="sd">            algo (Algorithm): the algorithm reference runned</span>
+<span class="sd">            _algo: {Algorithm} -- the algorithm reference runned</span>
 <span class="sd">        &quot;&quot;&quot;</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">algo</span> <span class="o">=</span> <span class="n">algo</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">algo</span> <span class="o">=</span> <span class="n">_algo</span></div></div>
 </pre></div>
 
            </div>

+ 213 - 0
docs/build/html/_modules/macop/operators/crossovers/Crossover.html

@@ -0,0 +1,213 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.operators.crossovers.Crossover &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.operators.crossovers.Crossover</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.operators.crossovers.Crossover</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Abstract Crossover class</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># module imports</span>
+<span class="kn">from</span> <span class="nn">..Operator</span> <span class="kn">import</span> <span class="n">KindOperator</span><span class="p">,</span> <span class="n">Operator</span>
+
+
+<span class="c1"># main mutation class</span>
+<div class="viewcode-block" id="Crossover"><a class="viewcode-back" href="../../../../macop/macop.operators.crossovers.Crossover.html#macop.operators.crossovers.Crossover.Crossover">[docs]</a><span class="k">class</span> <span class="nc">Crossover</span><span class="p">(</span><span class="n">Operator</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Abstract crossover extend from Operator</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        kind: {KindOperator} -- specify the kind of operator</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">kind</span> <span class="o">=</span> <span class="n">KindOperator</span><span class="o">.</span><span class="n">CROSSOVER</span>
+
+<div class="viewcode-block" id="Crossover.apply"><a class="viewcode-back" href="../../../../macop/macop.operators.crossovers.Crossover.html#macop.operators.crossovers.Crossover.Crossover.apply">[docs]</a>    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">solution</span><span class="p">):</span>
+        <span class="k">raise</span> <span class="ne">NotImplementedError</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 243 - 0
docs/build/html/_modules/macop/operators/crossovers/RandomSplitCrossover.html

@@ -0,0 +1,243 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.operators.crossovers.RandomSplitCrossover &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.operators.crossovers.RandomSplitCrossover</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.operators.crossovers.RandomSplitCrossover</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Crossover implementation which generated new solution by randomly splitting best solution and current solution</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># main imports</span>
+<span class="kn">import</span> <span class="nn">random</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+
+<span class="c1"># module imports</span>
+<span class="kn">from</span> <span class="nn">.Crossover</span> <span class="kn">import</span> <span class="n">Crossover</span>
+
+<span class="c1"># need to import the specify kind of solution</span>
+<span class="kn">from</span> <span class="nn">...solutions.BinarySolution</span> <span class="kn">import</span> <span class="n">BinarySolution</span>
+<span class="kn">from</span> <span class="nn">...solutions.Solution</span> <span class="kn">import</span> <span class="n">Solution</span>
+
+
+<div class="viewcode-block" id="RandomSplitCrossover"><a class="viewcode-back" href="../../../../macop/macop.operators.crossovers.RandomSplitCrossover.html#macop.operators.crossovers.RandomSplitCrossover.RandomSplitCrossover">[docs]</a><span class="k">class</span> <span class="nc">RandomSplitCrossover</span><span class="p">(</span><span class="n">Crossover</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Crossover implementation which generated new solution by randomly splitting best solution and current solution</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        kind: {KindOperator} -- specify the kind of operator</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+<div class="viewcode-block" id="RandomSplitCrossover.apply"><a class="viewcode-back" href="../../../../macop/macop.operators.crossovers.RandomSplitCrossover.html#macop.operators.crossovers.RandomSplitCrossover.RandomSplitCrossover.apply">[docs]</a>    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_solution</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Create new solution based on best solution found and solution passed as parameter</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            _solution: {Solution} -- the solution to use for generating new solution</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            {Solution} -- new generated solution</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="n">size</span> <span class="o">=</span> <span class="n">_solution</span><span class="o">.</span><span class="n">size</span>
+
+        <span class="c1"># copy data of solution</span>
+        <span class="n">firstData</span> <span class="o">=</span> <span class="n">_solution</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+        <span class="c1"># get best solution from current algorithm</span>
+        <span class="n">secondData</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">bestSolution</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+
+        <span class="n">splitIndex</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">secondData</span><span class="p">))</span>
+
+        <span class="k">if</span> <span class="n">random</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mf">0.5</span><span class="p">:</span>
+            <span class="n">firstData</span><span class="p">[</span><span class="n">splitIndex</span><span class="p">:(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)]</span> <span class="o">=</span> <span class="n">firstData</span><span class="p">[</span><span class="n">splitIndex</span><span class="p">:(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)]</span>
+            <span class="n">currentData</span> <span class="o">=</span> <span class="n">firstData</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">secondData</span><span class="p">[</span><span class="n">splitIndex</span><span class="p">:(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)]</span> <span class="o">=</span> <span class="n">firstData</span><span class="p">[</span><span class="n">splitIndex</span><span class="p">:(</span><span class="n">size</span> <span class="o">-</span>
+                                                                      <span class="mi">1</span><span class="p">)]</span>
+            <span class="n">currentData</span> <span class="o">=</span> <span class="n">secondData</span>
+
+        <span class="c1"># create solution of same kind with new data</span>
+        <span class="k">return</span> <span class="nb">globals</span><span class="p">()[</span><span class="nb">type</span><span class="p">(</span><span class="n">_solution</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="p">](</span><span class="n">currentData</span><span class="p">,</span> <span class="n">size</span><span class="p">)</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 243 - 0
docs/build/html/_modules/macop/operators/crossovers/SimpleCrossover.html

@@ -0,0 +1,243 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.operators.crossovers.SimpleCrossover &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.operators.crossovers.SimpleCrossover</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.operators.crossovers.SimpleCrossover</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Crossover implementation which generated new solution by splitting at mean size best solution and current solution</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># main imports</span>
+<span class="kn">import</span> <span class="nn">random</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+
+<span class="c1"># module imports</span>
+<span class="kn">from</span> <span class="nn">.Crossover</span> <span class="kn">import</span> <span class="n">Crossover</span>
+
+<span class="kn">from</span> <span class="nn">...solutions.BinarySolution</span> <span class="kn">import</span> <span class="n">BinarySolution</span>
+<span class="kn">from</span> <span class="nn">...solutions.Solution</span> <span class="kn">import</span> <span class="n">Solution</span>
+
+
+<div class="viewcode-block" id="SimpleCrossover"><a class="viewcode-back" href="../../../../macop/macop.operators.crossovers.SimpleCrossover.html#macop.operators.crossovers.SimpleCrossover.SimpleCrossover">[docs]</a><span class="k">class</span> <span class="nc">SimpleCrossover</span><span class="p">(</span><span class="n">Crossover</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Crossover implementation which generated new solution by splitting at mean size best solution and current solution</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        kind: {Algorithm} -- specify the kind of operator</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+<div class="viewcode-block" id="SimpleCrossover.apply"><a class="viewcode-back" href="../../../../macop/macop.operators.crossovers.SimpleCrossover.html#macop.operators.crossovers.SimpleCrossover.SimpleCrossover.apply">[docs]</a>    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">solution</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Create new solution based on best solution found and solution passed as parameter</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            _solution: {Solution} -- the solution to use for generating new solution</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            {Solution} -- new generated solution</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+
+        <span class="n">size</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">size</span>
+
+        <span class="c1"># copy data of solution</span>
+        <span class="n">firstData</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+        <span class="c1"># get best solution from current algorithm</span>
+        <span class="n">secondData</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">bestSolution</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+
+        <span class="n">splitIndex</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">size</span> <span class="o">/</span> <span class="mi">2</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">random</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mf">0.5</span><span class="p">:</span>
+            <span class="n">firstData</span><span class="p">[</span><span class="n">splitIndex</span><span class="p">:(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)]</span> <span class="o">=</span> <span class="n">firstData</span><span class="p">[</span><span class="n">splitIndex</span><span class="p">:(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)]</span>
+            <span class="n">currentData</span> <span class="o">=</span> <span class="n">firstData</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">secondData</span><span class="p">[</span><span class="n">splitIndex</span><span class="p">:(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)]</span> <span class="o">=</span> <span class="n">firstData</span><span class="p">[</span><span class="n">splitIndex</span><span class="p">:(</span><span class="n">size</span> <span class="o">-</span>
+                                                                      <span class="mi">1</span><span class="p">)]</span>
+            <span class="n">currentData</span> <span class="o">=</span> <span class="n">secondData</span>
+
+        <span class="c1"># create solution of same kind with new data</span>
+        <span class="k">return</span> <span class="nb">globals</span><span class="p">()[</span><span class="nb">type</span><span class="p">(</span><span class="n">solution</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="p">](</span><span class="n">currentData</span><span class="p">,</span> <span class="n">size</span><span class="p">)</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 213 - 0
docs/build/html/_modules/macop/operators/mutators/Mutation.html

@@ -0,0 +1,213 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.operators.mutators.Mutation &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.operators.mutators.Mutation</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.operators.mutators.Mutation</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Abstract Mutation class</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># module imports</span>
+<span class="kn">from</span> <span class="nn">..Operator</span> <span class="kn">import</span> <span class="n">KindOperator</span><span class="p">,</span> <span class="n">Operator</span>
+
+
+<span class="c1"># main mutation class</span>
+<div class="viewcode-block" id="Mutation"><a class="viewcode-back" href="../../../../macop/macop.operators.mutators.Mutation.html#macop.operators.mutators.Mutation.Mutation">[docs]</a><span class="k">class</span> <span class="nc">Mutation</span><span class="p">(</span><span class="n">Operator</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Abstract Mutation extend from Operator</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        kind: {KindOperator} -- specify the kind of operator</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">kind</span> <span class="o">=</span> <span class="n">KindOperator</span><span class="o">.</span><span class="n">MUTATOR</span>
+
+<div class="viewcode-block" id="Mutation.apply"><a class="viewcode-back" href="../../../../macop/macop.operators.mutators.Mutation.html#macop.operators.mutators.Mutation.Mutation.apply">[docs]</a>    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">solution</span><span class="p">):</span>
+        <span class="k">raise</span> <span class="ne">NotImplementedError</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 239 - 0
docs/build/html/_modules/macop/operators/mutators/SimpleBinaryMutation.html

@@ -0,0 +1,239 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.operators.mutators.SimpleBinaryMutation &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.operators.mutators.SimpleBinaryMutation</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.operators.mutators.SimpleBinaryMutation</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Mutation implementation for binary solution, swap bit randomly from solution</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># main imports</span>
+<span class="kn">import</span> <span class="nn">random</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+
+<span class="c1"># module imports</span>
+<span class="kn">from</span> <span class="nn">.Mutation</span> <span class="kn">import</span> <span class="n">Mutation</span>
+
+<span class="kn">from</span> <span class="nn">...solutions.BinarySolution</span> <span class="kn">import</span> <span class="n">BinarySolution</span>
+<span class="kn">from</span> <span class="nn">...solutions.Solution</span> <span class="kn">import</span> <span class="n">Solution</span>
+
+
+<div class="viewcode-block" id="SimpleBinaryMutation"><a class="viewcode-back" href="../../../../macop/macop.operators.mutators.SimpleBinaryMutation.html#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation">[docs]</a><span class="k">class</span> <span class="nc">SimpleBinaryMutation</span><span class="p">(</span><span class="n">Mutation</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Mutation implementation for binary solution, swap bit randomly from solution</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        kind: {KindOperator} -- specify the kind of operator</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+<div class="viewcode-block" id="SimpleBinaryMutation.apply"><a class="viewcode-back" href="../../../../macop/macop.operators.mutators.SimpleBinaryMutation.html#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation.apply">[docs]</a>    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_solution</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Create new solution based on solution passed as parameter</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            _solution: {Solution} -- the solution to use for generating new solution</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            {Solution} -- new generated solution</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+
+        <span class="n">size</span> <span class="o">=</span> <span class="n">_solution</span><span class="o">.</span><span class="n">size</span>
+
+        <span class="n">cell</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
+
+        <span class="c1"># copy data of solution</span>
+        <span class="n">currentData</span> <span class="o">=</span> <span class="n">_solution</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+
+        <span class="c1"># swicth values</span>
+        <span class="k">if</span> <span class="n">currentData</span><span class="p">[</span><span class="n">cell</span><span class="p">]:</span>
+            <span class="n">currentData</span><span class="p">[</span><span class="n">cell</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">currentData</span><span class="p">[</span><span class="n">cell</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>
+
+        <span class="c1"># create solution of same kind with new data</span>
+        <span class="k">return</span> <span class="nb">globals</span><span class="p">()[</span><span class="nb">type</span><span class="p">(</span><span class="n">_solution</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="p">](</span><span class="n">currentData</span><span class="p">,</span> <span class="n">size</span><span class="p">)</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 244 - 0
docs/build/html/_modules/macop/operators/mutators/SimpleMutation.html

@@ -0,0 +1,244 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.operators.mutators.SimpleMutation &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.operators.mutators.SimpleMutation</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.operators.mutators.SimpleMutation</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Mutation implementation for binary solution, swap two bits randomly from solution</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># main imports</span>
+<span class="kn">import</span> <span class="nn">random</span>
+<span class="kn">import</span> <span class="nn">sys</span>
+
+<span class="c1"># module imports</span>
+<span class="kn">from</span> <span class="nn">.Mutation</span> <span class="kn">import</span> <span class="n">Mutation</span>
+
+<span class="kn">from</span> <span class="nn">...solutions.BinarySolution</span> <span class="kn">import</span> <span class="n">BinarySolution</span>
+<span class="kn">from</span> <span class="nn">...solutions.Solution</span> <span class="kn">import</span> <span class="n">Solution</span>
+
+
+<div class="viewcode-block" id="SimpleMutation"><a class="viewcode-back" href="../../../../macop/macop.operators.mutators.SimpleMutation.html#macop.operators.mutators.SimpleMutation.SimpleMutation">[docs]</a><span class="k">class</span> <span class="nc">SimpleMutation</span><span class="p">(</span><span class="n">Mutation</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Mutation implementation for binary solution, swap two bits randomly from solution</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        kind: {KindOperator} -- specify the kind of operator</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+<div class="viewcode-block" id="SimpleMutation.apply"><a class="viewcode-back" href="../../../../macop/macop.operators.mutators.SimpleMutation.html#macop.operators.mutators.SimpleMutation.SimpleMutation.apply">[docs]</a>    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_solution</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Create new solution based on solution passed as parameter</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            _solution: {Solution} -- the solution to use for generating new solution</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            {Solution} -- new generated solution</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+
+        <span class="n">size</span> <span class="o">=</span> <span class="n">_solution</span><span class="o">.</span><span class="n">size</span>
+
+        <span class="n">firstCell</span> <span class="o">=</span> <span class="mi">0</span>
+        <span class="n">secondCell</span> <span class="o">=</span> <span class="mi">0</span>
+
+        <span class="c1"># copy data of solution</span>
+        <span class="n">currentData</span> <span class="o">=</span> <span class="n">_solution</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
+
+        <span class="k">while</span> <span class="n">firstCell</span> <span class="o">==</span> <span class="n">secondCell</span><span class="p">:</span>
+            <span class="n">firstCell</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
+            <span class="n">secondCell</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
+
+        <span class="n">temp</span> <span class="o">=</span> <span class="n">currentData</span><span class="p">[</span><span class="n">firstCell</span><span class="p">]</span>
+
+        <span class="c1"># swicth values</span>
+        <span class="n">currentData</span><span class="p">[</span><span class="n">firstCell</span><span class="p">]</span> <span class="o">=</span> <span class="n">currentData</span><span class="p">[</span><span class="n">secondCell</span><span class="p">]</span>
+        <span class="n">currentData</span><span class="p">[</span><span class="n">secondCell</span><span class="p">]</span> <span class="o">=</span> <span class="n">temp</span>
+
+        <span class="c1"># create solution of same kind with new data</span>
+        <span class="k">return</span> <span class="nb">globals</span><span class="p">()[</span><span class="nb">type</span><span class="p">(</span><span class="n">_solution</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="p">](</span><span class="n">currentData</span><span class="p">,</span> <span class="n">size</span><span class="p">)</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 253 - 0
docs/build/html/_modules/macop/operators/policies/Policy.html

@@ -0,0 +1,253 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.operators.policies.Policy &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.operators.policies.Policy</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.operators.policies.Policy</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Abstract class which is used for applying strategy when selecting and applying operator </span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="kn">import</span> <span class="nn">logging</span>
+
+
+<span class="c1"># define policy to choose `operator` function at current iteration</span>
+<div class="viewcode-block" id="Policy"><a class="viewcode-back" href="../../../../macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy">[docs]</a><span class="k">class</span> <span class="nc">Policy</span><span class="p">():</span>
+    <span class="sd">&quot;&quot;&quot;Abstract class which is used for applying strategy when selecting and applying operator </span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        operators: {[Operator]} -- list of selected operators for the algorithm</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="c1"># here you can define your statistical variables for choosing next operator to apply</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_operators</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">operators</span> <span class="o">=</span> <span class="n">_operators</span>
+
+<div class="viewcode-block" id="Policy.select"><a class="viewcode-back" href="../../../../macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy.select">[docs]</a>    <span class="k">def</span> <span class="nf">select</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Select specific operator to solution and returns solution</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="k">raise</span> <span class="ne">NotImplementedError</span></div>
+
+<div class="viewcode-block" id="Policy.apply"><a class="viewcode-back" href="../../../../macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy.apply">[docs]</a>    <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_solution</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Apply specific operator chosen to create new solution, computes its fitness and returns solution</span>
+<span class="sd">        </span>
+<span class="sd">        Args:</span>
+<span class="sd">            _solution: {Solution} -- the solution to use for generating new solution</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            {Solution} -- new generated solution</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+
+        <span class="n">operator</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">select</span><span class="p">()</span>
+
+        <span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;---- Applying </span><span class="si">%s</span><span class="s2"> on </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span>
+                     <span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">operator</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">_solution</span><span class="p">))</span>
+
+        <span class="c1"># apply operator on solution</span>
+        <span class="n">newSolution</span> <span class="o">=</span> <span class="n">operator</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="n">_solution</span><span class="p">)</span>
+
+        <span class="c1"># compute fitness of new solution</span>
+        <span class="n">newSolution</span><span class="o">.</span><span class="n">evaluate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">evaluator</span><span class="p">)</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">newSolution</span><span class="o">.</span><span class="n">fitness</span><span class="p">())</span>
+
+        <span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;---- Obtaining </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">_solution</span><span class="p">))</span>
+
+        <span class="k">return</span> <span class="n">newSolution</span></div>
+
+<div class="viewcode-block" id="Policy.setAlgo"><a class="viewcode-back" href="../../../../macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy.setAlgo">[docs]</a>    <span class="k">def</span> <span class="nf">setAlgo</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_algo</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Keep into policy reference of the whole algorithm</span>
+<span class="sd">           The reason is to better manage the operator choices (use of rewards as example)</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            _algo: {Algorithm} -- the algorithm reference runned</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">algo</span> <span class="o">=</span> <span class="n">_algo</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 219 - 0
docs/build/html/_modules/macop/operators/policies/RandomPolicy.html

@@ -0,0 +1,219 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.operators.policies.RandomPolicy &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.operators.policies.RandomPolicy</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.operators.policies.RandomPolicy</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Policy class implementation which is used for select operator randomly</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># main imports</span>
+<span class="kn">import</span> <span class="nn">random</span>
+
+<span class="c1"># module imports</span>
+<span class="kn">from</span> <span class="nn">.Policy</span> <span class="kn">import</span> <span class="n">Policy</span>
+
+
+<div class="viewcode-block" id="RandomPolicy"><a class="viewcode-back" href="../../../../macop/macop.operators.policies.RandomPolicy.html#macop.operators.policies.RandomPolicy.RandomPolicy">[docs]</a><span class="k">class</span> <span class="nc">RandomPolicy</span><span class="p">(</span><span class="n">Policy</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;Policy class implementation which is used for select operator randomly</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        operators: {[Operator]} -- list of selected operators for the algorithm</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+<div class="viewcode-block" id="RandomPolicy.select"><a class="viewcode-back" href="../../../../macop/macop.operators.policies.RandomPolicy.html#macop.operators.policies.RandomPolicy.RandomPolicy.select">[docs]</a>    <span class="k">def</span> <span class="nf">select</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;Select randomly the next operator to use</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            {Operator}: the selected operator</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="c1"># choose operator randomly</span>
+        <span class="n">index</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">operators</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">operators</span><span class="p">[</span><span class="n">index</span><span class="p">]</span></div></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 245 - 0
docs/build/html/_modules/macop/solutions/BinarySolution.html

@@ -0,0 +1,245 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.solutions.BinarySolution &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.solutions.BinarySolution</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.solutions.BinarySolution</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Binary solution class implementation</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+
+<span class="c1"># modules imports</span>
+<span class="kn">from</span> <span class="nn">.Solution</span> <span class="kn">import</span> <span class="n">Solution</span>
+
+
+<span class="c1"># Solution which stores solution data as binary array</span>
+<div class="viewcode-block" id="BinarySolution"><a class="viewcode-back" href="../../../macop/macop.solutions.BinarySolution.html#macop.solutions.BinarySolution.BinarySolution">[docs]</a><span class="k">class</span> <span class="nc">BinarySolution</span><span class="p">(</span><span class="n">Solution</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Binary integer solution class</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        data: {ndarray} --  array of binary values</span>
+<span class="sd">        size: {int} -- size of binary array values</span>
+<span class="sd">        score: {float} -- fitness score value</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_data</span><span class="p">,</span> <span class="n">_size</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Initialize binary solution using specific data</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            data: {ndarray} --  array of binary values</span>
+<span class="sd">            size: {int} -- size of binary array values</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">_data</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="n">_size</span>
+
+<div class="viewcode-block" id="BinarySolution.random"><a class="viewcode-back" href="../../../macop/macop.solutions.BinarySolution.html#macop.solutions.BinarySolution.BinarySolution.random">[docs]</a>    <span class="k">def</span> <span class="nf">random</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_validator</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Intialize binary array with use of validator to generate valid random solution</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            _validator: {function} -- specific function which validates or not a solution</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            {BinarySolution} -- new generated binary solution</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">)</span>
+
+        <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">isValid</span><span class="p">(</span><span class="n">_validator</span><span class="p">):</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">)</span>
+
+        <span class="k">return</span> <span class="bp">self</span></div>
+
+    <span class="k">def</span> <span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="k">return</span> <span class="s2">&quot;Binary solution </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="p">)</span></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

+ 246 - 0
docs/build/html/_modules/macop/solutions/CombinatoryIntegerSolution.html

@@ -0,0 +1,246 @@
+
+
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+  <meta charset="utf-8">
+  
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  
+  <title>macop.solutions.CombinatoryIntegerSolution &mdash; macop v0.1.5 documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+  <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script>
+  
+    
+      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
+        <script type="text/javascript" src="../../../_static/jquery.js"></script>
+        <script type="text/javascript" src="../../../_static/underscore.js"></script>
+        <script type="text/javascript" src="../../../_static/doctools.js"></script>
+        <script type="text/javascript" src="../../../_static/language_data.js"></script>
+    
+    <script type="text/javascript" src="../../../_static/js/theme.js"></script>
+
+    
+
+  
+  <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
+  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
+    <link rel="index" title="Index" href="../../../genindex.html" />
+    <link rel="search" title="Search" href="../../../search.html" /> 
+</head>
+
+<body class="wy-body-for-nav">
+
+   
+  <div class="wy-grid-for-nav">
+    
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+          
+
+          
+            <a href="../../../index.html" class="icon icon-home"> macop
+          
+
+          
+          </a>
+
+          
+            
+            
+              <div class="version">
+                0.1.5
+              </div>
+            
+          
+
+          
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+
+          
+        </div>
+
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+          
+            
+            
+              
+            
+            
+              <p class="caption"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../description.html">Description</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../macop.html">Documentation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples.html">Some examples</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../contributing.html">Contributing</a></li>
+</ul>
+
+            
+          
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+      
+      <nav class="wy-nav-top" aria-label="top navigation">
+        
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../../../index.html">macop</a>
+        
+      </nav>
+
+
+      <div class="wy-nav-content">
+        
+        <div class="rst-content">
+        
+          
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+  <ul class="wy-breadcrumbs">
+    
+      <li><a href="../../../index.html">Docs</a> &raquo;</li>
+        
+          <li><a href="../../index.html">Module code</a> &raquo;</li>
+        
+      <li>macop.solutions.CombinatoryIntegerSolution</li>
+    
+    
+      <li class="wy-breadcrumbs-aside">
+        
+      </li>
+    
+  </ul>
+
+  
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+            
+  <h1>Source code for macop.solutions.CombinatoryIntegerSolution</h1><div class="highlight"><pre>
+<span></span><span class="sd">&quot;&quot;&quot;Combinatory integer solution class implementation</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="c1"># main imports</span>
+<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+
+<span class="c1"># modules imports</span>
+<span class="kn">from</span> <span class="nn">.Solution</span> <span class="kn">import</span> <span class="n">Solution</span>
+
+
+<span class="c1"># Solution which stores solution data as combinatory integer array</span>
+<div class="viewcode-block" id="CombinatoryIntegerSolution"><a class="viewcode-back" href="../../../macop/macop.solutions.CombinatoryIntegerSolution.html#macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution">[docs]</a><span class="k">class</span> <span class="nc">CombinatoryIntegerSolution</span><span class="p">(</span><span class="n">Solution</span><span class="p">):</span>
+    <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Combinatory integer solution class</span>
+
+<span class="sd">    Attributes:</span>
+<span class="sd">        data: {ndarray} --  array of binary values</span>
+<span class="sd">        size: {int} -- size of binary array values</span>
+<span class="sd">        score: {float} -- fitness score value</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_data</span><span class="p">,</span> <span class="n">_size</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Initialize binary solution using specific data</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            data: {ndarray} --  array of binary values</span>
+<span class="sd">            size: {int} -- size of binary array values</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">_data</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="n">_size</span>
+
+<div class="viewcode-block" id="CombinatoryIntegerSolution.random"><a class="viewcode-back" href="../../../macop/macop.solutions.CombinatoryIntegerSolution.html#macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution.random">[docs]</a>    <span class="k">def</span> <span class="nf">random</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">_validator</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Intialize combinatory integer array with use of validator to generate valid random solution</span>
+
+<span class="sd">        Args:</span>
+<span class="sd">            _validator: {function} -- specific function which validates or not a solution</span>
+
+<span class="sd">        Returns:</span>
+<span class="sd">            {CombinatoryIntegerSolution} -- new generated combinatory integer solution</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+
+        <span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">shuffle</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">))</span>
+
+        <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">isValid</span><span class="p">(</span><span class="n">_validator</span><span class="p">):</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">shuffle</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">))</span>
+
+        <span class="k">return</span> <span class="bp">self</span></div>
+
+    <span class="k">def</span> <span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="k">return</span> <span class="s2">&quot;Combinatory integer solution </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="p">)</span></div>
+</pre></div>
+
+           </div>
+           
+          </div>
+          <footer>
+  
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>
+        &copy; Copyright 2020, Jérôme BUISINE
+
+    </p>
+  </div>
+  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
+
+</footer>
+
+        </div>
+      </div>
+
+    </section>
+
+  </div>
+  
+
+
+  <script type="text/javascript">
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script>
+
+  
+  
+    
+   
+
+</body>
+</html>

Fichier diff supprimé car celui-ci est trop grand
+ 246 - 0
docs/build/html/_modules/macop/solutions/IntegerSolution.html


+ 1 - 1
docs/build/html/_static/documentation_options.js

@@ -1,6 +1,6 @@
 var DOCUMENTATION_OPTIONS = {
     URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
-    VERSION: 'v0.1.4',
+    VERSION: 'v0.1.5',
     LANGUAGE: 'None',
     COLLAPSE_INDEX: false,
     FILE_SUFFIX: '.html',

+ 2 - 2
docs/build/html/contributing.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Contributing &mdash; macop v0.1.4 documentation</title>
+  <title>Contributing &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -59,7 +59,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           

+ 2 - 2
docs/build/html/description.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Description &mdash; macop v0.1.4 documentation</title>
+  <title>Description &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           

+ 2 - 2
docs/build/html/examples.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Some examples &mdash; macop v0.1.4 documentation</title>
+  <title>Some examples &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           

+ 133 - 29
docs/build/html/genindex.html

@@ -9,7 +9,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Index &mdash; macop v0.1.4 documentation</title>
+  <title>Index &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -59,7 +59,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -159,10 +159,10 @@
 <h1 id="index">Index</h1>
 
 <div class="genindex-jumpbox">
- <a href="#_"><strong>_</strong></a>
- | <a href="#A"><strong>A</strong></a>
+ <a href="#A"><strong>A</strong></a>
  | <a href="#B"><strong>B</strong></a>
  | <a href="#C"><strong>C</strong></a>
+ | <a href="#D"><strong>D</strong></a>
  | <a href="#E"><strong>E</strong></a>
  | <a href="#F"><strong>F</strong></a>
  | <a href="#G"><strong>G</strong></a>
@@ -178,41 +178,37 @@
  | <a href="#V"><strong>V</strong></a>
  
 </div>
-<h2 id="_">_</h2>
+<h2 id="A">A</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm._checkpoint">_checkpoint (macop.algorithms.Algorithm.Algorithm attribute)</a>
-</li>
-      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm._class">_class (macop.algorithms.Algorithm.Algorithm attribute)</a>
+      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.addCheckpoint">addCheckpoint() (macop.algorithms.Algorithm.Algorithm method)</a>
 </li>
-      <li><a href="macop/macop.algorithms.IteratedLocalSearch.html#macop.algorithms.IteratedLocalSearch.IteratedLocalSearch._evaluations">_evaluations (macop.algorithms.IteratedLocalSearch.IteratedLocalSearch attribute)</a>
+      <li><a href="macop/macop.checkpoints.BasicCheckpoint.html#macop.checkpoints.BasicCheckpoint.BasicCheckpoint.algo">algo (macop.checkpoints.BasicCheckpoint.BasicCheckpoint attribute)</a>
 
       <ul>
-        <li><a href="macop/macop.algorithms.LocalSearch.html#macop.algorithms.LocalSearch.LocalSearch._evaluations">(macop.algorithms.LocalSearch.LocalSearch attribute)</a>
+        <li><a href="macop/macop.checkpoints.Checkpoint.html#macop.checkpoints.Checkpoint.Checkpoint.algo">(macop.checkpoints.Checkpoint.Checkpoint attribute)</a>
 </li>
       </ul></li>
-  </ul></td>
-  <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm._every">_every (macop.algorithms.Algorithm.Algorithm attribute)</a>
+      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm">Algorithm (class in macop.algorithms.Algorithm)</a>
 </li>
-      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm._filepath">_filepath (macop.algorithms.Algorithm.Algorithm attribute)</a>
+      <li><a href="macop/macop.operators.crossovers.Crossover.html#macop.operators.crossovers.Crossover.Crossover.apply">apply() (macop.operators.crossovers.Crossover.Crossover method)</a>
+
+      <ul>
+        <li><a href="macop/macop.operators.crossovers.RandomSplitCrossover.html#macop.operators.crossovers.RandomSplitCrossover.RandomSplitCrossover.apply">(macop.operators.crossovers.RandomSplitCrossover.RandomSplitCrossover method)</a>
 </li>
-      <li><a href="macop/macop.algorithms.IteratedLocalSearch.html#macop.algorithms.IteratedLocalSearch.IteratedLocalSearch._ls_evaluations">_ls_evaluations (macop.algorithms.IteratedLocalSearch.IteratedLocalSearch attribute)</a>
+        <li><a href="macop/macop.operators.crossovers.SimpleCrossover.html#macop.operators.crossovers.SimpleCrossover.SimpleCrossover.apply">(macop.operators.crossovers.SimpleCrossover.SimpleCrossover method)</a>
 </li>
-  </ul></td>
-</tr></table>
-
-<h2 id="A">A</h2>
-<table style="width: 100%" class="indextable genindextable"><tr>
-  <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.addCheckpoint">addCheckpoint() (macop.algorithms.Algorithm.Algorithm method)</a>
+        <li><a href="macop/macop.operators.mutators.Mutation.html#macop.operators.mutators.Mutation.Mutation.apply">(macop.operators.mutators.Mutation.Mutation method)</a>
 </li>
-  </ul></td>
-  <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="macop/macop.checkpoints.Checkpoint.html#macop.checkpoints.Checkpoint.Checkpoint.algo">algo (macop.checkpoints.Checkpoint.Checkpoint attribute)</a>
+        <li><a href="macop/macop.operators.mutators.SimpleBinaryMutation.html#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation.apply">(macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation method)</a>
 </li>
-      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm">Algorithm (class in macop.algorithms.Algorithm)</a>
+        <li><a href="macop/macop.operators.mutators.SimpleMutation.html#macop.operators.mutators.SimpleMutation.SimpleMutation.apply">(macop.operators.mutators.SimpleMutation.SimpleMutation method)</a>
 </li>
+        <li><a href="macop/macop.operators.Operator.html#macop.operators.Operator.Operator.apply">(macop.operators.Operator.Operator method)</a>
+</li>
+        <li><a href="macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy.apply">(macop.operators.policies.Policy.Policy method)</a>
+</li>
+      </ul></li>
   </ul></td>
 </tr></table>
 
@@ -230,6 +226,10 @@
 </li>
       </ul></li>
   </ul></td>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="macop/macop.solutions.BinarySolution.html#macop.solutions.BinarySolution.BinarySolution">BinarySolution (class in macop.solutions.BinarySolution)</a>
+</li>
+  </ul></td>
 </tr></table>
 
 <h2 id="C">C</h2>
@@ -247,6 +247,10 @@
       </ul></li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="macop/macop.solutions.CombinatoryIntegerSolution.html#macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution">CombinatoryIntegerSolution (class in macop.solutions.CombinatoryIntegerSolution)</a>
+</li>
+      <li><a href="macop/macop.operators.crossovers.Crossover.html#macop.operators.crossovers.Crossover.Crossover">Crossover (class in macop.operators.crossovers.Crossover)</a>
+</li>
       <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.currentSolution">currentSolution (macop.algorithms.Algorithm.Algorithm attribute)</a>
 
       <ul>
@@ -258,6 +262,20 @@
   </ul></td>
 </tr></table>
 
+<h2 id="D">D</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="macop/macop.solutions.BinarySolution.html#macop.solutions.BinarySolution.BinarySolution.data">data (macop.solutions.BinarySolution.BinarySolution attribute)</a>
+
+      <ul>
+        <li><a href="macop/macop.solutions.CombinatoryIntegerSolution.html#macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution.data">(macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution attribute)</a>
+</li>
+        <li><a href="macop/macop.solutions.IntegerSolution.html#macop.solutions.IntegerSolution.IntegerSolution.data">(macop.solutions.IntegerSolution.IntegerSolution attribute)</a>
+</li>
+      </ul></li>
+  </ul></td>
+</tr></table>
+
 <h2 id="E">E</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
@@ -273,16 +291,26 @@
       </ul></li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="macop/macop.checkpoints.Checkpoint.html#macop.checkpoints.Checkpoint.Checkpoint.every">every (macop.checkpoints.Checkpoint.Checkpoint attribute)</a>
+      <li><a href="macop/macop.evaluators.EvaluatorExample.html#macop.evaluators.EvaluatorExample.evaluatorExample">evaluatorExample() (in module macop.evaluators.EvaluatorExample)</a>
+</li>
+      <li><a href="macop/macop.checkpoints.BasicCheckpoint.html#macop.checkpoints.BasicCheckpoint.BasicCheckpoint.every">every (macop.checkpoints.BasicCheckpoint.BasicCheckpoint attribute)</a>
+
+      <ul>
+        <li><a href="macop/macop.checkpoints.Checkpoint.html#macop.checkpoints.Checkpoint.Checkpoint.every">(macop.checkpoints.Checkpoint.Checkpoint attribute)</a>
 </li>
+      </ul></li>
   </ul></td>
 </tr></table>
 
 <h2 id="F">F</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="macop/macop.checkpoints.Checkpoint.html#macop.checkpoints.Checkpoint.Checkpoint.filepath">filepath (macop.checkpoints.Checkpoint.Checkpoint attribute)</a>
+      <li><a href="macop/macop.checkpoints.BasicCheckpoint.html#macop.checkpoints.BasicCheckpoint.BasicCheckpoint.filepath">filepath (macop.checkpoints.BasicCheckpoint.BasicCheckpoint attribute)</a>
+
+      <ul>
+        <li><a href="macop/macop.checkpoints.Checkpoint.html#macop.checkpoints.Checkpoint.Checkpoint.filepath">(macop.checkpoints.Checkpoint.Checkpoint attribute)</a>
 </li>
+      </ul></li>
   </ul></td>
 </tr></table>
 
@@ -310,6 +338,8 @@
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.initRun">initRun() (macop.algorithms.Algorithm.Algorithm method)</a>
+</li>
+      <li><a href="macop/macop.solutions.IntegerSolution.html#macop.solutions.IntegerSolution.IntegerSolution">IntegerSolution (class in macop.solutions.IntegerSolution)</a>
 </li>
       <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.isBetter">isBetter() (macop.algorithms.Algorithm.Algorithm method)</a>
 </li>
@@ -320,6 +350,22 @@
 
 <h2 id="K">K</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="macop/macop.operators.crossovers.Crossover.html#macop.operators.crossovers.Crossover.Crossover.kind">kind (macop.operators.crossovers.Crossover.Crossover attribute)</a>
+
+      <ul>
+        <li><a href="macop/macop.operators.crossovers.RandomSplitCrossover.html#macop.operators.crossovers.RandomSplitCrossover.RandomSplitCrossover.kind">(macop.operators.crossovers.RandomSplitCrossover.RandomSplitCrossover attribute)</a>
+</li>
+        <li><a href="macop/macop.operators.crossovers.SimpleCrossover.html#macop.operators.crossovers.SimpleCrossover.SimpleCrossover.kind">(macop.operators.crossovers.SimpleCrossover.SimpleCrossover attribute)</a>
+</li>
+        <li><a href="macop/macop.operators.mutators.Mutation.html#macop.operators.mutators.Mutation.Mutation.kind">(macop.operators.mutators.Mutation.Mutation attribute)</a>
+</li>
+        <li><a href="macop/macop.operators.mutators.SimpleBinaryMutation.html#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation.kind">(macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation attribute)</a>
+</li>
+        <li><a href="macop/macop.operators.mutators.SimpleMutation.html#macop.operators.mutators.SimpleMutation.SimpleMutation.kind">(macop.operators.mutators.SimpleMutation.SimpleMutation attribute)</a>
+</li>
+      </ul></li>
+  </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="macop/macop.operators.Operator.html#macop.operators.Operator.KindOperator">KindOperator (class in macop.operators.Operator)</a>
 </li>
@@ -393,18 +439,26 @@
         <li><a href="macop/macop.algorithms.LocalSearch.html#macop.algorithms.LocalSearch.LocalSearch.maximise">(macop.algorithms.LocalSearch.LocalSearch attribute)</a>
 </li>
       </ul></li>
+      <li><a href="macop/macop.operators.mutators.Mutation.html#macop.operators.mutators.Mutation.Mutation">Mutation (class in macop.operators.mutators.Mutation)</a>
+</li>
   </ul></td>
 </tr></table>
 
 <h2 id="O">O</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="macop/macop.operators.Operator.html#macop.operators.Operator.Operator">Operator (class in macop.operators.Operator)</a>
+</li>
       <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.operators">operators (macop.algorithms.Algorithm.Algorithm attribute)</a>
 
       <ul>
         <li><a href="macop/macop.algorithms.IteratedLocalSearch.html#macop.algorithms.IteratedLocalSearch.IteratedLocalSearch.operators">(macop.algorithms.IteratedLocalSearch.IteratedLocalSearch attribute)</a>
 </li>
         <li><a href="macop/macop.algorithms.LocalSearch.html#macop.algorithms.LocalSearch.LocalSearch.operators">(macop.algorithms.LocalSearch.LocalSearch attribute)</a>
+</li>
+        <li><a href="macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy.operators">(macop.operators.policies.Policy.Policy attribute)</a>
+</li>
+        <li><a href="macop/macop.operators.policies.RandomPolicy.html#macop.operators.policies.RandomPolicy.RandomPolicy.operators">(macop.operators.policies.RandomPolicy.RandomPolicy attribute)</a>
 </li>
       </ul></li>
   </ul></td>
@@ -414,6 +468,8 @@
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.parent">parent (macop.algorithms.Algorithm.Algorithm attribute)</a>
+</li>
+      <li><a href="macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy">Policy (class in macop.operators.policies.Policy)</a>
 </li>
       <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.policy">policy (macop.algorithms.Algorithm.Algorithm attribute)</a>
 
@@ -432,6 +488,20 @@
 
 <h2 id="R">R</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="macop/macop.solutions.BinarySolution.html#macop.solutions.BinarySolution.BinarySolution.random">random() (macop.solutions.BinarySolution.BinarySolution method)</a>
+
+      <ul>
+        <li><a href="macop/macop.solutions.CombinatoryIntegerSolution.html#macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution.random">(macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution method)</a>
+</li>
+        <li><a href="macop/macop.solutions.IntegerSolution.html#macop.solutions.IntegerSolution.IntegerSolution.random">(macop.solutions.IntegerSolution.IntegerSolution method)</a>
+</li>
+      </ul></li>
+      <li><a href="macop/macop.operators.policies.RandomPolicy.html#macop.operators.policies.RandomPolicy.RandomPolicy">RandomPolicy (class in macop.operators.policies.RandomPolicy)</a>
+</li>
+      <li><a href="macop/macop.operators.crossovers.RandomSplitCrossover.html#macop.operators.crossovers.RandomSplitCrossover.RandomSplitCrossover">RandomSplitCrossover (class in macop.operators.crossovers.RandomSplitCrossover)</a>
+</li>
+  </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.resume">resume() (macop.algorithms.Algorithm.Algorithm method)</a>
 </li>
@@ -453,10 +523,44 @@
 <h2 id="S">S</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
-      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.setCheckpoint">setCheckpoint() (macop.algorithms.Algorithm.Algorithm method)</a>
+      <li><a href="macop/macop.solutions.BinarySolution.html#macop.solutions.BinarySolution.BinarySolution.score">score (macop.solutions.BinarySolution.BinarySolution attribute)</a>
+
+      <ul>
+        <li><a href="macop/macop.solutions.CombinatoryIntegerSolution.html#macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution.score">(macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution attribute)</a>
+</li>
+        <li><a href="macop/macop.solutions.IntegerSolution.html#macop.solutions.IntegerSolution.IntegerSolution.score">(macop.solutions.IntegerSolution.IntegerSolution attribute)</a>
+</li>
+      </ul></li>
+      <li><a href="macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy.select">select() (macop.operators.policies.Policy.Policy method)</a>
+
+      <ul>
+        <li><a href="macop/macop.operators.policies.RandomPolicy.html#macop.operators.policies.RandomPolicy.RandomPolicy.select">(macop.operators.policies.RandomPolicy.RandomPolicy method)</a>
+</li>
+      </ul></li>
+      <li><a href="macop/macop.operators.Operator.html#macop.operators.Operator.Operator.setAlgo">setAlgo() (macop.operators.Operator.Operator method)</a>
+
+      <ul>
+        <li><a href="macop/macop.operators.policies.Policy.html#macop.operators.policies.Policy.Policy.setAlgo">(macop.operators.policies.Policy.Policy method)</a>
 </li>
+      </ul></li>
   </ul></td>
   <td style="width: 33%; vertical-align: top;"><ul>
+      <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.setCheckpoint">setCheckpoint() (macop.algorithms.Algorithm.Algorithm method)</a>
+</li>
+      <li><a href="macop/macop.operators.mutators.SimpleBinaryMutation.html#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation">SimpleBinaryMutation (class in macop.operators.mutators.SimpleBinaryMutation)</a>
+</li>
+      <li><a href="macop/macop.operators.crossovers.SimpleCrossover.html#macop.operators.crossovers.SimpleCrossover.SimpleCrossover">SimpleCrossover (class in macop.operators.crossovers.SimpleCrossover)</a>
+</li>
+      <li><a href="macop/macop.operators.mutators.SimpleMutation.html#macop.operators.mutators.SimpleMutation.SimpleMutation">SimpleMutation (class in macop.operators.mutators.SimpleMutation)</a>
+</li>
+      <li><a href="macop/macop.solutions.BinarySolution.html#macop.solutions.BinarySolution.BinarySolution.size">size (macop.solutions.BinarySolution.BinarySolution attribute)</a>
+
+      <ul>
+        <li><a href="macop/macop.solutions.CombinatoryIntegerSolution.html#macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution.size">(macop.solutions.CombinatoryIntegerSolution.CombinatoryIntegerSolution attribute)</a>
+</li>
+        <li><a href="macop/macop.solutions.IntegerSolution.html#macop.solutions.IntegerSolution.IntegerSolution.size">(macop.solutions.IntegerSolution.IntegerSolution attribute)</a>
+</li>
+      </ul></li>
       <li><a href="macop/macop.algorithms.Algorithm.html#macop.algorithms.Algorithm.Algorithm.stop">stop() (macop.algorithms.Algorithm.Algorithm method)</a>
 </li>
   </ul></td>

+ 2 - 2
docs/build/html/index.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Minimalist And Customizable Optimization Package &mdash; macop v0.1.4 documentation</title>
+  <title>Minimalist And Customizable Optimization Package &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -59,7 +59,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           

+ 17 - 17
docs/build/html/macop.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Documentation &mdash; macop v0.1.4 documentation</title>
+  <title>Documentation &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -227,7 +227,7 @@
 </colgroup>
 <tbody>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.checkpoints.BasicCheckpoint.html#module-macop.checkpoints.BasicCheckpoint" title="macop.checkpoints.BasicCheckpoint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.checkpoints.BasicCheckpoint</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Basic Checkpoint class implementation</p></td>
 </tr>
 <tr class="row-even"><td><p><a class="reference internal" href="macop/macop.checkpoints.Checkpoint.html#module-macop.checkpoints.Checkpoint" title="macop.checkpoints.Checkpoint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.checkpoints.Checkpoint</span></code></a></p></td>
 <td><p>Abstract Checkpoint class</p></td>
@@ -244,7 +244,7 @@
 </colgroup>
 <tbody>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.evaluators.EvaluatorExample.html#module-macop.evaluators.EvaluatorExample" title="macop.evaluators.EvaluatorExample"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.evaluators.EvaluatorExample</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Python evaluator function example</p></td>
 </tr>
 </tbody>
 </table>
@@ -258,31 +258,31 @@
 </colgroup>
 <tbody>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.operators.crossovers.Crossover.html#module-macop.operators.crossovers.Crossover" title="macop.operators.crossovers.Crossover"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.crossovers.Crossover</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Abstract Crossover class</p></td>
 </tr>
 <tr class="row-even"><td><p><a class="reference internal" href="macop/macop.operators.crossovers.RandomSplitCrossover.html#module-macop.operators.crossovers.RandomSplitCrossover" title="macop.operators.crossovers.RandomSplitCrossover"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.crossovers.RandomSplitCrossover</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Crossover implementation which generated new solution by randomly splitting best solution and current solution</p></td>
 </tr>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.operators.crossovers.SimpleCrossover.html#module-macop.operators.crossovers.SimpleCrossover" title="macop.operators.crossovers.SimpleCrossover"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.crossovers.SimpleCrossover</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Crossover implementation which generated new solution by splitting at mean size best solution and current solution</p></td>
 </tr>
 <tr class="row-even"><td><p><a class="reference internal" href="macop/macop.operators.mutators.Mutation.html#module-macop.operators.mutators.Mutation" title="macop.operators.mutators.Mutation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.mutators.Mutation</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Abstract Mutation class</p></td>
 </tr>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.operators.mutators.SimpleBinaryMutation.html#module-macop.operators.mutators.SimpleBinaryMutation" title="macop.operators.mutators.SimpleBinaryMutation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.mutators.SimpleBinaryMutation</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Mutation implementation for binary solution, swap bit randomly from solution</p></td>
 </tr>
 <tr class="row-even"><td><p><a class="reference internal" href="macop/macop.operators.mutators.SimpleMutation.html#module-macop.operators.mutators.SimpleMutation" title="macop.operators.mutators.SimpleMutation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.mutators.SimpleMutation</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Mutation implementation for binary solution, swap two bits randomly from solution</p></td>
 </tr>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.operators.policies.Policy.html#module-macop.operators.policies.Policy" title="macop.operators.policies.Policy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.policies.Policy</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Abstract class which is used for applying strategy when selecting and applying operator</p></td>
 </tr>
 <tr class="row-even"><td><p><a class="reference internal" href="macop/macop.operators.policies.RandomPolicy.html#module-macop.operators.policies.RandomPolicy" title="macop.operators.policies.RandomPolicy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.policies.RandomPolicy</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Policy class implementation which is used for select operator randomly</p></td>
 </tr>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.operators.Operator.html#module-macop.operators.Operator" title="macop.operators.Operator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.operators.Operator</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Abstract Operator class</p></td>
 </tr>
 </tbody>
 </table>
@@ -296,16 +296,16 @@
 </colgroup>
 <tbody>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.solutions.BinarySolution.html#module-macop.solutions.BinarySolution" title="macop.solutions.BinarySolution"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.solutions.BinarySolution</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Binary solution class implementation</p></td>
 </tr>
 <tr class="row-even"><td><p><a class="reference internal" href="macop/macop.solutions.CombinatoryIntegerSolution.html#module-macop.solutions.CombinatoryIntegerSolution" title="macop.solutions.CombinatoryIntegerSolution"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.solutions.CombinatoryIntegerSolution</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Combinatory integer solution class implementation</p></td>
 </tr>
 <tr class="row-odd"><td><p><a class="reference internal" href="macop/macop.solutions.IntegerSolution.html#module-macop.solutions.IntegerSolution" title="macop.solutions.IntegerSolution"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.solutions.IntegerSolution</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Integer solution class implementation</p></td>
 </tr>
 <tr class="row-even"><td><p><a class="reference internal" href="macop/macop.solutions.Solution.html#module-macop.solutions.Solution" title="macop.solutions.Solution"><code class="xref py py-obj docutils literal notranslate"><span class="pre">macop.solutions.Solution</span></code></a></p></td>
-<td><p></p></td>
+<td><p>Abstract solution class</p></td>
 </tr>
 </tbody>
 </table>

Fichier diff supprimé car celui-ci est trop grand
+ 38 - 38
docs/build/html/macop/macop.algorithms.Algorithm.html


+ 10 - 16
docs/build/html/macop/macop.algorithms.IteratedLocalSearch.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.algorithms.IteratedLocalSearch &mdash; macop v0.1.4 documentation</title>
+  <title>macop.algorithms.IteratedLocalSearch &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -248,21 +248,15 @@
 <dt id="macop.algorithms.IteratedLocalSearch.IteratedLocalSearch.run">
 <code class="sig-name descname">run</code><span class="sig-paren">(</span><em class="sig-param">_evaluations</em>, <em class="sig-param">_ls_evaluations=100</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/algorithms/IteratedLocalSearch.html#IteratedLocalSearch.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.algorithms.IteratedLocalSearch.IteratedLocalSearch.run" title="Permalink to this definition">¶</a></dt>
 <dd><p>Run the iterated local search algorithm using local search (EvE compromise)</p>
-<dl class="attribute">
-<dt id="macop.algorithms.IteratedLocalSearch.IteratedLocalSearch._evaluations">
-<code class="sig-name descname">_evaluations</code><a class="headerlink" href="#macop.algorithms.IteratedLocalSearch.IteratedLocalSearch._evaluations" title="Permalink to this definition">¶</a></dt>
-<dd><p>{int} – number of global evaluations for ILS</p>
-</dd></dl>
-
-<dl class="attribute">
-<dt id="macop.algorithms.IteratedLocalSearch.IteratedLocalSearch._ls_evaluations">
-<code class="sig-name descname">_ls_evaluations</code><a class="headerlink" href="#macop.algorithms.IteratedLocalSearch.IteratedLocalSearch._ls_evaluations" title="Permalink to this definition">¶</a></dt>
-<dd><p>{int} – number of Local search evaluations (default: 100)</p>
-</dd></dl>
-
 <dl class="field-list simple">
-<dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>{Solution} – best solution found</p>
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><ul class="simple">
+<li><p><strong>_evaluations</strong> – {int} – number of global evaluations for ILS</p></li>
+<li><p><strong>_ls_evaluations</strong> – {int} – number of Local search evaluations (default: 100)</p></li>
+</ul>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>{Solution} – best solution found</p>
 </dd>
 </dl>
 </dd></dl>

+ 7 - 10
docs/build/html/macop/macop.algorithms.LocalSearch.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.algorithms.LocalSearch &mdash; macop v0.1.4 documentation</title>
+  <title>macop.algorithms.LocalSearch &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -248,15 +248,12 @@
 <dt id="macop.algorithms.LocalSearch.LocalSearch.run">
 <code class="sig-name descname">run</code><span class="sig-paren">(</span><em class="sig-param">_evaluations</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/algorithms/LocalSearch.html#LocalSearch.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.algorithms.LocalSearch.LocalSearch.run" title="Permalink to this definition">¶</a></dt>
 <dd><p>Run the local search algorithm</p>
-<dl class="attribute">
-<dt id="macop.algorithms.LocalSearch.LocalSearch._evaluations">
-<code class="sig-name descname">_evaluations</code><a class="headerlink" href="#macop.algorithms.LocalSearch.LocalSearch._evaluations" title="Permalink to this definition">¶</a></dt>
-<dd><p>{int} – number of Local search evaluations</p>
-</dd></dl>
-
 <dl class="field-list simple">
-<dt class="field-odd">Returns</dt>
-<dd class="field-odd"><p>{Solution} – best solution found</p>
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><p><strong>_evaluations</strong> – {int} – number of Local search evaluations</p>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>{Solution} – best solution found</p>
 </dd>
 </dl>
 </dd></dl>

Fichier diff supprimé car celui-ci est trop grand
+ 26 - 6
docs/build/html/macop/macop.checkpoints.BasicCheckpoint.html


+ 3 - 3
docs/build/html/macop/macop.checkpoints.Checkpoint.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.checkpoints.Checkpoint &mdash; macop v0.1.4 documentation</title>
+  <title>macop.checkpoints.Checkpoint &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -216,7 +216,7 @@
 <dl class="method">
 <dt id="macop.checkpoints.Checkpoint.Checkpoint.run">
 <code class="sig-name descname">run</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/checkpoints/Checkpoint.html#Checkpoint.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.checkpoints.Checkpoint.Checkpoint.run" title="Permalink to this definition">¶</a></dt>
-<dd><p>Check if necessary to do backup based on <cite>_every</cite> variable</p>
+<dd><p>Check if necessary to do backup based on <cite>every</cite> variable</p>
 </dd></dl>
 
 </dd></dl>

Fichier diff supprimé car celui-ci est trop grand
+ 19 - 4
docs/build/html/macop/macop.evaluators.EvaluatorExample.html


+ 41 - 6
docs/build/html/macop/macop.operators.Operator.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.operators.Operator &mdash; macop v0.1.4 documentation</title>
+  <title>macop.operators.Operator &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -179,6 +179,7 @@
             
   <div class="section" id="module-macop.operators.Operator">
 <span id="macop-operators-operator"></span><h1>macop.operators.Operator<a class="headerlink" href="#module-macop.operators.Operator" title="Permalink to this headline">¶</a></h1>
+<p>Abstract Operator class</p>
 <p class="rubric">Classes</p>
 <table class="longtable docutils align-default">
 <colgroup>
@@ -187,17 +188,51 @@
 </colgroup>
 <tbody>
 <tr class="row-odd"><td><p><a class="reference internal" href="#macop.operators.Operator.KindOperator" title="macop.operators.Operator.KindOperator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">KindOperator</span></code></a></p></td>
-<td><p>An enumeration.</p></td>
+<td><p>Enum in order to recognize kind of operators</p></td>
 </tr>
-<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Operator</span></code>()</p></td>
-<td><p></p></td>
+<tr class="row-even"><td><p><a class="reference internal" href="#macop.operators.Operator.Operator" title="macop.operators.Operator.Operator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Operator</span></code></a>()</p></td>
+<td><p>Abstract Operator class which enables to update solution applying operator (computation)</p></td>
 </tr>
 </tbody>
 </table>
 <dl class="class">
 <dt id="macop.operators.Operator.KindOperator">
 <em class="property">class </em><code class="sig-prename descclassname">macop.operators.Operator.</code><code class="sig-name descname">KindOperator</code><a class="reference internal" href="../_modules/macop/operators/Operator.html#KindOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.Operator.KindOperator" title="Permalink to this definition">¶</a></dt>
-<dd><p>An enumeration.</p>
+<dd><p>Enum in order to recognize kind of operators</p>
+</dd></dl>
+
+<dl class="class">
+<dt id="macop.operators.Operator.Operator">
+<em class="property">class </em><code class="sig-prename descclassname">macop.operators.Operator.</code><code class="sig-name descname">Operator</code><a class="reference internal" href="../_modules/macop/operators/Operator.html#Operator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.Operator.Operator" title="Permalink to this definition">¶</a></dt>
+<dd><p>Abstract Operator class which enables to update solution applying operator (computation)</p>
+<dl class="method">
+<dt id="macop.operators.Operator.Operator.apply">
+<code class="sig-name descname">apply</code><span class="sig-paren">(</span><em class="sig-param">_solution</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/operators/Operator.html#Operator.apply"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.Operator.Operator.apply" title="Permalink to this definition">¶</a></dt>
+<dd><p>Apply the current operator transformation</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><p><strong>_solution</strong> – {Solution} – Solution instance</p>
+</dd>
+<dt class="field-even">Raises</dt>
+<dd class="field-even"><p><strong>NotImplementedError</strong> – if method not implemented into child class</p>
+</dd>
+</dl>
+</dd></dl>
+
+<dl class="method">
+<dt id="macop.operators.Operator.Operator.setAlgo">
+<code class="sig-name descname">setAlgo</code><span class="sig-paren">(</span><em class="sig-param">_algo</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/operators/Operator.html#Operator.setAlgo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.Operator.Operator.setAlgo" title="Permalink to this definition">¶</a></dt>
+<dd><dl class="simple">
+<dt>Keep into operator reference of the whole algorithm</dt><dd><p>The reason is to better manage operator instance</p>
+</dd>
+</dl>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><p><strong>_algo</strong> – {Algorithm} – the algorithm reference runned</p>
+</dd>
+</dl>
+</dd></dl>
+
 </dd></dl>
 
 </div>

+ 31 - 4
docs/build/html/macop/macop.operators.crossovers.Crossover.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.operators.crossovers.Crossover &mdash; macop v0.1.4 documentation</title>
+  <title>macop.operators.crossovers.Crossover &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -179,6 +179,7 @@
             
   <div class="section" id="module-macop.operators.crossovers.Crossover">
 <span id="macop-operators-crossovers-crossover"></span><h1>macop.operators.crossovers.Crossover<a class="headerlink" href="#module-macop.operators.crossovers.Crossover" title="Permalink to this headline">¶</a></h1>
+<p>Abstract Crossover class</p>
 <p class="rubric">Classes</p>
 <table class="longtable docutils align-default">
 <colgroup>
@@ -186,11 +187,37 @@
 <col style="width: 90%" />
 </colgroup>
 <tbody>
-<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Crossover</span></code>()</p></td>
-<td><p></p></td>
+<tr class="row-odd"><td><p><a class="reference internal" href="#macop.operators.crossovers.Crossover.Crossover" title="macop.operators.crossovers.Crossover.Crossover"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Crossover</span></code></a>()</p></td>
+<td><p>Abstract crossover extend from Operator</p></td>
 </tr>
 </tbody>
 </table>
+<dl class="class">
+<dt id="macop.operators.crossovers.Crossover.Crossover">
+<em class="property">class </em><code class="sig-prename descclassname">macop.operators.crossovers.Crossover.</code><code class="sig-name descname">Crossover</code><a class="reference internal" href="../_modules/macop/operators/crossovers/Crossover.html#Crossover"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.crossovers.Crossover.Crossover" title="Permalink to this definition">¶</a></dt>
+<dd><p>Abstract crossover extend from Operator</p>
+<dl class="attribute">
+<dt id="macop.operators.crossovers.Crossover.Crossover.kind">
+<code class="sig-name descname">kind</code><a class="headerlink" href="#macop.operators.crossovers.Crossover.Crossover.kind" title="Permalink to this definition">¶</a></dt>
+<dd><p>{KindOperator} – specify the kind of operator</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="macop.operators.crossovers.Crossover.Crossover.apply">
+<code class="sig-name descname">apply</code><span class="sig-paren">(</span><em class="sig-param">solution</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/operators/crossovers/Crossover.html#Crossover.apply"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.crossovers.Crossover.Crossover.apply" title="Permalink to this definition">¶</a></dt>
+<dd><p>Apply the current operator transformation</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><p><strong>_solution</strong> – {Solution} – Solution instance</p>
+</dd>
+<dt class="field-even">Raises</dt>
+<dd class="field-even"><p><strong>NotImplementedError</strong> – if method not implemented into child class</p>
+</dd>
+</dl>
+</dd></dl>
+
+</dd></dl>
+
 </div>
 
 

Fichier diff supprimé car celui-ci est trop grand
+ 31 - 4
docs/build/html/macop/macop.operators.crossovers.RandomSplitCrossover.html


+ 31 - 4
docs/build/html/macop/macop.operators.crossovers.SimpleCrossover.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.operators.crossovers.SimpleCrossover &mdash; macop v0.1.4 documentation</title>
+  <title>macop.operators.crossovers.SimpleCrossover &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -179,6 +179,7 @@
             
   <div class="section" id="module-macop.operators.crossovers.SimpleCrossover">
 <span id="macop-operators-crossovers-simplecrossover"></span><h1>macop.operators.crossovers.SimpleCrossover<a class="headerlink" href="#module-macop.operators.crossovers.SimpleCrossover" title="Permalink to this headline">¶</a></h1>
+<p>Crossover implementation which generated new solution by splitting at mean size best solution and current solution</p>
 <p class="rubric">Classes</p>
 <table class="longtable docutils align-default">
 <colgroup>
@@ -186,11 +187,37 @@
 <col style="width: 90%" />
 </colgroup>
 <tbody>
-<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">SimpleCrossover</span></code>()</p></td>
-<td><p></p></td>
+<tr class="row-odd"><td><p><a class="reference internal" href="#macop.operators.crossovers.SimpleCrossover.SimpleCrossover" title="macop.operators.crossovers.SimpleCrossover.SimpleCrossover"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SimpleCrossover</span></code></a>()</p></td>
+<td><p>Crossover implementation which generated new solution by splitting at mean size best solution and current solution</p></td>
 </tr>
 </tbody>
 </table>
+<dl class="class">
+<dt id="macop.operators.crossovers.SimpleCrossover.SimpleCrossover">
+<em class="property">class </em><code class="sig-prename descclassname">macop.operators.crossovers.SimpleCrossover.</code><code class="sig-name descname">SimpleCrossover</code><a class="reference internal" href="../_modules/macop/operators/crossovers/SimpleCrossover.html#SimpleCrossover"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.crossovers.SimpleCrossover.SimpleCrossover" title="Permalink to this definition">¶</a></dt>
+<dd><p>Crossover implementation which generated new solution by splitting at mean size best solution and current solution</p>
+<dl class="attribute">
+<dt id="macop.operators.crossovers.SimpleCrossover.SimpleCrossover.kind">
+<code class="sig-name descname">kind</code><a class="headerlink" href="#macop.operators.crossovers.SimpleCrossover.SimpleCrossover.kind" title="Permalink to this definition">¶</a></dt>
+<dd><p>{Algorithm} – specify the kind of operator</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="macop.operators.crossovers.SimpleCrossover.SimpleCrossover.apply">
+<code class="sig-name descname">apply</code><span class="sig-paren">(</span><em class="sig-param">solution</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/operators/crossovers/SimpleCrossover.html#SimpleCrossover.apply"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.crossovers.SimpleCrossover.SimpleCrossover.apply" title="Permalink to this definition">¶</a></dt>
+<dd><p>Create new solution based on best solution found and solution passed as parameter</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><p><strong>_solution</strong> – {Solution} – the solution to use for generating new solution</p>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>{Solution} – new generated solution</p>
+</dd>
+</dl>
+</dd></dl>
+
+</dd></dl>
+
 </div>
 
 

+ 31 - 4
docs/build/html/macop/macop.operators.mutators.Mutation.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.operators.mutators.Mutation &mdash; macop v0.1.4 documentation</title>
+  <title>macop.operators.mutators.Mutation &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -179,6 +179,7 @@
             
   <div class="section" id="module-macop.operators.mutators.Mutation">
 <span id="macop-operators-mutators-mutation"></span><h1>macop.operators.mutators.Mutation<a class="headerlink" href="#module-macop.operators.mutators.Mutation" title="Permalink to this headline">¶</a></h1>
+<p>Abstract Mutation class</p>
 <p class="rubric">Classes</p>
 <table class="longtable docutils align-default">
 <colgroup>
@@ -186,11 +187,37 @@
 <col style="width: 90%" />
 </colgroup>
 <tbody>
-<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Mutation</span></code>()</p></td>
-<td><p></p></td>
+<tr class="row-odd"><td><p><a class="reference internal" href="#macop.operators.mutators.Mutation.Mutation" title="macop.operators.mutators.Mutation.Mutation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Mutation</span></code></a>()</p></td>
+<td><p>Abstract Mutation extend from Operator</p></td>
 </tr>
 </tbody>
 </table>
+<dl class="class">
+<dt id="macop.operators.mutators.Mutation.Mutation">
+<em class="property">class </em><code class="sig-prename descclassname">macop.operators.mutators.Mutation.</code><code class="sig-name descname">Mutation</code><a class="reference internal" href="../_modules/macop/operators/mutators/Mutation.html#Mutation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.mutators.Mutation.Mutation" title="Permalink to this definition">¶</a></dt>
+<dd><p>Abstract Mutation extend from Operator</p>
+<dl class="attribute">
+<dt id="macop.operators.mutators.Mutation.Mutation.kind">
+<code class="sig-name descname">kind</code><a class="headerlink" href="#macop.operators.mutators.Mutation.Mutation.kind" title="Permalink to this definition">¶</a></dt>
+<dd><p>{KindOperator} – specify the kind of operator</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="macop.operators.mutators.Mutation.Mutation.apply">
+<code class="sig-name descname">apply</code><span class="sig-paren">(</span><em class="sig-param">solution</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/operators/mutators/Mutation.html#Mutation.apply"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.mutators.Mutation.Mutation.apply" title="Permalink to this definition">¶</a></dt>
+<dd><p>Apply the current operator transformation</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><p><strong>_solution</strong> – {Solution} – Solution instance</p>
+</dd>
+<dt class="field-even">Raises</dt>
+<dd class="field-even"><p><strong>NotImplementedError</strong> – if method not implemented into child class</p>
+</dd>
+</dl>
+</dd></dl>
+
+</dd></dl>
+
 </div>
 
 

+ 31 - 4
docs/build/html/macop/macop.operators.mutators.SimpleBinaryMutation.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.operators.mutators.SimpleBinaryMutation &mdash; macop v0.1.4 documentation</title>
+  <title>macop.operators.mutators.SimpleBinaryMutation &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -179,6 +179,7 @@
             
   <div class="section" id="module-macop.operators.mutators.SimpleBinaryMutation">
 <span id="macop-operators-mutators-simplebinarymutation"></span><h1>macop.operators.mutators.SimpleBinaryMutation<a class="headerlink" href="#module-macop.operators.mutators.SimpleBinaryMutation" title="Permalink to this headline">¶</a></h1>
+<p>Mutation implementation for binary solution, swap bit randomly from solution</p>
 <p class="rubric">Classes</p>
 <table class="longtable docutils align-default">
 <colgroup>
@@ -186,11 +187,37 @@
 <col style="width: 90%" />
 </colgroup>
 <tbody>
-<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">SimpleBinaryMutation</span></code>()</p></td>
-<td><p></p></td>
+<tr class="row-odd"><td><p><a class="reference internal" href="#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation" title="macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SimpleBinaryMutation</span></code></a>()</p></td>
+<td><p>Mutation implementation for binary solution, swap bit randomly from solution</p></td>
 </tr>
 </tbody>
 </table>
+<dl class="class">
+<dt id="macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation">
+<em class="property">class </em><code class="sig-prename descclassname">macop.operators.mutators.SimpleBinaryMutation.</code><code class="sig-name descname">SimpleBinaryMutation</code><a class="reference internal" href="../_modules/macop/operators/mutators/SimpleBinaryMutation.html#SimpleBinaryMutation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation" title="Permalink to this definition">¶</a></dt>
+<dd><p>Mutation implementation for binary solution, swap bit randomly from solution</p>
+<dl class="attribute">
+<dt id="macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation.kind">
+<code class="sig-name descname">kind</code><a class="headerlink" href="#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation.kind" title="Permalink to this definition">¶</a></dt>
+<dd><p>{KindOperator} – specify the kind of operator</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation.apply">
+<code class="sig-name descname">apply</code><span class="sig-paren">(</span><em class="sig-param">_solution</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/operators/mutators/SimpleBinaryMutation.html#SimpleBinaryMutation.apply"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.mutators.SimpleBinaryMutation.SimpleBinaryMutation.apply" title="Permalink to this definition">¶</a></dt>
+<dd><p>Create new solution based on solution passed as parameter</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><p><strong>_solution</strong> – {Solution} – the solution to use for generating new solution</p>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>{Solution} – new generated solution</p>
+</dd>
+</dl>
+</dd></dl>
+
+</dd></dl>
+
 </div>
 
 

+ 31 - 4
docs/build/html/macop/macop.operators.mutators.SimpleMutation.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.operators.mutators.SimpleMutation &mdash; macop v0.1.4 documentation</title>
+  <title>macop.operators.mutators.SimpleMutation &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -179,6 +179,7 @@
             
   <div class="section" id="module-macop.operators.mutators.SimpleMutation">
 <span id="macop-operators-mutators-simplemutation"></span><h1>macop.operators.mutators.SimpleMutation<a class="headerlink" href="#module-macop.operators.mutators.SimpleMutation" title="Permalink to this headline">¶</a></h1>
+<p>Mutation implementation for binary solution, swap two bits randomly from solution</p>
 <p class="rubric">Classes</p>
 <table class="longtable docutils align-default">
 <colgroup>
@@ -186,11 +187,37 @@
 <col style="width: 90%" />
 </colgroup>
 <tbody>
-<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">SimpleMutation</span></code>()</p></td>
-<td><p></p></td>
+<tr class="row-odd"><td><p><a class="reference internal" href="#macop.operators.mutators.SimpleMutation.SimpleMutation" title="macop.operators.mutators.SimpleMutation.SimpleMutation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SimpleMutation</span></code></a>()</p></td>
+<td><p>Mutation implementation for binary solution, swap two bits randomly from solution</p></td>
 </tr>
 </tbody>
 </table>
+<dl class="class">
+<dt id="macop.operators.mutators.SimpleMutation.SimpleMutation">
+<em class="property">class </em><code class="sig-prename descclassname">macop.operators.mutators.SimpleMutation.</code><code class="sig-name descname">SimpleMutation</code><a class="reference internal" href="../_modules/macop/operators/mutators/SimpleMutation.html#SimpleMutation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.mutators.SimpleMutation.SimpleMutation" title="Permalink to this definition">¶</a></dt>
+<dd><p>Mutation implementation for binary solution, swap two bits randomly from solution</p>
+<dl class="attribute">
+<dt id="macop.operators.mutators.SimpleMutation.SimpleMutation.kind">
+<code class="sig-name descname">kind</code><a class="headerlink" href="#macop.operators.mutators.SimpleMutation.SimpleMutation.kind" title="Permalink to this definition">¶</a></dt>
+<dd><p>{KindOperator} – specify the kind of operator</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="macop.operators.mutators.SimpleMutation.SimpleMutation.apply">
+<code class="sig-name descname">apply</code><span class="sig-paren">(</span><em class="sig-param">_solution</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/macop/operators/mutators/SimpleMutation.html#SimpleMutation.apply"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#macop.operators.mutators.SimpleMutation.SimpleMutation.apply" title="Permalink to this definition">¶</a></dt>
+<dd><p>Create new solution based on solution passed as parameter</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><p><strong>_solution</strong> – {Solution} – the solution to use for generating new solution</p>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p>{Solution} – new generated solution</p>
+</dd>
+</dl>
+</dd></dl>
+
+</dd></dl>
+
 </div>
 
 

Fichier diff supprimé car celui-ci est trop grand
+ 51 - 4
docs/build/html/macop/macop.operators.policies.Policy.html


Fichier diff supprimé car celui-ci est trop grand
+ 31 - 4
docs/build/html/macop/macop.operators.policies.RandomPolicy.html


Fichier diff supprimé car celui-ci est trop grand
+ 43 - 4
docs/build/html/macop/macop.solutions.BinarySolution.html


Fichier diff supprimé car celui-ci est trop grand
+ 43 - 4
docs/build/html/macop/macop.solutions.CombinatoryIntegerSolution.html


Fichier diff supprimé car celui-ci est trop grand
+ 43 - 4
docs/build/html/macop/macop.solutions.IntegerSolution.html


+ 3 - 2
docs/build/html/macop/macop.solutions.Solution.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>macop.solutions.Solution &mdash; macop v0.1.4 documentation</title>
+  <title>macop.solutions.Solution &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -60,7 +60,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           
@@ -174,6 +174,7 @@
             
   <div class="section" id="module-macop.solutions.Solution">
 <span id="macop-solutions-solution"></span><h1>macop.solutions.Solution<a class="headerlink" href="#module-macop.solutions.Solution" title="Permalink to this headline">¶</a></h1>
+<p>Abstract solution class</p>
 <p class="rubric">Classes</p>
 <table class="longtable docutils align-default">
 <colgroup>

BIN
docs/build/html/objects.inv


+ 2 - 2
docs/build/html/py-modindex.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Python Module Index &mdash; macop v0.1.4 documentation</title>
+  <title>Python Module Index &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -61,7 +61,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           

+ 2 - 2
docs/build/html/search.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Search &mdash; macop v0.1.4 documentation</title>
+  <title>Search &mdash; macop v0.1.5 documentation</title>
   
 
   
@@ -59,7 +59,7 @@
             
             
               <div class="version">
-                0.1.4
+                0.1.5
               </div>
             
           

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
docs/build/html/searchindex.js


+ 2 - 2
docs/source/conf.py

@@ -23,9 +23,9 @@ copyright = '2020, Jérôme BUISINE'
 author = 'Jérôme BUISINE'
 
 # The short X.Y version
-version = '0.1.4'
+version = '0.1.5'
 # The full version, including alpha/beta/rc tags
-release = 'v0.1.4'
+release = 'v0.1.5'
 
 
 # -- General configuration ---------------------------------------------------

+ 25 - 12
macop/algorithms/Algorithm.py

@@ -48,7 +48,7 @@ class Algorithm():
     def addCheckpoint(self, _class, _every, _filepath):
         """Add checkpoint to algorithm specifying usefull parameters
 
-        Attributes:
+        Args:
             _class: {class} -- Checkpoint class type
             _every: {int} -- checkpoint frequency based on evaluations
             _filepath: {str} -- file path where checkpoints will be saved
@@ -58,7 +58,7 @@ class Algorithm():
     def setCheckpoint(self, _checkpoint):
         """Set checkpoint instance directly
 
-        Attributes:
+        Args:
             _checkpoint: {Checkpoint} -- checkpoint instance
         """
         self.checkpoint = _checkpoint
@@ -82,10 +82,13 @@ class Algorithm():
         Method which initialiazes or re-initializes the whole algorithm context: operators, current solution, best solution (by default current solution)
         """
 
-        # add track reference of algo into operator (keep an eye into best solution)
+        # track reference of algo into operator (keep an eye into best solution)
         for operator in self.operators:
             operator.setAlgo(self)
 
+        # also track reference for policy
+        self.policy.setAlgo(self)
+
         self.currentSolution = self.initializer()
 
         # evaluate current solution
@@ -128,48 +131,58 @@ class Algorithm():
 
         return self.numberOfEvaluations >= self.maxEvaluations
 
-    def evaluate(self, solution):
+    def evaluate(self, _solution):
         """
+        Evaluate a solution using evaluator passed when intialize algorithm
+
+        Args:
+            solution: {Solution} -- solution to evaluate
+
         Returns: 
             fitness score of solution which is not already evaluated or changed
 
         Note: 
             if multi-objective problem this method can be updated using array of `evaluator`
         """
-        return solution.evaluate(self.evaluator)
+        return _solution.evaluate(self.evaluator)
 
-    def update(self, solution):
+    def update(self, _solution):
         """
         Apply update function to solution using specific `policy`
-
         Check if solution is valid after modification and returns it
+        
+        Args:
+            solution: {Solution} -- solution to update using current policy
 
         Returns:
             {Solution} -- updated solution obtained by the selected operator
         """
 
         # two parameters are sent if specific crossover solution are wished
-        sol = self.policy.apply(solution)
+        sol = self.policy.apply(_solution)
 
         if (sol.isValid(self.validator)):
             return sol
         else:
             logging.info("-- New solution is not valid %s" % sol)
-            return solution
+            return _solution
 
-    def isBetter(self, solution):
+    def isBetter(self, _solution):
         """
         Check if solution is better than best found
 
+        Args:
+            solution: {Solution} -- solution to compare with best one
+
         Returns:
             {bool} -- `True` if better
         """
         # depending of problem to solve (maximizing or minimizing)
         if self.maximise:
-            if self.evaluate(solution) > self.bestSolution.fitness():
+            if _solution.fitness() > self.bestSolution.fitness():
                 return True
         else:
-            if self.evaluate(solution) < self.bestSolution.fitness():
+            if _solution.fitness() < self.bestSolution.fitness():
                 return True
 
         # by default

+ 1 - 1
macop/algorithms/IteratedLocalSearch.py

@@ -27,7 +27,7 @@ class IteratedLocalSearch(Algorithm):
         """
         Run the iterated local search algorithm using local search (EvE compromise)
 
-        Attributes:
+        Args:
             _evaluations: {int} -- number of global evaluations for ILS
             _ls_evaluations: {int} -- number of Local search evaluations (default: 100)
 

+ 1 - 1
macop/algorithms/LocalSearch.py

@@ -26,7 +26,7 @@ class LocalSearch(Algorithm):
         """
         Run the local search algorithm
 
-        Attributes:
+        Args:
             _evaluations: {int} -- number of Local search evaluations
             
         Returns:

+ 17 - 2
macop/checkpoints/BasicCheckpoint.py

@@ -1,3 +1,6 @@
+"""Basic Checkpoint class implementation
+"""
+
 # main imports
 import os
 import logging
@@ -8,13 +11,23 @@ from .Checkpoint import Checkpoint
 
 
 class BasicCheckpoint(Checkpoint):
+    """
+    BasicCheckpoint is used for loading previous computations and start again after loading checkpoit
+
+    Attributes:
+        algo: {Algorithm} -- main algorithm instance reference
+        every: {int} -- checkpoint frequency used (based on number of evaluations)
+        filepath: {str} -- file path where checkpoints will be saved
+    """
     def __init__(self, _algo, _every, _filepath):
         self.algo = _algo
         self.every = _every
         self.filepath = _filepath
 
     def run(self):
-
+        """
+        Check if necessary to do backup based on `every` variable
+        """
         # get current best solution
         solution = self.algo.bestSolution
 
@@ -46,7 +59,9 @@ class BasicCheckpoint(Checkpoint):
                     f.write(line)
 
     def load(self):
-
+        """
+        Load last backup line of solution and set algorithm state (best solution and evaluations) at this backup
+        """
         if os.path.exists(self.filepath):
 
             logging.info('Load best solution from last checkpoint')

+ 2 - 2
macop/checkpoints/Checkpoint.py

@@ -20,14 +20,14 @@ class Checkpoint():
         self.filepath = _filepath
 
         # build path if not already exists
-        head, tail = os.path.split(self.filepath)
+        head, _ = os.path.split(self.filepath)
 
         if not os.path.exists(head):
             os.makedirs(head)
 
     def run(self):
         """
-        Check if necessary to do backup based on `_every` variable
+        Check if necessary to do backup based on `every` variable
         """
         pass
 

+ 14 - 2
macop/evaluators/EvaluatorExample.py

@@ -1,8 +1,20 @@
+"""Python evaluator function example
+"""
+
+
 # evaluator example
-def evaluatorExample(solution):
+def evaluatorExample(_solution):
+    """
+    Evaluator's example of solution to compute fitness
+
+    Args:
+        _solution: {Solution} -- solution to evaluate
 
+    Returns:
+        {float} -- fitness score of solution
+    """
     fitness = 0
-    for index, elem in enumerate(solution.data):
+    for index, elem in enumerate(_solution.data):
         fitness = fitness + (elem * index)
 
     return fitness

+ 11 - 5
macop/operators/Operator.py

@@ -1,33 +1,39 @@
+"""Abstract Operator class
+"""
 # main imports
 from enum import Enum
 
 
 # enumeration which stores kind of operator
 class KindOperator(Enum):
+    """Enum in order to recognize kind of operators
+    """
     MUTATOR = 1
     CROSSOVER = 2
 
 
 class Operator():
+    """Abstract Operator class which enables to update solution applying operator (computation)
+    """
     def __init__(self):
         pass
 
-    def apply(self, solution):
+    def apply(self, _solution):
         """Apply the current operator transformation
 
         Args:
-            solution (Solution): Solution instance
+            _solution: {Solution} -- Solution instance
 
         Raises:
             NotImplementedError: if method not implemented into child class
         """
         raise NotImplementedError
 
-    def setAlgo(self, algo):
+    def setAlgo(self, _algo):
         """Keep into operator reference of the whole algorithm
            The reason is to better manage operator instance
 
         Args:
-            algo (Algorithm): the algorithm reference runned
+            _algo: {Algorithm} -- the algorithm reference runned
         """
-        self.algo = algo
+        self.algo = _algo

+ 10 - 0
macop/operators/crossovers/Crossover.py

@@ -1,8 +1,18 @@
+"""Abstract Crossover class
+"""
 # module imports
 from ..Operator import KindOperator, Operator
 
 
 # main mutation class
 class Crossover(Operator):
+    """Abstract crossover extend from Operator
+
+    Attributes:
+        kind: {KindOperator} -- specify the kind of operator
+    """
     def __init__(self):
         self.kind = KindOperator.CROSSOVER
+
+    def apply(self, solution):
+        raise NotImplementedError

+ 20 - 4
macop/operators/crossovers/RandomSplitCrossover.py

@@ -1,3 +1,5 @@
+"""Crossover implementation which generated new solution by randomly splitting best solution and current solution
+"""
 # main imports
 import random
 import sys
@@ -5,16 +7,30 @@ import sys
 # module imports
 from .Crossover import Crossover
 
+# need to import the specify kind of solution
 from ...solutions.BinarySolution import BinarySolution
 from ...solutions.Solution import Solution
 
 
 class RandomSplitCrossover(Crossover):
-    def apply(self, solution):
-        size = solution.size
+    """Crossover implementation which generated new solution by randomly splitting best solution and current solution
+
+    Attributes:
+        kind: {KindOperator} -- specify the kind of operator
+    """
+    def apply(self, _solution):
+        """Create new solution based on best solution found and solution passed as parameter
+
+        Args:
+            _solution: {Solution} -- the solution to use for generating new solution
+
+        Returns:
+            {Solution} -- new generated solution
+        """
+        size = _solution.size
 
         # copy data of solution
-        firstData = solution.data.copy()
+        firstData = _solution.data.copy()
         # get best solution from current algorithm
         secondData = self.algo.bestSolution.data.copy()
 
@@ -29,4 +45,4 @@ class RandomSplitCrossover(Crossover):
             currentData = secondData
 
         # create solution of same kind with new data
-        return globals()[type(solution).__name__](currentData, size)
+        return globals()[type(_solution).__name__](currentData, size)

+ 16 - 0
macop/operators/crossovers/SimpleCrossover.py

@@ -1,3 +1,5 @@
+"""Crossover implementation which generated new solution by splitting at mean size best solution and current solution
+"""
 # main imports
 import random
 import sys
@@ -10,7 +12,21 @@ from ...solutions.Solution import Solution
 
 
 class SimpleCrossover(Crossover):
+    """Crossover implementation which generated new solution by splitting at mean size best solution and current solution
+
+    Attributes:
+        kind: {Algorithm} -- specify the kind of operator
+    """
     def apply(self, solution):
+        """Create new solution based on best solution found and solution passed as parameter
+
+        Args:
+            _solution: {Solution} -- the solution to use for generating new solution
+
+        Returns:
+            {Solution} -- new generated solution
+        """
+
         size = solution.size
 
         # copy data of solution

+ 7 - 0
macop/operators/mutators/Mutation.py

@@ -1,9 +1,16 @@
+"""Abstract Mutation class
+"""
 # module imports
 from ..Operator import KindOperator, Operator
 
 
 # main mutation class
 class Mutation(Operator):
+    """Abstract Mutation extend from Operator
+
+    Attributes:
+        kind: {KindOperator} -- specify the kind of operator
+    """
     def __init__(self):
         self.kind = KindOperator.MUTATOR
 

+ 20 - 4
macop/operators/mutators/SimpleBinaryMutation.py

@@ -1,3 +1,5 @@
+"""Mutation implementation for binary solution, swap bit randomly from solution
+"""
 # main imports
 import random
 import sys
@@ -10,13 +12,27 @@ from ...solutions.Solution import Solution
 
 
 class SimpleBinaryMutation(Mutation):
-    def apply(self, solution):
-        size = solution.size
+    """Mutation implementation for binary solution, swap bit randomly from solution
+
+    Attributes:
+        kind: {KindOperator} -- specify the kind of operator
+    """
+    def apply(self, _solution):
+        """Create new solution based on solution passed as parameter
+
+        Args:
+            _solution: {Solution} -- the solution to use for generating new solution
+
+        Returns:
+            {Solution} -- new generated solution
+        """
+
+        size = _solution.size
 
         cell = random.randint(0, size - 1)
 
         # copy data of solution
-        currentData = solution.data.copy()
+        currentData = _solution.data.copy()
 
         # swicth values
         if currentData[cell]:
@@ -25,4 +41,4 @@ class SimpleBinaryMutation(Mutation):
             currentData[cell] = 1
 
         # create solution of same kind with new data
-        return globals()[type(solution).__name__](currentData, size)
+        return globals()[type(_solution).__name__](currentData, size)

+ 20 - 4
macop/operators/mutators/SimpleMutation.py

@@ -1,3 +1,5 @@
+"""Mutation implementation for binary solution, swap two bits randomly from solution
+"""
 # main imports
 import random
 import sys
@@ -10,14 +12,28 @@ from ...solutions.Solution import Solution
 
 
 class SimpleMutation(Mutation):
-    def apply(self, solution):
-        size = solution.size
+    """Mutation implementation for binary solution, swap two bits randomly from solution
+
+    Attributes:
+        kind: {KindOperator} -- specify the kind of operator
+    """
+    def apply(self, _solution):
+        """Create new solution based on solution passed as parameter
+
+        Args:
+            _solution: {Solution} -- the solution to use for generating new solution
+
+        Returns:
+            {Solution} -- new generated solution
+        """
+
+        size = _solution.size
 
         firstCell = 0
         secondCell = 0
 
         # copy data of solution
-        currentData = solution.data.copy()
+        currentData = _solution.data.copy()
 
         while firstCell == secondCell:
             firstCell = random.randint(0, size - 1)
@@ -30,4 +46,4 @@ class SimpleMutation(Mutation):
         currentData[secondCell] = temp
 
         # create solution of same kind with new data
-        return globals()[type(solution).__name__](currentData, size)
+        return globals()[type(_solution).__name__](currentData, size)

+ 32 - 7
macop/operators/policies/Policy.py

@@ -1,9 +1,15 @@
-# main imports
+"""Abstract class which is used for applying strategy when selecting and applying operator 
+"""
 import logging
 
 
 # define policy to choose `operator` function at current iteration
 class Policy():
+    """Abstract class which is used for applying strategy when selecting and applying operator 
+
+    Attributes:
+        operators: {[Operator]} -- list of selected operators for the algorithm
+    """
 
     # here you can define your statistical variables for choosing next operator to apply
     def __init__(self, _operators):
@@ -15,19 +21,38 @@ class Policy():
         """
         raise NotImplementedError
 
-    def apply(self, solution):
+    def apply(self, _solution):
         """
-        Apply specific operator chosen to solution and returns solution
+        Apply specific operator chosen to create new solution, computes its fitness and returns solution
+        
+        Args:
+            _solution: {Solution} -- the solution to use for generating new solution
+
+        Returns:
+            {Solution} -- new generated solution
         """
 
         operator = self.select()
 
         logging.info("---- Applying %s on %s" %
-                     (type(operator).__name__, solution))
+                     (type(operator).__name__, _solution))
+
+        # apply operator on solution
+        newSolution = operator.apply(_solution)
 
-        # check kind of operator
-        newSolution = operator.apply(solution)
+        # compute fitness of new solution
+        newSolution.evaluate(self.algo.evaluator)
+        print(newSolution.fitness())
 
-        logging.info("---- Obtaining %s" % (solution))
+        logging.info("---- Obtaining %s" % (_solution))
 
         return newSolution
+
+    def setAlgo(self, _algo):
+        """Keep into policy reference of the whole algorithm
+           The reason is to better manage the operator choices (use of rewards as example)
+
+        Args:
+            _algo: {Algorithm} -- the algorithm reference runned
+        """
+        self.algo = _algo

+ 11 - 0
macop/operators/policies/RandomPolicy.py

@@ -1,3 +1,5 @@
+"""Policy class implementation which is used for select operator randomly
+"""
 # main imports
 import random
 
@@ -6,8 +8,17 @@ from .Policy import Policy
 
 
 class RandomPolicy(Policy):
+    """Policy class implementation which is used for select operator randomly
+
+    Attributes:
+        operators: {[Operator]} -- list of selected operators for the algorithm
+    """
     def select(self):
+        """Select randomly the next operator to use
 
+        Returns:
+            {Operator}: the selected operator
+        """
         # choose operator randomly
         index = random.randint(0, len(self.operators) - 1)
         return self.operators[index]

+ 20 - 6
macop/solutions/BinarySolution.py

@@ -1,4 +1,5 @@
-# main imports
+"""Binary solution class implementation
+"""
 import numpy as np
 
 # modules imports
@@ -7,12 +8,21 @@ from .Solution import Solution
 
 # Solution which stores solution data as binary array
 class BinarySolution(Solution):
+    """
+    Binary integer solution class
+
+    Attributes:
+        data: {ndarray} --  array of binary values
+        size: {int} -- size of binary array values
+        score: {float} -- fitness score value
+    """
     def __init__(self, _data, _size):
         """
-        Initialize data of solution using specific data
+        Initialize binary solution using specific data
 
-        - `data` field is array of binary values
-        - `size` field is the size of array binary values
+        Args:
+            data: {ndarray} --  array of binary values
+            size: {int} -- size of binary array values
         """
 
         self.data = _data
@@ -20,9 +30,13 @@ class BinarySolution(Solution):
 
     def random(self, _validator):
         """
-        Intialize binary array using size solution data
+        Intialize binary array with use of validator to generate valid random solution
 
-        Use of validator to generate valid random solution
+        Args:
+            _validator: {function} -- specific function which validates or not a solution
+
+        Returns:
+            {BinarySolution} -- new generated binary solution
         """
 
         self.data = np.random.randint(2, size=self.size)

+ 20 - 5
macop/solutions/CombinatoryIntegerSolution.py

@@ -1,3 +1,5 @@
+"""Combinatory integer solution class implementation
+"""
 # main imports
 import numpy as np
 
@@ -7,12 +9,21 @@ from .Solution import Solution
 
 # Solution which stores solution data as combinatory integer array
 class CombinatoryIntegerSolution(Solution):
+    """
+    Combinatory integer solution class
+
+    Attributes:
+        data: {ndarray} --  array of binary values
+        size: {int} -- size of binary array values
+        score: {float} -- fitness score value
+    """
     def __init__(self, _data, _size):
         """
-        Initialize data of solution using specific data
+        Initialize binary solution using specific data
 
-        - `data` field is array of integer values
-        - `size` field is the size of array integer values
+        Args:
+            data: {ndarray} --  array of binary values
+            size: {int} -- size of binary array values
         """
 
         self.data = _data
@@ -20,9 +31,13 @@ class CombinatoryIntegerSolution(Solution):
 
     def random(self, _validator):
         """
-        Intialize combinatory integer array using size solution data
+        Intialize combinatory integer array with use of validator to generate valid random solution
 
-        Use of validator to generate valid random solution
+        Args:
+            _validator: {function} -- specific function which validates or not a solution
+
+        Returns:
+            {CombinatoryIntegerSolution} -- new generated combinatory integer solution
         """
 
         self.data = np.random.shuffle(np.arange(self.size))

+ 20 - 5
macop/solutions/IntegerSolution.py

@@ -1,3 +1,5 @@
+"""Integer solution class implementation
+"""
 # main imports
 import numpy as np
 
@@ -7,12 +9,21 @@ from .Solution import Solution
 
 # Solution which stores solution data as integer array
 class IntegerSolution(Solution):
+    """
+    Integer solution class
+
+    Attributes:
+        data: {ndarray} --  array of binary values
+        size: {int} -- size of binary array values
+        score: {float} -- fitness score value
+    """
     def __init__(self, _data, _size):
         """
-        Initialize data of solution using specific data
+        Initialize integer solution using specific data
 
-        - `data` field is array of integer values
-        - `size` field is the size of array integer values
+        Args:
+            data: {ndarray} --  array of binary values
+            size: {int} -- size of binary array values
         """
 
         self.data = _data
@@ -20,9 +31,13 @@ class IntegerSolution(Solution):
 
     def random(self, _validator):
         """
-        Intialize integer array using size solution data
+        Intialize integer array with use of validator to generate valid random solution
 
-        Use of validator to generate valid random solution
+        Args:
+            _validator: {function} -- specific function which validates or not a solution
+
+        Returns:
+            {IntegerSolution} -- new generated integer solution
         """
 
         self.data = np.random.randint(self.size, size=self.size)

+ 25 - 4
macop/solutions/Solution.py

@@ -1,10 +1,16 @@
-# Generic solution class
+"""Abstract solution class
+"""
+
+
 class Solution():
     def __init__(self, _data, _size):
         """
-        Initialize data of solution using specific data
+        Binary integer solution class
 
-        Note : `data` field can be anything, such as array/list of integer
+        Attributes:
+            data: {ndarray} --  array of binary values
+            size: {int} -- size of binary array values
+            score: {float} -- fitness score value
         """
         self.data = _data
         self.size = _size
@@ -13,12 +19,24 @@ class Solution():
     def isValid(self, _validator):
         """
         Use of custom method which validates if solution is valid or not
+
+        Args:
+            _validator: {function} -- specific function which validates or not a solution
+
+        Returns:
+            {bool} -- `True` is solution is valid
         """
         return _validator(self)
 
     def evaluate(self, _evaluator):
         """
-        Evaluate function using specific `_evaluator`
+        Evaluate solution using specific `_evaluator`
+
+        Args:
+            _evaluator: {function} -- specific function which computes fitness of solution
+
+        Returns:
+            {float} -- fitness score value
         """
         self.score = _evaluator(self)
         return self.score
@@ -26,6 +44,9 @@ class Solution():
     def fitness(self):
         """
         Returns fitness score
+
+        Returns:
+            {float} -- fitness score value
         """
         return self.score
 

+ 6 - 2
mainExample.py

@@ -1,5 +1,6 @@
 # main imports
 import logging
+import os
 
 # module imports
 from macop.algorithms.IteratedLocalSearch import IteratedLocalSearch as ILS
@@ -15,8 +16,11 @@ from macop.operators.policies.RandomPolicy import RandomPolicy
 
 from macop.checkpoints.BasicCheckpoint import BasicCheckpoint
 
+if not os.path.exists('data'):
+    os.makedirs('data')
+
 # logging configuration
-logging.basicConfig(format='%(asctime)s %(message)s', filename='example.log', level=logging.DEBUG)
+logging.basicConfig(format='%(asctime)s %(message)s', filename='data/example.log', level=logging.DEBUG)
 
 # default validator
 def validator(solution):
@@ -26,7 +30,7 @@ def validator(solution):
 def init():
     return BinarySolution([], 30).random(validator)
 
-filepath = "checkpoints.csv"
+filepath = "data/checkpoints.csv"
 
 def main():
 

+ 1 - 1
setup.py

@@ -23,7 +23,7 @@ class TestCommand(distutils.command.check.check):
 
 setup(
     name='macop',
-    version='0.1.4',
+    version='0.1.5',
     description='Minimalist And Customizable Optimization Package',
     long_description=open('README.md').read(),
     long_description_content_type='text/markdown',