Skip to content

Commit

Permalink
Merge pull request #24 from krzysztofarendt/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
krzysztofarendt authored Feb 6, 2021
2 parents b6812f8 + cfcc07a commit 6f7deca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Main features:
By **default** `modestga.minimize()` runs on all CPUs and divides the population into smaller subpopulations (1 per CPU)
which exchange genes among one another at each generation. Alternatively, it can be run in a simplified parallel mode in which an exact copy of the initial population runs in parallel on each CPU and the best result among all is returned (`modestga.parallel.simple.minimize()`).

[![Downloads](https://pepy.tech/badge/modestga)](https://pepy.tech/project/modestga)

## Installation
```
pip install modestga
Expand Down Expand Up @@ -138,4 +140,4 @@ The performance of the parallel optimization was evaluated using a 128-dimension
<p align="center">
<img src="modestga/benchmark/results/comparison_parallel.png" align="center">
<div align="center">Figure 3: Parallel minimization performance</div>
</p>
</p>
4 changes: 2 additions & 2 deletions modestga/benchmark/functions/rastrigin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import time


def rastrigin(x):
def rastrigin(x, *args):
"""Rastrigin function to be minimized.
Global minimum y=0 at x=[0, 0, ..., 0].
Expand All @@ -13,7 +13,7 @@ def rastrigin(x):
y = A * n + np.sum(x ** 2 - A * np.cos(2 * np.pi * x))
return y

def rastrigin_delayed(x):
def rastrigin_delayed(x, *args):
"""Rastrigin function to be minimized.
Global minimum y=0 at x=[0, 0, ..., 0].
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import setuptools

setup(name='modestga',
version='0.5.5',
version='0.5.6',
description='Genetic Algorithm minimization',
url='https://github.com/krzysztofarendt/modestga',
keywords='genetic algorithm optimization',
Expand Down

0 comments on commit 6f7deca

Please sign in to comment.