simple fmincon problem, optimization toolbox
1 回表示 (過去 30 日間)
古いコメントを表示
I have an optimization problem in that Matlab solves depending on the initial value given. First, I give X0 = [10 10 10] as the initial value, and ok. But then I give X0 = [0 0 0] as the initial value, which is not a minimum, Matlab gives it as the minimum. Why?
FUN = @(x)-prod(x);
X0 = [10 10 10];
A = [-1 -2 -3;
1 2 3];
B = [0 ; 72];
options = optimset('Display','iter');
X = fmincon(FUN, X0, A, B, [], [], [], [], [], options)
FUN = @(x)-prod(x);
X0 = [0 0 0];
A = [-1 -2 -3;
1 2 3];
B = [0 ; 72];
options = optimset('Display','iter');
X = fmincon(FUN, X0, A, B, [], [], [], [], [], options)
0 件のコメント
回答 (1 件)
Matt J
2021 年 9 月 10 日
編集済み: Matt J
2021 年 9 月 10 日
The point X=[0,0,0] is a first order local minimum. It is a point of zero-gradient, and it satisfies the constraints. You made an unlucky initial guess.
Incidentally, if you are looking for solutions with positive x(i) it would probably be better, numerically, to use the equivalent objective function
FUN=@(x)-sum(log(x))
as well as to impose lower bounds lb=[0;0;0]
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with Optimization Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!