コード例 #1
0
    void reconnect() {
        if (deconnected()) {
            if (ToulBar2::verbose >= 3) cout << "reconnect " << this << endl;
			assert(linkX->prev == NULL && linkX->next == NULL);
            x->getConstrs()->push_back(linkX, true);
        }
    }
コード例 #2
0
    virtual void reconnect() {
        if (deconnected()) {
            if (ToulBar2::verbose >= 3) cout << "reconnect " << this << endl;
            for(int i=0;i<arity_;i++) {
			    assert(links[i]->prev == NULL && links[i]->next == NULL);
	            scope[i]->getConstrs()->push_back(links[i], true);
	        }
        }
    }
コード例 #3
0
 void incConflictWeight(Constraint *from) override {
     //assert(fromElim1==NULL);
     //assert(fromElim2==NULL);
     if (from==this) {
         Constraint::incConflictWeight(1);
     } else if (deconnected()) {
         for (int i=0; i<from->arity(); i++) {
             int index = getIndex(from->getVar(i));
             if (index>=0) { // the last conflict constraint may be derived from two binary constraints (boosting search), each one derived from an n-ary constraint with a scope which does not include parameter constraint from
                 assert(index < arity_);
                 conflictWeights[index]++;
             }
         }
     }
 }
コード例 #4
0
void LinearConstraint::end() {
	mip.called_time();
	if (deconnected()) return;
}