cons_xor.c File Reference Detailed DescriptionConstraint handler for "xor" constraints, . This constraint handler deals with "xor" constraint. These are constraint of the form:
where is a binary variable for all and is bool. The variables 's are called operators. This constraint is satisfied if is TRUE and an odd number of the operators are TRUE or if the is FALSE and a even number of operators are TRUE. Hence, if the sum of and operators is even. Definition in file cons_xor.c. #include <assert.h> #include <string.h> #include "scip/pub_misc.h" #include "scip/cons_xor.h" #include "scip/cons_setppc.h" #include "scip/cons_linear.h" #include "scip/heur_trysol.h" #include "scip/debug.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 48 of file cons_xor.c. Referenced by createConsXorIntvar(), SCIP_DECL_CONSHDLRCOPY(), SCIPcreateConsXor(), SCIPgetNVarsXor(), SCIPgetRhsXor(), SCIPgetVarsXor(), and SCIPincludeConshdlrXor().
Definition at line 49 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
priority of the constraint handler for separation Definition at line 50 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
priority of the constraint handler for constraint enforcing Definition at line 51 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
priority of the constraint handler for checking feasibility Definition at line 52 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
frequency for separating cuts; zero means to separate only in the root node Definition at line 53 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
frequency for propagating domains; zero means only preprocessing propagation Definition at line 54 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only Definition at line 55 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
maximal number of presolving rounds the constraint handler participates in (-1: no limit) Definition at line 58 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
should separation method be delayed, if other separators found cuts? Definition at line 59 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
should propagation method be delayed, if other propagators found reductions? Definition at line 60 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
should the constraint handler be skipped, if no constraints are available? Definition at line 61 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
Definition at line 63 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
Definition at line 64 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
Definition at line 66 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
Definition at line 67 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
priority of the constraint handler for upgrading of linear constraints Definition at line 69 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
should pairwise constraint comparison be performed in presolving? Definition at line 71 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
should the extended formulation be added in presolving? Definition at line 72 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
should the extended flow formulation be added (nonsymmetric formulation otherwise)? Definition at line 73 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
should parity inequalities be separated? Definition at line 74 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
frequency for applying the Gauss propagator Definition at line 75 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
minimal size of hash table in logicor constraint tables Definition at line 76 of file cons_xor.c. Referenced by detectRedundantConstraints().
should hash table be used for detecting redundant constraints in advance Definition at line 77 of file cons_xor.c. Referenced by SCIPincludeConshdlrXor().
number for minimal pairwise presolving comparisons Definition at line 78 of file cons_xor.c. Referenced by SCIP_DECL_CONSPRESOL().
minimal gain per minimal pairwise presolving comparisons to repeat pairwise comparison round Definition at line 79 of file cons_xor.c. Referenced by SCIP_DECL_CONSPRESOL().
maximal number of active constraints for which checking the system over GF2 is performed Definition at line 80 of file cons_xor.c. Referenced by checkSystemGF2().
maximal number of variables in xor constraints for which checking the system over GF2 is performed Definition at line 81 of file cons_xor.c. Referenced by checkSystemGF2().
Definition at line 83 of file cons_xor.c. Referenced by addRelaxation(), allRowsInLP(), consdataCreate(), consdataFreeRows(), and separateCons(). Typedef Documentation
type used for matrix entries in function checkGauss() Definition at line 91 of file cons_xor.c. Definition at line 140 of file cons_xor.c. Enumeration Type Documentation
Definition at line 132 of file cons_xor.c. Function Documentation
installs rounding locks for the given variable in the given xor constraint
Definition at line 149 of file cons_xor.c. References SCIP_CALL, SCIP_OKAY, SCIPlockVarCons(), TRUE, and unlockRounding(). Referenced by addCoef(), createRelaxation(), and setIntvar().
removes rounding locks for the given variable in the given xor constraint
Definition at line 163 of file cons_xor.c. References conshdlrdataCreate(), SCIP_CALL, SCIP_OKAY, SCIPunlockVarCons(), and TRUE. Referenced by delCoefPos(), lockRounding(), and setIntvar().
creates constraint handler data
Definition at line 177 of file cons_xor.c. References conshdlrdataFree(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocMemory. Referenced by SCIPincludeConshdlrXor(), and unlockRounding().
frees constraint handler data
Definition at line 197 of file cons_xor.c. References consdataSwitchWatchedvars(), NULL, SCIP_OKAY, and SCIPfreeMemory. Referenced by conshdlrdataCreate(), and SCIP_DECL_CONSFREE().
stores the given variable numbers as watched variables, and updates the event processing
Definition at line 212 of file cons_xor.c. References consdataEnsureVarsSize(), NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIPcatchVarEvent(), and SCIPdropVarEvent(). Referenced by consdataFree(), conshdlrdataFree(), delCoefPos(), and propagateCons().
ensures, that the vars array can store at least num entries
Definition at line 276 of file cons_xor.c. References consdataCreate(), NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addCoef(), and consdataSwitchWatchedvars().
creates constraint data for xor constraint
Definition at line 300 of file cons_xor.c. References consdataFreeRows(), FALSE, NROWS, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPcaptureVar(), SCIPduplicateBlockMemoryArray, SCIPgetTransformedVar(), SCIPgetTransformedVars(), SCIPisTransformed(), and TRUE. Referenced by consdataEnsureVarsSize(), createConsXorIntvar(), SCIP_DECL_CONSTRANS(), and SCIPcreateConsXor().
releases LP row of constraint data
Definition at line 357 of file cons_xor.c. References consdataFree(), NROWS, NULL, SCIP_CALL, SCIP_OKAY, and SCIPreleaseRow(). Referenced by consdataCreate(), consdataFree(), and SCIP_DECL_CONSEXITSOL().
frees constraint data for xor constraint
Definition at line 379 of file cons_xor.c. References consdataFreeRows(), consdataPrint(), consdataSwitchWatchedvars(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPisEQ(), SCIPisTransformed(), SCIPreleaseVar(), and SCIPvarGetLbGlobal(). Referenced by consdataFreeRows(), and SCIP_DECL_CONSDELETE().
prints xor constraint to file stream
Definition at line 440 of file cons_xor.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPinfoMessage(), SCIPwriteVarName(), SCIPwriteVarsList(), setIntvar(), and TRUE. Referenced by applyFixings(), consdataFree(), and SCIP_DECL_CONSPRINT().
sets intvar of an xor constraint
Definition at line 474 of file cons_xor.c. References addCoef(), lockRounding(), NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsIsTransformed(), SCIPerrorMessage, SCIPgetTransformedVar(), SCIPreleaseVar(), SCIPvarIsTransformed(), TRUE, and unlockRounding(). Referenced by applyFixings(), consdataPrint(), and preprocessConstraintPairs().
adds coefficient to xor constraint
Definition at line 526 of file cons_xor.c. References consdataEnsureVarsSize(), delCoefPos(), lockRounding(), NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsTransformed(), SCIPerrorMessage, SCIPgetTransformedVar(), SCIPvarIsTransformed(), and TRUE. Referenced by applyFixings(), preprocessConstraintPairs(), and setIntvar().
deletes coefficient at given position from xor constraint data
Definition at line 573 of file cons_xor.c. References consdataSort(), consdataSwitchWatchedvars(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsTransformed(), SCIPvarIsTransformed(), TRUE, and unlockRounding(). Referenced by addCoef(), and applyFixings().
sorts and constraint's variables by non-decreasing variable index
Definition at line 626 of file cons_xor.c. References NULL, SCIP_DECL_HASHGETKEY(), SCIPsortPtr(), SCIPvarCompareActiveAndNegated(), and TRUE. Referenced by applyFixings(), delCoefPos(), detectRedundantConstraints(), preprocessConstraintPairs(), and SCIP_DECL_HASHKEYEQ().
gets the key of the given element Definition at line 710 of file cons_xor.c. References SCIP_DECL_HASHKEYEQ(). Referenced by consdataSort().
returns TRUE iff both keys are equal; two constraints are equal if they have the same variables Definition at line 718 of file cons_xor.c. References consdataSort(), FALSE, NULL, SCIP_DECL_HASHKEYVAL(), SCIPconsGetData(), SCIPvarCompare(), SCIPvarCompareActiveAndNegated(), and TRUE. Referenced by SCIP_DECL_HASHGETKEY().
returns the hash value of the key Definition at line 760 of file cons_xor.c. References applyFixings(), NULL, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_NEGATED, SCIPconsGetData(), SCIPvarGetIndex(), SCIPvarGetStatus(), and SCIPvarIsActive(). Referenced by SCIP_DECL_HASHKEYEQ().
deletes all fixed variables and all pairs of equal variables
Definition at line 795 of file cons_xor.c. References addCoef(), addExtendedFlowFormulation(), consdataPrint(), consdataSort(), delCoefPos(), MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_FIXED, SCIP_VARTYPE_BINARY, SCIPaddCons(), SCIPaddVar(), SCIPaggregateVars(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsDynamic(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPcreateVar(), SCIPdebug, SCIPdebugMessage, SCIPdoNotAggr(), SCIPgetBinvarRepresentative(), SCIPisEQ(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNegatedVar(), SCIPvarGetNegationVar(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsBinary(), SCIPvarIsInitial(), SCIPvarIsNegated(), SCIPvarIsRemovable(), setIntvar(), and TRUE. Referenced by detectRedundantConstraints(), preprocessConstraintPairs(), SCIP_DECL_CONSPRESOL(), and SCIP_DECL_HASHKEYVAL().
adds extended flow formulation The extended flow formulation is built as follows: Let be the variables contained in the given XOR constraint. We construct a two layered flow network. The upper layer is called the north layer and the lower is called the south layer. For each , we add arcs that stay in the north and south layer (denoted by 'nn' and 'ss', respectively), as well as arcs that change the layers (denoted by 'ns' and 'sn'). For , we only add two arcs from the source to the two layers. The source is located on the north layer. For , we add two arcs connecting the two layers to the sink. Depending on the rhs of the constraint the sink is located on the north or south layer. A change in the layers corresponds to a parity change, i.e., the corresponding variable is 1 (and 0 otherwise).
Definition at line 1065 of file cons_xor.c. References addExtendedAsymmetricFormulation(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_IMPLINT, SCIPaddCons(), SCIPaddVar(), SCIPaggregateVars(), SCIPallocBlockMemoryArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsInitial(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPcreateConsLinear(), SCIPcreateVar(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPlockVarCons(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarIsTransformed(), and TRUE. Referenced by applyFixings(), and SCIP_DECL_CONSPRESOL().
adds extended asymmetric formulation The extended asymmetric formulation is constructed as follows: Let be the variables contained in the given XOR constraint. We introduce variables with the following constraints: , , and for :
This formulation is described in Robert D. Carr and Goran Konjevod
Definition at line 1370 of file cons_xor.c. References createRelaxation(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_IMPLINT, SCIPaddCons(), SCIPaddVar(), SCIPaggregateVars(), SCIPallocBlockMemoryArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsInitial(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPcreateConsLinear(), SCIPcreateVar(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPinfinity(), SCIPlockVarCons(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarIsTransformed(), and TRUE. Referenced by addExtendedFlowFormulation(), and SCIP_DECL_CONSPRESOL().
creates LP row corresponding to xor constraint: x1 + ... + xn - 2q == rhs with internal integer variable q; in the special case of 3 variables and c = 0, the following linear system is created:
Definition at line 1549 of file cons_xor.c. References addRelaxation(), lockRounding(), NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPaddVar(), SCIPaddVarsToRowSameCoef(), SCIPaddVarToRow(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPinfinity(), and SCIPsnprintf(). Referenced by addExtendedAsymmetricFormulation(), addRelaxation(), and separateCons().
adds linear relaxation of or constraint to the LP
Definition at line 1682 of file cons_xor.c. References allRowsInLP(), createRelaxation(), FALSE, NROWS, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCut(), SCIPconsGetData(), and SCIProwIsInLP(). Referenced by createRelaxation(), and SCIP_DECL_CONSINITLP().
returns whether all rows of the LP relaxation are in the current LP
Definition at line 1713 of file cons_xor.c. References checkCons(), FALSE, NROWS, NULL, SCIProwIsInLP(), and TRUE. Referenced by addRelaxation(), and checkCons().
checks xor constraint for feasibility of given solution: returns TRUE iff constraint is feasible
Definition at line 1735 of file cons_xor.c. References allRowsInLP(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPgetSolVal(), SCIPincConsAge(), SCIPisFeasEQ(), SCIPisFeasIntegral(), SCIPresetConsAge(), separateCons(), and TRUE. Referenced by allRowsInLP(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFOPS().
separates current LP solution Consider a XOR-constraint
with and a solution to be cut off. Small XOR constraints are handled by adding the inequalities of the convex hull. The separation of larger XOR constraints has been described by We separate the inequalities
with as follows. That these inequalities are valid can be seen as follows: Let be a feasible solution and suppose that the inequality is violated for some . Then for all and for all . Thus we should have
which is not equal to as required by the XOR-constraint. Let . Suppose that has not the same parity as rhs. Then
is the only inequality that can be violated. We rewrite the inequality as
These inequalities are added. Otherwise let and check the inequality for and similarly for .
Definition at line 1847 of file cons_xor.c. References computeRowEcholonGF2(), createRelaxation(), FALSE, NROWS, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCut(), SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPcreateEmptyRowCons(), SCIPdebug, SCIPdebugMessage, SCIPflushRowExtensions(), SCIPgetRowLPActivity(), SCIPgetRowSolFeasibility(), SCIPgetSolVal(), SCIPinfinity(), SCIPisEfficacious(), SCIPisFeasGT(), SCIPisFeasNegative(), SCIPisGT(), SCIPprintRow(), SCIPreleaseRow(), SCIProwIsInLP(), SCIPsnprintf(), and TRUE. Referenced by checkCons(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
Transform linear system into row echolon form via the Gauss algorithm with row pivoting over GF2
Here, . On exit, the vector
Definition at line 2060 of file cons_xor.c. References NULL, SCIPisStopped(), and solveRowEcholonGF2(). Referenced by checkSystemGF2(), and separateCons().
Construct solution from matrix in row echolon form over GF2 Compute solution of , which is already in row echolon form (
Definition at line 2169 of file cons_xor.c. References checkSystemGF2(), and NULL. Referenced by checkSystemGF2(), and computeRowEcholonGF2().
solve equation system over GF 2 by Gauss algorithm and create solution out of it or return cutoff Collect all information in xor constraints into a linear system over GF2. Then solve the system by computing a row echolon form. If the system is infeasible, the current node is infeasible. Otherwise, we can compute a solution for the xor constraints given. We check whether this gives a solution for the whole problem. We sort the columns with respect to the product of the objective coefficients and 1 minus the current LP solution value. The idea is that columns that are likely to provide the steps in the row echolon form should appear towards the front of the matrix. The smaller the product, the more it makes sense to set the variable to 1 (because the solution value is already close to 1 and the objective function is small). Note that this function is called from propagation where usually no solution is available. However, the solution is only used for sorting the columns. Thus, the procedure stays correct even with nonsense solutions.
Definition at line 2233 of file cons_xor.c. References addConflictBounds(), BMSclearMemoryArray, computeRowEcholonGF2(), FALSE, MAXXORCONSSSYSTEM, MAXXORVARSSYSTEM, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_BINARY, SCIPallocBufferArray, SCIPblkmem(), SCIPcalcHashtableSize(), SCIPcheckSol(), SCIPcomputeVarLbLocal(), SCIPcomputeVarUbLocal(), SCIPconsGetData(), SCIPconsGetName(), SCIPcreateSol(), SCIPdebug, SCIPdebugMessage, SCIPfindHeur(), SCIPfreeBufferArray, SCIPfreeSol(), SCIPgetNVars(), SCIPgetSolVal(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPheurPassSolAddSol(), SCIPinfoMessage(), SCIPisEQ(), SCIPisGE(), SCIPisLE(), SCIPisStopped(), SCIPprintSol(), SCIPsetSolVal(), SCIPsortRealIntPtr(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetAggrConstant(), SCIPvarGetAggrScalar(), SCIPvarGetAggrVar(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNegatedVar(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsNegated(), solveRowEcholonGF2(), and TRUE. Referenced by SCIP_DECL_CONSPROP(), and solveRowEcholonGF2().
for each variable in the xor constraint, add it to conflict set; for integral variable add corresponding bound
Definition at line 2713 of file cons_xor.c. References analyzeConflict(), FALSE, NULL, PROPRULE_0, PROPRULE_1, PROPRULE_INTLB, PROPRULE_INTUB, PROPRULE_INVALID, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPaddConflictBinvar(), SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPconsGetData(), SCIPconsGetName(), SCIPerrorMessage, SCIPisEQ(), SCIPvarGetLbAtIndex(), SCIPvarGetUbAtIndex(), and TRUE. Referenced by analyzeConflict(), checkSystemGF2(), and resolvePropagation().
analyzes conflicting assignment on given constraint, and adds conflict constraint to problem
Definition at line 2821 of file cons_xor.c. References addConflictBounds(), NULL, propagateCons(), SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPanalyzeConflictCons(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), and SCIPisConflictAnalysisApplicable(). Referenced by addConflictBounds(), and propagateCons().
propagates constraint with the following rules: (0) all variables are fixed => can fix integral variable (1) all except one variable fixed => fix remaining variable and integral variable (2) depending on the amount of fixed binary variables we can tighten the integral variable (3) depending on the lower bound of the integral variable one can fix variables to 1 (4) depending on the upper bound of the integral variable one can fix variables to 0
Definition at line 2852 of file cons_xor.c. References analyzeConflict(), consdataSwitchWatchedvars(), FALSE, NULL, PROPRULE_0, PROPRULE_1, PROPRULE_INTLB, PROPRULE_INTUB, resolvePropagation(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelConsLocal(), SCIPincConsAge(), SCIPinferBinvarCons(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPinRepropagation(), SCIPisEQ(), SCIPisFeasEQ(), SCIPisFeasIntegral(), SCIPresetConsAge(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE. Referenced by analyzeConflict(), SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
resolves a conflict on the given variable by supplying the variables needed for applying the corresponding propagation rules (see propagateCons())
Definition at line 3250 of file cons_xor.c. References addConflictBounds(), cliquePresolve(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_SUCCESS, and SCIPdebugMessage. Referenced by propagateCons(), and SCIP_DECL_CONSRESPROP().
try to use clique information to delete a part of the xor constraint or even fix variables
Definition at line 3271 of file cons_xor.c. References detectRedundantConstraints(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_NEGATED, SCIPaddCoefSetppc(), SCIPaddCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsSetpart(), SCIPdebug, SCIPdebugMessage, SCIPdelCons(), SCIPfixVar(), SCIPgetNegatedVar(), SCIPprintCons(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarGetNegationVar(), SCIPvarGetStatus(), SCIPvarIsActive(), SCIPvarsHaveCommonClique(), and TRUE. Referenced by resolvePropagation(), and SCIP_DECL_CONSPRESOL().
compares each constraint with all other constraints for possible redundancy and removes or changes constraint accordingly; in contrast to preprocessConstraintPairs(), it uses a hash table
Definition at line 3561 of file cons_xor.c. References applyFixings(), consdataSort(), HASHSIZE_XORCONS, MAX, NULL, preprocessConstraintPairs(), SCIP_CALL, SCIP_OKAY, SCIPcalcHashtableSize(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetPos(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsModifiable(), SCIPdelCons(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPhashtableInsert(), SCIPhashtableRetrieve(), SCIPupdateConsFlags(), and TRUE. Referenced by cliquePresolve(), and SCIP_DECL_CONSPRESOL().
compares constraint with all prior constraints for possible redundancy or aggregation, and removes or changes constraint accordingly
Definition at line 3676 of file cons_xor.c. References addCoef(), applyFixings(), consdataSort(), createConsXorIntvar(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPaddCons(), SCIPaggregateVars(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDynamic(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPdoNotAggr(), SCIPerrorMessage, SCIPfixVar(), SCIPisStopped(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarCompareActiveAndNegated(), SCIPvarGetName(), SCIPvarGetNegatedVar(), SCIPvarGetProbvar(), SCIPvarIsActive(), setIntvar(), and TRUE. Referenced by detectRedundantConstraints(), and SCIP_DECL_CONSPRESOL().
creates and captures a xor constraint x_0 xor ... xor x_{k-1} = rhs with a given artificial integer variable for the linear relaxation
Definition at line 4190 of file cons_xor.c. References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_LINCONSUPGD(), SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPerrorMessage, and SCIPfindConshdlr(). Referenced by preprocessConstraintPairs(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), and SCIP_DECL_LINCONSUPGD().
tries to upgrade a linear constraint into an xor constraint Assuming the only coefficients with an absolute value unequal to one is two in absolute value we can transform:
Definition at line 4264 of file cons_xor.c. References createConsXorIntvar(), FALSE, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSHDLRCOPY(), SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPaddVar(), SCIPaggregateVars(), SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateVar(), SCIPdebug, SCIPdebugMessage, SCIPdebugPrintCons, SCIPfeasFloor(), SCIPfloor(), SCIPfreeBufferArray, SCIPgetNegatedVar(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisIntegral(), SCIPisZero(), SCIPprintVar(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetAggrConstant(), SCIPvarGetAggrScalar(), SCIPvarGetAggrVar(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsBinary(), SCIPvarIsInitial(), and SCIPvarIsRemovable(). Referenced by createConsXorIntvar().
copy method for constraint handler plugins (called when SCIP copies plugins) Definition at line 4448 of file cons_xor.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSFREE(), SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrXor(), and TRUE. Referenced by SCIP_DECL_LINCONSUPGD().
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) Definition at line 4464 of file cons_xor.c. References conshdlrdataFree(), NULL, SCIP_CALL, SCIP_DECL_CONSEXITSOL(), SCIP_OKAY, SCIPconshdlrGetData(), and SCIPconshdlrSetData(). Referenced by SCIP_DECL_CONSHDLRCOPY().
solving process deinitialization method of constraint handler (called before branch and bound process data is freed) Definition at line 4481 of file cons_xor.c. References consdataFreeRows(), SCIP_CALL, SCIP_DECL_CONSDELETE(), SCIP_OKAY, and SCIPconsGetData(). Referenced by SCIP_DECL_CONSFREE().
frees specific constraint data Definition at line 4499 of file cons_xor.c. References consdataFree(), NULL, SCIP_CALL, SCIP_DECL_CONSTRANS(), SCIP_OKAY, and SCIPconshdlrGetData(). Referenced by SCIP_DECL_CONSEXITSOL().
transforms constraint data into data belonging to the transformed problem Definition at line 4514 of file cons_xor.c. References consdataCreate(), NULL, SCIP_CALL, SCIP_DECL_CONSINITLP(), SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), and SCIPcreateCons(). Referenced by SCIP_DECL_CONSDELETE().
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) Definition at line 4540 of file cons_xor.c. References addRelaxation(), SCIP_CALL, SCIP_DECL_CONSSEPALP(), SCIP_OKAY, and SCIPconsIsInitial(). Referenced by SCIP_DECL_CONSTRANS().
separation method of constraint handler for LP solutions Definition at line 4556 of file cons_xor.c. References NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSSEPASOL(), SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, SCIPconshdlrGetData(), and separateCons(). Referenced by SCIP_DECL_CONSINITLP().
separation method of constraint handler for arbitrary primal solutions Definition at line 4587 of file cons_xor.c. References NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSENFOLP(), SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, SCIPconshdlrGetData(), and separateCons(). Referenced by SCIP_DECL_CONSSEPALP().
constraint enforcing method of constraint handler for LP solutions Definition at line 4618 of file cons_xor.c. References checkCons(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSENFOPS(), SCIP_FEASIBLE, SCIP_OKAY, SCIP_SEPARATED, SCIPconshdlrGetData(), and separateCons(). Referenced by SCIP_DECL_CONSSEPASOL().
constraint enforcing method of constraint handler for pseudo solutions Definition at line 4655 of file cons_xor.c. References checkCons(), NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSCHECK(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, and TRUE. Referenced by SCIP_DECL_CONSENFOLP().
feasibility check method of constraint handler for integral solutions Definition at line 4678 of file cons_xor.c. References checkCons(), NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSPROP(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconsGetData(), SCIPgetSolVal(), SCIPinfoMessage(), and SCIPprintCons(). Referenced by SCIP_DECL_CONSENFOPS().
domain propagation method of constraint handler Definition at line 4729 of file cons_xor.c. References checkSystemGF2(), FALSE, NULL, propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSPRESOL(), SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconshdlrGetData(), SCIPgetDepth(), and SCIPinProbing(). Referenced by SCIP_DECL_CONSCHECK().
presolving method of constraint handler Definition at line 4779 of file cons_xor.c. References addExtendedAsymmetricFormulation(), addExtendedFlowFormulation(), applyFixings(), cliquePresolve(), detectRedundantConstraints(), FALSE, MINGAINPERNMINCOMPARISONS, NMINCOMPARISONS, NULL, preprocessConstraintPairs(), propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSRESPROP(), SCIP_DIDNOTFIND, SCIP_Longint, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_MEDIUM, SCIP_Real, SCIP_SUCCESS, SCIPaggregateVars(), SCIPblkmem(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelCons(), SCIPdoNotAggr(), SCIPisEQ(), SCIPisPresolveFinished(), SCIPisStopped(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), and TRUE. Referenced by SCIP_DECL_CONSPROP().
propagation conflict resolving method of constraint handler Definition at line 4980 of file cons_xor.c. References resolvePropagation(), SCIP_CALL, SCIP_DECL_CONSLOCK(), and SCIP_OKAY. Referenced by SCIP_DECL_CONSPRESOL().
variable rounding lock method of constraint handler Definition at line 4990 of file cons_xor.c. References NULL, SCIP_CALL, SCIP_DECL_CONSPRINT(), SCIP_OKAY, SCIPaddVarLocks(), and SCIPconsGetData(). Referenced by SCIP_DECL_CONSRESPROP().
constraint display method of constraint handler Definition at line 5016 of file cons_xor.c. References consdataPrint(), FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSCOPY(), SCIP_OKAY, and SCIPconsGetData(). Referenced by SCIP_DECL_CONSLOCK().
constraint copying method of constraint handler Definition at line 5029 of file cons_xor.c. References createConsXorIntvar(), NULL, SCIP_CALL, SCIP_DECL_CONSPARSE(), SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetRhsXor(), SCIPgetVarCopy(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and TRUE. Referenced by SCIP_DECL_CONSPRINT().
constraint parsing method of constraint handler Definition at line 5120 of file cons_xor.c. References createConsXorIntvar(), FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSGETVARS(), SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateConsXor(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPerrorMessage, SCIPfreeBufferArray, SCIPisEQ(), SCIPisZero(), SCIPparseVarName(), SCIPparseVarsList(), SCIPreallocBufferArray, SCIPstrToRealValue(), SCIPvarGetName(), and TRUE. Referenced by SCIP_DECL_CONSCOPY().
constraint method of constraint handler which returns the variables (if possible) Definition at line 5252 of file cons_xor.c. References BMScopyMemoryArray, FALSE, NULL, SCIP_DECL_CONSGETNVARS(), SCIP_OKAY, SCIPconsGetData(), and TRUE. Referenced by SCIP_DECL_CONSPARSE().
constraint method of constraint handler which returns the number of variable (if possible) Definition at line 5294 of file cons_xor.c. References NULL, SCIP_DECL_EVENTEXEC(), SCIP_OKAY, SCIPconsGetData(), and TRUE. Referenced by SCIP_DECL_CONSGETVARS().
Definition at line 5318 of file cons_xor.c. References FALSE, NULL, SCIP_OKAY, and SCIPincludeConshdlrXor(). Referenced by SCIP_DECL_CONSGETNVARS().
creates the handler for xor constraints and includes it in SCIP
Definition at line 5340 of file cons_xor.c. References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPROP, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PRESOLTIMING, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, conshdlrdataCreate(), DEFAULT_ADDEXTENDEDFORM, DEFAULT_ADDFLOWEXTENDED, DEFAULT_GAUSSPROPFREQ, DEFAULT_PRESOLPAIRWISE, DEFAULT_PRESOLUSEHASHING, DEFAULT_SEPARATEPARITY, EVENTHDLR_DESC, EVENTHDLR_NAME, LINCONSUPGD_PRIORITY, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddIntParam(), SCIPcreateConsXor(), SCIPfindConshdlr(), SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPincludeLinconsUpgrade(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrResprop(), SCIPsetConshdlrSepa(), SCIPsetConshdlrTrans(), and TRUE. Referenced by SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_EVENTEXEC(), and SCIPincludeDefaultPlugins().
creates and captures a xor constraint x_0 xor ... xor x_{k-1} = rhs
Definition at line 5424 of file cons_xor.c. References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPcreateCons(), SCIPcreateConsBasicXor(), SCIPerrorMessage, and SCIPfindConshdlr(). Referenced by CREATE_CONSTRAINT(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicXor(), SCIPincludeConshdlrXor(), and tryUpgradingXor().
creates and captures a xor constraint x_0 xor ... xor x_{k-1} = rhs with all constraint flags set to their default values
Definition at line 5482 of file cons_xor.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsXor(), SCIPgetNVarsXor(), and TRUE. Referenced by createMIP(), and SCIPcreateConsXor(). gets number of variables in xor constraint
Definition at line 5498 of file cons_xor.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsXor(). Referenced by SCIPcreateConsBasicXor(). gets array of variables in xor constraint
Definition at line 5519 of file cons_xor.c. References CONSHDLR_NAME, NULL, SCIP_Bool, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetRhsXor(). Referenced by SCIPgetNVarsXor(). gets the right hand side of the xor constraint
Definition at line 5540 of file cons_xor.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by SCIP_DECL_CONSCOPY(), and SCIPgetVarsXor(). |