Post constraint on \a x
| 82 | } |
| 83 | /// Post constraint on \a x |
| 84 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 85 | using namespace Gecode; |
| 86 | BoolVarArgs y(6); |
| 87 | y[0]=channel(home,x[0]); |
| 88 | y[1]=y[3]=channel(home,x[1]); |
| 89 | y[2]=y[4]=y[5]=channel(home,x[2]); |
| 90 | unshare(home, y); |
| 91 | for (int i=0; i<6; i++) |
| 92 | rel(home, y[i], IRT_EQ, channel(home,x[3+i])); |
| 93 | } |
| 94 | }; |
| 95 | |
| 96 | /// %Test for unsharing in failed spaces |