Skip to content

Commit

Permalink
Release new alpha version 2.5.4a6
Browse files Browse the repository at this point in the history
  • Loading branch information
thieu1995 committed Jun 20, 2023
1 parent 44b19e9 commit c525dcd
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 86 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Different versions of mealpy in terms of passing hyper-parameters. So please car
+ amend_position() from problem. This means for problem level (transform to the correct solution)
+ Fix bugs coefficients in GWO-based optimizers.
+ Fig bug self.epoch in SCSO optimizer.
+ Fix bug self.dyn_pop_size when pop_size is small value
+ Move SHADE-based optimizers from DE to SHADE module in evolutionary_based group
+ Add Improved Grey Wolf Optimization (IGWO) in GWO algorithm
+ Add Tabu Search (TS) to math-based group
+ Add get_all_optimizers() and get_optimizer_by_name() in Mealpy



# Version 2.5.3
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MEALPY is the largest python library for most of the cutting-edge nature-inspire
approximate optimization.

* **Free software:** GNU General Public License (GPL) V3 license
* **Total algorithms**: 174 (102 original, 45 official variants, 27 developed variants)
* **Total algorithms**: 175 (102 original, 46 official variants, 27 developed variants)
* **Documentation:** https://mealpy.readthedocs.io/en/latest/
* **Python versions:** 3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x
* **Dependencies:** numpy, scipy, pandas, matplotlib
Expand Down Expand Up @@ -60,7 +60,7 @@ $ pip install mealpy==2.5.3

### Install the alpha/beta version
```sh
$ pip install mealpy==2.5.4a5
$ pip install mealpy==2.5.4a6
```

### Install the pre-release version
Expand All @@ -80,6 +80,9 @@ After installation, you can import Mealpy as any other Python module:
$ python
>>> import mealpy
>>> mealpy.__version__

>>> print(mealpy.get_all_optimizers())
>>> model = mealpy.get_optimizer_by_name("OriginalWOA")(epoch=100, pop_size=50)
```

Let's go through a basic and advanced example.
Expand Down Expand Up @@ -364,14 +367,14 @@ All visualization examples: [Link](https://mealpy.readthedocs.io/en/latest/pages
* Issue tracker: https://github.com/thieu1995/mealpy/issues
* Notable changes log: https://github.com/thieu1995/mealpy/blob/master/ChangeLog.md
* Examples with different meapy version: https://github.com/thieu1995/mealpy/blob/master/EXAMPLES.md
* Official chat/support group: https://t.me/+fRVCJGuGJg1mNDg1

* This project also related to our another projects which are "meta-heuristics" and "neural-network", check it here
* https://github.com/thieu1995/opfunu
* https://github.com/thieu1995/metaheuristics
* https://github.com/aiir-team

**Want to have an instant assistant? Join our telegram community at [link](https://t.me/+fRVCJGuGJg1mNDg1)**
We share lots of information, questions, and answers there. You will get more support and knowledge there.
* https://github.com/mafese
* https://github.com/permetrics

### Cite Us

Expand All @@ -383,7 +386,8 @@ If you are using mealpy in your project, we would appreciate citations:
author={Van Thieu, Nguyen and Mirjalili, Seyedali},
journal={Journal of Systems Architecture},
year={2023},
publisher={Elsevier}
publisher={Elsevier},
doi={10.1016/j.sysarc.2023.102871}
}
@article{van2023groundwater,
Expand All @@ -393,7 +397,8 @@ If you are using mealpy in your project, we would appreciate citations:
volume={617},
pages={129034},
year={2023},
publisher={Elsevier}
publisher={Elsevier},
doi={10.1016/j.jhydrol.2022.129034}
}
```

Expand Down
19 changes: 9 additions & 10 deletions docs/source/pages/general/simple_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,25 @@ Installation

**User Installation**

Install the [current PyPI release](https://pypi.python.org/pypi/mealpy):
Install the `current PyPI release`_. ::

::
$ pip install mealpy==2.5.3

$ pip install mealpy==2.5.0
.. _current PyPI release: https://pypi.python.org/pypi/mealpy

Or install the development version from GitHub:

::
Or install the development version from GitHub::

$ pip install git+https://github.com/thieu1995/mealpy


Check the version of MEALPY:

::
Check the version of MEALPY::

$ import mealpy
$ mealpy.__version__

$ print(mealpy.get_all_optimizers())
$ model = mealpy.get_optimizer_by_name("OriginalWOA")(epoch=100, pop_size=50)

----------------------
Getting started in 30s
----------------------
Expand Down Expand Up @@ -193,4 +192,4 @@ The returned results are 2 values :
:maxdepth: 4

.. toctree::
:maxdepth: 4
:maxdepth: 4
42 changes: 28 additions & 14 deletions docs/source/pages/support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,53 @@
Cite Us
=======

If you are using mealpy in your project, we would appreciate citations:

::

@software{nguyen_van_thieu_2022_6684223,
author = {Nguyen Van Thieu and Seyedali Mirjalili},
title = {{MEALPY: a Framework of The State-of-The-Art Meta-Heuristic Algorithms in Python}},
month = jun,
year = 2022,
publisher = {Zenodo},
version = {v2.5.0},
doi = {10.5281/zenodo.6684223},
url = {https://doi.org/10.5281/zenodo.6684223}
If you are using mealpy in your project, we would appreciate citations::

@article{van2023mealpy,
title={MEALPY: An open-source library for latest meta-heuristic algorithms in Python},
author={Van Thieu, Nguyen and Mirjalili, Seyedali},
journal={Journal of Systems Architecture},
year={2023},
publisher={Elsevier},
doi={10.1016/j.sysarc.2023.102871}
}

@article{van2023groundwater,
title={Groundwater level modeling using Augmented Artificial Ecosystem Optimization},
author={Van Thieu, Nguyen and Barma, Surajit Deb and Van Lam, To and Kisi, Ozgur and Mahesha, Amai},
journal={Journal of Hydrology},
volume={617},
pages={129034},
year={2023},
publisher={Elsevier},
doi={10.1016/j.jhydrol.2022.129034}
}
```


If you have an open-ended or a research question, you can contact me via [email protected]


===============
Important links
===============


* Official source code repo: https://github.com/thieu1995/mealpy
* Official document: https://mealpy.readthedocs.io/
* Download releases: https://pypi.org/project/mealpy/
* Issue tracker: https://github.com/thieu1995/mealpy/issues
* Notable changes log: https://github.com/thieu1995/mealpy/blob/master/ChangeLog.md
* Examples with different meapy version: https://github.com/thieu1995/mealpy/blob/master/EXAMPLES.md
* Official chat/support group: https://t.me/+fRVCJGuGJg1mNDg1

* This project also related to my another projects which are "meta-heuristics" and "neural-network", check it here
* This project also related to our another projects which are "meta-heuristics" and "neural-network", check it here
* https://github.com/thieu1995/opfunu
* https://github.com/thieu1995/metaheuristics
* https://github.com/aiir-team
* https://github.com/mafese
* https://github.com/permetrics



====================
Expand Down
118 changes: 64 additions & 54 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

# from mealpy.utils.problem import Problem
from mealpy import Problem
from mealpy import get_all_optimizers, get_optimizer_by_name


ndim = 30
f18 = F292017(ndim, f_bias=0)
Expand Down Expand Up @@ -63,61 +65,69 @@ def fit_func(self, solution):
P1 = Squared(lb=[-10, ] * 100, ub=[10, ] * 100, minmax="min")

if __name__ == "__main__":
model = WOA.OriginalWOA(epoch, pop_size)
model = OriginalBMO(epoch, pop_size)
model = OriginalTPO(epoch, pop_size)
model = OriginalEHO(epoch, pop_size)
model = OriginalESOA(epoch, pop_size)
model = T1.BaseBBO(epoch, pop_size)
model = T2.OriginalBBO(epoch, pop_size)
model = BaseBBO(epoch, pop_size)
model = LARO(epoch, pop_size)
model = OriginalARO(epoch, pop_size)
model = MGTO(epoch, pop_size)
model = EOA.OriginalEOA(epoch, pop_size)
model = SBO.OriginalSBO(epoch, pop_size)
model = SMA.OriginalSMA(epoch, pop_size)
model = SOA.DevSOA(epoch, pop_size)
model = MA.OriginalMA(epoch, pop_size)
model = BRO.BaseBRO(epoch, pop_size)
model = BSO.ImprovedBSO(epoch, pop_size)
model = CHIO.BaseCHIO(epoch, pop_size)
model = FBIO.OriginalFBIO(epoch, pop_size)
model = HBO.OriginalHBO(epoch, pop_size)
model = QSA.BaseQSA(epoch, pop_size)
model = QSA.OriginalQSA(epoch, pop_size)
model = QSA.OppoQSA(epoch, pop_size)
model = QSA.ImprovedQSA(epoch, pop_size)
model = SARO.BaseSARO(epoch, pop_size)
model = SARO.OriginalSARO(epoch, pop_size)
model = TLO.BaseTLO(epoch, pop_size)
model = TLO.ImprovedTLO(epoch, pop_size)
model = TLO.OriginalTLO(epoch, pop_size)
model = PSS.OriginalPSS(epoch, pop_size)
model = ASO.OriginalASO(epoch, pop_size)
model = EO.ModifiedEO(epoch, pop_size)
model = EO.AdaptiveEO(epoch, pop_size)
model = EO.OriginalEO(epoch, pop_size)
model = FLA.OriginalFLA(epoch, pop_size)
model = BFO.OriginalBFO(epoch, pop_size)
model = BFO.ABFO(epoch, pop_size)
model = GJO.OriginalGJO(epoch, pop_size)
model = GTO.Matlab102GTO(epoch, pop_size)
model = HHO.OriginalHHO(epoch, pop_size)
model = MPA.OriginalMPA(epoch, pop_size)
model = SeaHO.OriginalSeaHO(epoch, pop_size)
model = SRSR.OriginalSRSR(epoch, pop_size)
model = AVOA.OriginalAVOA(epoch, pop_size)
model = SA.OriginalSA(epoch, pop_size)
model = BSO.OriginalBSO(epoch, pop_size)
# model = WOA.OriginalWOA(epoch, pop_size)
# model = OriginalBMO(epoch, pop_size)
# model = OriginalTPO(epoch, pop_size)
# model = OriginalEHO(epoch, pop_size)
# model = OriginalESOA(epoch, pop_size)
# model = T1.BaseBBO(epoch, pop_size)
# model = T2.OriginalBBO(epoch, pop_size)
# model = BaseBBO(epoch, pop_size)
# model = LARO(epoch, pop_size)
# model = OriginalARO(epoch, pop_size)
# model = MGTO(epoch, pop_size)
# model = EOA.OriginalEOA(epoch, pop_size)
# model = SBO.OriginalSBO(epoch, pop_size)
# model = SMA.OriginalSMA(epoch, pop_size)
# model = SOA.DevSOA(epoch, pop_size)
# model = MA.OriginalMA(epoch, pop_size)
# model = BRO.BaseBRO(epoch, pop_size)
# model = BSO.ImprovedBSO(epoch, pop_size)
# model = CHIO.BaseCHIO(epoch, pop_size)
# model = FBIO.OriginalFBIO(epoch, pop_size)
# model = HBO.OriginalHBO(epoch, pop_size)
# model = QSA.BaseQSA(epoch, pop_size)
# model = QSA.OriginalQSA(epoch, pop_size)
# model = QSA.OppoQSA(epoch, pop_size)
# model = QSA.ImprovedQSA(epoch, pop_size)
# model = SARO.BaseSARO(epoch, pop_size)
# model = SARO.OriginalSARO(epoch, pop_size)
# model = TLO.BaseTLO(epoch, pop_size)
# model = TLO.ImprovedTLO(epoch, pop_size)
# model = TLO.OriginalTLO(epoch, pop_size)
# model = PSS.OriginalPSS(epoch, pop_size)
# model = ASO.OriginalASO(epoch, pop_size)
# model = EO.ModifiedEO(epoch, pop_size)
# model = EO.AdaptiveEO(epoch, pop_size)
# model = EO.OriginalEO(epoch, pop_size)
# model = FLA.OriginalFLA(epoch, pop_size)
# model = BFO.OriginalBFO(epoch, pop_size)
# model = BFO.ABFO(epoch, pop_size)
# model = GJO.OriginalGJO(epoch, pop_size)
# model = GTO.Matlab102GTO(epoch, pop_size)
# model = HHO.OriginalHHO(epoch, pop_size)
# model = MPA.OriginalMPA(epoch, pop_size)
# model = SeaHO.OriginalSeaHO(epoch, pop_size)
# model = SRSR.OriginalSRSR(epoch, pop_size)
# model = AVOA.OriginalAVOA(epoch, pop_size)
# model = SA.OriginalSA(epoch, pop_size)
# model = BSO.OriginalBSO(epoch, pop_size)
# model = BSO.ImprovedBSO(epoch, pop_size)
model = SCSO.OriginalSCSO(epoch, pop_size)
model = TS.OriginalTS(epoch, pop_size=2, tabu_size=5, neighbour_size=20, perturbation_scale=0.05)
model = GWO.OriginalGWO(epoch, pop_size)
model = GWO.GWO_WOA(epoch, pop_size)
model = GWO.RW_GWO(epoch, pop_size)
model = GWO.IGWO(epoch, pop_size, a_min=0.02, a_max=1.6)
best_position, best_fitness = model.solve(P1)#, mode="thread", n_workers=4, termination=term_dict1)
# model = SCSO.OriginalSCSO(epoch, pop_size)
# model = TS.OriginalTS(epoch, pop_size=2, tabu_size=5, neighbour_size=20, perturbation_scale=0.05)
# model = GWO.OriginalGWO(epoch, pop_size)
# model = GWO.GWO_WOA(epoch, pop_size)
# model = GWO.RW_GWO(epoch, pop_size)

## 1st way
# model = GWO.IGWO(epoch, pop_size, a_min=0.02, a_max=1.6)

for opt_name, opt_class in get_all_optimizers().items():
print(f"{opt_name}: {opt_class}")

## 2nd way
model = get_optimizer_by_name("IGWO")(epoch, pop_size, a_min=0.02, a_max=1.6)
best_position, best_fitness = model.solve(P1, mode="thread", n_workers=4, termination=term_dict1)

print(best_position)
print(model.get_parameters())
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def readme():

setup(
name="mealpy",
version="2.5.4-alpha.5",
version="2.5.4-alpha.6",
author="Thieu",
author_email="[email protected]",
description="MEALPY: An Open-source Library for Latest Meta-heuristic Algorithms in Python",
Expand Down

0 comments on commit c525dcd

Please sign in to comment.