Different Bounds, global or local minimimum in 'fmincon'

1 view (last 30 days)
Hallo, everyone, I'm using 'fmincon' to solve an optimization problem under the following situations
(1) Given , solve out the optimized and ;
(2) Given , solve out the optimized and ;
(3) Given ,solve out the optimized and ;
(4) Given ,solve out the optimized and ;
where is the set of other endogenous variables.
However, if I change the search area for and ( by taking 'b' as 2, 5 and 10 respectively in the code below), the optimized result for (1), (2) and (3) remain unchanged, while that for (4) under different search area are different. Besides, all the optimized result for (4) under different 'b' belong to the smallest search area 'b=2'. The initial point is unchanged here. The complete code can be found in my another question: https://www.mathworks.com/matlabcentral/answers/470432-issues-about-using-function-fmincon-solve-optimization-problem?s_tid=mlc_ans_email_view#comment_722323
%% Initial Point
x_0 = [9.1347e+03 2.0408 4.3421 2.0408 4.3421 6.7266 6.7266 251.6883 251.6883 1.0000];
%% Search Area for Endogenous Variables
length_b = 10;
UB = [repmat(length_b.*x_0,4,1),(diag(ones(1,4)).*(length_b-1))+ones(4,4)];
LB = [repmat((length_b*0.001).*x_0,4,1),(diag(ones(1,4)).*(length_b*0.001-1))+ones(4,4)];
x_0(1,11:14) = 1;
x_0 = x_0.';
%% Optimset for 'fmincon'
tol = 1.0E-12;
options = optimset( ...
'Display', 'off', ...
'GradObj', 'on', ...
'GradConstr', 'on', ...
'DerivativeCheck', 'off', ...
'FinDiffType', 'central', ...
'TolFun', tol, ...
'TolX', tol, ...
'TolCon', tol, ...
'algorithm', 'active-set', ...
'MaxFunEvals', inf, ...
'MaxIter', 5000,...
'FunValCheck', 'on', ...
'PlotFcns', {@optimplotfval,@optimplotconstrviolation});
The optimization result for Case (1)-(4) under b=2, b=5 and b=10 respectively. The last row in the red circle is the optimized t4.
WeChat Image_20190711014905.png
The following three figures are the plot for 'fval' and 'constrviolation' for Case (4) under b=2, b=5 and b=10 respectively.
b2.jpg
b5.jpg
b10.jpg
I'm not sure whether it is the issue about local minimization and global minimization because 'fmincon' finds the local minization. But I didn't change the initial point here. Should I consider the 'globalsearch' method here?
Your comments are appreciated.

Answers (1)

sxj
sxj on 11 Jul 2019
Answer by myself
I just review the webpage https://www.mathworks.com/help/optim/ug/iterations-can-violate-constraints.html . It says that iterations in fmincon active-set algorithm can violate constraints, which seems to appear in the figures above, especially the last two. So I change the algorithm from active-set to interior-point and the optimized result for Case (1)-(4) under b=2,5 and 10 are the same. The plots for 'fval' and 'constrviolation' under b=2,5 and 10 are the same, as below:
interor-point.jpg
which looks more reasonable than that of 'active-set'.
Am I right by changing the algorithm to solve the problem here?

Community Treasure Hunt

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

Start Hunting!