All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 85 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
should separation method be delayed, if other separators found cuts? Definition at line 86 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
should propagation method be delayed, if other propagators found reductions? Definition at line 87 of file cons_sos2.c. Referenced by SCIPincludeConshdlrSOS2().
should presolving method be delayed, if other presolvers 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 94 of file cons_sos2.c. Referenced by SCIP_DECL_EVENTEXEC(), and SCIPincludeConshdlrSOS2().
Definition at line 95 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 118 of file cons_sos2.c. References FALSE, 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 169 of file cons_sos2.c. References FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_MULTAGGR, SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPvarGetLbLocal(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), and TRUE. Referenced by propSOS2().
add lock on variable
Definition at line 212 of file cons_sos2.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPlockVarCons(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by handleNewVariableSOS2(), and presolRoundSOS2().
Definition at line 231 of file cons_sos2.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPunlockVarCons(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal(). Referenced by deleteVarSOS2(), and presolRoundSOS2().
ensures that the vars and weights array can store at least num entries
Definition at line 250 of file cons_sos2.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addVarSOS2(), and appendVarSOS2().
handle new variable
Definition at line 278 of file cons_sos2.c. References 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(), and appendVarSOS2().
adds a variable to an SOS2 constraint, a position given by weight - ascending order
Definition at line 335 of file cons_sos2.c. References consdataEnsurevarsSizeSOS2(), handleNewVariableSOS2(), NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsTransformed(), SCIPerrorMessage, SCIPgetTransformedVar(), SCIPvarIsTransformed(), and TRUE. Referenced by SCIPaddVarSOS2().
appends a variable to an SOS2 constraint
Definition at line 403 of file cons_sos2.c. References consdataEnsurevarsSizeSOS2(), FALSE, handleNewVariableSOS2(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsTransformed(), SCIPgetTransformedVar(), and SCIPvarIsTransformed(). Referenced by SCIPappendVarSOS2().
deletes a variable of an SOS2 constraint
Definition at line 447 of file cons_sos2.c. References NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIPdropVarEvent(), and unlockVariableSOS2(). Referenced by presolRoundSOS2().
perform one presolving round We perform the following presolving steps.
We currently do not handle the following:
Definition at line 507 of file cons_sos2.c. References deleteVarSOS2(), FALSE, lockVariableSOS2(), NULL, 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 SCIP_DECL_CONSPRESOL().
propagate variables
Definition at line 788 of file cons_sos2.c. References FALSE, inferVariableZero(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelConsLocal(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPresetConsAge(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE. Referenced by enforceSOS2(), 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 984 of file cons_sos2.c. References branchCons(), fixVariableZeroNode(), 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 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 1187 of file cons_sos2.c. References FALSE, NULL, REALABS, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarsToRowSameCoef(), SCIPconsGetData(), SCIPconsGetName(), SCIPcreateEmptyRowCons(), SCIPdebug, SCIPinfinity(), SCIPisFeasZero(), SCIPisInfinity(), SCIPprintRow(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal(). Referenced by SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
copy method for constraint handler plugins (called when SCIP copies plugins) Definition at line 1286 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrSOS2(), and TRUE.
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) Definition at line 1303 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPfreeMemory.
solving process deinitialization method of constraint handler (called before branch and bound process data is freed) Definition at line 1322 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, and SCIPreleaseRow().
frees specific constraint data Definition at line 1354 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_OKAY, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsTransformed(), SCIPdebugMessage, SCIPdropVarEvent(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, and SCIPreleaseRow().
transforms constraint data into data belonging to the transformed problem Definition at line 1403 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, 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().
presolving method of constraint handler Definition at line 1486 of file cons_sos2.c. References CONSHDLR_NAME, NULL, presolRoundSOS2(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SUCCESS, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsModifiable(), and SCIPdebugMessage.
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) Definition at line 1557 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, generateRowSOS2(), NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebug, SCIPdebugMessage, SCIPisInfinity(), SCIPprintRow(), SCIProwGetLhs(), SCIProwGetRhs(), and SCIProwIsInLP().
separation method of constraint handler for LP solutions Definition at line 1602 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, generateRowSOS2(), NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SEPARATED, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebug, SCIPdebugMessage, SCIPisCutEfficacious(), SCIPprintRow(), SCIPresetConsAge(), and SCIProwIsInLP().
separation method of constraint handler for arbitrary primal solutions Definition at line 1658 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, generateRowSOS2(), NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SEPARATED, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebug, SCIPdebugMessage, SCIPisCutEfficacious(), SCIPprintRow(), SCIPresetConsAge(), and SCIProwIsInLP().
constraint enforcing method of constraint handler for LP solutions Definition at line 1714 of file cons_sos2.c. References CONSHDLR_NAME, enforceSOS2(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconshdlrGetName().
constraint enforcing method of constraint handler for pseudo solutions Definition at line 1730 of file cons_sos2.c. References CONSHDLR_NAME, enforceSOS2(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconshdlrGetName().
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 1751 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPgetSolVal(), SCIPinfoMessage(), SCIPisFeasZero(), SCIPprintCons(), SCIPresetConsAge(), and SCIPvarGetName().
domain propagation method of constraint handler Definition at line 1817 of file cons_sos2.c. References CONSHDLR_NAME, NULL, propSOS2(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, and SCIPisTransformed().
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 1867 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPvarGetLbAtIndex(), and SCIPvarGetUbAtIndex().
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 1919 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocks(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
constraint display method of constraint handler Definition at line 1959 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), SCIPinfoMessage(), and SCIPwriteVarName().
constraint copying method of constraint handler Definition at line 1989 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPcreateConsSOS2(), SCIPdebugMessage, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetVarCopy(), and TRUE.
constraint parsing method of constraint handler Definition at line 2055 of file cons_sos2.c. References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_MINIMAL, SCIPaddVarSOS2(), SCIPcreateConsSOS2(), SCIPparseVarName(), SCIPverbMessage(), and TRUE.
constraint method of constraint handler which returns the variables (if possible) Definition at line 2113 of file cons_sos2.c. References BMScopyMemoryArray, FALSE, NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
constraint method of constraint handler which returns the number of variables (if possible) Definition at line 2136 of file cons_sos2.c. References NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
Definition at line 2157 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(), SCIPisFeasNegative(), SCIPisFeasPositive(), and SCIPvarGetName().
creates the handler for SOS2 constraints and includes it in SCIP
Definition at line 2214 of file cons_sos2.c. References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPRESOL, CONSHDLR_DELAYPROP, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocMemory, SCIPerrorMessage, SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrResprop(), SCIPsetConshdlrSepa(), and SCIPsetConshdlrTrans(). Referenced by SCIP_DECL_CONSHDLRCOPY(), 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 2268 of file cons_sos2.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPcreateCons(), SCIPduplicateBlockMemoryArray, SCIPerrorMessage, SCIPfindConshdlr(), and SCIPsortRealPtr(). Referenced by readSOS(), readSos(), readSOScons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), and SCIPcreateConsBasicSOS2().
creates and captures a SOS2 constraint with all constraint flags set to their default values.
Definition at line 2351 of file cons_sos2.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsSOS2(), and TRUE.
adds variable to SOS2 constraint, the position is determined by the given weight
Definition at line 2367 of file cons_sos2.c. References addVarSOS2(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPerrorMessage, and SCIPvarGetName(). Referenced by readSOS(), readSos(), readSOScons(), and SCIP_DECL_CONSPARSE().
appends variable to SOS2 constraint
Definition at line 2393 of file cons_sos2.c. References appendVarSOS2(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPerrorMessage, and SCIPvarGetName(). gets number of variables in SOS2 constraint
Definition at line 2418 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by SCIP_DECL_READERWRITE(), SCIPwriteGms(), and SCIPwriteLp(). gets array of variables in SOS2 constraint
Definition at line 2443 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by SCIP_DECL_READERWRITE(), SCIPwriteGms(), and SCIPwriteLp(). gets array of weights in SOS2 constraint (or NULL if not existent)
Definition at line 2468 of file cons_sos2.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by SCIP_DECL_READERWRITE(), and SCIPwriteLp(). |