# Appropriate optimization algorithm for constraints having NaN values

I am trying to solve a problem where some of the constraints have NaN values. Which algorithm can be used to handle this kind of problem. In my example I have 3 nonlinear inequality constraints, C(1)<= 0 C(2)<= 0 C(3)<= 0 If C(1) is not satisfied, C(2) and C(3) will have NaN value.

• It's unclear what you're asking here. Can you give a little more detail? – Ben I. Oct 30 '17 at 17:29
• stackoverflow.com/questions/47009234/… – user78742 Oct 30 '17 at 17:33
• @BenI. I have linked the question I have asked on stackoverflow for more details, basically values for some of my constraint can't be calculated unless certain constraints are satisfied. I tried using if condition (if C(1) and C(2) are satisfied only then evaluate C(3), C(4)), but I am confused what values should be assigned to C(3) and C(4) when C(1) and C(2) are not satisfied. – user78742 Oct 30 '17 at 17:39
• @BenI. Sorry I am finding it difficult to explain the question properly. Please do ask if anything is unclear in above comment. – user78742 Oct 30 '17 at 17:41