Detailed Descriptionconstraint handler for SOS type 2 constraints A specially ordered set of type 2 (SOS2) is a sequence of variables such that at most two variables are nonzero and if two variables are nonzero they must be adjacent in the specified sequence. Note that it is in principle allowed that a variable appears twice, but it then can be fixed to 0 if it is at least two apart in the sequence. This constraint is useful when considering a piecewise affine approximation of a univariate (nonlinear) function : Let be points in and introduce variables . To evaluate at some point one can use the following constraints:
The value of can the be approximated as
To get a valid piecewise affine approximation, have to obey an SOS constraint of type 2. This implementation of this constraint handler is based on classical ideas, see e.g. The order of the variables is determined as follows:
Definition in file cons_sos2.c. #include <assert.h> #include "scip/cons_sos2.h" #include "scip/cons_linear.h" #include "scip/pub_misc.h" #include <string.h> #include <ctype.h> Go to the source code of this file.
Macro Definition Documentation
Definition at line 76 of file cons_sos2.c. Referenced by SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSEXITSOL(), SCIP_DECL_CONSFREE(), SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_CONSPRINT(), SCIP_DECL_CONSPROP(), SCIP_DECL_CONSRESPROP(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_CONSSEPASOL(), SCIP_DECL_CONSTRANS(), SCIPaddVarSOS2(), SCIPappendVarSOS2(), SCIPcreateConsSOS2(), SCIPgetNVarsSOS2(), SCIPgetVarsSOS2(), SCIPgetWeightsSOS2(), and SCIPincludeConshdlrSOS2().
Definition at line 77 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
priority of the constraint handler for separation Definition at line 78 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
priority of the constraint handler for constraint enforcing Definition at line 79 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
priority of the constraint handler for checking feasibility Definition at line 80 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
frequency for separating cuts; zero means to separate only in the root node Definition at line 81 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
frequency for propagating domains; zero means only preprocessing propagation Definition at line 82 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
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 83 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
maximal number of presolving rounds the constraint handler participates in (-1: no limit) Definition at line 86 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
should separation method be delayed, if other separators found cuts? Definition at line 87 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
should propagation method be delayed, if other propagators found reductions? Definition at line 88 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
should the constraint handler be skipped, if no constraints are available? Definition at line 89 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
Definition at line 91 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
Definition at line 92 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
Definition at line 95 of file cons_sos2.c. Referenced by SCIP_DECL_EVENTEXEC(), and SCIPincludeConshdlrSOS2().
Definition at line 96 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2(). Function Documentation
fix variable in given node to 0 or add constraint if variable is multi-aggregated
Definition at line 119 of file cons_sos2.c. References FALSE, inferVariableZero(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPaddConsNode(), SCIPchgVarLbNode(), SCIPchgVarUbNode(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPreleaseCons(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), and TRUE. Referenced by enforceSOS2().
fix variable in local node to 0, and return whether the operation was feasible
Definition at line 170 of file cons_sos2.c. References FALSE, lockVariableSOS2(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_MULTAGGR, SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPvarGetLbLocal(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), and TRUE. Referenced by fixVariableZeroNode(), and propSOS2().
add lock on variable
Definition at line 213 of file cons_sos2.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPlockVarCons(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and unlockVariableSOS2(). Referenced by handleNewVariableSOS2(), inferVariableZero(), and presolRoundSOS2().
Definition at line 232 of file cons_sos2.c. References consdataEnsurevarsSizeSOS2(), NULL, SCIP_CALL, SCIP_OKAY, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPunlockVarCons(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by deleteVarSOS2(), lockVariableSOS2(), and presolRoundSOS2().
ensures that the vars and weights array can store at least num entries
Definition at line 251 of file cons_sos2.c. References handleNewVariableSOS2(), NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addVarSOS2(), appendVarSOS2(), and unlockVariableSOS2().
handle new variable
Definition at line 279 of file cons_sos2.c. References addVarSOS2(), lockVariableSOS2(), NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIPaddVarToRow(), SCIPcatchVarEvent(), SCIPchgRowLhs(), SCIPchgRowRhs(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIProwGetLhs(), SCIProwGetRhs(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by addVarSOS2(), appendVarSOS2(), and consdataEnsurevarsSizeSOS2().
adds a variable to an SOS2 constraint, a position given by weight - ascending order
Definition at line 336 of file cons_sos2.c. References appendVarSOS2(), consdataEnsurevarsSizeSOS2(), handleNewVariableSOS2(), NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsTransformed(), SCIPerrorMessage, SCIPgetTransformedVar(), SCIPvarIsTransformed(), and TRUE. Referenced by handleNewVariableSOS2(), and SCIPaddVarSOS2().
appends a variable to an SOS2 constraint
Definition at line 404 of file cons_sos2.c. References consdataEnsurevarsSizeSOS2(), deleteVarSOS2(), FALSE, handleNewVariableSOS2(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsTransformed(), SCIPgetTransformedVar(), and SCIPvarIsTransformed(). Referenced by addVarSOS2(), and SCIPappendVarSOS2().
deletes a variable of an SOS2 constraint
Definition at line 448 of file cons_sos2.c. References NULL, presolRoundSOS2(), SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIPdropVarEvent(), and unlockVariableSOS2(). Referenced by appendVarSOS2(), and presolRoundSOS2().
perform one presolving round We perform the following presolving steps.
We currently do not handle the following:
Definition at line 508 of file cons_sos2.c. References deleteVarSOS2(), FALSE, lockVariableSOS2(), NULL, propSOS2(), SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIP_Real, SCIPcatchVarEvent(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelCons(), SCIPdropVarEvent(), SCIPfixVar(), SCIPgetProbvarSum(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), TRUE, and unlockVariableSOS2(). Referenced by deleteVarSOS2(), and SCIP_DECL_CONSPRESOL().
propagate variables
Definition at line 789 of file cons_sos2.c. References enforceSOS2(), FALSE, inferVariableZero(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelConsLocal(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPresetConsAge(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE. Referenced by enforceSOS2(), presolRoundSOS2(), and SCIP_DECL_CONSPROP().
enforcement method We check whether the current solution is feasible, i.e., contains at most one nonzero variable. If not, we branch along the lines indicated by Beale and Tomlin: We first compute and . Then we search for the index that satisfies
The branches are then
There is one special case that we have to consider: It can happen that is one too small. Example: . Then . This yields and hence the first branch does not change the solution. We therefore increase by one if . This is valid, since we know that (with respect to the original ); the corresponding branch will cut off the current solution, since .
Definition at line 987 of file cons_sos2.c. References branchCons(), fixVariableZeroNode(), generateRowSOS2(), NULL, propSOS2(), REALABS, SCIP_Bool, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIPcalcChildEstimate(), SCIPcalcNodeselPriority(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPcreateChild(), SCIPdebugMessage, SCIPfeasFloor(), SCIPgetSolVal(), SCIPisFeasZero(), SCIPresetConsAge(), and SCIPvarGetName(). Referenced by propSOS2(), SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFOPS().
Generate basic row We generate the row corresponding to the following simple valid inequalities. Let and be the largest and second largest upper bound of variables appearing in the constraint. Similarly let and be the smallest and second smallest lower bound. The inequalities are:
Of course, these inequalities are only added if the upper and lower bounds are all finite and or .
Definition at line 1190 of file cons_sos2.c. References FALSE, NULL, REALABS, SCIP_CALL, SCIP_DECL_CONSHDLRCOPY(), SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarsToRowSameCoef(), SCIPconsGetData(), SCIPconsGetName(), SCIPcreateEmptyRowCons(), SCIPdebug, SCIPinfinity(), SCIPisFeasZero(), SCIPisInfinity(), SCIPprintRow(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal(). Referenced by enforceSOS2(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
copy method for constraint handler plugins (called when SCIP copies plugins) Definition at line 1289 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSFREE(), SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrSOS2(), and TRUE. Referenced by generateRowSOS2().
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) Definition at line 1306 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_DECL_CONSEXITSOL(), SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPfreeMemory. Referenced by SCIP_DECL_CONSHDLRCOPY().
solving process deinitialization method of constraint handler (called before branch and bound process data is freed) Definition at line 1325 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSDELETE(), SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, and SCIPreleaseRow(). Referenced by SCIP_DECL_CONSFREE().
frees specific constraint data Definition at line 1357 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSTRANS(), SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPdebugMessage, SCIPdropVarEvent(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, and SCIPreleaseRow(). Referenced by SCIP_DECL_CONSEXITSOL().
transforms constraint data into data belonging to the transformed problem Definition at line 1406 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSPRESOL(), SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPcatchVarEvent(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPdebugMessage, SCIPduplicateBlockMemoryArray, SCIPgetTransformedVar(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPsnprintf(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by SCIP_DECL_CONSDELETE().
presolving method of constraint handler Definition at line 1489 of file cons_sos2.c. References CONSHDLR_NAME, NULL, presolRoundSOS2(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSINITLP(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SUCCESS, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsModifiable(), and SCIPdebugMessage. Referenced by SCIP_DECL_CONSTRANS().
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) Definition at line 1560 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, generateRowSOS2(), NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSSEPALP(), SCIP_OKAY, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebug, SCIPdebugMessage, SCIPisInfinity(), SCIPprintRow(), SCIProwGetLhs(), SCIProwGetRhs(), and SCIProwIsInLP(). Referenced by SCIP_DECL_CONSPRESOL().
separation method of constraint handler for LP solutions Definition at line 1605 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, generateRowSOS2(), NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSSEPASOL(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SEPARATED, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebug, SCIPdebugMessage, SCIPisCutEfficacious(), SCIPprintRow(), SCIPresetConsAge(), and SCIProwIsInLP(). Referenced by SCIP_DECL_CONSINITLP().
separation method of constraint handler for arbitrary primal solutions Definition at line 1661 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, generateRowSOS2(), NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSENFOLP(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SEPARATED, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebug, SCIPdebugMessage, SCIPisCutEfficacious(), SCIPprintRow(), SCIPresetConsAge(), and SCIProwIsInLP(). Referenced by SCIP_DECL_CONSSEPALP().
constraint enforcing method of constraint handler for LP solutions Definition at line 1717 of file cons_sos2.c. References CONSHDLR_NAME, enforceSOS2(), NULL, SCIP_CALL, SCIP_DECL_CONSENFOPS(), SCIP_OKAY, and SCIPconshdlrGetName(). Referenced by SCIP_DECL_CONSSEPASOL().
constraint enforcing method of constraint handler for pseudo solutions Definition at line 1733 of file cons_sos2.c. References CONSHDLR_NAME, enforceSOS2(), NULL, SCIP_CALL, SCIP_DECL_CONSCHECK(), SCIP_OKAY, and SCIPconshdlrGetName(). Referenced by SCIP_DECL_CONSENFOLP().
feasibility check method of constraint handler for integral solutions We simply check whether at most two variable are nonzero and in the case there are exactly two nonzero, then they have to be direct neighbors in the given solution. Definition at line 1754 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSPROP(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPgetSolVal(), SCIPinfoMessage(), SCIPisFeasZero(), SCIPprintCons(), SCIPresetConsAge(), and SCIPvarGetName(). Referenced by SCIP_DECL_CONSENFOPS().
domain propagation method of constraint handler Definition at line 1820 of file cons_sos2.c. References CONSHDLR_NAME, NULL, propSOS2(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSRESPROP(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, and SCIPisTransformed(). Referenced by SCIP_DECL_CONSCHECK().
propagation conflict resolving method of constraint handler We check which bound changes were the reason for infeasibility. We use that inferinfo stores the index of the variable that has bounds that fix it to be nonzero (these bounds are the reason). Definition at line 1869 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSLOCK(), SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPvarGetLbAtIndex(), and SCIPvarGetUbAtIndex(). Referenced by SCIP_DECL_CONSPROP().
variable rounding lock method of constraint handler Let lb and ub be the lower and upper bounds of a variable. Preprocessing usually makes sure that lb <= 0 <= ub.
Definition at line 1921 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSPRINT(), SCIP_OKAY, SCIPaddVarLocks(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by SCIP_DECL_CONSRESPROP().
constraint display method of constraint handler Definition at line 1961 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSCOPY(), SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), SCIPinfoMessage(), and SCIPwriteVarName(). Referenced by SCIP_DECL_CONSLOCK().
constraint copying method of constraint handler Definition at line 1991 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSPARSE(), SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPcreateConsSOS2(), SCIPdebugMessage, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetVarCopy(), and TRUE. Referenced by SCIP_DECL_CONSPRINT().
constraint parsing method of constraint handler Definition at line 2057 of file cons_sos2.c. References FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSGETVARS(), SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_MINIMAL, SCIPaddVarSOS2(), SCIPcreateConsSOS2(), SCIPparseVarName(), SCIPverbMessage(), and TRUE. Referenced by SCIP_DECL_CONSCOPY().
constraint method of constraint handler which returns the variables (if possible) Definition at line 2115 of file cons_sos2.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 variables (if possible) Definition at line 2138 of file cons_sos2.c. References NULL, SCIP_DECL_EVENTEXEC(), SCIP_OKAY, SCIPconsGetData(), and TRUE. Referenced by SCIP_DECL_CONSGETVARS().
Definition at line 2159 of file cons_sos2.c. References EVENTHDLR_NAME, NULL, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPerrorMessage, SCIPeventGetNewbound(), SCIPeventGetOldbound(), SCIPeventGetType(), SCIPeventGetVar(), SCIPeventhdlrGetName(), SCIPincludeConshdlrSOS2(), SCIPisFeasNegative(), SCIPisFeasPositive(), and SCIPvarGetName(). Referenced by SCIP_DECL_CONSGETNVARS().
creates the handler for SOS2 constraints and includes it in SCIP
Definition at line 2216 of file cons_sos2.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, EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocMemory, SCIPcreateConsSOS2(), SCIPerrorMessage, SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrResprop(), SCIPsetConshdlrSepa(), and SCIPsetConshdlrTrans(). Referenced by SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_EVENTEXEC(), and SCIPincludeDefaultPlugins().
creates and captures a SOS2 constraint We set the constraint to not be modifable. If the weights are non NULL, the variables are ordered according to these weights (in ascending order).
Definition at line 2270 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPcreateCons(), SCIPcreateConsBasicSOS2(), SCIPduplicateBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), and SCIPsortRealPtr(). Referenced by readSOS(), readSos(), readSOScons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicSOS2(), and SCIPincludeConshdlrSOS2().
creates and captures a SOS2 constraint with all constraint flags set to their default values.
Definition at line 2353 of file cons_sos2.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPaddVarSOS2(), SCIPcreateConsSOS2(), and TRUE. Referenced by SCIPcreateConsSOS2().
adds variable to SOS2 constraint, the position is determined by the given weight
Definition at line 2369 of file cons_sos2.c. References addVarSOS2(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPappendVarSOS2(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPerrorMessage, and SCIPvarGetName(). Referenced by readSOS(), readSos(), readSOScons(), SCIP_DECL_CONSPARSE(), and SCIPcreateConsBasicSOS2().
appends variable to SOS2 constraint
Definition at line 2395 of file cons_sos2.c. References appendVarSOS2(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPerrorMessage, SCIPgetNVarsSOS2(), and SCIPvarGetName(). Referenced by SCIPaddVarSOS2(). gets number of variables in SOS2 constraint
Definition at line 2420 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsSOS2(). Referenced by SCIP_DECL_READERWRITE(), SCIPappendVarSOS2(), SCIPwriteGms(), and SCIPwriteLp(). gets array of variables in SOS2 constraint
Definition at line 2445 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetWeightsSOS2(). Referenced by SCIP_DECL_READERWRITE(), SCIPgetNVarsSOS2(), SCIPwriteGms(), and SCIPwriteLp(). gets array of weights in SOS2 constraint (or NULL if not existent)
Definition at line 2470 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by SCIP_DECL_READERWRITE(), SCIPgetVarsSOS2(), and SCIPwriteLp(). |