Finding a single global solution
显示 更早的评论
I am trying to find optimum(minimum) value of a 3 variable function using simulannealbnd. Using the default parameters, optimization ends with exit flag 1. However, the x and fval output values are different based on the starting point, x0. What option should I modify to make it compute a single global solution irrespective of starting point?
x0 = [10.5,380,200]; % Different x and fval outputs based on x0
lb = [ 10;
10;
10];
ub = [ 50;
400;
300];
fnc = @(x) fun(x);
% options = optimoptions('simulannealbnd','StallIterLimit',4000,'TolFun',1e-20,''); <- this results in exit flag 0
rng default
[x,fval,exitflag,output] = simulannealbnd(fnc,x0,lb,ub,options)
Sample Output for different x0 and same lb,ub
1. x0 = [10.5,380,200] and using default options
> ANS: x =
10.4875
360.1725
204.0897
fval =
0.1719
2. x0 = [25,100,100] and using default options
> ANS: x =
10.3225
399.9853
116.3712
fval =
0.1673
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!