MATLAB Answers

fmincon stopped because the size of the current step is less than the value of the step size tolerance and constraints are satisfied to within the value of the constraint tol

11 views (last 30 days)
nasim mh
nasim mh on 13 Jul 2021
Commented: nasim mh on 13 Jul 2021
Hi,
I tried to solve an optimization problem using fmincon. but I think there is not enough iteration to reach an optimal point. because I use some initial points and final results are very close to them. I got this message:
Local minimum possible. Constraints satisfied.
fmincon stopped because the size of the current step is less than
the value of the step size tolerance and constraints are
satisfied to within the value of the constraint tolerance.
Could you please help me how can I fix this problem?
all related codes are attached to this text.

Accepted Answer

Matt J
Matt J on 13 Jul 2021
Edited: Matt J on 13 Jul 2021
Your objective and nonlinear constraint function is stochastic due to this line,
G = sqrt(0.5)*(randn(M,K)+1i*randn(M,K));
If the function is stochastic, an iterative search cannot work, because every time the solver samples a new x, the definition of the function has changed randomly. It also means the G in your objective function and the G in your constraints will never be the same G.
Presumably, you meant to do the randomization prior to, not during, the optimization.

More Answers (1)

Alan Weiss
Alan Weiss on 13 Jul 2021
I do not understand what your constraints do. They seem to depend on random numbers, and so change every time they are called. This does not fit the assumptions of optimization solvers, which require that the objective and nonlinear constraint functions give consistent, identical values for fun(x) and for nonlcon(x) whenever they are called for the same value of the argument x. I also do not know if your constraints are real-valued or not; they must be real in order for optimization solvers to work.
Alan Weiss
MATLAB mathematical toolbox documentation

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!