1
- # Optimization Function using Numpy (OpFuNu)
2
- [ ![ GitHub release] ( https://img.shields.io/badge/release-1.0.0-yellow.svg )] ( )
1
+
2
+ <p align =" center " ><img src =" .github/img/logo2.svg " alt =" OPFUNU " title =" OPFUNU " /></p >
3
+
4
+ ---
5
+
6
+
7
+ [ ![ GitHub release] ( https://img.shields.io/badge/release-1.0.1-yellow.svg )] ( https://github.com/thieu1995/opfunu/releases )
3
8
[ ![ Wheel] ( https://img.shields.io/pypi/wheel/gensim.svg )] ( https://pypi.python.org/pypi/opfunu )
4
9
[ ![ PyPI version] ( https://badge.fury.io/py/opfunu.svg )] ( https://badge.fury.io/py/opfunu )
5
- [ ![ DOI version] ( https://zenodo.org/badge/DOI/10.5281/zenodo.3620960.svg )] ( https://badge.fury.io/py/opfunu )
10
+ ![ PyPI - Python Version] ( https://img.shields.io/pypi/pyversions/opfunu.svg )
11
+ ![ PyPI - Status] ( https://img.shields.io/pypi/status/opfunu.svg )
12
+ ![ PyPI - Downloads] ( https://img.shields.io/pypi/dm/opfunu.svg )
6
13
[ ![ Downloads] ( https://pepy.tech/badge/opfunu )] ( https://pepy.tech/project/opfunu )
14
+ ![ GitHub Release Date] ( https://img.shields.io/github/release-date/thieu1995/opfunu.svg )
15
+ [ ![ Documentation Status] ( https://readthedocs.org/projects/opfunu/badge/?version=latest )] ( https://opfunu.readthedocs.io/en/latest/?badge=latest )
16
+ ![ GitHub contributors] ( https://img.shields.io/github/contributors/thieu1995/opfunu.svg )
17
+ [ ![ DOI] ( https://zenodo.org/badge/DOI/10.5281/zenodo.3620960.svg )] ( https://badge.fury.io/py/opfunu )
7
18
[ ![ License: GPL v3] ( https://img.shields.io/badge/License-GPLv3-blue.svg )] ( https://www.gnu.org/licenses/gpl-3.0 )
8
19
9
- ## Quick Notification
10
20
11
- * The structure of version 1.0.0 is based on Object-Oriented Programming, which is entirely different from the previous version (<= 0.8.0).
12
- * All CEC functions from 2005, 2008, 2010, 2013, 2014, 2015, 2017, 2019, 2020, 2021, 2022 are implemented. This version is well-organized, faster and has no more bugs.
13
- * All old code-based functions from previous version <= 0.8.0 will be removed in version 1.0.1
21
+ OPFUNU is the largest python library for cutting-edge optimization problems (benchmark, mathematical, engineering, real-world). Contains all CEC competition functions from 2005, 2008, 2010, 2013, 2014, 2015, 2017, 2019, 2020, 2021, 2022. Besides, more than 300 traditional functions with different dimensions are implemented.
14
22
23
+ * ** Free software:** GNU General Public License (GPL) V3 license
24
+ * ** Total problems** : > 500 problems
25
+ * ** Documentation:** https://opfunu.readthedocs.io/en/latest/
26
+ * ** Python versions:** 3.6.x, 3.7.x, 3.8.x, 3.9.x, 3.10.x
27
+ * ** Dependencies:** numpy, scipy, pandas, matplotlib
15
28
16
29
17
- ## Installation
18
30
19
- Install the [ current PyPI release] ( https://pypi.python.org/pypi/opfunu ) :
20
31
21
- ``` bash
22
- pip install opfunu==1.0.0
32
+ # Installation
33
+
34
+ ### Install with pip
35
+
36
+ Install the [ current PyPI release] ( https://pypi.python.org/pypi/opfunu ) :
37
+ ``` sh
38
+ $ pip install opfunu==1.0.1
23
39
```
24
40
25
41
Or install the development version from GitHub:
@@ -28,6 +44,16 @@ Or install the development version from GitHub:
28
44
pip install git+https://github.com/thieu1995/opfunu
29
45
```
30
46
47
+ ### Install from source
48
+
49
+ In case you want to install directly from the source code, use:
50
+ ``` sh
51
+ $ git clone https://github.com/thieu1995/mealpy.git
52
+ $ cd mealpy
53
+ $ python setup.py install
54
+ ```
55
+
56
+
31
57
## Lib's structure
32
58
33
59
``` code
42
68
...
43
69
cec2021.py
44
70
cec2022.py
71
+ engineering_based
72
+ pdo_2022.py
73
+ rwco_2020.py
45
74
name_based
46
75
a_func.py
47
76
b_func.py
@@ -58,28 +87,42 @@ README.md
58
87
setup.py
59
88
```
60
89
61
- ## Examples
62
90
63
- ### How to get the function and use it
91
+ # Usage
92
+
93
+ After installation, you can import Opfunu as any other Python module:
94
+
95
+ ``` sh
96
+ $ python
97
+ >>> import opfunu
98
+ >>> opfunu.__version__
99
+ ```
100
+
101
+ Let's go through some examples.
102
+
103
+
104
+ ### Examples
105
+
106
+ How to get the function and use it
64
107
65
- * 1st way
108
+ #### 1st way
66
109
67
- ``` python
110
+ ``` python
68
111
from opfunu.cec_based.cec2014 import F12014
69
112
70
113
func = F12014(ndim = 30 )
71
114
func.evaluate(func.create_solution())
72
115
73
116
# # or
74
117
75
- from opfunu.cec_based import F12014
118
+ from opfunu.cec_based import F102014
76
119
77
120
func = F102014(ndim = 50 )
78
121
func.evaluate(func.create_solution())
79
122
```
80
123
81
124
82
- * 2nd way
125
+ #### 2nd way
83
126
84
127
``` python
85
128
@@ -96,38 +139,55 @@ print(all_funcs_2014)
96
139
97
140
```
98
141
142
+ For more usage examples please look at [ examples] ( /examples ) folder.
143
+
144
+
145
+
146
+ ### Get helps (questions, problems)
99
147
100
- ## References
148
+ * Official source code repo: https://github.com/thieu1995/opfunu
149
+ * Official document: https://opfunu.readthedocs.io/
150
+ * Download releases: https://pypi.org/project/opfunu/
151
+ * Issue tracker: https://github.com/thieu1995/opfunu/issues
152
+ * Notable changes log: https://github.com/thieu1995/opfunu/blob/master/ChangeLog.md
153
+ * Examples with different meapy version: https://github.com/thieu1995/opfunu/blob/master/examples.md
101
154
102
- #### Publications
155
+ * This project also related to our another projects which are "meta-heuristics" and "neural-network", check it here
156
+ * https://github.com/thieu1995/mealpy
157
+ * https://github.com/thieu1995/metaheuristics
158
+ * https://github.com/thieu1995/permetrics
159
+ * https://github.com/aiir-team
103
160
104
- + If you see my code and data useful and use it, please cite my works here
161
+
162
+ ** Want to have an instant assistant? Join our telegram community at [ link] ( https://t.me/+fRVCJGuGJg1mNDg1 ) **
163
+ We share lots of information, questions, and answers there. You will get more support and knowledge there.
164
+
165
+
166
+ ### Cite Us
167
+
168
+ If you are using opfunu in your project, we would appreciate citations:
105
169
106
170
``` code
107
171
@software{thieu_nguyen_2020_3711682,
108
- author = {Thieu Nguyen},
109
- title = {A framework of Optimization Functions using Numpy (OpFuNu) for optimization problems },
172
+ author = {Nguyen Van Thieu },
173
+ title = {Opfunu: A Python Library For Optimization Functions in Numpy},
110
174
year = 2020,
111
175
publisher = {Zenodo},
112
176
doi = {10.5281/zenodo.3620960},
113
177
url = {https://doi.org/10.5281/zenodo.3620960.}
114
178
}
115
-
116
179
```
117
180
118
- #### Documentation
181
+
182
+ ### References
183
+
119
184
``` code
120
- 1. dimension_based references
121
- 1. http://benchmarkfcns.xyz/fcns
122
- 2. https://en.wikipedia.org/wiki/Test_functions_for_optimization
123
- 3. https://www.cs.unm.edu/~neal.holts/dga/benchmarkFunction/
124
- 4. http://www.sfu.ca/~ssurjano/optimization.html
125
-
126
- 2. type_based
127
- A Literature Survey of Benchmark Functions For Global Optimization Problems (2013)
128
-
129
- 3. cec
130
- Problem Definitions and Evaluation Criteria for the CEC 2014
131
- Special Session and Competition on Single Objective Real-Parameter Numerical Optimization
185
+
186
+ 1. http://benchmarkfcns.xyz/fcns
187
+ 2. https://en.wikipedia.org/wiki/Test_functions_for_optimization
188
+ 3. https://www.cs.unm.edu/~neal.holts/dga/benchmarkFunction/
189
+ 4. http://www.sfu.ca/~ssurjano/optimization.html
190
+ 5. A Literature Survey of Benchmark Functions For Global Optimization Problems (2013)
191
+ 6. Problem Definitions and Evaluation Criteria for the CEC 2014 Special Session and Competition on Single Objective Real-Parameter Numerical Optimization
132
192
133
193
```
0 commit comments