Exemplo n.º 1
0
 @Override
 public void impose(Store store) {
   x.putModelConstraint(this, getConsistencyPruningEvent(x));
   p.putModelConstraint(this, getConsistencyPruningEvent(p));
   store.addChanged(this);
   store.countConstraint();
 }
Exemplo n.º 2
0
  // registers the constraint in the constraint store
  @Override
  public void impose(Store store) {

    result.putModelConstraint(this, getConsistencyPruningEvent(result));

    for (Var V : list) V.putModelConstraint(this, getConsistencyPruningEvent(V));

    store.addChanged(this);
    store.countConstraint();
  }
Exemplo n.º 3
0
  @Override
  public void impose(Store store) {

    this.store = store;

    int level = store.level;

    int pos = 0;
    positionMapping = new HashMap<IntVar, Integer>();

    for (IntVar v : listAlldiff) {
      positionMapping.put(v, pos++);
      v.putModelConstraint(this, getConsistencyPruningEvent(v));
      queueVariable(level, v);
    }
    grounded = new TimeStamp<Integer>(store, 0);

    store.addChanged(this);
    store.countConstraint();
  }