I imagine that doing the and between the problem constraints and the improvement constraints is expensive. I suggest you store this in an temp variable instead of doing it twice.