Upload
philantha-carlyn
View
56
Download
0
Embed Size (px)
DESCRIPTION
PARALLEL METAHEURISTICS. Tổng quan. Bài toán tối ưu tổ hợp Tìm lời giải tốt nhất trong các lời giải có thể Không gian tìm kiếm của bài toán là rời rạc Nhiều bài toán tối ưu tổ hợp thuộc lớp NP khó Các kỹ thuật heuristic Metaheuristic. Các giải thuật metaheuristic. - PowerPoint PPT Presentation
Citation preview
PARALLEL PARALLEL METAHEURISTICSMETAHEURISTICS
Tổng quanTổng quanBài toán tối ưu tổ hợp
◦Tìm lời giải tốt nhất trong các lời giải có thể ◦Không gian tìm kiếm của bài toán là rời rạc
Nhiều bài toán tối ưu tổ hợp thuộc lớp NP khó
Các kỹ thuật heuristic ◦Metaheuristic
Các giải thuật metaheuristicCác giải thuật metaheuristicGiải thuật di truyền (GA)Giải thụật luyện thép (SA)Giải thuật đàn kiến (ACO)Giải thuật lai (Hybrid)
Parallel metaheuristicParallel metaheuristicĐộ phức tạp tính toán caoCác giải thuật Metaheuristic
thường chậm
Song song hóa
Giải thuật di truyền (GA)Giải thuật di truyền (GA)vận dụng các nguyên lý của tiến
hóa ◦di truyền◦đột biến◦chọn lọc tự nhiên◦trao đổi chéo
Giải thuật di truyền (GA)Giải thuật di truyền (GA)Generate( P (0));Evaluate( P( 0));t := 0;while not Termination-
Criterion(P( t ) ) do◦ P’(t) := Selection(P(t));◦ P”(t) := Recombination(P’(t));◦ P”’(t) := Mutation(P”(t));◦ Evaluate(P’( t ) ) ;◦ P(t + 1) := Replace(P(t), P”’(t));◦ t := t + 1;
endwhile
Parallel GAParallel GANhiều mô hình
◦Chạy nhiều lần (Independent run)◦Master – Slave◦Đảo di cư
Independent runIndependent run
Master - SlaveMaster - Slave
POPULATION
COMPUTE FITNESS
INITIALIZING POPULATIONSELECTION
RECOMBINATION MUTATION
NEW POPULATION
Individual_1
Individual_2
Individual_N
Individual_N-1
COMPUTE FITNESS
COMPUTE FITNESS
COMPUTE FITNESS
Individual_1chromosomes
Individual_2chromosomes
Individual_N-1chromosomes
Fitness ofIndividual_1
Fitness ofIndividual_N
Fitness ofIndividual_2
Fitness ofIndividual_N-1
Individual_Nchromosomes
MANAGER
WORKER 0 WORKER 1 WORKER N-1 WORKER N
Đảo di cưĐảo di cư
Client process
Clientprocess
Client process
Client process
RE
DU
CE
F
INA
L P
OP
UL
AT
ION
OF
TH
E B
ES
T F
ITN
ES
SM
PI_
Red
uce
Server process
Best Chromosome
MigrationMPI_Sendrecv
Best Chromosome
MigrationMPI_Sendrecv
Best Chromosome
MigrationMPI_Sendrecv
BR
OA
DC
AS
T IN
ITIA
L P
OP
ULA
TIO
N
MP
I_B
cast
BR
OA
DC
AS
T INITIA
L PO
PU
LATIO
N
MP
I_Bcast
Best Chromosome
MigrationMPI_Sendrecv
REDUCE
FINAL POPULATION
OF THE BEST FITNESS
MPI_Reduce
RE
DU
CE
FIN
AL
PO
PU
LA
TIO
N
OF
TH
E B
ES
T F
ITN
ES
S
MP
I_Red
uce
RE
DU
CE
F
INA
L P
OP
UL
AT
ION
O
F T
HE
BE
ST
FIT
NE
SS
MP
I_R
ed
uc
e
Client process
BR
OA
DC
AS
T IN
ITIA
L P
OP
UL
AT
ION
MP
I_B
ca
st
REDUCE
FINAL POPULATION
OF THE BEST FITNESS
MPI_Reduce
BROADCAST INIT
IAL P
OPULATION
MPI_
Bcast
BROADCAST INITIAL POPULATION
MPI_Bcast
Giải thuật luyện thép(SA)Giải thuật luyện thép(SA)BeginWhile (not frozen) do
◦ Randomly initialize energy and temperature ( Ea To)
◦ Eold=Eo◦ Repeat:
Generate a new state with En,, - AE= E d – Enew if ( AE < O ) E o u = Enew Else Eold = Enew with probability of e-''T
◦ Until (not at equilibrium)◦ T = Tnew
End
Parallel SAParallel SANhiều mô hình
◦Independent run◦Partition data◦Hybrid với GA◦Parallel moves
Parallel movesParallel moves
Parallel MoveParallel Move
MPI
_Bca
st
initi
al a
rran
gem
ent
MPI
_Red
uce
loca
l cos
t fun
ctio
n
MPI_Bcast initial arrangement
MPI_Bcast dislikes matrix
Worker
MPI_Bcast number of persons
MPI
_Bca
st
num
ber
of p
erso
ns
MPI_Bcast number of persons
MPI_Bcast initial arrangement
MPI_Bcast dislikes matrix
MPI
_Bca
st
disl
ikes
mat
rix
MPI
_Bca
st
num
ber
of p
erso
ns
MPI
_Bca
st
initi
al a
rran
gem
ent
MPI
_Bca
st
disl
ikes
mat
rix
MPI
_Red
uce
loca
l cos
t fun
ctio
n
MPI_Reducelocal cost function
Worker
Worker
Worker Worker
MPI_Reducelocal cost function
Hybrid với GAHybrid với GASA sẽ hoạt động tốt hơn nhiều
nếu trạng thái ban đầu tốtSA lấy kết quả ban đầu sau khi
đã chạy GA qua 1 số lần lặp
Giải thuật đàn kiến(ACO)Giải thuật đàn kiến(ACO)
Giải thuật đàn kiến(ACO)Giải thuật đàn kiến(ACO)
Giải thuật đàn kiến(ACO)Giải thuật đàn kiến(ACO) ACO scheme: Initialize pheromone values repeat for ant k c {I, . . . , m}
◦ construct a solution endfor forall pheromone values do
◦ decrease the value by a certain percentage {evaporation}
endfor forall pheromone values corresponding to good
solutions do
◦ increase the value {intensification} endfor until stopping criterion is met
Giải thuật đàn kiến(ACO)Giải thuật đàn kiến(ACO)
Công thức cập nhập mùiCông thức cập nhập mùi
n
kikik
ijijkij
t
ttp
1
.)(
.)()(
m
k
kijijij
1
).1(
Parallel ACOParallel ACOCác con kiến khá độc lập với
nhauChia kiến ra các processor khác
nhau các cụm kiến (Ant colony)
Cập nhập ma trận mùi◦Sau mỗi lần lặp◦Sau một số lần lặp
Kết quả so sánhKết quả so sánhACO PACO SA PSA GA PGA Hybri
d
16(6859)
0.23 0.94 3.55 3.99 6870 0.59 0.61
22(7013)
1.86 3.67 4.76 5.68 7087 7105 1.11
51(426)
(427) (427) (445) (445) (464) (447) (440)
76(538)
(539) (543) (566) (566) (599) (584) (579)
101(629)
(650) (656) (683) (680) (773) (773) (683)