MATLAB: How fmincon shifts x0 when it does not strictly satisfy the upper and lower bounds

fminconoptimizationOptimization Toolbox

When you get the following message in running fmincon:
Your initial point x0 is not between bounds lb and ub; FMINCON
shifted x0 to strictly satisfy the bounds.
How the x0 is shifted? Is it a reproducible shift? Can the shifted x0 be recorded?

Best Answer

I believe that if you get this message, then you have made an error. You gave a start point that is infeasible with respect to the bounds, and this is a mistake. fmincon does the best it can to try to continue despite the error. If I got that message, I would examine my code carefully and eliminate the cause of the error, rather than trying to figure out exactly how fmincon works around my error.
Alan Weiss
MATLAB mathematical toolbox documentation