Skip to main content
. 2017 Mar 2;14(3):249. doi: 10.3390/ijerph14030249
Parameters
t: the number of iteration       Iter_Max: the maximum number of iteration
n: the maximum number of species    size: the size of population
rand: the random number in [0,1]      Vi: the mixed hybrid operator
MaxXi: the maximum individual     MinXi: the minimum individual
C: the probability of mutation     F: difference operator
1 /* Parameter setup */
2 /* Initialize population Pi */
3 /* Compute the fitness function Fi of each habitat, sort Fi */
4 Fi=MSE(|yrealy^forecast|)
5 /* Obtain elitist population */
6 /* Initialize probability of population in habitat */
7 FOR t < Iter_Max DO
8   IF t is odd THEN
9    /* Compute the number of population k */
10     /* Compute the rate of immigration λi and emigration μi for each habitat */
11    λi=0.5I(1+cos(kπn)); μi=0.5E(1cos(kπn))
12    /* Normalize the immigration rate λscale */
13    λscale=λlower+(λupperλlower)*(λimin(λi))/(max(λi)min(λi))
14    /* Operation of migration */
15    Transform new information to habitat i
16    ELSE
17    FOR i = 1:size
18       Choose indexes r1r2i
19       /* Generate difference operator */
20       Vi=Pi+F*(Pi(1)Pi)+F*(Pi(r1)Pi(r2))
21       IF randC THEN
22          /* Mutation operation */
23          Vi=MinXi+(MaxXiMinXi)*rand
24       END IF
25    END FOR
26   END IF
27 END FOR
28 /* Deassign for samples beyond the range */
29 /* Deassign for the same sample */
30 /* Compute fitness Fi for new population and sort Fi */
31 Obtain optimal solution
32 Postprocess results and visualization