Browse Source

rename all paramaters as protected

Jérôme BUISINE 3 months ago
parent
commit
899ec8e7d3
100 changed files with 1 additions and 9282 deletions
  1. 1 1
      build.sh
  2. BIN
      docs/build/doctrees/environment.pickle
  3. BIN
      docs/build/doctrees/macop.doctree
  4. BIN
      docs/build/doctrees/macop/macop.algorithms.Algorithm.doctree
  5. BIN
      docs/build/doctrees/macop/macop.algorithms.mono.HillClimberBestImprovment.doctree
  6. BIN
      docs/build/doctrees/macop/macop.algorithms.mono.HillClimberFirstImprovment.doctree
  7. BIN
      docs/build/doctrees/macop/macop.algorithms.mono.IteratedLocalSearch.doctree
  8. BIN
      docs/build/doctrees/macop/macop.algorithms.mono.LocalSearch.doctree
  9. BIN
      docs/build/doctrees/macop/macop.algorithms.multi.MOSubProblem.doctree
  10. BIN
      docs/build/doctrees/macop/macop.callbacks.BasicCheckpoint.doctree
  11. BIN
      docs/build/doctrees/macop/macop.callbacks.Callback.doctree
  12. BIN
      docs/build/doctrees/macop/macop.callbacks.MultiCheckpoint.doctree
  13. BIN
      docs/build/doctrees/macop/macop.callbacks.ParetoCheckpoint.doctree
  14. BIN
      docs/build/doctrees/macop/macop.callbacks.UCBCheckpoint.doctree
  15. BIN
      docs/build/doctrees/macop/macop.evaluators.EvaluatorExample.doctree
  16. BIN
      docs/build/doctrees/macop/macop.operators.Operator.doctree
  17. BIN
      docs/build/doctrees/macop/macop.operators.crossovers.Crossover.doctree
  18. BIN
      docs/build/doctrees/macop/macop.operators.crossovers.RandomSplitCrossover.doctree
  19. BIN
      docs/build/doctrees/macop/macop.operators.crossovers.SimpleCrossover.doctree
  20. BIN
      docs/build/doctrees/macop/macop.operators.mutators.Mutation.doctree
  21. BIN
      docs/build/doctrees/macop/macop.operators.mutators.SimpleBinaryMutation.doctree
  22. BIN
      docs/build/doctrees/macop/macop.operators.mutators.SimpleMutation.doctree
  23. BIN
      docs/build/doctrees/macop/macop.operators.policies.Policy.doctree
  24. BIN
      docs/build/doctrees/macop/macop.operators.policies.RandomPolicy.doctree
  25. BIN
      docs/build/doctrees/macop/macop.operators.policies.UCBPolicy.doctree
  26. BIN
      docs/build/doctrees/macop/macop.solutions.BinarySolution.doctree
  27. BIN
      docs/build/doctrees/macop/macop.solutions.CombinatoryIntegerSolution.doctree
  28. BIN
      docs/build/doctrees/macop/macop.solutions.IntegerSolution.doctree
  29. BIN
      docs/build/doctrees/macop/macop.solutions.Solution.doctree
  30. 0 4
      docs/build/html/.buildinfo
  31. BIN
      docs/build/html/_images/logo_macop.png
  32. 0 217
      docs/build/html/_modules/index.html
  33. 0 444
      docs/build/html/_modules/macop/algorithms/Algorithm.html
  34. 0 276
      docs/build/html/_modules/macop/algorithms/mono/IteratedLocalSearch.html
  35. 0 268
      docs/build/html/_modules/macop/algorithms/mono/LocalSearch.html
  36. 0 549
      docs/build/html/_modules/macop/algorithms/multi/MOEAD.html
  37. 0 288
      docs/build/html/_modules/macop/algorithms/multi/MOSubProblem.html
  38. 0 299
      docs/build/html/_modules/macop/callbacks/BasicCheckpoint.html
  39. 0 245
      docs/build/html/_modules/macop/callbacks/Callback.html
  40. 0 306
      docs/build/html/_modules/macop/callbacks/MultiCheckpoint.html
  41. 0 304
      docs/build/html/_modules/macop/callbacks/ParetoCheckpoint.html
  42. 0 284
      docs/build/html/_modules/macop/callbacks/UCBCheckpoint.html
  43. 0 219
      docs/build/html/_modules/macop/evaluators/EvaluatorExample.html
  44. 0 234
      docs/build/html/_modules/macop/operators/Operator.html
  45. 0 213
      docs/build/html/_modules/macop/operators/crossovers/Crossover.html
  46. 0 248
      docs/build/html/_modules/macop/operators/crossovers/RandomSplitCrossover.html
  47. 0 259
      docs/build/html/_modules/macop/operators/crossovers/SimpleCrossover.html
  48. 0 213
      docs/build/html/_modules/macop/operators/mutators/Mutation.html
  49. 0 244
      docs/build/html/_modules/macop/operators/mutators/SimpleBinaryMutation.html
  50. 0 249
      docs/build/html/_modules/macop/operators/mutators/SimpleMutation.html
  51. 0 255
      docs/build/html/_modules/macop/operators/policies/Policy.html
  52. 0 219
      docs/build/html/_modules/macop/operators/policies/RandomPolicy.html
  53. 0 296
      docs/build/html/_modules/macop/operators/policies/UCBPolicy.html
  54. 0 245
      docs/build/html/_modules/macop/solutions/BinarySolution.html
  55. 0 246
      docs/build/html/_modules/macop/solutions/CombinatoryIntegerSolution.html
  56. 0 246
      docs/build/html/_modules/macop/solutions/IntegerSolution.html
  57. 0 17
      docs/build/html/_sources/contributing.rst.txt
  58. 0 21
      docs/build/html/_sources/description.rst.txt
  59. 0 626
      docs/build/html/_sources/examples.rst.txt
  60. 0 27
      docs/build/html/_sources/index.rst.txt
  61. 0 68
      docs/build/html/_sources/macop.rst.txt
  62. 0 22
      docs/build/html/_sources/macop/macop.algorithms.Algorithm.rst.txt
  63. 0 22
      docs/build/html/_sources/macop/macop.algorithms.mono.IteratedLocalSearch.rst.txt
  64. 0 22
      docs/build/html/_sources/macop/macop.algorithms.mono.LocalSearch.rst.txt
  65. 0 28
      docs/build/html/_sources/macop/macop.algorithms.multi.MOEAD.rst.txt
  66. 0 22
      docs/build/html/_sources/macop/macop.algorithms.multi.MOSubProblem.rst.txt
  67. 0 22
      docs/build/html/_sources/macop/macop.callbacks.BasicCheckpoint.rst.txt
  68. 0 22
      docs/build/html/_sources/macop/macop.callbacks.Callback.rst.txt
  69. 0 22
      docs/build/html/_sources/macop/macop.callbacks.MultiCheckpoint.rst.txt
  70. 0 22
      docs/build/html/_sources/macop/macop.callbacks.ParetoCheckpoint.rst.txt
  71. 0 22
      docs/build/html/_sources/macop/macop.callbacks.UCBCheckpoint.rst.txt
  72. 0 22
      docs/build/html/_sources/macop/macop.evaluators.EvaluatorExample.rst.txt
  73. 0 23
      docs/build/html/_sources/macop/macop.operators.Operator.rst.txt
  74. 0 22
      docs/build/html/_sources/macop/macop.operators.crossovers.Crossover.rst.txt
  75. 0 22
      docs/build/html/_sources/macop/macop.operators.crossovers.RandomSplitCrossover.rst.txt
  76. 0 22
      docs/build/html/_sources/macop/macop.operators.crossovers.SimpleCrossover.rst.txt
  77. 0 22
      docs/build/html/_sources/macop/macop.operators.mutators.Mutation.rst.txt
  78. 0 22
      docs/build/html/_sources/macop/macop.operators.mutators.SimpleBinaryMutation.rst.txt
  79. 0 22
      docs/build/html/_sources/macop/macop.operators.mutators.SimpleMutation.rst.txt
  80. 0 22
      docs/build/html/_sources/macop/macop.operators.policies.Policy.rst.txt
  81. 0 22
      docs/build/html/_sources/macop/macop.operators.policies.RandomPolicy.rst.txt
  82. 0 22
      docs/build/html/_sources/macop/macop.operators.policies.UCBPolicy.rst.txt
  83. 0 22
      docs/build/html/_sources/macop/macop.solutions.BinarySolution.rst.txt
  84. 0 22
      docs/build/html/_sources/macop/macop.solutions.CombinatoryIntegerSolution.rst.txt
  85. 0 22
      docs/build/html/_sources/macop/macop.solutions.IntegerSolution.rst.txt
  86. 0 22
      docs/build/html/_sources/macop/macop.solutions.Solution.rst.txt
  87. 0 764
      docs/build/html/_static/basic.css
  88. 0 1
      docs/build/html/_static/css/badge_only.css
  89. 0 6
      docs/build/html/_static/css/theme.css
  90. 0 314
      docs/build/html/_static/doctools.js
  91. 0 10
      docs/build/html/_static/documentation_options.js
  92. BIN
      docs/build/html/_static/file.png
  93. BIN
      docs/build/html/_static/fonts/Inconsolata-Bold.ttf
  94. BIN
      docs/build/html/_static/fonts/Inconsolata-Regular.ttf
  95. BIN
      docs/build/html/_static/fonts/Inconsolata.ttf
  96. BIN
      docs/build/html/_static/fonts/Lato-Bold.ttf
  97. BIN
      docs/build/html/_static/fonts/Lato-Regular.ttf
  98. BIN
      docs/build/html/_static/fonts/Lato/lato-bold.eot
  99. BIN
      docs/build/html/_static/fonts/Lato/lato-bold.ttf
  100. 0 0
      docs/build/html/_static/fonts/Lato/lato-bold.woff

+ 1 - 1
build.sh

@@ -2,7 +2,7 @@
 
 # Format code
 echo "Use of yapf package to format code.."
-yapf -ir -vv macop
+#yapf -ir -vv macop
 
 # Build rawls package
 echo "Build package..."

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.mono.HillClimberBestImprovment.doctree


BIN
docs/build/doctrees/macop/macop.algorithms.mono.HillClimberFirstImprovment.doctree


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


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


BIN
docs/build/doctrees/macop/macop.algorithms.multi.MOSubProblem.doctree


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


BIN
docs/build/doctrees/macop/macop.callbacks.Callback.doctree


BIN
docs/build/doctrees/macop/macop.callbacks.MultiCheckpoint.doctree


BIN
docs/build/doctrees/macop/macop.callbacks.ParetoCheckpoint.doctree


BIN
docs/build/doctrees/macop/macop.callbacks.UCBCheckpoint.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.operators.policies.UCBPolicy.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


+ 0 - 4
docs/build/html/.buildinfo

@@ -1,4 +0,0 @@
-# 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: ff44bc9598693fa4083d3e6df6fd44c7
-tags: 645f666f9bcd5a90fca523b33c5a78b7

BIN
docs/build/html/_images/logo_macop.png


+ 0 - 217
docs/build/html/_modules/index.html

@@ -1,217 +0,0 @@
-
-
-<!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>Overview: module code &mdash; macop v1.0.0 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">
-                1.0.0
-              </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>Overview: module code</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>All modules for which code is available</h1>
-<ul><li><a href="macop/algorithms/Algorithm.html">macop.algorithms.Algorithm</a></li>
-<li><a href="macop/algorithms/mono/IteratedLocalSearch.html">macop.algorithms.mono.IteratedLocalSearch</a></li>
-<li><a href="macop/algorithms/mono/LocalSearch.html">macop.algorithms.mono.LocalSearch</a></li>
-<li><a href="macop/algorithms/multi/MOEAD.html">macop.algorithms.multi.MOEAD</a></li>
-<li><a href="macop/algorithms/multi/MOSubProblem.html">macop.algorithms.multi.MOSubProblem</a></li>
-<li><a href="macop/callbacks/BasicCheckpoint.html">macop.callbacks.BasicCheckpoint</a></li>
-<li><a href="macop/callbacks/Callback.html">macop.callbacks.Callback</a></li>
-<li><a href="macop/callbacks/MultiCheckpoint.html">macop.callbacks.MultiCheckpoint</a></li>
-<li><a href="macop/callbacks/ParetoCheckpoint.html">macop.callbacks.ParetoCheckpoint</a></li>
-<li><a href="macop/callbacks/UCBCheckpoint.html">macop.callbacks.UCBCheckpoint</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/operators/policies/UCBPolicy.html">macop.operators.policies.UCBPolicy</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>
-           
-          </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>

File diff suppressed because it is too large
+ 0 - 444
docs/build/html/_modules/macop/algorithms/Algorithm.html


File diff suppressed because it is too large
+ 0 - 276
docs/build/html/_modules/macop/algorithms/mono/IteratedLocalSearch.html


+ 0 - 268
docs/build/html/_modules/macop/algorithms/mono/LocalSearch.html

@@ -1,268 +0,0 @@
-
-
-<!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.algorithms.mono.LocalSearch &mdash; macop v1.0.0 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">
-                1.0.0
-              </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.algorithms.mono.LocalSearch</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.algorithms.mono.LocalSearch</h1><div class="highlight"><pre>
-<span></span><span class="sd">&quot;&quot;&quot;Local Search algorithm</span>
-<span class="sd">&quot;&quot;&quot;</span>
-
-<span class="c1"># main imports</span>
-<span class="kn">import</span> <span class="nn">logging</span>
-
-<span class="c1"># module imports</span>
-<span class="kn">from</span> <span class="nn">..Algorithm</span> <span class="kn">import</span> <span class="n">Algorithm</span>
-
-
-<div class="viewcode-block" id="LocalSearch"><a class="viewcode-back" href="../../../../macop/macop.algorithms.mono.LocalSearch.html#macop.algorithms.mono.LocalSearch.LocalSearch">[docs]</a><span class="k">class</span> <span class="nc">LocalSearch</span><span class="p">(</span><span class="n">Algorithm</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;Local Search used as exploitation optimisation algorithm</span>
-
-<span class="sd">    Attributes:</span>
-<span class="sd">        initalizer: {function} -- basic function strategy to initialize solution</span>
-<span class="sd">        evaluator: {function} -- basic function in order to obtained fitness (mono or multiple objectives)</span>
-<span class="sd">        operators: {[Operator]} -- list of operator to use when launching algorithm</span>
-<span class="sd">        policy: {Policy} -- Policy class implementation strategy to select operators</span>
-<span class="sd">        validator: {function} -- basic function to check if solution is valid or not under some constraints</span>
-<span class="sd">        maximise: {bool} -- specify kind of optimisation problem </span>
-<span class="sd">        currentSolution: {Solution} -- current solution managed for current evaluation</span>
-<span class="sd">        bestSolution: {Solution} -- best solution found so far during running algorithm</span>
-<span class="sd">        callbacks: {[Callback]} -- list of Callback class implementation to do some instructions every number of evaluations and `load` when initializing algorithm</span>
-<span class="sd">    &quot;&quot;&quot;</span>
-<div class="viewcode-block" id="LocalSearch.run"><a class="viewcode-back" href="../../../../macop/macop.algorithms.mono.LocalSearch.html#macop.algorithms.mono.LocalSearch.LocalSearch.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="n">_evaluations</span><span class="p">):</span>
-        <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Run the local search algorithm</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>
-<span class="sd">            {Solution} -- best solution found</span>
-<span class="sd">        &quot;&quot;&quot;</span>
-
-        <span class="c1"># by default use of mother method to initialize variables</span>
-        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">_evaluations</span><span class="p">)</span>
-
-        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">parent</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">parent</span><span class="o">.</span><span class="n">bestSolution</span>
-
-        <span class="c1"># initialize current solution</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">initRun</span><span class="p">()</span>
-
-        <span class="n">solutionSize</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">currentSolution</span><span class="o">.</span><span class="n">size</span>
-
-        <span class="c1"># local search algorithm implementation</span>
-        <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">stop</span><span class="p">():</span>
-
-            <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">solutionSize</span><span class="p">):</span>
-
-                <span class="c1"># update current solution using policy</span>
-                <span class="n">newSolution</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">currentSolution</span><span class="p">)</span>
-
-                <span class="c1"># if better solution than currently, replace it</span>
-                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">isBetter</span><span class="p">(</span><span class="n">newSolution</span><span class="p">):</span>
-                    <span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</span> <span class="o">=</span> <span class="n">newSolution</span>
-
-                <span class="c1"># increase number of evaluations</span>
-                <span class="bp">self</span><span class="o">.</span><span class="n">increaseEvaluation</span><span class="p">()</span>
-
-                <span class="bp">self</span><span class="o">.</span><span class="n">progress</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;---- Current </span><span class="si">%s</span><span class="s2"> - SCORE </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span>
-                             <span class="p">(</span><span class="n">newSolution</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="c1"># stop algorithm if necessary</span>
-                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">stop</span><span class="p">():</span>
-                    <span class="k">break</span>
-
-        <span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;End of </span><span class="si">%s</span><span class="s2">, best solution found </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="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</span><span class="p">))</span>
-
-        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</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>

File diff suppressed because it is too large
+ 0 - 549
docs/build/html/_modules/macop/algorithms/multi/MOEAD.html


+ 0 - 288
docs/build/html/_modules/macop/algorithms/multi/MOSubProblem.html

@@ -1,288 +0,0 @@
-
-
-<!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.algorithms.multi.MOSubProblem &mdash; macop v1.0.0 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">
-                1.0.0
-              </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.algorithms.multi.MOSubProblem</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.algorithms.multi.MOSubProblem</h1><div class="highlight"><pre>
-<span></span><span class="sd">&quot;&quot;&quot;MOEAD sub problem algorithm class</span>
-<span class="sd">&quot;&quot;&quot;</span>
-
-<span class="c1"># main imports</span>
-<span class="kn">import</span> <span class="nn">logging</span>
-
-<span class="c1"># module imports</span>
-<span class="kn">from</span> <span class="nn">..Algorithm</span> <span class="kn">import</span> <span class="n">Algorithm</span>
-
-
-<div class="viewcode-block" id="MOSubProblem"><a class="viewcode-back" href="../../../../macop/macop.algorithms.multi.MOSubProblem.html#macop.algorithms.multi.MOSubProblem.MOSubProblem">[docs]</a><span class="k">class</span> <span class="nc">MOSubProblem</span><span class="p">(</span><span class="n">Algorithm</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;Specific MO sub problem used into MOEAD</span>
-
-<span class="sd">    Attributes:</span>
-<span class="sd">        index: {int} -- sub problem index</span>
-<span class="sd">        weights: {[float]} -- sub problems objectives weights</span>
-<span class="sd">        initalizer: {function} -- basic function strategy to initialize solution</span>
-<span class="sd">        evaluator: {function} -- basic function in order to obtained fitness (mono or multiple objectives)</span>
-<span class="sd">        operators: {[Operator]} -- list of operator to use when launching algorithm</span>
-<span class="sd">        policy: {Policy} -- Policy class implementation strategy to select operators</span>
-<span class="sd">        validator: {function} -- basic function to check if solution is valid or not under some constraints</span>
-<span class="sd">        maximise: {bool} -- specify kind of optimisation problem </span>
-<span class="sd">        currentSolution: {Solution} -- current solution managed for current evaluation</span>
-<span class="sd">        bestSolution: {Solution} -- best solution found so far during running algorithm</span>
-<span class="sd">        callbacks: {[Callback]} -- list of Callback class implementation to do some instructions every number of evaluations and `load` when initializing algorithm</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">_index</span><span class="p">,</span>
-                 <span class="n">_weights</span><span class="p">,</span>
-                 <span class="n">_initalizer</span><span class="p">,</span>
-                 <span class="n">_evaluator</span><span class="p">,</span>
-                 <span class="n">_operators</span><span class="p">,</span>
-                 <span class="n">_policy</span><span class="p">,</span>
-                 <span class="n">_validator</span><span class="p">,</span>
-                 <span class="n">_maximise</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
-                 <span class="n">_parent</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
-
-        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">_initalizer</span><span class="p">,</span> <span class="n">_evaluator</span><span class="p">,</span> <span class="n">_operators</span><span class="p">,</span> <span class="n">_policy</span><span class="p">,</span>
-                         <span class="n">_validator</span><span class="p">,</span> <span class="n">_maximise</span><span class="p">,</span> <span class="n">_parent</span><span class="p">)</span>
-
-        <span class="bp">self</span><span class="o">.</span><span class="n">index</span> <span class="o">=</span> <span class="n">_index</span>
-        <span class="bp">self</span><span class="o">.</span><span class="n">weights</span> <span class="o">=</span> <span class="n">_weights</span>
-
-<div class="viewcode-block" id="MOSubProblem.run"><a class="viewcode-back" href="../../../../macop/macop.algorithms.multi.MOSubProblem.html#macop.algorithms.multi.MOSubProblem.MOSubProblem.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="n">_evaluations</span><span class="p">):</span>
-        <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">        Run the local search algorithm</span>
-
-<span class="sd">        Args:</span>
-<span class="sd">            _evaluations: {int} -- number of evaluations</span>
-<span class="sd">            </span>
-<span class="sd">        Returns:</span>
-<span class="sd">            {Solution} -- best solution found</span>
-<span class="sd">        &quot;&quot;&quot;</span>
-
-        <span class="c1"># by default use of mother method to initialize variables</span>
-        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">_evaluations</span><span class="p">)</span>
-
-        <span class="c1"># initialize solution if necessary</span>
-        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">initRun</span><span class="p">()</span>
-
-        <span class="c1"># new operators list keep track of current sub problem</span>
-        <span class="k">for</span> <span class="n">op</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">operators</span><span class="p">:</span>
-            <span class="n">op</span><span class="o">.</span><span class="n">setAlgo</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
-
-        <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">_evaluations</span><span class="p">):</span>
-
-            <span class="c1"># keep reference of sub problem used</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">policy</span><span class="o">.</span><span class="n">setAlgo</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
-
-            <span class="c1"># update solution using policy</span>
-            <span class="n">newSolution</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</span><span class="p">)</span>
-
-            <span class="c1"># if better solution than currently, replace it</span>
-            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">isBetter</span><span class="p">(</span><span class="n">newSolution</span><span class="p">):</span>
-                <span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</span> <span class="o">=</span> <span class="n">newSolution</span>
-
-            <span class="c1"># increase number of evaluations</span>
-            <span class="bp">self</span><span class="o">.</span><span class="n">increaseEvaluation</span><span class="p">()</span>
-
-            <span class="bp">self</span><span class="o">.</span><span class="n">progress</span><span class="p">()</span>
-
-            <span class="c1"># stop algorithm if necessary</span>
-            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">stop</span><span class="p">():</span>
-                <span class="k">break</span>
-
-            <span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;---- Current </span><span class="si">%s</span><span class="s2"> - SCORE </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span>
-                         <span class="p">(</span><span class="n">newSolution</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;End of </span><span class="si">%s</span><span class="s2">, best solution found </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="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</span><span class="p">))</span>
-
-        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">bestSolution</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>

+ 0 - 299
docs/build/html/_modules/macop/callbacks/BasicCheckpoint.html

@@ -1,299 +0,0 @@
-
-
-<!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.callbacks.BasicCheckpoint &mdash; macop v1.0.0 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">
-                1.0.0
-              </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.callbacks.BasicCheckpoint</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.callbacks.BasicCheckpoint</h1><div class="highlight"><pre>
-<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>
-
-<span class="c1"># module imports</span>
-<span class="kn">from</span> <span class="nn">.Callback</span> <span class="kn">import</span> <span class="n">Callback</span>
-<span class="kn">from</span> <span class="nn">..utils.color</span> <span class="kn">import</span> <span class="n">macop_text</span><span class="p">,</span> <span class="n">macop_line</span>
-
-
-<div class="viewcode-block" id="BasicCheckpoint"><a class="viewcode-back" href="../../../macop/macop.callbacks.BasicCheckpoint.html#macop.callbacks.BasicCheckpoint.BasicCheckpoint">[docs]</a><span class="k">class</span> <span class="nc">BasicCheckpoint</span><span class="p">(</span><span class="n">Callback</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 checkpoint</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>
-<div class="viewcode-block" id="BasicCheckpoint.run"><a class="viewcode-back" href="../../../macop/macop.callbacks.BasicCheckpoint.html#macop.callbacks.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>
-
-        <span class="n">currentEvaluation</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">getGlobalEvaluation</span><span class="p">()</span>
-
-        <span class="c1"># backup if necessary</span>
-        <span class="k">if</span> <span class="n">currentEvaluation</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">every</span> <span class="o">==</span> <span class="mi">0</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;Checkpoint is done into &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">filepath</span><span class="p">)</span>
-
-            <span class="n">solutionData</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
-            <span class="n">solutionSize</span> <span class="o">=</span> <span class="nb">len</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="k">for</span> <span class="n">index</span><span class="p">,</span> <span class="n">val</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">solutionData</span> <span class="o">+=</span> <span class="nb">str</span><span class="p">(</span><span class="n">val</span><span class="p">)</span>
-
-                <span class="k">if</span> <span class="n">index</span> <span class="o">&lt;</span> <span class="n">solutionSize</span> <span class="o">-</span> <span class="mi">1</span><span class="p">:</span>
-                    <span class="n">solutionData</span> <span class="o">+=</span> <span class="s1">&#39; &#39;</span>
-
-            <span class="n">line</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">currentEvaluation</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;;&#39;</span> <span class="o">+</span> <span class="n">solutionData</span> <span class="o">+</span> <span class="s1">&#39;;&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span>
-                <span class="n">solution</span><span class="o">.</span><span class="n">fitness</span><span class="p">())</span> <span class="o">+</span> <span class="s1">&#39;;</span><span class="se">\n</span><span class="s1">&#39;</span>
-
-            <span class="c1"># check if file exists</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="bp">self</span><span class="o">.</span><span class="n">filepath</span><span class="p">):</span>
-                <span class="k">with</span> <span class="nb">open</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="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
-                    <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>
-            <span class="k">else</span><span class="p">:</span>
-                <span class="k">with</span> <span class="nb">open</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="s1">&#39;a&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
-                    <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.callbacks.BasicCheckpoint.html#macop.callbacks.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>
-            <span class="k">with</span> <span class="nb">open</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">as</span> <span class="n">f</span><span class="p">:</span>
-
-                <span class="c1"># get last line and read data</span>
-                <span class="n">lastline</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">readlines</span><span class="p">()[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
-                <span class="n">data</span> <span class="o">=</span> <span class="n">lastline</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;;&#39;</span><span class="p">)</span>
-
-                <span class="c1"># get evaluation  information</span>
-                <span class="n">globalEvaluation</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
-
-                <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">parent</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</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">parent</span><span class="o">.</span><span class="n">numberOfEvaluations</span> <span class="o">=</span> <span class="n">globalEvaluation</span>
-                <span class="k">else</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">numberOfEvaluations</span> <span class="o">=</span> <span class="n">globalEvaluation</span>
-
-                <span class="c1"># get best solution data information</span>
-                <span class="n">solutionData</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">int</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39; &#39;</span><span class="p">)))</span>
-
-                <span class="k">if</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="ow">is</span> <span class="kc">None</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">bestSolution</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">initializer</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">bestSolution</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">array</span><span class="p">(</span><span class="n">solutionData</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">bestSolution</span><span class="o">.</span><span class="n">score</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
-
-            <span class="nb">print</span><span class="p">(</span><span class="n">macop_line</span><span class="p">())</span>
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span><span class="s1">&#39;Checkpoint found from `</span><span class="si">{}</span><span class="s1">` file.&#39;</span><span class="o">.</span><span class="n">format</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="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span><span class="s1">&#39;Restart algorithm from evaluation </span><span class="si">{}</span><span class="s1">.&#39;</span><span class="o">.</span><span class="n">format</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">numberOfEvaluations</span><span class="p">)))</span>
-
-        <span class="k">else</span><span class="p">:</span>
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span>
-                    <span class="s1">&#39;No backup found... Start running algorithm from evaluation 0.&#39;</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;Can&#39;t load backup... Backup filepath not valid in Checkpoint&quot;</span><span class="p">)</span>
-
-        <span class="nb">print</span><span class="p">(</span><span class="n">macop_line</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>

+ 0 - 245
docs/build/html/_modules/macop/callbacks/Callback.html

@@ -1,245 +0,0 @@
-
-
-<!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.callbacks.Callback &mdash; macop v1.0.0 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">
-                1.0.0
-              </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.callbacks.Callback</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.callbacks.Callback</h1><div class="highlight"><pre>
-<span></span><span class="sd">&quot;&quot;&quot;Abstract Checkpoint class</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">from</span> <span class="nn">abc</span> <span class="kn">import</span> <span class="n">abstractmethod</span>
-
-
-<div class="viewcode-block" id="Callback"><a class="viewcode-back" href="../../../macop/macop.callbacks.Callback.html#macop.callbacks.Callback.Callback">[docs]</a><span class="k">class</span> <span class="nc">Callback</span><span class="p">():</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Callback abstract class in order to compute some instruction every evaluation</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">_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="kc">None</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>
-
-        <span class="c1"># build path if not already exists</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="Callback.setAlgo"><a class="viewcode-back" href="../../../macop/macop.callbacks.Callback.html#macop.callbacks.Callback.Callback.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;Specify the main algorithm instance reference</span>
-
-<span class="sd">        Args:</span>
-<span class="sd">            _algo: {Algorithm} -- main algorithm instance reference</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 class="viewcode-block" id="Callback.run"><a class="viewcode-back" href="../../../macop/macop.callbacks.Callback.html#macop.callbacks.Callback.Callback.run">[docs]</a>    <span class="nd">@abstractmethod</span>
-    <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="k">pass</span></div>
-
-<div class="viewcode-block" id="Callback.load"><a class="viewcode-back" href="../../../macop/macop.callbacks.Callback.html#macop.callbacks.Callback.Callback.load">[docs]</a>    <span class="nd">@abstractmethod</span>
-    <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 at this backup</span>
-<span class="sd">        &quot;&quot;&quot;</span>
-        <span class="k">pass</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>

+ 0 - 306
docs/build/html/_modules/macop/callbacks/MultiCheckpoint.html

@@ -1,306 +0,0 @@
-
-
-<!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.callbacks.MultiCheckpoint &mdash; macop v1.0.0 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">
-                1.0.0
-              </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.callbacks.MultiCheckpoint</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.callbacks.MultiCheckpoint</h1><div class="highlight"><pre>
-<span></span><span class="sd">&quot;&quot;&quot;Multi 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>
-
-<span class="c1"># module imports</span>
-<span class="kn">from</span> <span class="nn">.Callback</span> <span class="kn">import</span> <span class="n">Callback</span>
-<span class="kn">from</span> <span class="nn">..utils.color</span> <span class="kn">import</span> <span class="n">macop_text</span><span class="p">,</span> <span class="n">macop_line</span>
-
-
-<div class="viewcode-block" id="MultiCheckpoint"><a class="viewcode-back" href="../../../macop/macop.callbacks.MultiCheckpoint.html#macop.callbacks.MultiCheckpoint.MultiCheckpoint">[docs]</a><span class="k">class</span> <span class="nc">MultiCheckpoint</span><span class="p">(</span><span class="n">Callback</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    MultiCheckpoint is used for loading previous computations and start again after loading checkpoint</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>
-<div class="viewcode-block" id="MultiCheckpoint.run"><a class="viewcode-back" href="../../../macop/macop.callbacks.MultiCheckpoint.html#macop.callbacks.MultiCheckpoint.MultiCheckpoint.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 population</span>
-        <span class="n">population</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">population</span>
-
-        <span class="n">currentEvaluation</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">getGlobalEvaluation</span><span class="p">()</span>
-
-        <span class="c1"># backup if necessary</span>
-        <span class="k">if</span> <span class="n">currentEvaluation</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">every</span> <span class="o">==</span> <span class="mi">0</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;Checkpoint is done into &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">filepath</span><span class="p">)</span>
-
-            <span class="k">with</span> <span class="nb">open</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="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
-
-                <span class="k">for</span> <span class="n">solution</span> <span class="ow">in</span> <span class="n">population</span><span class="p">:</span>
-                    <span class="n">solutionData</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
-                    <span class="n">solutionSize</span> <span class="o">=</span> <span class="nb">len</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="k">for</span> <span class="n">index</span><span class="p">,</span> <span class="n">val</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">solutionData</span> <span class="o">+=</span> <span class="nb">str</span><span class="p">(</span><span class="n">val</span><span class="p">)</span>
-
-                        <span class="k">if</span> <span class="n">index</span> <span class="o">&lt;</span> <span class="n">solutionSize</span> <span class="o">-</span> <span class="mi">1</span><span class="p">:</span>
-                            <span class="n">solutionData</span> <span class="o">+=</span> <span class="s1">&#39; &#39;</span>
-
-                    <span class="n">line</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">currentEvaluation</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39;;&#39;</span>
-
-                    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</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">algo</span><span class="o">.</span><span class="n">evaluator</span><span class="p">)):</span>
-                        <span class="n">line</span> <span class="o">+=</span> <span class="nb">str</span><span class="p">(</span><span class="n">solution</span><span class="o">.</span><span class="n">scores</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">+</span> <span class="s1">&#39;;&#39;</span>
-
-                    <span class="n">line</span> <span class="o">+=</span> <span class="n">solutionData</span> <span class="o">+</span> <span class="s1">&#39;;</span><span class="se">\n</span><span class="s1">&#39;</span>
-
-                    <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="MultiCheckpoint.load"><a class="viewcode-back" href="../../../macop/macop.callbacks.MultiCheckpoint.html#macop.callbacks.MultiCheckpoint.MultiCheckpoint.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 backup lines as population and set algorithm state (population and pareto front) 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>
-            <span class="k">with</span> <span class="nb">open</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">as</span> <span class="n">f</span><span class="p">:</span>
-
-                <span class="c1"># read data for each line</span>
-                <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">line</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">readlines</span><span class="p">()):</span>
-
-                    <span class="n">data</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;;&#39;</span><span class="p">)</span>
-
-                    <span class="c1"># only the first time</span>
-                    <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
-                        <span class="c1"># get evaluation  information</span>
-                        <span class="n">globalEvaluation</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
-
-                        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">parent</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</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">parent</span><span class="o">.</span><span class="n">numberOfEvaluations</span> <span class="o">=</span> <span class="n">globalEvaluation</span>
-                        <span class="k">else</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">numberOfEvaluations</span> <span class="o">=</span> <span class="n">globalEvaluation</span>
-
-                    <span class="n">nObjectives</span> <span class="o">=</span> <span class="nb">len</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="n">scores</span> <span class="o">=</span> <span class="p">[</span><span class="nb">float</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="mi">1</span><span class="p">:</span><span class="n">nObjectives</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]]</span>
-
-                    <span class="c1"># get best solution data information</span>
-                    <span class="n">solutionData</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">int</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39; &#39;</span><span class="p">)))</span>
-
-                    <span class="c1"># initialize and fill with data</span>
-                    <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">population</span><span class="p">[</span><span class="n">i</span><span class="p">]</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">initializer</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">population</span><span class="p">[</span><span class="n">i</span><span class="p">]</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">array</span><span class="p">(</span><span class="n">solutionData</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">population</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">scores</span> <span class="o">=</span> <span class="n">scores</span>
-
-                    <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">pfPop</span><span class="o">.</span><span class="n">append</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">population</span><span class="p">[</span><span class="n">i</span><span class="p">])</span>
-
-            <span class="nb">print</span><span class="p">(</span><span class="n">macop_line</span><span class="p">())</span>
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span><span class="s1">&#39;Load of available population from `</span><span class="si">{}</span><span class="s1">`&#39;</span><span class="o">.</span><span class="n">format</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="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span><span class="s1">&#39;Restart algorithm from evaluation </span><span class="si">{}</span><span class="s1">.&#39;</span><span class="o">.</span><span class="n">format</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">numberOfEvaluations</span><span class="p">)))</span>
-
-        <span class="k">else</span><span class="p">:</span>
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span>
-                    <span class="s1">&#39;No backup found... Start running algorithm from evaluation 0.&#39;</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;Can&#39;t load backup... Backup filepath not valid in Checkpoint&quot;</span><span class="p">)</span>
-
-        <span class="nb">print</span><span class="p">(</span><span class="n">macop_line</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>

+ 0 - 304
docs/build/html/_modules/macop/callbacks/ParetoCheckpoint.html

@@ -1,304 +0,0 @@
-
-
-<!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.callbacks.ParetoCheckpoint &mdash; macop v1.0.0 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">
-                1.0.0
-              </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.callbacks.ParetoCheckpoint</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.callbacks.ParetoCheckpoint</h1><div class="highlight"><pre>
-<span></span><span class="sd">&quot;&quot;&quot;Pareto front 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>
-<span class="kn">import</span> <span class="nn">sys</span>
-
-<span class="c1"># module imports</span>
-<span class="kn">from</span> <span class="nn">.Callback</span> <span class="kn">import</span> <span class="n">Callback</span>
-<span class="kn">from</span> <span class="nn">..utils.color</span> <span class="kn">import</span> <span class="n">macop_text</span><span class="p">,</span> <span class="n">macop_line</span>
-<span class="kn">from</span> <span class="nn">..utils.modules</span> <span class="kn">import</span> <span class="n">load_class</span>
-
-
-<div class="viewcode-block" id="ParetoCheckpoint"><a class="viewcode-back" href="../../../macop/macop.callbacks.ParetoCheckpoint.html#macop.callbacks.ParetoCheckpoint.ParetoCheckpoint">[docs]</a><span class="k">class</span> <span class="nc">ParetoCheckpoint</span><span class="p">(</span><span class="n">Callback</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    Pareto checkpoint is used for loading previous computations and start again after loading checkpoint</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>
-<div class="viewcode-block" id="ParetoCheckpoint.run"><a class="viewcode-back" href="../../../macop/macop.callbacks.ParetoCheckpoint.html#macop.callbacks.ParetoCheckpoint.ParetoCheckpoint.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 population</span>
-        <span class="n">pfPop</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">pfPop</span>
-
-        <span class="n">currentEvaluation</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">getGlobalEvaluation</span><span class="p">()</span>
-
-        <span class="c1"># backup if necessary</span>
-        <span class="k">if</span> <span class="n">currentEvaluation</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">every</span> <span class="o">==</span> <span class="mi">0</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;Checkpoint is done into &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">filepath</span><span class="p">)</span>
-
-            <span class="k">with</span> <span class="nb">open</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="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
-
-                <span class="k">for</span> <span class="n">solution</span> <span class="ow">in</span> <span class="n">pfPop</span><span class="p">:</span>
-                    <span class="n">solutionData</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
-                    <span class="n">solutionSize</span> <span class="o">=</span> <span class="nb">len</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="k">for</span> <span class="n">index</span><span class="p">,</span> <span class="n">val</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">solutionData</span> <span class="o">+=</span> <span class="nb">str</span><span class="p">(</span><span class="n">val</span><span class="p">)</span>
-
-                        <span class="k">if</span> <span class="n">index</span> <span class="o">&lt;</span> <span class="n">solutionSize</span> <span class="o">-</span> <span class="mi">1</span><span class="p">:</span>
-                            <span class="n">solutionData</span> <span class="o">+=</span> <span class="s1">&#39; &#39;</span>
-
-                    <span class="n">line</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
-
-                    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</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">algo</span><span class="o">.</span><span class="n">evaluator</span><span class="p">)):</span>
-                        <span class="n">line</span> <span class="o">+=</span> <span class="nb">str</span><span class="p">(</span><span class="n">solution</span><span class="o">.</span><span class="n">scores</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">+</span> <span class="s1">&#39;;&#39;</span>
-
-                    <span class="n">line</span> <span class="o">+=</span> <span class="n">solutionData</span> <span class="o">+</span> <span class="s1">&#39;;</span><span class="se">\n</span><span class="s1">&#39;</span>
-
-                    <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="ParetoCheckpoint.load"><a class="viewcode-back" href="../../../macop/macop.callbacks.ParetoCheckpoint.html#macop.callbacks.ParetoCheckpoint.ParetoCheckpoint.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 backup lines as population and set algorithm state (population and pareto front) 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>
-            <span class="k">with</span> <span class="nb">open</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">as</span> <span class="n">f</span><span class="p">:</span>
-
-                <span class="c1"># reinit pf population</span>
-                <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">pfPop</span> <span class="o">=</span> <span class="p">[]</span>
-
-                <span class="c1"># retrieve class name from algo</span>
-                <span class="n">class_name</span> <span class="o">=</span> <span class="nb">type</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">population</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span><span class="o">.</span><span class="vm">__name__</span>
-
-                <span class="c1"># dynamically load solution class if unknown</span>
-                <span class="k">if</span> <span class="n">class_name</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">sys</span><span class="o">.</span><span class="n">modules</span><span class="p">:</span>
-                    <span class="n">load_class</span><span class="p">(</span><span class="n">class_name</span><span class="p">,</span> <span class="nb">globals</span><span class="p">())</span>
-
-                <span class="c1"># read data for each line</span>
-                <span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">f</span><span class="o">.</span><span class="n">readlines</span><span class="p">():</span>
-
-                    <span class="n">data</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;;&#39;</span><span class="p">)</span>
-
-                    <span class="n">nObjectives</span> <span class="o">=</span> <span class="nb">len</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="n">scores</span> <span class="o">=</span> <span class="p">[</span><span class="nb">float</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="n">nObjectives</span><span class="p">]]</span>
-
-                    <span class="c1"># get best solution data information</span>
-                    <span class="n">solutionData</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">int</span><span class="p">,</span> <span class="n">data</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39; &#39;</span><span class="p">)))</span>
-
-                    <span class="n">newSolution</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span>
-                        <span class="nb">globals</span><span class="p">()[</span><span class="s1">&#39;macop.solutions.&#39;</span> <span class="o">+</span> <span class="n">class_name</span><span class="p">],</span>
-                        <span class="n">class_name</span><span class="p">)(</span><span class="n">solutionData</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">solutionData</span><span class="p">))</span>
-                    <span class="n">newSolution</span><span class="o">.</span><span class="n">scores</span> <span class="o">=</span> <span class="n">scores</span>
-
-                    <span class="bp">self</span><span class="o">.</span><span class="n">algo</span><span class="o">.</span><span class="n">pfPop</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">newSolution</span><span class="p">)</span>
-
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span>
-                    <span class="s1">&#39;Load of available pareto front backup from `</span><span class="si">{}</span><span class="s1">`&#39;</span><span class="o">.</span><span class="n">format</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">else</span><span class="p">:</span>
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span>
-                    <span class="s1">&#39;No pareto front found... Start running algorithm with new pareto front population.&#39;</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;No pareto front backup used...&quot;</span><span class="p">)</span>
-
-        <span class="nb">print</span><span class="p">(</span><span class="n">macop_line</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>

+ 0 - 284
docs/build/html/_modules/macop/callbacks/UCBCheckpoint.html

@@ -1,284 +0,0 @@
-
-
-<!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.callbacks.UCBCheckpoint &mdash; macop v1.0.0 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">
-                1.0.0
-              </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.callbacks.UCBCheckpoint</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.callbacks.UCBCheckpoint</h1><div class="highlight"><pre>
-<span></span><span class="sd">&quot;&quot;&quot;UCB policy 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>
-<span class="kn">import</span> <span class="nn">pkgutil</span>
-
-<span class="c1"># module imports</span>
-<span class="kn">from</span> <span class="nn">.Callback</span> <span class="kn">import</span> <span class="n">Callback</span>
-<span class="kn">from</span> <span class="nn">..utils.color</span> <span class="kn">import</span> <span class="n">macop_text</span><span class="p">,</span> <span class="n">macop_line</span>
-
-
-<div class="viewcode-block" id="UCBCheckpoint"><a class="viewcode-back" href="../../../macop/macop.callbacks.UCBCheckpoint.html#macop.callbacks.UCBCheckpoint.UCBCheckpoint">[docs]</a><span class="k">class</span> <span class="nc">UCBCheckpoint</span><span class="p">(</span><span class="n">Callback</span><span class="p">):</span>
-    <span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">    UCB checkpoint is used for loading previous UCB data and start again after loading checkpoint</span>
-<span class="sd">    Need to be the same operators used during previous run</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>
-<div class="viewcode-block" id="UCBCheckpoint.run"><a class="viewcode-back" href="../../../macop/macop.callbacks.UCBCheckpoint.html#macop.callbacks.UCBCheckpoint.UCBCheckpoint.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 population</span>
-        <span class="n">currentEvaluation</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">getGlobalEvaluation</span><span class="p">()</span>
-
-        <span class="c1"># backup if necessary</span>
-        <span class="k">if</span> <span class="n">currentEvaluation</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">every</span> <span class="o">==</span> <span class="mi">0</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;UCB Checkpoint is done into &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">filepath</span><span class="p">)</span>
-
-            <span class="k">with</span> <span class="nb">open</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="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
-
-                <span class="n">rewardsLine</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
-
-                <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">r</span> <span class="ow">in</span> <span class="nb">enumerate</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">policy</span><span class="o">.</span><span class="n">rewards</span><span class="p">):</span>
-                    <span class="n">rewardsLine</span> <span class="o">+=</span> <span class="nb">str</span><span class="p">(</span><span class="n">r</span><span class="p">)</span>
-
-                    <span class="k">if</span> <span class="n">i</span> <span class="o">!=</span> <span class="nb">len</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">policy</span><span class="o">.</span><span class="n">rewards</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">:</span>
-                        <span class="n">rewardsLine</span> <span class="o">+=</span> <span class="s1">&#39;;&#39;</span>
-
-                <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">rewardsLine</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
-
-                <span class="n">occurrencesLine</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
-
-                <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">o</span> <span class="ow">in</span> <span class="nb">enumerate</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">policy</span><span class="o">.</span><span class="n">occurrences</span><span class="p">):</span>
-                    <span class="n">occurrencesLine</span> <span class="o">+=</span> <span class="nb">str</span><span class="p">(</span><span class="n">o</span><span class="p">)</span>
-
-                    <span class="k">if</span> <span class="n">i</span> <span class="o">!=</span> <span class="nb">len</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">policy</span><span class="o">.</span><span class="n">occurrences</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">:</span>
-                        <span class="n">occurrencesLine</span> <span class="o">+=</span> <span class="s1">&#39;;&#39;</span>
-
-                <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">occurrencesLine</span> <span class="o">+</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span></div>
-
-<div class="viewcode-block" id="UCBCheckpoint.load"><a class="viewcode-back" href="../../../macop/macop.callbacks.UCBCheckpoint.html#macop.callbacks.UCBCheckpoint.UCBCheckpoint.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 backup lines as rewards and occurrences for UCB</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 UCB data&#39;</span><span class="p">)</span>
-            <span class="k">with</span> <span class="nb">open</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">as</span> <span class="n">f</span><span class="p">:</span>
-
-                <span class="n">lines</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">readlines</span><span class="p">()</span>
-                <span class="c1"># read data for each line</span>
-                <span class="n">rewardsLine</span> <span class="o">=</span> <span class="n">lines</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">)</span>
-                <span class="n">occurrencesLine</span> <span class="o">=</span> <span class="n">lines</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</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">policy</span><span class="o">.</span><span class="n">rewards</span> <span class="o">=</span> <span class="p">[</span>
-                    <span class="nb">float</span><span class="p">(</span><span class="n">f</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">rewardsLine</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;;&#39;</span><span class="p">)</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">policy</span><span class="o">.</span><span class="n">occurrences</span> <span class="o">=</span> <span class="p">[</span>
-                    <span class="nb">float</span><span class="p">(</span><span class="n">f</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">occurrencesLine</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;;&#39;</span><span class="p">)</span>
-                <span class="p">]</span>
-
-            <span class="nb">print</span><span class="p">(</span>
-                <span class="n">macop_text</span><span class="p">(</span>
-                    <span class="s1">&#39;Load of available UCB policy data from `</span><span class="si">{}</span><span class="s1">`&#39;</span><span class="o">.</span><span class="n">format</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">else</span><span class="p">:</span>
-            <span class="nb">print</span><span class="p">(</span><span class="n">macop_text</span><span class="p">(</span><span class="s1">&#39;No UCB data found, use default UCB policy&#39;</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;No UCB data found...&quot;</span><span class="p">)</span>
-
-        <span class="nb">print</span><span class="p">(</span><span class="n">macop_line</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>

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

@@ -1,219 +0,0 @@
-
-
-<!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 v1.0.0 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">
-                1.0.0
-              </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="kn">import</span> <span class="nn">random</span>
-
-<span class="n">elements_score</span> <span class="o">=</span> <span class="p">[</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">20</span><span class="p">)</span> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">30</span><span class="p">)]</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">elements_score</span><span class="p">[</span><span class="n">index</span><span class="p">]</span> <span class="o">*</span> <span class="n">elem</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">
-      jQuer