I am trying to solve a NLP problem with IPOPT. I noticed that constraints can be violated during the optimization. I need to take sqrt to estimate one term in my target function. So it is natural to add a constraint to make sure the sqrt calculation is always valid. However, during the iterations, IPOPT use some trial parameters that violate this constraint. The optimization almost always terminates before it finds any solution. Any work around for this?