Parcourir la source

paper file updated

Jérôme BUISINE il y a 3 ans
Parent
commit
26ccf57175

+ 39 - 31
CONTRIBUTING.md

@@ -8,7 +8,7 @@ Contribution guidelines
 
 # Welcome !
 
-Thank you for taking the time to read this guide for the package's contribution. I'm glad to know that you may bring a lot to the IPFML package. This document will show you the good development practices used in the project and how you can easily participate in its evolution!
+Thank you for taking the time to read this guide for the package's contribution. I'm glad to know that you may bring a lot to the **Macop** package. This document will show you the good development practices used in the project and how you can easily participate in its evolution!
 
 # Table of contents
 
@@ -71,18 +71,16 @@ Note that the **yapf** package is used during build process of **macop** package
 In order to allow quick access to the code, the project follows the documentation conventions (docstring) proposed by Google. Here an example:
 
 ```python
-'''Divide image into equal size blocks
+''' Binary integer solution class
 
-  Args:
-      image: PIL Image or Numpy array
-      block: tuple (width, height) representing the size of each dimension of the block
-      pil: block type returned (default True)
+    - store solution as a binary array (example: [0, 1, 0, 1, 1])
+    - associated size is the size of the array
+    - mainly use for selecting or not an element in a list of valuable objects
 
-  Returns:
-      list containing all 2D Numpy blocks (in RGB or not)
-
-  Raises:
-      ValueError: If `image_width` or `image_heigt` are not compatible to produce correct block sizes
+    Attributes:
+       data: {ndarray} --  array of binary values
+       size: {int} -- size of binary array values
+       score: {float} -- fitness score value
 '''
 ```
 
@@ -101,26 +99,24 @@ This project use the [doctest](https://docs.python.org/3/library/doctest.html) p
 
 # TODO : add custom example
 ```python
-"""Cauchy noise filter to apply on image
-
-  Args:
-      image: image used as input (2D or 3D image representation)
-      n: used to set importance of noise [1, 999]
-      identical: keep or not identical noise distribution for each canal if RGB Image (default False)
-      distribution_interval: set the distribution interval of normal law distribution (default (0, 1))
-      k: variable that specifies the amount of noise to be taken into account in the output image (default 0.0002)
-
-  Returns:
-      2D Numpy array with Cauchy noise applied
-
-  Example:
-
-  >>> from ipfml.filters.noise import cauchy_noise
-  >>> import numpy as np
-  >>> image = np.random.uniform(0, 255, 10000).reshape((100, 100))
-  >>> noisy_image = cauchy_noise(image, 10)
-  >>> noisy_image.shape
-  (100, 100)
+""" Initialise binary solution using specific data
+
+    Args:
+        data: {ndarray} --  array of binary values
+        size: {int} -- size of binary array values
+
+    Example:
+
+    >>> from macop.solutions.discrete import BinarySolution
+    >>> # build of a solution using specific data and size
+    >>> data = [0, 1, 0, 1, 1]
+    >>> solution = BinarySolution(data, len(data))
+    >>> # check data content
+    >>> sum(solution._data) == 3
+    True
+    >>> # clone solution
+    >>> solution_copy = solution.clone()
+    >>> all(solution_copy._data == solution._data)
 """
 ```
 
@@ -165,4 +161,16 @@ You can also add your own labels too or add priority label:
 - prio:**normal**
 - prio:**high**
 
+Main common required issue header:
+
+```
+Package version: X.X.X
+Issue label: XXXXX
+Priority: prio:**level**
+Targeted modules: `macop.algorithms`, `macop.policies`
+Operating System: Manjaro Linux
+
+Description: XXXXX
+```
+
 Whatever the problem reported, I will thank you for your contribution to this project. So do not hesitate.

+ 1 - 1
README.md

@@ -25,7 +25,7 @@
 
 Based on all of these generic and/or implemented functionalities, the user will be able to quickly develop a solution to his problem while retaining the possibility of remaining in control of his development by overloading existing functionalities if necessary.
 
-Main idea about this Python package is that it does not implement the whole available algorithms in the literature but let the possibility to the user to quickly develop and test its own algorithms and strategies. The main objective of this package is to be the most flexible as possible and hence, to offer a maximum of implementation possibilities.
+Main idea about this Python package is that it does not which doesn't implement every algorithm in the literature but let the possibility to the user to quickly develop and test its own algorithms and strategies. The main objective of this package is to provide maximum flexibility, which allows for easy experimentation in implementation..
 
 ## Documentation
 

+ 1 - 1
docs/source/index.rst

@@ -8,7 +8,7 @@ Minimalist And Customisable Optimisation Package
 What's **Macop** ?
 ------------------
 
-**Macop** is a discrete optimisation Python package which not implement the whole available algorithms in the literature but let you the possibility to quickly develop and test your own algorithm and strategies. The main objective of this package is to be the most flexible as possible and hence, to offer a maximum of implementation possibilities.
+**Macop** is a discrete optimisation Python package which not which doesn't implement every algorithm in the literature but provides the ability to quickly develop and test your own algorithm and strategies. The main objective of this package is to provide maximum flexibility, which allows for easy experimentation in implementation..
 
 .. toctree::
    :maxdepth: 1

+ 27 - 0
macop/__init__.py

@@ -0,0 +1,27 @@
+from .algorithms import base
+from .algorithms import mono
+from .algorithms import multi
+
+from .callbacks import base
+from .callbacks import classicals
+from .callbacks import multi
+
+from .evaluators import base
+from .evaluators.discrete import mono
+from .evaluators.discrete import multi
+
+from .operators import base
+from .operators.discrete import mutators
+from .operators.discrete import crossovers
+from .operators.continuous import mutators
+from .operators.continuous import crossovers
+
+from .policies import base
+from .policies import classicals
+from .policies import reinforcement
+
+from .solutions import base
+from .solutions import continuous
+from .solutions import discrete
+
+from .utils import progress

+ 1 - 1
macop/algorithms/base.py

@@ -4,7 +4,7 @@
 # main imports
 import logging
 import sys, os
-from ..utils.progress import macop_text, macop_line, macop_progress
+from macop.utils.progress import macop_text, macop_line, macop_progress
 
 
 # Generic algorithm class

+ 1 - 1
macop/algorithms/mono.py

@@ -5,7 +5,7 @@
 import logging
 
 # module imports
-from .base import Algorithm
+from macop.algorithms.base import Algorithm
 
 
 class HillClimberFirstImprovment(Algorithm):

+ 3 - 3
macop/algorithms/multi.py

@@ -6,11 +6,11 @@ import logging
 import math
 import numpy as np
 import sys
-from ..utils.progress import macop_text, macop_line, macop_progress
+from macop.utils.progress import macop_text, macop_line, macop_progress
 
 # module imports
-from .base import Algorithm
-from ..evaluators.discrete.multi import WeightedSum
+from macop.algorithms.base import Algorithm
+from macop.evaluators.discrete.multi import WeightedSum
 
 
 class MOEAD(Algorithm):

+ 2 - 2
macop/callbacks/classicals.py

@@ -7,8 +7,8 @@ import logging
 import numpy as np
 
 # module imports
-from .base import Callback
-from ..utils.progress import macop_text, macop_line
+from macop.callbacks.base import Callback
+from macop.utils.progress import macop_text, macop_line
 
 
 class BasicCheckpoint(Callback):

+ 2 - 2
macop/callbacks/multi.py

@@ -7,8 +7,8 @@ import logging
 import numpy as np
 
 # module imports
-from .base import Callback
-from ..utils.progress import macop_text, macop_line
+from macop.callbacks.base import Callback
+from macop.utils.progress import macop_text, macop_line
 
 
 class MultiCheckpoint(Callback):

+ 2 - 2
macop/callbacks/policies.py

@@ -7,8 +7,8 @@ import logging
 import numpy as np
 
 # module imports
-from .base import Callback
-from ..utils.progress import macop_text, macop_line
+from macop.callbacks.base import Callback
+from macop.utils.progress import macop_text, macop_line
 
 
 class UCBCheckpoint(Callback):

+ 1 - 1
macop/evaluators/discrete/mono.py

@@ -1,7 +1,7 @@
 """Knapsack evaluators classes
 """
 # main imports
-from ..base import Evaluator
+from macop.evaluators.base import Evaluator
 
 
 class KnapsackEvaluator(Evaluator):

+ 1 - 1
macop/evaluators/discrete/multi.py

@@ -1,7 +1,7 @@
 """Multi-objective evaluators classes 
 """
 # main imports
-from ..base import Evaluator
+from macop.evaluators.base import Evaluator
 
 
 class WeightedSum(Evaluator):

+ 1 - 1
macop/operators/continuous/crossovers.py

@@ -5,5 +5,5 @@ import random
 import sys
 
 # module imports
-from ..base import Crossover
+from macop.operators.base import Crossover
 

+ 1 - 1
macop/operators/continuous/mutators.py

@@ -5,4 +5,4 @@ import random
 import sys
 
 # module imports
-from ..base import Mutation
+from macop.operators.base import Mutation

+ 1 - 1
macop/operators/discrete/crossovers.py

@@ -5,7 +5,7 @@ import random
 import sys
 
 # module imports
-from ..base import Crossover
+from macop.operators.base import Crossover
 
 
 class SimpleCrossover(Crossover):

+ 1 - 1
macop/operators/discrete/mutators.py

@@ -5,7 +5,7 @@ import random
 import sys
 
 # module imports
-from ..base import Mutation
+from macop.operators.base import Mutation
 
 
 class SimpleMutation(Mutation):

+ 1 - 1
macop/policies/base.py

@@ -4,7 +4,7 @@ import logging
 from abc import abstractmethod
 
 
-from ..operators.base import KindOperator
+from macop.operators.base import KindOperator
 
 
 # define policy to choose `operator` function at current iteration

+ 1 - 1
macop/policies/classicals.py

@@ -4,7 +4,7 @@
 import random
 
 # module imports
-from .base import Policy
+from macop.policies.base import Policy
 
 
 class RandomPolicy(Policy):

+ 2 - 2
macop/policies/reinforcement.py

@@ -7,8 +7,8 @@ import math
 import numpy as np
 
 # module imports
-from .base import Policy
-from ..operators.base import KindOperator
+from macop.policies.base import Policy
+from macop.operators.base import KindOperator
 
 
 class UCBPolicy(Policy):

+ 1 - 1
macop/solutions/discrete.py

@@ -3,7 +3,7 @@
 import numpy as np
 
 # modules imports
-from .base import Solution
+from macop.solutions.base import Solution
 
 
 class BinarySolution(Solution):

+ 48 - 0
paper.bib

@@ -131,4 +131,52 @@
   timestamp = {Mon, 15 Jun 2020 16:51:53 +0200},
   biburl    = {https://dblp.org/rec/journals/remotesensing/PullanagariKY18.bib},
   bibsource = {dblp computer science bibliography, https://dblp.org}
+}
+
+@misc{ceres-solver,
+  author = "Sameer Agarwal and Keir Mierle and Others",
+  title = "Ceres Solver",
+  howpublished = "\url{http://ceres-solver.org}",
+}
+
+@book{hart2017pyomo,
+  title={Pyomo--optimization modeling in python},
+  author={Hart, William E. and Laird, Carl D. and Watson, Jean-Paul and Woodruff, David L. and Hackebeil, Gabriel A. and Nicholson, Bethany L. and Siirola, John D.},
+  edition={Second},
+  volume={67},
+  year={2017},
+  publisher={Springer Science \& Business Media}
+}
+
+@article{pyopt-paper,
+  author = {Ruben E. Perez and Peter W. Jansen and Joaquim R. R. A. Martins},
+  title = {py{O}pt: A {P}ython-Based Object-Oriented Framework for Nonlinear Constrained Optimization},
+  journal = {Structures and Multidisciplinary Optimization},
+  year = {2012},
+  volume = {45},
+  number = {1},
+  pages = {101--118},
+  doi = {10.1007/s00158-011-0666-3}
+}
+
+@incollection{MaherMiltenbergerPedrosoRehfeldtSchwarzSerrano2016,
+  author = {Stephen Maher and Matthias Miltenberger and Jo{\~{a}}o Pedro Pedroso and Daniel Rehfeldt and Robert Schwarz and Felipe Serrano},
+  title = {{PySCIPOpt}: Mathematical Programming in Python with the {SCIP} Optimization Suite},
+  booktitle = {Mathematical Software {\textendash} {ICMS} 2016},
+  publisher = {Springer International Publishing},
+  pages = {301--307},
+  year = {2016},
+  doi = {10.1007/978-3-319-42432-3_37},
+}
+
+@misc{simanneal-solver,
+  author = "Matthew Perry",
+  title = "simanneal",
+  howpublished = "\url{https://github.com/perrygeo/simanneal}",
+}
+
+@misc{solid-solver,
+  author = "Devin Soni",
+  title = "Solid",
+  howpublished = "\url{https://github.com/100/Solid}",
 }

Fichier diff supprimé car celui-ci est trop grand
+ 7 - 5
paper.md