| | Input: Popu_size, Pc, n_f |
| | Output: newPop_f (newfacility population after crossover peration and repairment) |
| (1) | f_popu_cro ⟵ individuals in facility level for crossover; |
| (2) | so_popu_cro ⟵ individuals in splitting position level for crossover; |
| (3) | sp_popu_cro ⟵ individuals in splitting mode level for crossover; |
| (4) | newPop_f ⟵ zeros(popu_sizePc, n_f); |
| (5) | r1 ⟵ sorted array of r1 from lowest to highest; |
| (6) | while r1(1) = r1(2) |
| (7) | Do r1 ⟵ regenerate two random integers within [1, n_f]; |
| (8) | end while |
| (9) | r1 ⟵ sorted array of r1 from lowest to highest; |
| (10) | for j ⟵ 1 TO popu_sizePc/2 |
| (11) | newPop_f(2j − 1,:) ⟵ [f_popu_cro(j + popu_n0.8/2,1 : r1(1)),f_popu_cro(j, r1(1) + 1 : r1(2) − 1), |
| f_popu_cro(j + popu_n0.8/2, r1(2) : end)]; |
| (12) | newPop_f(2 j,:) ⟵ [f_popu_cro(j, 1 : r1(1)), f_popu_cro(j + popu_n0.8/2, r1(1) + 1 : r1(2) − 1), |
| f_popu_cro(j, r1(2) : end)]; |
| (13) | end for |
| (14) | ch_temp ⟵ integer order sequence taking value within [1, N_f]; |
| (15) | for i ⟵ 1 TO popu_nPc |
| (16) | ind1 ⟵ locating the position of element with multiple occurrences in newPop_f; |
| (17) | temp_re1 ⟵ all elements that appear in newPop_f; |
| (18) | temp_re2 ⟵ temp_re1(ind1); |
| (19) | ind2 ⟵ locating the position of element in ch_temp that do not appear in newPop_f; |
| (20) | for j ⟵ 1 TO length(temp_re2) |
| (21) | ind3 ⟵ locating the position of element in ith row of newPop_f that equals to the jth |
| element of temp_re2; |
| (22) | newPop_f (i,ind3) ⟵ ch_temp(ind2(j)); |
| (23) | end for |
| (24) | end for |