Reputation: 3739
Im doing an optimization using SLSQP however it always returns "Inequality constraints incompatible".
I think my criterion are fine:
g1 = a_lower - a # a is of length 10
g2 = b_lower - b # b is of length 10
The initial values dont satisfy all conditions tho.
I'm using pyOpt. I'm totally confused by this error message.
Could anyone help?
Upvotes: 0
Views: 12429
Reputation: 211
The constrained optimization algorithms in the scipy.optimize module are assumed to satisfy ">=0". Assuming that your a_lower
and b_lower
values are the lower limits of a
and b
, I think the constraints g1
and g2
should be
g1 = a - a_lower
g2 = b - b_lower
My apologies if I'm completely misreading your dilemma.
Upvotes: 8