simple fmincon problem, optimization toolbox
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Matt J
am 10 Sep. 2021
Bearbeitet: Matt J
am 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 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!