Constraints Violated

I set particular constraints for my optimization problem and find that these constraints are violated even though the solvers says that it was successful when solving.

For example, I set 10 decision variables to be equal to each other, and there will be slight deviations in the chosen values such that the 10 decision variables are close to equal but not quite.

Why is this happening? Is it because of the accuracy of the solver?

The solver stops when its iterates meet the convergence criteria that you set. Those conditions are described here.

If you set tighter convergence tolerances, you should see closer agreement between variables in your equality constraints. The run time will also increase though.

The solver does try to clean things up a bit in a post-processing step, though success is not guaranteed. Have you tried enabling the polish option?

1 Like