simple fmincon problem, optimization toolbox
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Matt J
on 10 Sep 2021
Edited: Matt J
on 10 Sep 2021
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 Comments
See Also
Categories
Find more on Get Started with Optimization Toolbox 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!