Does fmincon satisfy the non linear and linear constraints at each step?

4 views (last 30 days)
My optimization problem consists of non-linear inequality constraints and linear equality constraints. I use fmincon interior point algorithm to solve the optimization problem.
When I supply an initial vector (say x) to fmincon to start optimization, I make sure it satisfy all the constraints (c(x) <=0 & Aeq*x = Beq)
The final solution also satisfy all the constraints but the optimization steps in the middle of optimization process do not satisfy the constraints (c(x) >= 0 & Aeq*x ≠ Beq)
So my question has two parts:
1. If interior point method utilize the barrier function to avoid taking steps which do not satisfy the inequality constraints, why does it still do not satisfy the inequality constraints? Shouldn't the function take large values where the constraints are not satisfied?
2. Is it necessary that the initial point supplied to start the optimization satisfy all the constraints?

Answers (1)

Alan Weiss
Alan Weiss on 13 Oct 2014
  1. No fmincon algorithm is guaranteed to satisfy nonlinear inequality constraints at intermediate iterations, only bound constraints. See Iterations Can Violate Constraints.
  2. No, the initial point does not have to satisfy the constraints. However, the solver often works better if it does.
For further information, see Write Constraints.
Alan Weiss MATLAB mathematical toolbox documentation
  2 Comments
AdarG
AdarG on 29 Dec 2019
Hi, how can I circumvent the violation of linear and non-linear constraints?
Should I check the constraints in the simulation and raise the cost if they are violated? If this is the case, why use the fmincon built-in constraints in the first place?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!