SLIDE 1
Xudong Zhang
SLIDE 2
- 1. Int roduct ion of simulat ed annealing (S
A) algorit hm
equent ial S A algorit hm
A algorit hm
- 4. Experimental setup
- 5. Theoretical analysis on time consumption
SLIDE 3
Material annealing process Multiple temperature decreasing process The cooling process is controlled with cooling schedule to allow the material to form specific crystal tissue and reduce the defects in the materials. The inner free energy of material can be reach to equilibrium in each temperature level.
SLIDE 4 The S A algorithm simulates the material annealing process. The algorithm allows the system to reach optimum at each temperature state. "The algorithm is able to accept the non-optimal results with larger possibility initially (Because of the high initial temperature), which allows it to get rid of the local optimal according to Metropolis criterion" (Metropolis et al. 1953)
Metropolis, N.; Rosenbluth, A. W.; Rosenbluth, M.; Teller, A. H.; and Teller, E. "Equation of S tate Calculations by Fast Computing Machines." J. Chem. Phys. 21, 1087-1092, 1953.
SLIDE 5
The probability of accepting a worse result (lower value) is lower when the temperature is lower. Finding the maximum with the simulated annealing algorithm.
S eldom j umping out of this area when temperature is lower.
SLIDE 6
SLIDE 7
step 1->2 Accept 2->3 0.7 0.3 3->4 Accept 4->5 0.6 0.5 5->6 Accept 6->7 Accept 7->8 Accept 8->9 Accept
Finding the maximum with the simulated annealing algorithm at a temperature state. Ti is the denominator of exponent of e.
SLIDE 8
S equential S imulated Annealing Algorithm for seeking the minimum. Initialize T0, Tfinal / / T0 is the initial temperature, and Tfinal is the final temperature. Initialize X0 / / X0 can be a vector or scalar. / / X0 is randomly selected in the searching domain. Initialize the step size S Initialize obj ective function f(X) Initialize the number of sub loop N while Ti> Tfinal do while n< N do Xn= Xn-1+(2random(0,1)-1)S ; If (f(Xn-1)> f(Xn)) Xopt imal = Xn; else if (exp((f(Xn-1)-f(Xn))/ Ti)>random(0,1)) Xn-1 = Xn; / / accept X with a probability. n = n +1; Ti+1=KTi / / 0<K<1, K was predefined to be a function or constant.
SLIDE 9 Finding the maximum with P processors by using parallel simulated annealing algorithm 1. X1 X2 At temperature T0 : X1, X2,…. Xp were randomly generated in the searching domain. Xp S earching to find the maximum when x=50 S earching to find the maximum when x =80 Comparing the optimal found by each processor (#1, #2~#P), and set the maximum of optimal as the starting point (optimal on processor #1) for the temperature T1~Tfinal.
find the maximum when x=30
SLIDE 10 X1, X2, ~ Xp were randomly generated on P processors from the optimal (x=30) in last temperature state.
At temperature T1~Tfinal Finding the maximum with P processors by using parallel simulated annealing algorithm 1. The total iteration step on each processor is N/ P in one temperature state.
x=30 X1 Xp X2
SLIDE 11
Initialize T0, Tfinal / / T0 is the initial temperature, and Tfinal is the final temperature. Initialize X0 / / X0 can be a vector or scalar. / / X0 is randomly selected in the domain. Initialize the step size S Initialize obj ective function f(X) Initialize the number of sub loop N The following code was executed in parallel: while Ti> Tfinal do while n< N/ P do / / P is the number of processor. Xn= Xn-1+(2random(0,1)-1)S ; If (f(Xn-1)> f(Xn)) Xopt imal = Xn; else if (exp((f(Xn-1)-f(Xn))/ Ti)>random(0,1)) Xn-1 = Xn; / / accept X with a probability. n = n +1; Calculate the Xopt imal among all processing units. Distribute the Xopt imal to all processing units as the start point in next tempearate status. Ti+1=KTi / / 0<K<1, K was predefined to be a function or constant.
SLIDE 12
X1 X2 Finding the maximum with P processors by using parallel simulated annealing algorithm 2. XP Dividing the searching domain to P portions, and each processor searches the optimal in its own space with N/ P iterations in one temperature state. X3
SLIDE 13
Initialize T0, Tfinal / / T0 is the initial temperature, and Tfinal is the final temperature. Initialize X1, X2 ~ Xp / / searching domain was divided to P portions, and / / randomly generate X1, X2 ~ Xp on each sub-domain. S end X1, X2 ~ Xp to corresponding processors. Initialize the step size S Initialize obj ective function f(X) Initialize the number of sub loop N The following code was executed in parallel: while Ti> Tfinal do while n< N/ P do / / P is the number of processor. Xn= Xn-1+(2random(0,1)-1)S ; If (f(Xn-1)> f(Xn)) Xopt imal = Xn; else if (exp((f(Xn-1)-f(Xn))/ Ti)>random(0,1)) Xn-1 = Xn; / / accept X with a probability. n = n +1; Ti+1=KTi / / 0<K<1, K was predefined to be a function or constant. Comparing and obtaining the Xopt imal among all processing units.
SLIDE 14
*
SLIDE 15
*
SLIDE 16
time consumption for initializing the parameters. Number of temperature decreasing Number of sub loop in each temperature status. Number of processors. The parameters used in theoretically analyzing the performance of parallel S A algorithm.
SLIDE 17
S equential S imulated Annealing Algorithm for seeking the minimum. Initialize T0, Tfinal / / T0 is the initial temperature, and Tfinal is the final temperature. Initialize X0 / / X0 can be a vector or scalar. / / X0 is randomly selected in the searching domain. Initialize the step size S Initialize obj ective function f(X) Initialize the number of sub loop N while Ti> Tfinal do while n< N do Xn= Xn-1+(2random(0,1)-1)S ; If (f(Xn-1)> f(Xn)) Xopt imal = Xn; else if (exp((f(Xn-1)-f(Xn))/ Ti)>random(0,1)) Xn-1 = Xn; / / accept X with a probability. n = n +1; Ti+1=KTi / / 0<K<1, K was predefined to be a function or constant.
SLIDE 18
S equential S A algorithm:
SLIDE 19
Initialize T0, Tfinal / / T0 is the initial temperature, and Tfinal is the final temperature. Initialize X0 / / X0 can be a vector or scalar. / / X0 is randomly selected in the domain. Initialize the step size S Initialize obj ective function f(X) Initialize the number of sub loop N The following code was executed in parallel: while Ti> Tfinal do while n< N/ P do / / P is the number of processor. Xn= Xn-1+(2random(0,1)-1)S ; If (f(Xn-1)> f(Xn)) Xopt imal = Xn; else if (exp((f(Xn-1)-f(Xn))/ Ti)>random(0,1)) Xn-1 = Xn; / / accept X with a probability. n = n +1; Calculate the Xopt imal among all processing units. Distribute the Xopt imal to all processing units as the start point in next tempearate status. Ti+1=KTi / / 0<K<1, K was predefined to be a function or constant.
SLIDE 20
Parallel S A algorithm 1:
SLIDE 21
SLIDE 22
Initialize T0, Tfinal / / T0 is the initial temperature, and Tfinal is the final temperature. Initialize X1, X2 ~ Xp / / searching domain was divided to P portions, and / / randomly generate X1, X2 ~ Xp on each sub-domain. Initialize the step size S Initialize obj ective function f(X) Initialize the number of sub loop N S end X1, X2 ~ Xp to corresponding processors. / / MPI_S catter. The following code was executed in parallel: while Ti> Tfinal do while n< N/ P do / / P is the number of processor. Xn= Xn-1+(2random(0,1)-1)S ; If (f(Xn-1)> f(Xn)) Xopt imal = Xn; else if (exp((f(Xn-1)-f(Xn))/ Ti)>random(0,1)) Xn-1 = Xn; / / accept X with a probability. n = n +1; Ti+1=KTi / / 0<K<1, K was predefined to be a function or constant. Receiving all the optimal on each processor. / / MPI_Gather Comparing and obtaining the Xopt imal among all processing units.
SLIDE 23
Parallel S A algorithm 2:
SLIDE 24
SLIDE 25