Borrar filtros
Borrar filtros

Why does simulated annealing get stuck at the initial point

2 visualizaciones (últimos 30 días)
Kailin
Kailin el 23 de Oct. de 2019
Comentada: Kailin el 24 de Oct. de 2019
I tried to use simulated annealing to find a global minimum. But when I plotted the current value, it kept showing me the function value of the initial point (which is so far the best point) as shown in the graph below. When I checked the diary, the function value did change, but it was not shown in the graph. I wondered what happened and how I can correct it. Below are the graph and the major part of my code.
It does not happen with the other of my minimization problem. I wondered whether it is because simulated annealing has a constraint on the objective function.
Any help would be appreciated!sa1.png
% settin gup initial points (17*1 vector)
x0=[cost;entry]
lb = zeros(numel(x0),1);
ub = ones(numel(x0),1);
ub(1,1)=5;
fun = @(para)a1022compute(para);
options = optimoptions('simulannealbnd','PlotFcns',...
{@saplotbestx,@saplotbestf,@saplotx,@saplotf,@saplotstopping,@saplottemperature},'MaxIterations',100);
[outpara,fval,exitflag,output] =simulannealbnd(fun,x0,lb,ub,options)
  1 comentario
Kailin
Kailin el 24 de Oct. de 2019
I did an experiment. I found that when the function value got too large, the simulated annealing algorithm chose to stick with the initial point. But when the function value was close to the best point, it would show it. The following graph illustrates it. In my diary, I have function values over 100, but they were not shown in the graph.
sa2.png

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Simulated Annealing en Help Center y File Exchange.

Productos


Versión

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by