MATLAB compatibility#
Compatibility with the EASY-IEC MATLAB toolbox (Madár, Abonyi and Szeifert, 2005).
The MATLAB toolbox represented a population by a structure popu with the
fields nvar (number of variables), nind (population size), LB and
UB (bounds), devi (strategy parameters, one row per individual) and
chrom (real-coded chromosomes, one row per individual). The user wrote a
user function that drew each individual into a column of subplots, and
popu = ies_main(popu, subfigrows, 'userfun') ran the interactive loop.
This module offers the same workflow in Python:
>>> import numpy as np
>>> from easyiec.compat import popu_init, ies_main, UserFunctionProblem
>>> popu = popu_init([0, 0, -1], [5, 10, 1], nind=9, init_chrom=[2.5, 5, 0], seed=0)
>>> popu["chrom"].shape
(9, 3)
The popu workflow of the EASY-IEC MATLAB toolbox.
Classes#
|
Wrap a MATLAB-style user function |
Functions#
|
Initialize a population structure as in the EASY-IEC help. |
|
Run the interactive loop on a |
|