Here, I have a very simple optimization problem, which is given by
max log(x)
s.t. 0 <= x <= 1.
Obviously, the optimal solution is
x = 1.
I implement the code in YALMIP as
clc;
x = sdpvar(1,1);
SumUtility = log(x);
Constraints = [1 >= x >= 0];
sol = solvesdp(Constraints,-SumUtility);
if sol.problem == 0
x = double(x);
else
display('Hmm, something went wrong!');
yalmiperror(sol.problem)
end
YALMIP does obtain the right solution, i.e., x = 1. However, it at the same time outputs the following information
Your initial point x0 is not between bounds lb and ub; FMINCON shifted x0 to satisfy the bounds.
Norm of First-order
Iteration f(x) step optimality CG-iterations
0 0.693147 1
1 0.287682 0.353553 0.333 1
2 0.0645385 0.375 0.0667 1
3 0.0039139 0.234375 0.00392 1
4 1.53187e-005 0.0622549 1.53e-005 1
5 2.34664e-010 0.00391384 2.35e-010 1
Local minimum found.
Optimization completed because the size of the gradient is less than the selected value of the function tolerance.
My question is: why does YALMIP output "Your initial point x0 is not between bounds lb and ub; FMINCON shifted x0 to satisfy the bounds.", because I do not provide an initial point for the variable x in the code. Besides, the problem is convex and thus, the globally optimal solution can be obtained. Then, why does output "Local minimum found."