|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
7 h3 s* e2 V) c/ U) ^
合作协同进化已经引入协同进化算法,目的是通过分而治之的范式解决日益复杂的优化问题。理论上,协同改 变子成分的想法是十分适合解决大规模优化问题的。然而在实践中,没有关于问题的先验知识, 问题应如何分解是尚不清楚的。在本文中,我们提出一个自动分解策略,称为差分分组,可以揭示决策变量的底层交互结构和形成子成分,以使它们之间的相互依存关系保持到最低限度。我们在数学上展示这样一个分解策略如何从部分可分性的定义中产生。实证研究表明,这样的近最优的分解可以大大提高大规模的全局优化问题的解决方案的质量。最后,我们展示了这样一个自动分解是如何产生对多样的子成分的分布的更好的近似,导致一个对多样的子成分的计算预算的更高效的分配。 # E9 Q4 J6 }, K! E. F
2 x* t8 y6 c0 {: Q
索引词:合作协同进化,大规模优化,问题分解,不可分性,数值优化 # y! }" O7 n( \$ r! O: R1 @2 X: D
- F2 T- H' M2 t3 H
4 |( _/ {( Q1 F, ~4 d! D& y/ Erun.m6 w' m5 D9 W" B: Z3 v1 i
3 @$ y& X: Q1 R1 j8 v( O
% Author: Mohammad Nabi Omidvar$ t6 G! D& }8 [7 V" x# G6 u9 M- j
% email address: mn.omidvar AT gmail.com
: S$ g! Q0 P6 f" u9 Y" T c* D%
6 ?3 A; v1 l3 j8 L0 p) z2 v% ------------3 u, N( h) E" e! f! L7 r2 W' g
% Description:
/ ?5 Q4 m: P9 c* o O% ------------
) a0 P5 _. v, }% This files is the entry point for running the differential gropuing algorithm.6 d6 {6 P% F k! b1 Z& K
! {8 f( R" o2 U5 h4 e1 b" B" r' W
clear all;
- r; A& g, Y/ ?, B" I/ b7 ^/ _, \, j, k
% Specify the functions that you want the differential grouping algorithm to
& N' D' d; \9 w. A; x7 R9 H4 \# b' o7 x% identify its underlying grouping structure.
- [" D F) s; z3 o2 m" gfunc = [20:-1:1];
, [" |* U% R5 D* g1 u, M0 mfor i=func
" p- n* \7 p2 Z5 D6 b' y func_num = i
% s2 D; O, f( ]3 F' ?
( u" c4 f8 s2 B* \' h9 h t1 = [1 4 7 8 9 12 13 14 17 18 19 20];( t6 c; X7 ]7 C0 e; r, m5 A) k
t2 = [2 5 10 15];
( F q. F2 P: D& H0 o t3 = [3 6 11 16];: j9 T' s1 Q: P" m
& q) \! c* t: h; I3 X2 ~% I
if (ismember(func_num, t1)), R4 G8 N& |5 x, |
lb = -100;
+ ?2 }; e5 \+ X; j: r2 g' h ub = 100;
/ @# H8 A! ]4 W elseif (ismember(func_num, t2))) }- N9 t6 B2 {" l) T% W
lb = -5;" U T/ I2 f$ |1 k3 E
ub = 5;
+ X( t5 _- S! T H8 y elseif (ismember(func_num, t3))
9 U- J) a7 U3 z( Z lb = -32;
1 H2 o* b/ v8 ]9 N$ t6 z ub = 32;
2 M1 b" I% r5 E) w; w, V end
' r# G! O$ T" A" P. b# O, [' p6 b. |+ n
opts.lbound = lb;6 F @! Y1 V$ ^) W& c
opts.ubound = ub;2 k; l2 V2 K8 d9 P0 I- M
opts.dim = 1000;2 |/ I0 n) p" b
opts.epsilon = 1e-3;
/ W& J0 W" t$ y( ~$ }: |% a/ Q4 b* G4 T' B- k
addpath('cec2010');% `9 ?+ C7 \9 T
addpath('cec2010/datafiles');
5 t3 q' z3 h9 s/ T global initial_flag;2 Q5 ~+ s! Z. {% m1 b; J- S
initial_flag = 0;
2 A# L, I z. M: h+ S" W9 J
7 n0 a6 w& x2 I8 k [seps, nonseps, FEs] = dg('benchmark_func', func_num, opts);
% {+ c7 x( E( s( B" m T; v
% G! N! `6 [1 X! ~% M% q Z. O % filename = sprintf('./results/F%02d.mat', func_num);
+ v" W6 ?5 M5 t4 q % save (filename, 'seps', 'nonseps', 'FEs', '-v7');6 U J5 ~: `6 U2 Z8 B6 \" l0 U
end6 y* F! G# Y( T& G4 H! R
7 D3 h C) m" o% ^" T0 e; w" D
+ y9 ]$ s2 W) G" g- F8 r' |! e) R# S: Cdg.m 7 j9 P" @7 [; v X
! N3 v T7 [) _# ~6 s) M0 M6 E4 ~% Author: Mohammad Nabi Omidvar
. _: M- u3 R5 R7 r: ~0 l7 E% email : mn.omidvar AT gmail.com
}$ d3 m- @6 t# r* U" i6 f& i: ~) o%" L0 W2 s+ n+ g, ~
% ------------/ ?9 W/ O+ V$ t4 o, V" D
% Description:
& _% F& Q z0 Y5 p0 @% ------------4 r% U" q: `( r, w% x. j% ]
% dg - This function runs the differential grouping
$ r: h1 b L6 d4 _% procedure to identify the non-separable groups
( m. |3 m5 m& L: I% in cec'2010 benchmark problems.o
3 m! H5 y* y W0 M5 H' R' K8 j%' D& S0 b; F+ O9 |$ o, \
% -------0 G5 G: ~1 Y+ k) m
% Inputs:: k( l; B4 k$ T5 u4 d5 ?# U5 b
% ------- e+ I; @$ h2 ^& `, y
% fun : the function suite for which the interaction structure
$ G# ]0 y: ^+ \! @% is going to be identified in this case benchmark_func
3 w" N2 \1 Y4 J, ?% of cec'2010.) l- Q* p' \8 k8 }/ ]+ F/ X0 `7 n ^
%
) O' N6 n4 R1 n' X% fun_number : the function number.) P" ]. `+ r- W- |- T
%: v! q/ n5 X" Q" s( G
% options : this variable contains the options such as problem
3 B$ K1 V& G2 s3 S% g4 Y; x$ X% dimensionality, upper and lower bounds and the parameter 8 R4 {( T) Q7 @+ _
% epsilon used by differential grouping.
) O8 F/ f* g" {6 W8 v% input3 - Description
! L+ ]1 J* b* I F% k* {/ q%
0 z1 j7 q- {5 K6 r, b0 p1 N% --------/ _' M& N, M& y" S- ]
% Outputs:
^# H8 l) u l; b4 S0 u% --------
+ `# R: {" X" v: M3 L( j% sep : a vector of all separable variables.9 z% ~! }4 r. I M* |9 O
% allgroups: a cell array containing all non-separable groups.2 z' I6 M& c2 W8 q" Q7 m/ `3 l1 r" _
% FEs : the total number of fitness evaluations used.
' y% ?$ q) ]' s, ~%: b) k9 v/ k4 o- y5 g
% --------$ } S. w1 z$ } I% c5 T. w
% License:6 e4 D( O! f D2 e x" }
% -------- ~6 q4 N7 |* ^ o/ W8 h
% This program is to be used under the terms of the GNU General Public License
+ b2 r# G! W- P, B/ v% (http://www.gnu.org/copyleft/gpl.html).8 \4 X8 l, ?1 i$ z5 N5 }
% Author: Mohammad Nabi Omidvar
$ e3 t% J0 Q3 \/ ]5 \% e-mail: mn.omidvar AT gmail.com) w! v# Z/ c" s0 o: ^' A2 A1 i
% Copyright notice: (c) 2013 Mohammad Nabi Omidvar ~$ y( b- Q$ v' d" K7 q# f% P' ?
; t8 A- K- W& J! G
) g# r2 L' w5 q0 c4 E
function [seps, allgroups, FEs] = dg(fun, fun_number, options);
5 v: a; t! b' y# u$ n9 Z ub = options.ubound;% z; _$ s3 w) d3 }2 l0 {
lb = options.lbound;+ I" @, Q( [; Z( {7 e* I
dim = options.dim;8 U1 Z6 J8 @7 d N$ w' T
epsilon = options.epsilon;
. s) ?+ m; F# j R r = ub - lb;; e% \: k8 ~' w5 I2 d& j& j
dims = [1:1:dim];2 ~, g0 O# w' B0 L0 c
seps = [];& Q% R7 T/ g$ l4 R; `, v
allgroups = {};
( j" m8 E' u' O: z$ \$ K FEs = 0;
5 }6 A/ M( E1 [( K* T5 }7 M+ B0 A7 p
, W; l; _1 C6 j7 `9 ^2 F3 R while (length(dims) >= 1)2 I9 Q( }6 z( K( A: h$ r1 f; t
allgroups;4 ]$ k' g* l8 H6 X
n = length(dims)( c/ b+ T) O' A+ Q; E1 S
group = [dims(1)];
5 |9 x9 \+ L. H# D group_ind = [1];" |- s* _: V/ v9 J g( J
% F5 {' p' G4 B; S6 Z$ H( Y p1 = lb * ones(1,dim);& I2 I$ j1 R: J. j1 F4 u
p2 = p1;
& F, z0 j; |9 R t p2(dims(1)) = ub;
- a) _) {3 H5 C' a1 l9 z' i& E) H9 g
+ H& u) j/ e7 ^! x0 b delta1 = feval(fun, p1, fun_number) - feval(fun, p2, fun_number);
1 O1 p8 e; |0 [1 Y) w; z4 R- U2 ~& _* Q7 L
FEs = FEs + 2;
* c* n( T% I$ L6 ^% ]' O Q/ R) X: [& h; i
for i=2:n
* |4 f/ [7 d0 l0 m2 k: s/ P p3 = p1;- X3 u4 L/ i+ I: H0 [" Y
p4 = p2;5 m0 `' ?' g6 M
$ k+ v6 ]7 w: L- H
temp = 0;" d; ~- \% W2 V' Z9 t0 B9 `
p3(dims(i)) = temp;# n# _: C% V7 Q! {
p4(dims(i)) = temp;
9 a. W s/ r) T+ P* f3 T6 F8 u; B# F( f) n
delta2 = feval(fun, p3, fun_number) - feval(fun, p4, fun_number);
1 x$ r) u2 k" C( F# ^- W! O: k, J' _& Z
FEs = FEs + 2;- N, G) c% V( e$ f, m% x
2 C& {% |& N8 P- L) L+ z% t if(abs(delta1-delta2) > epsilon)
2 K' Y# ?9 Q4 I- s4 Y4 {" L7 G group = [group ; dims(i)];* J" l0 ?* N0 z
group_ind = [group_ind ; i];3 p; l3 U4 c( D
end
% {8 J6 U6 x3 ?, v( U end
9 L c d1 Z$ b6 Z8 R! D$ `: N2 Z" `
if(length(group) == 1)
& k. t6 L4 K# j/ W seps = [seps ; group];! _1 H/ T' T1 @2 @ S
else
, f+ d0 D6 w3 _0 l allgroups = {allgroups{1:end}, group};
' Z- [0 v1 H+ |7 G; f: H end* D3 Z" O* j4 {2 C, Z' l% R
6 ~2 h0 M; O6 b) a( i" K' i# J if(length(dims) > 0)
% o8 y) b' s1 a3 Z3 e7 [ dims(group_ind) = [];
# ]+ x- Y# Z& Z+ M end
) }; c3 ~! q7 z6 @ end2 i6 l. q8 c: S4 S* [
end
8 } H2 E8 \2 @: g* o6 a
5 n) r C b k% T- ~2 u( e. L& {* t6 i3 X1 F% S. v
analyze.m1 u1 _4 F$ S5 S% @" g9 Q G
D3 V- M/ e# _* T0 K) [/ S4 `% Author: Mohammad Nabi Omidvar
! Z# q, S+ ]8 l' O) Q J- I% |% email address: mn.omidvar AT gmail.com
; d3 f. p, N2 c%! X! ]4 G$ h1 J9 L% U$ U* o8 v- d: `
% ------------
' p# ]; i$ Z V' A% Description:, A: P) i/ k5 ?# v' T/ J
% ------------% c. Q# {5 Z+ b8 z' D3 N9 N
% This file is used to analyze the peRFormance of the differential
2 H$ I: {2 y, z9 j4 F8 {& U% grouping algorithm on CEC'2010 benchmark problems.) T# f9 q; B; P! {9 R3 _
% This program reads the data files generated by differential ( v9 F! F" \' _7 J3 i8 m
% grouping and shows how many variables from each formed group/ m- P y, Z8 q& v; \
% are correctly identified and to which permutation group they+ \6 _" r ^; B5 L+ E
% belong.: u1 r) J+ }8 O$ j: [& A$ e( j
%
0 Z/ a1 C( C0 {7 |%--------
9 q) k: Q: Z& Y5 T/ h0 m4 g% Inputs:: q3 t5 R( ~0 }2 m' c4 P; f; ~
%--------% G9 ^+ B e% E6 ~0 P
% funs: a vector containing the functions ids the functions that you 0 t: B' x: {4 `% f9 {! E' D. a# o
% want to analyze." K0 J( S- N! r! Q
%
8 P& d0 s1 ?& q) D% -----------! |" ~" I1 C' g# D+ Y# }$ y" V, W$ o
% References:
t; {: v6 P- k6 ^9 O& w8 w- F% -----------
7 k4 v9 o. Z4 @- H5 r8 R% Omidvar, M.N.; Li, X.; Mei, Y.; Yao, X., "Cooperative Co-evolution with
0 {! h+ v; @+ s4 z. p% Differential Grouping for Large Scale Optimization," Evolutionary Computation,
: S2 M9 c( J5 |% IEEE Transactions on, vol.PP, no.99, pp.1,1, 0
4 V' f3 F, ^3 P/ @3 m% http://dx.doi.org/10.1109/TEVC.2013.22815439 k: Q$ a* o7 E9 S' T) p, {: y' X6 J
%% y) ^4 s$ g; p" L' v, a) O: B$ \' b
% --------. e( ^' D; X! Y$ ?4 M
% License:
0 t2 v! e5 d4 h# T) C0 F% --------) a* L2 j0 ^; r5 k# \9 {; b& F
% This program is to be used under the terms of the GNU General Public License ( m# G( s( A- Q" H% G* U" h8 X8 T
% (http://www.gnu.org/copyleft/gpl.html).7 k2 y: _7 C7 L/ a: q7 x' v7 Z; v- r
% Author: Mohammad Nabi Omidvar
3 E/ f9 l; y' G0 ^% e-mail: mn.omidvar AT gmail.com
2 Q- q: U: C8 g5 g7 t: L% Copyright notice: (c) 2013 Mohammad Nabi Omidvar
: }7 ]& z6 V" B2 q1 D* S% I$ N- o# K5 n4 j% K) L, I5 D
% `4 {8 Y. D7 n7 v3 e+ I( h$ G
function analyze(funcs)
4 a1 W: a8 u0 E more off;8 [( C( q! h# R1 E* v
n" ^3 H' ]5 t" h! G % Number of non-separable groups for each function in CEC'210 benchmark suite.- z5 _/ \& r- Z2 i) A' C
numNonSep = [0 0 0 1 1 1 1 1 10 10 10 10 10 20 20 20 20 20 20 20];- u, ^) B+ d, U* G
* p$ \. [: [7 v6 P- \
for f=funcs
7 a' \9 z8 `1 \# r; | filename = sprintf('./results/F%02d.mat', f);
' b8 I A8 p$ g p = 1:1:1000;
" m8 b% l; K$ u load(filename);8 ?1 o/ s' p% ~# J% y
7 V+ \* b$ s7 F9 B, O1 @* P, V8 T mat = zeros(length(nonseps), 20);
; S( \& i5 f' X: f2 } drawline('=');
6 J3 D/ N5 N5 f9 @8 |4 U! ^; N fprintf('Function F: %02d\n', f);* G" z. C" K8 F' D
fprintf('FEs used: %d\n', FEs);
: B( |! u R. c4 M7 d: r fprintf('Number of separables variables: %d\n', length (seps));
- V |9 n, ^3 w8 J fprintf('Number of non-separables groups: %d\n', length (nonseps));
+ `0 N% D) u6 v5 k! {- E4 k7 k i
/ K6 V2 J9 f u) e2 B+ F, F filename1 = sprintf('./cec2010/datafiles/f%02d_op.mat', f);
3 h! ]9 N$ G3 |9 \ filename2 = sprintf('./cec2010/datafiles/f%02d_opm.mat', f);5 t: o' m7 I, v# O. u% S0 `
flag = false;
4 [3 p! f% z8 I; R; j; I* X O+ M if(exist(filename1))
' D8 S, B, n* J' _; A4 j2 p$ w* ] load(filename1);
& |, a& k6 p3 n flag = true;/ O, c. `, x# j6 } x4 A8 H
elseif(exist(filename2))
I6 \7 `! d. J( B8 x7 I4 P load(filename2);
5 p- {* b( C9 I4 O$ Y flag = true;* p: S+ b1 H6 ]9 X3 u( d: v
end
$ _4 A8 ^7 |0 F+ `! u" A; Q& c: T
! ?8 @3 p3 a, R, G! v) L printheader();5 C. a0 e7 j2 u3 U4 F) v# `* ^( l
! w& j: w4 n5 n8 G0 n! A for i=[1:1:length(nonseps)]7 g' P* v: y+ H& O. ^3 g
fprintf('Size of G%02d: %3d | ', i, length (nonseps{i}));
3 }/ \% x" K9 R: ]& k3 [$ N6 D m = 50;
$ h% `- x6 U6 w: } if(flag)
% M6 b" g/ z# Q+ H for g=[1:1:20]/ Y8 B0 T% f& k$ _
captured = length(intersect(p((g-1)*m+1:g*m), nonseps{i}));
$ z0 h. w$ {* R2 q' I fprintf(' %4d', captured);
B A' P/ c3 a G' H8 s mat(i, g) = captured;8 K4 I' t. q* Y9 t
end' z( J" |% g7 v5 n' a. } t% {
end
- n+ x8 \/ P* { fprintf('\n');
g& o2 _4 p' Q# ? end8 w0 k2 r: y7 O+ N- ]$ k
5 G8 H: }# t# P9 A% J2 B
mat2 = mat;
) f: t9 Y8 C' U& ?; I' `+ |# o- V [temp I] = max(mat, [], 1);
+ B# V9 G. }) d3 i2 B [sorted II] = sort(temp, 'descend');
' C4 _2 _" J. |0 l, ^8 t$ D9 X masks = zeros(size(mat));
* {* d0 ^- O% U0 g$ j for k = 1:min(size(mat))" C7 A& @& I/ [4 }/ t R7 @
mask = zeros(1, length(sorted));2 Z$ c' p1 ~5 w8 B: i. N2 S
mask(II(k)) = 1;' x1 R! D/ J+ y; H% g* M
masks(I(II(k)), :) = mask;
, U" Q! @& V. _! ?4 ~! e E %point = [I(k) II(k)];
: X! W1 J! k- p1 J# y. P6 K9 x mat(I(II(k)), :) = mat(I(II(k)), :) .* mask;
) ]; X$ }6 D6 v; t& i% Z, k [2 V [temp I] = max(mat, [], 1);! L' X* I+ ^( W
[sorted II] = sort(temp, 'descend');
, @9 ^) ^% v* S( E& q end+ \" u) k8 R# `! x4 [$ m+ R: \6 T
mat = mat2 .* masks;
6 F& ]- W# ^# [ [temp I] = max(mat, [], 1);
) E8 W) X4 Y; {. @ if(ismember(f, [19 20]))+ j% W3 L, \1 f8 @2 [
gsizes = cellfun('length', nonseps);2 T! q$ h" r5 N
fprintf('Number of non-separable variables correctly grouped: %d\n', max(gsizes));
6 P% S' _5 u5 z. Y else9 t8 I4 E0 i4 X5 u: s
fprintf('Number of non-separable variables correctly grouped: %d\n', sum(temp(1:numNonSep(f))));
) u5 }- \% |5 K1 k! M( K: E/ |0 @" J end+ E* q" U+ e V. L; A
drawline('=');
/ l2 \7 k# K( G# A( n pause;
4 q. C9 J/ o4 v( F Yend
" _; h4 z. V9 x. @9 c7 u/ O; [: h! Z; [ F
end! s# B# s9 A4 |
% Helper Functions ----------------------------------------------------------
3 e; |, E3 G. Y0 Afunction drawline(c)* [" i# N" m- o4 K* g# {) x( Y
for i=1:121- x6 |9 X! p, N6 L$ w
fprintf(1,c);3 u4 m5 H; }) c! M& E
end
, s" ?( y9 f- u N Y fprintf('\n')! D1 h o7 G& y0 R+ f% q
end4 a, u7 M, {- w7 e
9 {0 s+ R% c* `% |) U
function printheader()% Q& G l& v! r1 z j4 m# A9 a; a
fprintf('Permutation Groups| ');
: h& \; y# C' g( l% J. Q1 C for i=1:20
# k$ K! e1 b7 a" J. a# W9 z fprintf(' %4s', sprintf('P%d', i));% }7 A# y& e# ?) D/ L% i
end
$ \& Z8 x$ z* R' a" | fprintf('\n')
2 u2 \, Y( z1 J( |, @- T drawline('-');6 ~6 K1 ]% S! k' \9 d
end
$ ^/ r* _1 ~! z, h4 d% End Helper Functions ------------------------------------------------------8 ?0 `7 Z: A9 S" G" L# X5 A' B
) |1 b; p! y1 q$ A$ e$ P" g! |& ^. m
6 _" k: m; L. w+ Z |
|