Finding a single global solution
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!