示例#1
0
文件: XeqP.java 项目: mnmlist/jacop
 @Override
 public void impose(Store store) {
   x.putModelConstraint(this, getConsistencyPruningEvent(x));
   p.putModelConstraint(this, getConsistencyPruningEvent(p));
   store.addChanged(this);
   store.countConstraint();
 }
示例#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();
  }
示例#3
0
文件: Alldiff.java 项目: velarm/jacop
  @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();
  }