109#define CONSHDLR_NAME "SOS2"
110#define CONSHDLR_DESC "SOS2 constraint handler"
111#define CONSHDLR_SEPAPRIORITY 10
112#define CONSHDLR_ENFOPRIORITY 100
113#define CONSHDLR_CHECKPRIORITY -10
114#define CONSHDLR_SEPAFREQ 0
115#define CONSHDLR_PROPFREQ 1
116#define CONSHDLR_EAGERFREQ 100
118#define CONSHDLR_MAXPREROUNDS -1
119#define CONSHDLR_DELAYSEPA FALSE
120#define CONSHDLR_DELAYPROP FALSE
121#define CONSHDLR_NEEDSCONS TRUE
123#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
124#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST
127#define EVENTHDLR_NAME "SOS2"
128#define EVENTHDLR_DESC "bound change event handler for SOS2 constraints"
130#define EVENTHDLR_EVENT_TYPE (SCIP_EVENTTYPE_BOUNDCHANGED | SCIP_EVENTTYPE_GBDCHANGED)
145struct SCIP_ConshdlrData
180 SCIP_CALL(
SCIPcreateConsLinear(
scip, &cons,
"branch", 1, &
var, &val, 0.0, 0.0,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
232 *tightened = *tightened || tighten;
236 *tightened = *tightened || tighten;
295 assert( consdata->nvars <= consdata->maxvars );
297 if ( num > consdata->maxvars )
303 if ( reserveWeights )
305 consdata->maxvars = newsize;
307 assert( num <= consdata->maxvars );
345 assert( consdata->nfixednonzeros >= 0 );
347 ++consdata->nfixednonzeros;
354 if ( consdata->row !=
NULL )
390 if ( consdata->weights ==
NULL && consdata->maxvars > 0 )
409 assert( consdata->maxvars >= consdata->nvars+1 );
412 for (pos = 0; pos < consdata->nvars; ++pos)
414 if ( consdata->weights[pos] > weight )
420 for (j = consdata->nvars; j > pos; --j)
422 consdata->vars[j] = consdata->vars[j-1];
423 consdata->weights[j] = consdata->weights[j-1];
427 consdata->vars[pos] =
var;
428 consdata->weights[pos] = weight;
454 assert( consdata->nvars >= 0 );
467 if ( consdata->weights !=
NULL )
477 consdata->vars[consdata->nvars] =
var;
478 if ( consdata->weights !=
NULL )
480 if ( consdata->nvars > 0 )
481 consdata->weights[consdata->nvars] = consdata->weights[consdata->nvars-1] + 1.0;
483 consdata->weights[consdata->nvars] = 0.0;
515 for (j = pos; j < consdata->nvars-1; ++j)
517 consdata->vars[j] = consdata->vars[j+1];
518 if ( consdata->weights !=
NULL )
519 consdata->weights[j] = consdata->weights[j+1];
572 int lastFixedNonzero;
574 int localnremovedvars;
594 if( consdata->nvars <= 2 )
608 lastFixedNonzero = -1;
609 vars = consdata->vars;
610 lastzero = consdata->nvars;
611 localnremovedvars = 0;
614 for( j = consdata->nvars - 1; j >= 0; --j )
656 if( lastFixedNonzero != -1 && lastFixedNonzero != j + 1 )
658 SCIPdebugMsg(
scip,
"The problem is infeasible: two non-consecutive variables have bounds that keep them from being 0.\n");
664 if( nfixednonzeros > 2 )
666 SCIPdebugMsg(
scip,
"The problem is infeasible: more than two variables have bounds that keep them from being 0.\n");
671 if( lastFixedNonzero == -1)
672 lastFixedNonzero = j;
679 if( j == consdata->nvars - 1 )
689 else if( lastzero > j + 1 )
693 lastzero = consdata->nvars;
700 if( lastzero < consdata->
nvars )
704 for( j = lastzero; j >= 0; --j )
712 localnremovedvars += (lastzero + 1);
719 *nremovedvars += localnremovedvars;
722 if( lastFixedNonzero >= 0 )
724 lastFixedNonzero -= localnremovedvars;
725 assert(0 <= lastFixedNonzero && lastFixedNonzero < consdata->
nvars);
730 if( consdata->nvars <= 2 )
743 oldnfixedvars = *nfixedvars;
746 if ( nfixednonzeros == 1 )
748 assert(0 <= lastFixedNonzero && lastFixedNonzero < consdata->
nvars);
753 for( j = 0; j < lastFixedNonzero - 1; ++j )
767 for( j = lastFixedNonzero + 2; j < consdata->nvars; ++j )
782 if( *nfixedvars > oldnfixedvars )
786 else if ( nfixednonzeros == 2 )
788 assert(0 < lastFixedNonzero && lastFixedNonzero < consdata->
nvars);
796 for( j = 0; j < lastFixedNonzero - 1; ++j )
810 for( j = lastFixedNonzero + 1; j < consdata->nvars; ++j )
857 if ( consdata->nfixednonzeros > 2 )
859 SCIPdebugMsg(
scip,
"the node is infeasible, more than 2 variables are fixed to be nonzero.\n");
866 if ( consdata->nfixednonzeros == 1 )
872 int firstFixedNonzero;
876 firstFixedNonzero = -1;
877 nvars = consdata->nvars;
878 vars = consdata->vars;
882 for (j = 0; j <
nvars; ++j)
886 firstFixedNonzero = j;
890 assert( firstFixedNonzero >= 0 );
895 for (j = 0; j < firstFixedNonzero-1; ++j)
906 for (j = firstFixedNonzero+2; j <
nvars; ++j)
915 SCIPdebugMsg(
scip,
"the node is infeasible: variable <%s> is fixed nonzero and variable <%s> with distance at least 2 as well.\n",
927 else if ( consdata->nfixednonzeros == 2 )
934 int firstFixedNonzero;
938 firstFixedNonzero = -1;
939 nvars = consdata->nvars;
940 vars = consdata->vars;
944 for (j = 0; j <
nvars; ++j)
948 firstFixedNonzero = j;
952 assert( 0 <= firstFixedNonzero && firstFixedNonzero <
nvars-1 );
958 for (j = 0; j < firstFixedNonzero; ++j)
963 allVarFixed = allVarFixed && success;
969 for (j = firstFixedNonzero+2; j <
nvars; ++j)
978 SCIPdebugMsg(
scip,
"the node is infeasible: variable <%s> is fixed nonzero and variable <%s> with distance at least 2 as well.\n",
983 allVarFixed = allVarFixed && success;
999 if ( *ngen > ngenold )
1070 for (
c = 0;
c < nconss; ++
c)
1088 nvars = consdata->nvars;
1089 vars = consdata->vars;
1117 for (j = 0; j <
nvars; ++j)
1142 w = weight1/weight2;
1152 if ( cnt > maxNonzeros )
1170 nvars = consdata->nvars;
1171 vars = consdata->vars;
1182 for (j = 0; j < maxInd; ++j)
1192 for (j = 0; j < maxInd; ++j)
1201 for (j = maxInd+1; j <
nvars; ++j)
1210 for (j = maxInd+1; j <
nvars; ++j)
1265 nvars = consdata->nvars;
1266 vars = consdata->vars;
1270 for (j = 0; j <
nvars; ++j)
1306 lhs = minLb + minLb2;
1307 rhs = maxUb + maxUb2;
1323 consdata->row = row;
1384 for (
c = 0;
c < nconss; ++
c)
1396 if ( consdata->row !=
NULL )
1429 for (j = 0; j < (*consdata)->nvars; ++j)
1437 if ( (*consdata)->weights !=
NULL )
1443 if ( (*consdata)->row !=
NULL )
1482 assert( sourcedata->nvars > 0 );
1483 assert( sourcedata->nvars <= sourcedata->maxvars );
1488 consdata->nvars = sourcedata->nvars;
1489 consdata->maxvars = sourcedata->nvars;
1490 consdata->row =
NULL;
1491 consdata->nfixednonzeros = 0;
1495 if ( sourcedata->weights !=
NULL )
1500 consdata->weights =
NULL;
1502 for (j = 0; j < sourcedata->nvars; ++j)
1504 assert( sourcedata->vars[j] != 0 );
1509 ++(consdata->nfixednonzeros);
1522 for (j = 0; j < consdata->nvars; ++j)
1529 if ( consdata->nfixednonzeros > 0 )
1543 SCIPdebug(
int oldnfixedvars = *nfixedvars; )
1544 SCIPdebug(
int oldndelconss = *ndelconss; )
1559 if( nrounds == 0 || nnewfixedvars > 0 || nnewaggrvars > 0 || nnewchgcoefs > 0 )
1569 for (
c = 0;
c < nconss; ++
c)
1583 assert( consdata->nvars >= 0 );
1584 assert( consdata->nvars <= consdata->maxvars );
1600 (*nchgcoefs) += nremovedvars;
1603 *nfixedvars - oldnfixedvars, nremovedvars, *ndelconss - oldndelconss); )
1620 *infeasible =
FALSE;
1623 for (
c = 0;
c < nconss && !(*infeasible); ++
c)
1635 if ( consdata->row ==
NULL )
1672 for (
c = 0;
c < nconss && !
cutoff; ++
c)
1684 if ( consdata->row ==
NULL )
1690 row = consdata->row;
1704 else if ( ngen > 0 )
1729 for (
c = 0;
c < nconss && !
cutoff; ++
c)
1741 row = consdata->row;
1761 else if ( ngen > 0 )
1853 for (j = 0; j < consdata->nvars; ++j)
1858 if ( firstNonzero < 0 )
1863 if ( j > firstNonzero+1 )
1913 for (
c = 0;
c < nconss; ++
c)
1965 assert( 0 <= inferinfo && inferinfo < consdata->
nvars );
1966 var = consdata->vars[inferinfo];
2019 vars = consdata->vars;
2020 nvars = consdata->nvars;
2023 for (j = 0; j <
nvars; ++j)
2057 for (j = 0; j < consdata->nvars; ++j)
2062 if ( consdata->weights ==
NULL )
2080 const char* consname;
2104 nvars = sourceconsdata->nvars;
2108 if ( sourceconsdata->weights !=
NULL )
2114 sourcevars = sourceconsdata->vars;
2126 initial,
separate, enforce, check,
propagate, local, dynamic, removable, stickingatnode) );
2150 SCIP_CALL(
SCIPcreateConsSOS2(
scip, cons, name, 0,
NULL,
NULL, initial,
separate, enforce, check,
propagate, local, dynamic, removable, stickingatnode) );
2177 weight = strtod(s, &t);
2230 if( varssize < consdata->
nvars )
2253 (*nvars) = consdata->nvars;
2285 nconsvars = consdata->nvars;
2296 for(
i = 0;
i < nconsvars - 1; ++
i )
2301 for( j =
i; j <
i + 2; ++j )
2303 locvars[0] = consvars[j];
2360 nconsvars = consdata->nvars;
2371 for(
i = 0;
i < nconsvars - 1; ++
i )
2376 for( j =
i; j <
i + 2; ++j )
2378 locvars[0] = consvars[j];
2398 allownegation =
TRUE;
2424 for( k = 0; k < nlocvars; ++k )
2474 assert( 0 <= consdata->nfixednonzeros && consdata->nfixednonzeros <= consdata->nvars );
2480 switch ( eventtype )
2485 ++(consdata->nfixednonzeros);
2490 ++(consdata->nfixednonzeros);
2495 --(consdata->nfixednonzeros);
2500 --(consdata->nfixednonzeros);
2528 assert( 0 <= consdata->nfixednonzeros && consdata->nfixednonzeros <= consdata->nvars );
2531 oldbound, newbound, consdata->nfixednonzeros);
2550 conshdlrdata->eventhdlr =
NULL;
2553 eventExecSOS2,
NULL) );
2554 if ( conshdlrdata->eventhdlr ==
NULL )
2563 consEnfolpSOS2, consEnfopsSOS2, consCheckSOS2, consLockSOS2, conshdlrdata) );
2634 if ( conshdlr ==
NULL )
2645 for (v = 0; v <
nvars; ++v)
2652 consdata->vars =
NULL;
2653 consdata->nvars =
nvars;
2654 consdata->maxvars =
nvars;
2655 consdata->row =
NULL;
2656 consdata->nfixednonzeros = -1;
2657 consdata->weights =
NULL;
2663 if ( weights !=
NULL )
2676 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate, enforce, check,
propagate,
2677 local, modifiable, dynamic, removable, stickingatnode) );
2699 SCIP_CALL(
SCIPcreateConsSOS2(
scip, cons, name,
nvars,
vars, weights,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
FALSE,
FALSE,
FALSE,
FALSE) );
2766 return consdata->nvars;
2786 return consdata->vars;
2806 return consdata->weights;
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_PROP_TIMING
#define CONSHDLR_MAXPREROUNDS
#define CONSHDLR_SEPAPRIORITY
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PRESOLTIMING
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYSEPA
#define CONSHDLR_DELAYPROP
#define EVENTHDLR_EVENT_TYPE
static SCIP_RETCODE branchCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
Constraint handler for linear constraints in their most general form, .
static SCIP_RETCODE propSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_Bool *cutoff, int *ngen)
static SCIP_RETCODE handleNewVariableSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Bool transformed)
static SCIP_RETCODE deleteVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE presolRoundSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, SCIP_Bool *success, int *ndelconss, int *nfixedvars, int *nremovedvars)
static SCIP_RETCODE unlockVariableSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_RETCODE appendVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_RETCODE fixVariableZeroNode(SCIP *scip, SCIP_VAR *var, SCIP_NODE *node, SCIP_Bool *infeasible)
static SCIP_RETCODE inferVariableZero(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened, SCIP_Bool *success)
static SCIP_RETCODE generateRowSOS2(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool local)
static SCIP_RETCODE lockVariableSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
static SCIP_RETCODE addVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
static SCIP_RETCODE consdataEnsurevarsSizeSOS2(SCIP *scip, SCIP_CONSDATA *consdata, int num, SCIP_Bool reserveWeights)
static SCIP_RETCODE enforceSOS2(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_CONS **conss, SCIP_SOL *sol, SCIP_RESULT *result)
constraint handler for SOS type 2 constraints
#define SCIP_STRINGEQ(name, reference, retcode)
SCIP_Real * SCIPgetWeightsSOS2(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsSOS2(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPappendVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var)
int SCIPgetNVarsSOS2(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsSOS2(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPaddVarSOS2(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real weight)
SCIP_RETCODE SCIPcreateConsBasicSOS2(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *weights)
SCIP_RETCODE SCIPincludeConshdlrSOS2(SCIP *scip)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_Bool SCIPisTransformed(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_Real SCIPcalcNodeselPriority(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
SCIP_Real SCIPcalcChildEstimateIncrease(SCIP *scip, SCIP_VAR *var, SCIP_Real varsol, SCIP_Real targetvalue)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetSignedPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrGetPermsymGraph(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_RETCODE SCIPchgRowLhs(SCIP *scip, SCIP_ROW *row, SCIP_Real lhs)
SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_RETCODE SCIPchgRowRhs(SCIP *scip, SCIP_ROW *row, SCIP_Real rhs)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
void SCIPupdateSolConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
void SCIPsortRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPskipSpace(char **s)
SCIP_RETCODE SCIPaddSymgraphEdge(SCIP *scip, SYM_GRAPH *graph, int first, int second, SCIP_Bool hasval, SCIP_Real val)
SCIP_RETCODE SCIPaddSymgraphOpnode(SCIP *scip, SYM_GRAPH *graph, int op, int *nodeidx)
SCIP_RETCODE SCIPgetSymActiveVariables(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
SCIP_RETCODE SCIPaddSymgraphValnode(SCIP *scip, SYM_GRAPH *graph, SCIP_Real val, int *nodeidx)
int SCIPgetSymgraphVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
SCIP_RETCODE SCIPaddSymgraphConsnode(SCIP *scip, SYM_GRAPH *graph, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, int *nodeidx)
SCIP_RETCODE SCIPaddSymgraphVarAggregation(SCIP *scip, SYM_GRAPH *graph, int rootidx, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real constant)
int SCIPgetSymgraphNegatedVarnodeidx(SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
public methods for managing constraints
public methods for managing events
public methods for LP management
public methods for message output
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for problem variables
public methods for branching rule plugins and branching
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for cuts and aggregation rows
public methods for event handler plugins and event handlers
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for global and local (sub)problems
public methods for solutions
public methods for SCIP variables
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
structs for symmetry computations
methods for dealing with symmetry detection graphs
#define SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(x)
#define SCIP_DECL_CONSGETPERMSYMGRAPH(x)
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSDELETE(x)
struct SCIP_Cons SCIP_CONS
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSLOCK(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
#define SCIP_DECL_CONSCOPY(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_CONSSEPASOL(x)
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#define SCIP_EVENTTYPE_GUBCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_GLBCHANGED
#define SCIP_EVENTTYPE_LBTIGHTENED
#define SCIP_EVENTTYPE_UBRELAXED
@ SCIP_BRANCHDIR_DOWNWARDS
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SYM_CONSOPTYPE_SOS2_TUPLE
struct SCIP_Node SCIP_NODE
@ SCIP_VARSTATUS_MULTAGGR