Algorithm flow, write a little messy, see for yourself
Markov chain length is the number of iterations at a certain temperature
1, set the initial parameters: starting point, initial temperature T0, Markov chain length max_l, the maximum value of the target function max_e, the stop temperature te, the cooling function (the simplest to take linear), scale;
2, judge whether Convergence (t<te), is the word stop algorithm; otherwise t= at,l=1 on the next step;
3, randomly select a component of the current solution, according to the formula to create a disturbance, to obtain a new candidate solution, here with the upper and lower bound of the optimization problem as an example:
4, the calculation of the target function is poor, DE, according to Metropolis rules to determine whether to accept the candidate solution
Generate a random number between 0-1 R, if P>r, then accept the candidate solution as a new solution, l+=1, otherwise proceed to the next step;
5, if l>max_l, return to the third step; otherwise l+=1, return to the third step.
The solution of simulated annealing algorithm for continuous variable optimization problem