cons_pseudoboolean.c
Go to the documentation of this file.
33 * The constraint handler deals with pseudo Boolean constraints. These are constraints of the form
35 * \mbox{lhs} \leq \sum_{k=0}^m c_k \cdot x_k + \sum_{i=0}^n c_i \cdot \prod_{j \in I_i} x_j \leq \mbox{rhs}
42/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
79#define CONSHDLR_ENFOPRIORITY -1000000 /**< priority of the constraint handler for constraint enforcing */
80#define CONSHDLR_CHECKPRIORITY -5000000 /**< priority of the constraint handler for checking feasibility */
81#define CONSHDLR_EAGERFREQ 100 /**< frequency for using all instead of only the useful constraints in separation,
83#define CONSHDLR_MAXPREROUNDS -1 /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
84#define CONSHDLR_NEEDSCONS TRUE /**< should the constraint handler be skipped, if no constraints are available? */
86#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM /**< presolving timing of the constraint handler (fast, medium, or exhaustive) */
88#define DEFAULT_DECOMPOSENORMALPBCONS FALSE /**< decompose all normal pseudo boolean constraint into a "linear" constraint and "and" constraints */
89#define DEFAULT_DECOMPOSEINDICATORPBCONS TRUE /**< decompose all indicator pseudo boolean constraint into a "linear" constraint and "and" constraints */
91#define DEFAULT_SEPARATENONLINEAR TRUE /**< if decomposed, should the nonlinear constraints be separated during LP processing */
92#define DEFAULT_PROPAGATENONLINEAR TRUE /**< if decomposed, should the nonlinear constraints be propagated during node processing */
93#define DEFAULT_REMOVABLENONLINEAR TRUE /**< if decomposed, should the nonlinear constraints be removable */
103#define HASHSIZE_PSEUDOBOOLEANNONLINEARTERMS 500 /**< minimal size of hash table in and constraint tables */
106/* - create special linear(knapsack, setppc, logicor, (eqknapsack)) and and-constraints with check flags FALSE, to
107 * get smaller amount of locks on the term variables, do all presolving ...?! in these constraint handlers
109 * - do the checking here, lock and-resultants in both directions and all and-variables according to their
111 * @note this only works if the and-resultant has no objective cofficient, otherwise we need to lock variables also in both directions
113 * - need to keep and constraint pointer for special propagations like if two ands are due to their variables in
117 * check/IP/PseudoBoolean/normalized-PB07/OPT-SMALLINT-NLC/submittedPB07/manquinho/bsg/normalized-bsg_1000_25_1.opb.gz
123 * which "equals" a pseudoboolean constraint: 2 x1 + 2 x2 + 1 x3 x4 + 1 x5 x6 x7 + 1 x8 x9 <= 5 ;
127 * which "equals" a pseudoboolean constraint: 2 x1 + 2 x2 + 1 x3 x4 + 1 x5 x6 x7 + 1 x8 x9 <= 6 ;
138/* @todo - in and-constraint better count nfixed zeros in both directions and maybe nfixedones for better propagation
140 * - do better conflict analysis by choosing the earliest fixed variable which led to a conflict instead of maybe
143 * - how to make sure that we aggregate in a right way, when aggregating a resultant and a "normal" variable,
144 * maybe add in SCIPaggregateVars a check for original variables, to prefer them if the variable type is the
145 * same; probably it would be better too if we would aggregate two resultants that the one with less variables
148 * @note since product resultants are artificial, we do not care for their solution value, but this can lead to fixation
149 * of the resultant not representing the product, in 'optimization mode' we do not care, but this might make
179 SCIP_LINEARCONSTYPE linconstype; /**< type of linear constraint which represents this pseudoboolean constraint */
182 CONSANDDATA** consanddatas; /**< array of and-constraints-data-objects sorted after problem index of
213 CONSANDDATA** allconsanddatas; /**< array of all and-constraint data objects inside the whole problem,
225 SCIP_Bool decomposenormalpbcons;/**< decompose the pseudo boolean constraint into a "linear" constraint and "and" constraints */
226 SCIP_Bool decomposeindicatorpbcons;/**< decompose the indicator pseudo boolean constraint into a "linear" constraint and "and" constraints */
237/** comparison method for sorting and-resultants according to their problem index, which is used instead of the
238 * original index because the implicit resultants are shuffled when creating the constraints that otherwise results in
240 * if an and-resultant is deleted, it will be put in front with respect to its original index while sorting
261/** comparison method for sorting consanddatas according to the problem index of their corresponding and-resultants,
262 * if a consanddata object is deleted, it is handled like it has an inactive resultant, so this will be put
304 return resvarComp((void*)SCIPgetResultantAnd(NULL, consand1), (void*)SCIPgetResultantAnd(NULL, consand2));
315/** returns TRUE iff both keys are equal; two non-linear terms are equal if they have the same variables */
407/** initializes the hashmap and -table used in this constraint handler data for artificial variables and specific
429 SCIP_CALL( SCIPhashtableCreate(&((*conshdlrdata)->hashtable), SCIPblkmem(scip), (*conshdlrdata)->hashtablesize,
434 SCIP_CALL( SCIPhashmapCreate(&((*conshdlrdata)->hashmap), SCIPblkmem(scip), (*conshdlrdata)->hashmapsize) );
457 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &((*conshdlrdata)->allconsanddatas), (*conshdlrdata)->sallconsanddatas ) );
504 SCIPfreeBlockMemoryArray(scip, &((*conshdlrdata)->allconsanddatas), (*conshdlrdata)->sallconsanddatas );
779 SCIP_VAR**const linvars, /**< array to store not and-resultant variables of linear constraint, or NULL */
780 SCIP_Real*const lincoefs, /**< array to store coefficients of not and-resultant variables of linear
783 SCIP_VAR**const andress, /**< array to store and-resultant variables of linear constraint, or NULL */
786 SCIP_Bool*const andnegs, /**< array to store negation status of and-resultant variables of linear
833 /* if and resultant is not a resultant anymore (meaning the corresponding and-constraint was deleted/upgraded),
840 CONSANDDATA* consanddata = (CONSANDDATA*) SCIPhashmapGetImage(conshdlrdata->hashmap, (void*)(hashmapvar));
929 SCIP_CALL_ABORT( getLinearConsSides(scip, consdata->lincons, consdata->linconstype, &newlhs, &newrhs) );
951 SCIP_CALL_ABORT( getLinearConsVarsData(scip, consdata->lincons, consdata->linconstype, vars, coefs, &nvars) );
955 SCIP_CALL_ABORT( getLinVarsAndAndRess(scip, cons, vars, coefs, nvars, linvars, lincoefs, &nlinvars,
973 if( res == andresultant && consdata->andnegs[c] == andnegs[v] && consdata->andcoefs[c] == andcoefs[v] )
976 assert(SCIPvarIsActive(res) || (SCIPvarIsNegated(res) && SCIPvarIsActive(SCIPvarGetNegationVar(res))));
979 /* all and-resultants should be merged, so it is only allowed that each variable exists one time */
1009/** transforming transformed consanddata object back to original space, if an corresponding original constraint exists,
1085 SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &(consanddata->vars), andvars, consanddata->nvars) );
1098 assert(consanddata == (CONSANDDATA*)(SCIPhashtableRetrieve(conshdlrdata->hashtable, (void*)consanddata)));
1099 assert(SCIPhashmapExists(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddata->origcons)));
1100 assert(consanddata == (CONSANDDATA*)(SCIPhashmapGetImage(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddata->origcons))));
1130 assert(consanddata == (CONSANDDATA*)(SCIPhashtableRetrieve(conshdlrdata->hashtable, (void*)consanddata)));
1131 assert(SCIPhashmapExists(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddata->origcons)));
1132 assert(consanddata == (CONSANDDATA*)(SCIPhashmapGetImage(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddata->origcons))));
1148 SCIP_CONS*const lincons, /**< linear constraint with artificial and-resultants representing this pseudoboolean constraint */
1150 SCIP_CONS**const andconss, /**< array of and-constraints which occur in this pseudoboolean constraint */
1152 SCIP_Bool*const andnegs, /**< negation status of and-constraints (or NULL, if no negated resultants) */
1157 SCIP_VAR* const intvar, /**< a artificial variable which was added only for the objective function,
1191 SCIPerrorMessage("left hand side of pseudo boolean constraint greater than right hand side\n");
1236 /* do not capture the and constraint when scip is in transformed mode; this automatically happens in
1263 SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &((*consdata)->andcoefs), andcoefs, nandconss) );
1290 (*consdata)->consanddatas[c] = (CONSANDDATA*) SCIPhashmapGetImage(conshdlrdata->hashmap, (void*)andress[c]);
1292 assert((*consdata)->consanddatas[c]->origcons == andconss[c] || (*consdata)->consanddatas[c]->cons == andconss[c]);
1297 if( (*consdata)->consanddatas[c]->origcons != NULL && (*consdata)->consanddatas[c]->cons == NULL )
1303 /* do not capture the and constraint when scip is in transformed mode; this automatically happens in
1306 SCIP_CALL( SCIPtransformCons(scip, (*consdata)->consanddatas[c]->origcons, &((*consdata)->consanddatas[c]->cons)) );
1320 /* resort variables in transformed problem, because the order might change while tranforming */
1343 SCIPsortPtrPtrRealBool((void**)andress, (void**)((*consdata)->consanddatas), (*consdata)->andcoefs, (*consdata)->andnegs, resvarComp, nandconss);
1408 /* count down uses and if necessary release constraints and delete data from hashtable and -map */
1424 /* if the consanddata is not used anymore, release the constraint and clear the hashmap- and table */
1438 assert(SCIPhashmapExists(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddatas[c]->cons)));
1439 SCIP_CALL( SCIPhashmapRemove(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddatas[c]->cons)) );
1459 conshdlrdata->allconsanddatas[d] = conshdlrdata->allconsanddatas[conshdlrdata->nallconsanddatas];
1479 /* if the consanddata is not used anymore, release the constraint and clear the hashmap- and table */
1492 assert(SCIPhashmapExists(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddatas[c]->origcons)));
1493 SCIP_CALL( SCIPhashmapRemove(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddatas[c]->origcons)) );
1525 conshdlrdata->allconsanddatas[d] = conshdlrdata->allconsanddatas[conshdlrdata->nallconsanddatas];
1592 assert(consanddatas[c] == (CONSANDDATA*)(SCIPhashtableRetrieve(conshdlrdata->hashtable, (void*)consanddatas[c])));
1593 assert(SCIPhashmapExists(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddatas[c]->origcons)));
1594 assert(consanddatas[c] == (CONSANDDATA*)(SCIPhashmapGetImage(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddatas[c]->origcons))));
1609/** check the locks of an AND resultant and removes it from all global structures if the resultant is not locked anymore */
1619 /* the resultant has no locks left and might be dual fixed now, we need to delete all its cliques */
1621 && SCIPvarGetNLocksUpType(res, SCIP_LOCKTYPE_MODEL) == 0 && SCIPgetStage(scip) < SCIP_STAGE_FREETRANS )
1656 /* choose correct variable array to add locks for, we only add locks for now valid variables */
1703 CONSANDDATA*const consanddata, /**< CONSANDDATA object for which we want to delete the locks */
1797 /* more than one and-constraint is needed, otherwise this pseudoboolean constraint should be upgraded to a linear constraint */
1814 SCIP_CALL( getLinearConsVarsData(scip, consdata->lincons, consdata->linconstype, vars, coefs, &nvars) );
1817 /* number of variables should be consistent, number of 'real' linear variables plus number of and-constraints should
1867 SCIPinfoMessage(scip, file, " %+.15g %s<%s>[B]", coefs[v], negated ? "~" : "", SCIPvarGetName(aggrvar));
1989 SCIP_Bool const stickingatnode, /**< should the constraint always be kept at the node where it was added, even
2079 (void)SCIPsnprintf(name, SCIP_MAXSTRLEN, ARTIFICIALVARNAMEPREFIX"%d", conshdlrdata->nallconsanddatas);
2083#if 1 /* @todo: check whether we want to branch on artificial variables, the test results show that it is of advantage */
2091#if 0 /* does not work for since the value of artificial resultants must not be equal to the value computed by their
2111 if( (SCIPvarIsOriginal(resultant) || SCIPvarIsTransformedOrigvar(resultant)) && !SCIPisFeasEQ(scip, debugsolval, val) )
2113 SCIPerrorMessage("computed solution value %g for resultant <%s> violates debug solution value %g\n", val, SCIPvarGetName(resultant), debugsolval);
2149 SCIP_CALL( SCIPensureBlockMemoryArray(scip, &(conshdlrdata->allconsanddatas), &(conshdlrdata->sallconsanddatas), SCIPcalcMemGrowSize(scip, conshdlrdata->sallconsanddatas + 1)) );
2236 SCIPconsIsInitial(cons), SCIPconsIsEnforced(cons), SCIPconsIsChecked(cons), SCIPconsIsLocal(cons),
2244 SCIP_CALL( SCIPensureBlockMemoryArray(scip, &(consdata->consanddatas), &(consdata->sconsanddatas), consdata->sconsanddatas + 1) );
2251 consdata->consanddatas[consdata->nconsanddatas] = (CONSANDDATA*) SCIPhashmapGetImage(conshdlrdata->hashmap, (void*)res);
2293 SCIP_CALL( lockRoundingAndCons(scip, cons, consdata->consanddatas[consdata->nconsanddatas - 1], val, consdata->lhs, consdata->rhs) );
2402 SCIP_CALL( getLinearConsSides(scip, consdata->lincons, consdata->linconstype, &oldlhs, &oldrhs) );
2424 SCIP_CALL( getLinearConsVarsData(scip, consdata->lincons, consdata->linconstype, vars, coefs, &nvars) );
2428 SCIP_CALL( getLinVarsAndAndRess(scip, cons, vars, coefs, nvars, linvars, lincoefs, &nlinvars, andress, andcoefs, andnegs, &nandress) );
2514 /* check whether the left hand side is increased, if and only if that's the case we maybe can propagate, tighten and add more cliques */
2573 SCIP_CALL( getLinearConsSides(scip, consdata->lincons, consdata->linconstype, &oldlhs, &oldrhs) );
2595 SCIP_CALL( getLinearConsVarsData(scip, consdata->lincons, consdata->linconstype, vars, coefs, &nvars) );
2599 SCIP_CALL( getLinVarsAndAndRess(scip, cons, vars, coefs, nvars, linvars, lincoefs, &nlinvars, andress, andcoefs, andnegs, &nandress) );
2685 /* check whether the right hand side is decreased, if and only if that's the case we maybe can propagate, tighten and add more cliques */
2735 SCIP_Bool const stickingatnode, /**< should the constraint always be kept at the node where it was added, even
2812 SCIP_Bool const removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
2815 SCIP_Bool const stickingatnode, /**< should the constraint always be kept at the node where it was added, even
2820 SCIP_LINEARCONSTYPE*const linconstype /**< pointer to store the type of the linear constraint */
2931 SCIPdebugMsg(scip, "While creating the linear constraint of the pseudoboolean constraint we found %d zero coefficients that were removed\n", nzero);
2946 * - logic or constraints have left hand side of +1.0, and right hand side of +infinity: x(S) >= 1.0
2958 /* check, if we have to multiply with -1 (negate the positive vars) or with +1 (negate the negative vars) */
2992 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3006 /* check, if linear constraint can be upgraded to set partitioning, packing, or covering constraint
3007 * - all set partitioning / packing / covering constraints consist only of binary variables with a
3014 * - a set partitioning constraint has left hand side of +1.0, and right hand side of +1.0 : x(S) == 1.0
3016 * - a set packing constraint has left hand side of -infinity, and right hand side of +1.0 : x(S) <= 1.0
3018 * - a set covering constraint has left hand side of +1.0, and right hand side of +infinity: x(S) >= 1.0
3026 if( SCIPisEQ(scip, *lhs, *rhs) && (SCIPisEQ(scip, *lhs, 1.0 - ncoeffsnone) || SCIPisEQ(scip, *lhs, ncoeffspone - 1.0)) )
3030 /* check, if we have to multiply with -1 (negate the positive vars) or with +1 (negate the negative vars) */
3064 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3080 /* check, if we have to multiply with -1 (negate the positive vars) or with +1 (negate the negative vars) */
3114 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3132 SCIPwarningMessage(scip, "Does not expect this, because this constraint should be a set packing constraint.\n");
3136 SCIPwarningMessage(scip, "Does not expect this, because this constraint should be a logicor constraint.\n");
3141 /* check, if we have to multiply with -1 (negate the positive vars) or with +1 (negate the negative vars) */
3175 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3195 if( upgrconshdlr != NULL && !created && (ncoeffspone + ncoeffsnone + ncoeffspint + ncoeffsnint == nvars) && (SCIPisInfinity(scip, -*lhs) != SCIPisInfinity(scip, *rhs)) )
3209 /* if the right hand side is non-infinite, we have to negate all variables with negative coefficient;
3210 * otherwise, we have to negate all variables with positive coefficient and multiply the row with -1
3263 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3284 if( upgrconshdlr != NULL && !created && (ncoeffspone + ncoeffsnone + ncoeffspint + ncoeffsnint == nvars) && SCIPisEQ(scip, *lhs, *rhs) )
3294 SCIPdebugMsg(scip, "linear pseudoboolean constraint will be a equality-knapsack constraint\n");
3351 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3373 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3437 SCIPdebugMsg(scip, "checking original pseudo boolean constraint <%s>\n", SCIPconsGetName(cons));
3460 SCIP_CALL( getLinearConsVarsData(scip, consdata->lincons, consdata->linconstype, vars, coefs, &nvars) );
3463 /* number of variables should be consistent, number of 'real' linear variables plus number of and-constraints should
3561 SCIPinfoMessage(scip, NULL, "violation: left hand side is violated by %.15g\n", lhs - activity);
3577 SCIPinfoMessage(scip, NULL, "violation: right hand side is violated by %.15g\n", activity - rhs);
3590/** checks all and-constraints inside the pseudoboolean constraint handler for feasibility of given solution or current
3686 SCIP_HASHMAP*const varmap, /**< a SCIP_HASHMAP mapping variables of the source SCIP to corresponding
3688 SCIP_HASHMAP*const consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
3698 SCIP_Bool const removable, /**< should the relaxation be removed from the LP due to aging or cleanup? */
3699 SCIP_Bool const stickingatnode, /**< should the constraint always be kept at the node where it was added, even
3775 SCIP_CALL( SCIPgetConsCopy(sourcescip, targetscip, sourcelincons, &targetlincons, conshdlrlinear, varmap, consmap, SCIPconsGetName(sourcelincons),
3776 SCIPconsIsInitial(sourcelincons), SCIPconsIsSeparated(sourcelincons), SCIPconsIsEnforced(sourcelincons), SCIPconsIsChecked(sourcelincons),
3777 SCIPconsIsPropagated(sourcelincons), SCIPconsIsLocal(sourcelincons), SCIPconsIsModifiable(sourcelincons), SCIPconsIsDynamic(sourcelincons),
3784 /* @note due to copying special linear constraints, now leads only to simple linear constraints, we check that
3785 * our target constraint handler is the same as our source constraint handler of the linear constraint,
3818 SCIP_CALL( getLinearConsNVars(targetscip, targetlincons, targetlinconstype, &ntargetlinvars) );
3830 SCIP_CALL( SCIPhashtableCreate(&linconsvarsmap, SCIPblkmem(targetscip), ntargetlinvars, SCIPvarGetHashkey,
3855 targetandresultant = (SCIP_VAR*) SCIPhashmapGetImage(varmap, SCIPgetResultantAnd(sourcescip, oldcons));
3869 SCIP_CALL( SCIPgetConsCopy(sourcescip, targetscip, oldcons, &targetandconss[ntargetandconss], conshdlrand, varmap, consmap, SCIPconsGetName(oldcons),
3870 SCIPconsIsInitial(oldcons), SCIPconsIsSeparated(oldcons), SCIPconsIsEnforced(oldcons), SCIPconsIsChecked(oldcons),
3871 SCIPconsIsPropagated(oldcons), SCIPconsIsLocal(oldcons), SCIPconsIsModifiable(oldcons), SCIPconsIsDynamic(oldcons),
3905 SCIP_CALL( SCIPgetVarCopy(sourcescip, targetscip, indvar, &indvar, varmap, consmap, global, valid) );
3911 SCIP_CALL( SCIPgetVarCopy(sourcescip, targetscip, intvar, &intvar, varmap, consmap, global, valid) );
3925 SCIP_CALL( getLinearConsSides(targetscip, targetlincons, targetlinconstype, &targetlhs, &targetrhs) );
3930 /* Note that due to compression the and constraints might have disappeared in which case ntargetandconss == 0. */
3934 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3940 SCIPverbMessage(sourcescip, SCIP_VERBLEVEL_MINIMAL, NULL, "could not copy constraint <%s>\n", SCIPconsGetName(sourcecons));
4014 assert(consanddata->nnewvars == 0 && ((consanddata->snewvars > 0) == (consanddata->newvars != NULL)));
4056 /* check for changings, if and-constraint did not change we do not need to copy all variables */
4080 SCIP_CALL( SCIPensureBlockMemoryArray(scip, &(consanddata->newvars), &(consanddata->snewvars), nnewvars) );
4104 CONSANDDATA*const consanddata, /**< CONSANDDATA object for which we want to delete the locks and the
4132 CONSANDDATA*const consanddata, /**< CONSANDDATA object for which we want to delete the locks and the
4165 SCIP_Bool*const andnegs, /**< new negation status of and-resultants in pseudoboolean constraint */
4196 SCIPsortPtrRealBool((void**)(consdata->consanddatas), consdata->andcoefs, consdata->andnegs, resvarCompWithInactive, consdata->nconsanddatas);
4266 /* collect new consanddata objects sorted with respect to the problem index of corresponding and-resultants */
4274 SCIP_CALL( removeOldLocks(scip, cons, consanddatas[c], oldandnegs[c] ? -oldandcoefs[c] : oldandcoefs[c],
4286 newconsanddatas[nnewconsanddatas] = (CONSANDDATA*) SCIPhashmapGetImage(conshdlrdata->hashmap, (void*)res2);
4292 SCIP_CALL( addNewLocks(scip, cons, newconsanddatas[nnewconsanddatas], newandnegs[nnewconsanddatas] ?
4327 lhschanged = (SCIPisInfinity(scip, -consdata->lhs) && !SCIPisInfinity(scip, -newlhs)) || (!SCIPisInfinity(scip, -consdata->lhs) && SCIPisInfinity(scip, -newlhs))
4329 rhschanged = (SCIPisInfinity(scip, consdata->rhs) && !SCIPisInfinity(scip, newrhs)) || (!SCIPisInfinity(scip, consdata->rhs) && SCIPisInfinity(scip, newrhs))
4333 if( coefsignchanged || lhschanged || rhschanged || newconsanddatas[nnewconsanddatas]->nnewvars > 0)
4338 SCIP_CALL( addNewLocks(scip, cons, newconsanddatas[nnewconsanddatas], newandnegs[nnewconsanddatas] ?
4387 SCIP_CALL( removeOldLocks(scip, cons, consanddatas[c], oldandnegs[c] ? -oldandcoefs[c] : oldandcoefs[c],
4404 newconsanddatas[nnewconsanddatas] = (CONSANDDATA*) SCIPhashmapGetImage(conshdlrdata->hashmap, (void*)res2);
4410 SCIP_CALL( addNewLocks(scip, cons, newconsanddatas[nnewconsanddatas], newandnegs[nnewconsanddatas] ?
4443 SCIP_CALL( getLinearConsNVars(scip, consdata->lincons, consdata->linconstype, &(consdata->nlinvars)) );
4460 /* check that consanddata objects are sorted with respect to the problem index of the corresponding resultants */
4516 /* if we have no and-constraints left, we should not be here and this constraint should be deleted (only the linaer should survive) */
4544 SCIP_CALL( getLinearConsVarsData(scip, consdata->lincons, consdata->linconstype, vars, NULL, &nvars) );
4585 if( !SCIPvarIsActive(var1) && (!SCIPvarIsNegated(var1) || !SCIPvarIsActive(SCIPvarGetNegationVar(var1))) )
4602 if( !SCIPvarIsActive(var2) && (!SCIPvarIsNegated(var2) || !SCIPvarIsActive(SCIPvarGetNegationVar(var2))) )
4614 /* if variable in and-constraint1 is the negated variable of a normal linear variable, than we can add a
4615 * clique between the and-resultant and the normal linear variable, negated variables are not save in
4637 /* @todo: check whether it is better to only add the clique or to add the setppc constraint or do both */
4646 (void) SCIPsnprintf(consname, SCIP_MAXSTRLEN, "%s_clq_%s_%s", SCIPconsGetName(cons), SCIPvarGetName(clqvars[0]), SCIPvarGetName(clqvars[1]) );
4659 /* if a variable in an and-constraint is in a clique with another normal linear variable, we can add the
4680 /* @todo: check whether it is better to only add the clique or to add the setppc constraint or do both */
4689 (void) SCIPsnprintf(consname, SCIP_MAXSTRLEN, "%s_clq_%s_%s", SCIPconsGetName(cons), SCIPvarGetName(clqvars[0]), SCIPvarGetName(clqvars[1]) );
4755 if( !SCIPvarIsActive(var1) && (!SCIPvarIsNegated(var1) || !SCIPvarIsActive(SCIPvarGetNegationVar(var1))) )
4772 if( !SCIPvarIsActive(var2) && (!SCIPvarIsNegated(var2) || !SCIPvarIsActive(SCIPvarGetNegationVar(var2))) )
4784 /* if a variable in and-constraint1 is the negated variable of a variable in and-constraint2, than we can
4806 /* @todo: check whether it is better to only add the clique or to add the setppc constraint or do both */
4815 (void) SCIPsnprintf(consname, SCIP_MAXSTRLEN, "%s_clq_%s_%s", SCIPconsGetName(cons), SCIPvarGetName(clqvars[0]), SCIPvarGetName(clqvars[1]) );
4828 /* if a variable in an and-constraint is in a clique with a variable in another and-constraint, we can add
4850 /* @todo: check whether it is better to only add the clique or to add the setppc constraint or do both */
4859 (void) SCIPsnprintf(consname, SCIP_MAXSTRLEN, "%s_clq_%s_%s", SCIPconsGetName(cons), SCIPvarGetName(clqvars[0]), SCIPvarGetName(clqvars[1]) );
5015 assert(consanddata->nnewvars == 0 || (consanddata->newvars != NULL && consanddata->snewvars > 0));
5061 /* the consanddata object is not used anymore, so extract the and constraint and delete other data */
5086 /* @note due to aggregations or fixings the resultant may need to be propagated later on, so we can only
5118 assert(SCIPvarGetStatus(activevars[i]) == SCIP_VARSTATUS_LOOSE || SCIPvarGetStatus(activevars[i]) == SCIP_VARSTATUS_COLUMN || SCIPvarGetStatus(activevars[i]) == SCIP_VARSTATUS_FIXED);
5150 assert(SCIPhashmapExists(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddata->cons)));
5151 SCIP_CALL( SCIPhashmapRemove(conshdlrdata->hashmap, (void*)SCIPgetResultantAnd(scip, consanddata->cons)) );