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!
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)