Kiryu Sento
毕设论文-1

毕设论文-1

可自适应子问题的协同差分进化算法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
def CCAS(objFunct, dim, learningLength):
V = (k, numIndv) # k是子问题数向量, numIndv是分组内的个体数向量
pop = initPop(dim, maxNumIndv)
b = initContextVector(pop)
f = objFunct(b) # f: fitness
for (j, numIndv) in V:
G[j] = randomGroup(dim, j)
b[j] = b
pop[j] = extractPop(pop, numIndv)
f_prev[j] = f


fitnessEval = 0
selectDecom = 0
learnCount = 0
q = [0 for i in range(m)]
R = [0 for i in range(m)]
while fitnessEval < maxFitnessEval:
if learnCount == learnLen:
learnCount = -1
for (j, numIndv) in V:
q[j] = computeValFunct(r[j])
selectedDecomposer = decomposerWithMax(q)
bestFitnessDecomposer = decomposerWithMax(f)
copySearchState(bestFitnessDecomposer, selectedDecomposer)
if learnCount >= 0:
learnCount ← learnCount + 1
for (j, numIndv) in V:
(f[j], FitnessEval[j]) = optimizeSubcomponents(objFunct, G[j] , b[j] , pop[j] )
fitnessEval = fitnessEval+FitnessEval[j]
r_learnCount[j] = (f_prev[j]-f_cur[j])/(abs(f_prev[j])*FitnessEval[j])
f_prev[j] = f_cur[j]
G[j] = randomGroup(dim, j)
else:
j = SelectedDecomposer
(f[j], FitnessEval[j]) = optimizeSubcomponents(objectiveFunction, G[j] , b[j] , pop[j] )
fitnessEval = fitnessEval+FitnessEval[j]
if unifRandom(0, 1) < epsilon:
learnCount = 0
broadcastSearchState(b[j], pop[j])
f_prev[j] = f[j]
b = b[j]
G[j] = randomGroup(dim, j)
return objFunct(b), b # 返回最优解以及b的参数



本文作者:Kiryu Sento
本文链接:https://wandernforte.github.io/kirameki/毕设论文-1/
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可