Paul,
It appears that your problem is "non-endogenous". Which means that your constraints depend on the values of the variables, pn. These are particularly hard problems to solve because the constraints change with the variables.
Can you solve the "stages" sequentially? Solve for p1, then use the value of p1 to solve for p2,p4,p5 and then from those values construct the constraints for the p2 dependencies -- or do the later solutions alter the earlier choices? For example, in your earlier example up to p7, how did you set p1=4? was that iterative until a complete solution was found?
If the later is the case you can try creating constraints that combine And and Or and enumerate all the possible constraint sets for each stage but that might get large and difficult to solve.
Regards,
Neil