44 #define CONSHDLR_NAME "superindicator" 45 #define CONSHDLR_DESC "constraint handler for indicator constraints over arbitrary constraint types" 46 #define CONSHDLR_SEPAPRIORITY 0 47 #define CONSHDLR_ENFOPRIORITY -5000000 48 #define CONSHDLR_CHECKPRIORITY -5000000 49 #define CONSHDLR_SEPAFREQ -1 50 #define CONSHDLR_PROPFREQ 1 51 #define CONSHDLR_EAGERFREQ 100 53 #define CONSHDLR_MAXPREROUNDS -1 55 #define CONSHDLR_DELAYSEPA FALSE 56 #define CONSHDLR_DELAYPROP FALSE 57 #define CONSHDLR_NEEDSCONS TRUE 59 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 60 #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM 62 #define DEFAULT_CHECKSLACKTYPE TRUE 63 #define DEFAULT_UPGDPRIOINDICATOR 1 64 #define DEFAULT_UPGDPRIOLINEAR 2 65 #define DEFAULT_MAXUPGDCOEFLINEAR 1e4 81 struct SCIP_ConshdlrData
86 int upgdprioindicator;
104 assert(scip != NULL);
108 (*consdata)->binvar = binvar;
109 (*consdata)->slackcons = slackcons;
129 assert((*consdata)->slackcons != NULL);
158 SCIPinfoMessage(scip, NULL,
"violation: binvar takes fractional value %.15g\n", binval);
164 else if( binval > 0.5 )
168 SCIP_CALL(
SCIPcheckCons(scip, consdata->slackcons, sol, checkintegrality, checklprows, printreason, result) );
172 SCIPinfoMessage(scip, NULL,
"violation: SCIPcheckCons() for slack constraint <%s> returns infeasible while binvar <%s> == 1\n",
185 assert(*result == testresultnotintegrality);
186 assert(*result == testresultnotlprows);
190 SCIPdebugMsg(scip,
"binvar <%s> == 1, sol=%p --> SCIPcheckCons() on constraint <%s> --> %s\n",
222 assert(scip != NULL);
223 assert(cons != NULL);
224 assert(minactivity != NULL);
225 assert(maxactivity != NULL);
226 assert(minabscoef != NULL);
238 ismininfinity =
FALSE;
239 ismaxinfinity =
FALSE;
244 for( i = nvars-1; i >= 0; i-- )
263 *minactivity += (val > 0.0) ? val * lb : val * ub;
266 *maxactivity += (val > 0.0) ? val * ub : val * lb;
269 if( val > 0.0 && val < *minabscoef )
271 else if( val < 0.0 && -val < *minabscoef )
272 *minabscoef = -vals[i];
306 assert(scip != NULL);
307 assert(cons != NULL);
308 assert(success != NULL);
309 assert(deleted != NULL);
318 assert(consdata != NULL);
326 if( conshdlr == NULL )
373 for( i = nvars-1; i >= 0; i-- )
374 negvals[i] = -vals[i];
431 assert(scip != NULL);
432 assert(cons != NULL);
433 assert(success != NULL);
434 assert(deleted != NULL);
443 assert(consdata != NULL);
445 slackcons = consdata->slackcons;
446 assert(slackcons != NULL);
456 if( conshdlr == NULL )
494 maxact - rhs > maxcoef)) ||
496 lhs - minact > maxcoef)) )
498 SCIPdebugMsg(scip,
"constraint <%s> not upgraded to a linear constraint due to large big-M coefficient\n",
512 assert(slackvars != NULL);
513 assert(slackvals != NULL);
515 for( i = nvars-1; i >= 0; i-- )
517 newvars[i] = slackvars[i];
518 newvals[i] = slackvals[i];
522 newvars[nvars] = consdata->binvar;
523 assert(newvars[nvars] != NULL);
539 newvals[nvars] = maxact - rhs;
570 newvals[nvars] = minact - lhs;
614 assert(scip != NULL);
615 assert(cons != NULL);
616 assert(success != NULL);
617 assert(deleted != NULL);
625 if( conshdlrdata->upgdprioindicator > conshdlrdata->upgdpriolinear )
627 assert(conshdlrdata->upgdprioindicator >= 0);
631 if( !*deleted && !*success && conshdlrdata->upgdpriolinear >= 0 )
637 else if( conshdlrdata->upgdpriolinear >= 0 )
641 if( !*deleted && !*success && conshdlrdata->upgdprioindicator >= 0 )
666 assert(scip != NULL);
667 assert(conshdlr != NULL);
668 assert(result != NULL);
677 SCIPdebugMsg(scip,
"executing enforcement callback for %s solution\n", sol == NULL ?
"LP" :
"relaxation");
687 for( i = nconss-1; i >= 0 && cont; i-- )
693 assert(consdata != NULL);
704 SCIPdebugMsg(scip,
"binvar <%s> == 1 locally --> SCIPenfolpCons() on constraint <%s>\n",
711 SCIPdebugMsg(scip,
"binvar <%s> == 1 locally --> SCIPenforelaxCons() on constraint <%s>\n",
788 assert(scip != NULL);
789 assert(conshdlr != NULL);
806 assert(conshdlr != NULL);
808 assert(scip != NULL);
810 SCIPdebugMsg(scip,
"freeing superindicator constraint handler data\n");
814 assert(conshdlrdata != NULL);
832 for( i = nconss-1; i >= 0; i-- )
835 assert(consdata != NULL);
848 assert(conshdlr != NULL);
850 assert(consdata != NULL);
851 assert(*consdata != NULL);
852 assert((*consdata)->slackcons != NULL);
879 assert(sourcedata != NULL);
900 assert(scip != NULL);
902 assert(infeasible != NULL);
908 for( c = nconss-1; c >= 0 && !(*infeasible); c-- )
914 assert(consdata != NULL);
921 SCIPdebugMsg(scip,
"binvar <%s> == 1 --> SCIPinitlpCons() on constraint <%s>\n",
937 assert(conshdlr != NULL);
939 assert(conss != NULL);
940 assert(result != NULL);
951 for( c = nusefulconss-1; c >= 0 && *result !=
SCIP_CUTOFF; c-- )
957 assert(consdata != NULL);
966 SCIPdebugMsg(scip,
"binvar <%s> == 1 --> SCIPsepalpCons() on constraint <%s>\n",
1006 *result = locresult;
1015 *result = locresult;
1025 *result = locresult;
1046 assert(conshdlr != NULL);
1048 assert(conss != NULL);
1049 assert(result != NULL);
1061 for( c = 0; c < nusefulconss && *result !=
SCIP_CUTOFF; ++c )
1067 assert(consdata != NULL);
1076 SCIPdebugMsg(scip,
"binvar <%s> == 0 --> SCIPsepasolCons() on constraint <%s>\n",
1090 *result = locresult;
1095 *result = locresult;
1101 *result = locresult;
1108 *result = locresult;
1116 *result = locresult;
1125 *result = locresult;
1135 *result = locresult;
1175 assert(scip != NULL);
1176 assert(conshdlr != NULL);
1177 assert(result != NULL);
1185 else if( objinfeasible )
1197 for( i = nconss-1; i >= 0 && cont; i-- )
1203 assert(consdata != NULL);
1212 SCIPdebugMsg(scip,
"binvar <%s> == 1 locally --> SCIPenfopsCons() on constraint <%s>\n",
1233 *result = locresult;
1240 *result = locresult;
1247 *result = locresult;
1256 *result = locresult;
1266 *result = locresult;
1277 *result = locresult;
1289 *result = locresult;
1308 assert(scip != NULL);
1309 assert(conshdlr != NULL);
1310 assert(result != NULL);
1311 assert(sol != NULL);
1315 for( i = nconss-1; i >= 0 && (*result ==
SCIP_FEASIBLE || completely); i-- )
1323 SCIPdebugMsg(scip,
"checked solution from <%s> (checkintegrality=%u, checklprows=%u) --> result=%d (%sfeasible)\n",
1336 assert(scip != NULL);
1337 assert(conshdlr != NULL);
1338 assert(result != NULL);
1345 for( i = nusefulconss-1; i >= 0 && *result !=
SCIP_CUTOFF; i-- )
1351 assert(consdata != NULL);
1360 SCIPdebugMsg(scip,
"binvar <%s> == 1 globally --> deleting superindicator and adding slack constraint <%s>\n",
1373 SCIPdebugMsg(scip,
"binvar <%s> == 1 locally --> propagating slack constraint <%s>\n",
1392 *result = locresult;
1397 *result = locresult;
1403 *result = locresult;
1410 *result = locresult;
1429 assert(scip != NULL);
1430 assert(conss != NULL);
1431 assert(conshdlr != NULL);
1437 for( i = nconss-1; i >= 0 && *result !=
SCIP_CUTOFF; i-- )
1443 assert(consdata != NULL);
1456 SCIPdebugMsg(scip,
"binvar <%s> == 1 globally --> deleting superindicator and adding slack constraint <%s>\n",
1483 if( deleted || success )
1496 *result = locresult;
1502 *result = locresult;
1518 assert(scip != NULL);
1519 assert(cons != NULL);
1520 assert(infervar != NULL);
1521 assert(bdchgidx != NULL);
1522 assert(result != NULL);
1527 assert(consdata != NULL);
1538 SCIP_CALL(
SCIPrespropCons(scip, consdata->slackcons, infervar, inferinfo, boundtype, bdchgidx, relaxedbd, result) );
1551 assert(scip != NULL);
1556 assert(consdata != NULL);
1576 assert(scip != NULL);
1577 assert(conshdlr != NULL);
1578 assert(cons != NULL);
1582 assert(consdata != NULL);
1585 binvar = consdata->binvar;
1586 assert(binvar != NULL);
1594 assert(binvar != NULL);
1604 assert(consdata->slackcons != NULL);
1619 const char* consname;
1621 assert(scip != NULL);
1622 assert(sourcescip != NULL);
1623 assert(sourcecons != NULL);
1637 SCIPwarningMessage(scip,
"cannot create modifiable superindicator constraint when trying to copy constraint <%s>\n",
1644 assert(sourceconsdata != NULL);
1647 sourceslackcons = sourceconsdata->slackcons;
1648 assert(sourceslackcons != NULL);
1653 SCIPdebugMsg(scip,
"slack constraint <%s> deleted; creating empty linear constraint\n",
1665 assert(conshdlrslack != NULL);
1676 assert(transslackcons != NULL);
1680 sourceconsdata->slackcons = transslackcons;
1681 sourceslackcons = transslackcons;
1696 sourcebinvar = sourceconsdata->binvar;
1697 assert(sourcebinvar != NULL);
1702 targetbinvar = NULL;
1707 assert(targetslackcons != NULL);
1708 assert(targetbinvar != NULL);
1709 assert(!modifiable);
1712 initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode) );
1716 if( targetslackcons != NULL )
1735 char binvarname[1024];
1736 const char* slackstr;
1740 assert(cons != NULL);
1741 assert(scip != NULL);
1742 assert(success != NULL);
1743 assert(str != NULL);
1744 assert(name != NULL);
1749 nargs = sscanf(str,
" <%1023[^>]>[B] = %d", binvarname, &zeroone);
1751 if( nargs != 2 || (zeroone != 0 && zeroone != 1) )
1759 slackstr = strstr(str,
"->");
1761 if( slackstr == NULL )
1768 slackstr = strstr(slackstr,
"[");
1770 if( slackstr == NULL )
1777 SCIPdebugMsg(scip,
"binvarname=%s, zeroone=%d, slackstr=%s\n", binvarname, zeroone, slackstr);
1781 if( binvar == NULL )
1801 SCIP_CALL(
SCIPparseCons(scip, &slackcons, slackstr, initial, separate, enforce, check, propagate, local, modifiable,
1802 dynamic, removable, stickingatnode, success) );
1806 assert(binvar != NULL);
1807 assert(slackcons != NULL);
1811 initial, separate, enforce, check, propagate, local, dynamic, removable, stickingatnode) );
1827 assert(consdata != NULL);
1835 vars[0] = consdata->binvar;
1851 assert(consdata != NULL);
1882 conshdlrdata->nrejects = 0;
1887 consEnfolpSuperindicator, consEnfopsSuperindicator, consCheckSuperindicator, consLockSuperindicator,
1890 assert(conshdlr != NULL);
1913 assert(root != NULL);
1920 SCIPdialogExecMenu, NULL, NULL,
1921 "change",
"change the problem",
TRUE, NULL) );
1937 SCIPdialogExecChangeMinUC, NULL, NULL,
1938 "minuc",
"transforms the current problem into a MinUC problem minimizing the number of unsatisfied constraints",
1947 "should type of slack constraint be checked when creating superindicator constraint?",
1952 "maximum big-M coefficient of binary variable in upgrade to a linear constraint (relative to smallest coefficient)",
1957 "priority for upgrading to an indicator constraint (-1: never)",
1962 "priority for upgrading to an indicator constraint (-1: never)",
2005 assert(scip != NULL);
2006 assert(cons != NULL);
2007 assert(name != NULL);
2008 assert(binvar != NULL);
2009 assert(slackcons != NULL);
2015 if( conshdlr == NULL )
2022 assert(conshdlrdata != NULL);
2025 if( conshdlrdata->checkslacktype &&
2047 if( conshdlrdata->nrejects < 5 )
2049 SCIPwarningMessage(scip,
"rejected creation of superindicator with slack constraint <%s> of type <%s> " 2050 "(use parameter <checkslacktype> to disable check)\n",
2052 conshdlrdata->nrejects++;
2055 if( conshdlrdata->nrejects == 5 )
2058 conshdlrdata->nrejects++;
2066 assert(consdata != NULL);
2069 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
2070 local, modifiable, dynamic, removable, stickingatnode) );
2091 assert(scip != NULL);
2092 assert(cons != NULL);
2093 assert(name != NULL);
2094 assert(binvar != NULL);
2095 assert(slackcons != NULL);
2109 assert(cons != NULL);
2121 assert(cons != NULL);
2152 assert(scip != NULL);
2153 assert(success != NULL);
2159 SCIPerrorMessage(
"method <SCIPtransformMinUC> can only be called in problem stage\n");
2173 for( i = nvars-1; i >= 0; i-- )
2187 for( i = 0; i < nconss; ++i )
2196 assert(cons != NULL);
2202 TRUE,
FALSE, NULL, NULL, NULL, NULL, NULL) );
2235 SCIPdebugMsg(scip,
"constraint <%s> of type <%s> could not be transformed to superindicator and was removed\n",
2254 if( ntransconss == nconss )
2292 SCIPdialogMessage(scip, NULL,
"some constraints could not be transformed to superindicator constraints and were removed\n");
2296 SCIPdialogMessage(scip, NULL,
"changed problem has %d variables (%d bin, %d int, %d impl, %d cont) and %d constraints\n",
2300 SCIPdialogMessage(scip, NULL,
"increased branching priority of new binary variables");
2315 SCIPdialogMessage(scip, NULL,
"problem has to be in problem stage to create MinUC problem\n");
SCIP_RETCODE SCIPrespropCons(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT *result)
enum SCIP_Result SCIP_RESULT
int SCIPgetNIntVars(SCIP *scip)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
#define DEFAULT_UPGDPRIOLINEAR
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
static SCIP_RETCODE upgradeIndicatorSuperindicator(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success, SCIP_Bool *deleted)
SCIP_RETCODE SCIPincludeDialogDefault(SCIP *scip)
#define DEFAULT_CHECKSLACKTYPE
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
static SCIP_DECL_CONSENFOPS(consEnfopsSuperindicator)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPaddDialogEntry(SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOG *subdialog)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
#define CONSHDLR_SEPAPRIORITY
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_CONSGETVARS(consGetVarsSuperindicator)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE upgradeSuperindicator(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success, SCIP_Bool *deleted)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
static SCIP_RETCODE extractLinearValues(SCIP *scip, SCIP_CONS *cons, SCIP_Real *minactivity, SCIP_Real *maxactivity, SCIP_Real *minabscoef)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
#define CONSHDLR_MAXPREROUNDS
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
constraint handler for indicator constraints
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
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 SCIPparseCons(SCIP *scip, SCIP_CONS **cons, const char *str, 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 *success)
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_CHECKPRIORITY
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_RETCODE SCIPtransformMinUC(SCIP *scip, SCIP_Bool *success)
constraint handler for indicator constraints over arbitrary constraint types
static SCIP_DECL_CONSSEPASOL(consSepasolSuperindicator)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
#define SCIPdebugMsgPrint
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
int SCIPgetNContVars(SCIP *scip)
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_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
static SCIP_DECL_CONSTRANS(consTransSuperindicator)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateConsSuperindicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *slackcons, 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)
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopySuperindicator)
static SCIP_DECL_CONSRESPROP(consRespropSuperindicator)
#define DEFAULT_MAXUPGDCOEFLINEAR
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPincludeDialog(SCIP *scip, SCIP_DIALOG **dialog, SCIP_DECL_DIALOGCOPY((*dialogcopy)), SCIP_DECL_DIALOGEXEC((*dialogexec)), SCIP_DECL_DIALOGDESC((*dialogdesc)), SCIP_DECL_DIALOGFREE((*dialogfree)), const char *name, const char *desc, SCIP_Bool issubmenu, SCIP_DIALOGDATA *dialogdata)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
static SCIP_DECL_CONSCHECK(consCheckSuperindicator)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
#define CONSHDLR_SEPAFREQ
const char * SCIPheurGetName(SCIP_HEUR *heur)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
static SCIP_DECL_CONSGETNVARS(consGetNVarsSuperindicator)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcheckCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_RESULT *result)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
#define CONSHDLR_ENFOPRIORITY
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPenforelaxCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool solinfeasible, SCIP_RESULT *result)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeMinUC)
SCIP_RETCODE SCIPtransformCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicSuperindicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, SCIP_CONS *slackcons)
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
struct SCIP_ConsData SCIP_CONSDATA
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
SCIP_RETCODE SCIPgetConsCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, 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 global, SCIP_Bool *valid)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
static SCIP_DECL_CONSENFOLP(consEnfolpSuperindicator)
static SCIP_DECL_CONSINITLP(consInitlpSuperindicator)
SCIP_RETCODE SCIPpropCons(SCIP *scip, SCIP_CONS *cons, SCIP_PROPTIMING proptiming, SCIP_RESULT *result)
#define SCIPallocBufferArray(scip, ptr, num)
#define DEFAULT_UPGDPRIOINDICATOR
SCIP_RETCODE SCIPsetConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_Bool local)
int SCIPgetNImplVars(SCIP *scip)
static SCIP_DECL_CONSPARSE(consParseSuperindicator)
static SCIP_RETCODE consdataCheckSuperindicator(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_RESULT *result)
int SCIPvarGetBranchPriority(SCIP_VAR *var)
SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)
static SCIP_DECL_CONSPROP(consPropSuperindicator)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
static SCIP_DECL_CONSCOPY(consCopySuperindicator)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
#define CONSHDLR_PROPFREQ
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_RETCODE SCIPsepasolCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_RESULT *result)
SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
#define CONSHDLR_DELAYPROP
SCIP_RETCODE SCIPenfolpCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool solinfeasible, SCIP_RESULT *result)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
Constraint handler for linear constraints in their most general form, .
static SCIP_DECL_CONSPRESOL(consPresolSuperindicator)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)
int SCIPgetNBinVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
static SCIP_DECL_CONSINITPRE(consInitpreSuperindicator)
static SCIP_DECL_CONSFREE(consFreeSuperindicator)
SCIP_RETCODE SCIPcreateConsIndicator(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *binvar, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real rhs, 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)
static SCIP_DECL_CONSLOCK(consLockSuperindicator)
SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)
static SCIP_DECL_CONSENFORELAX(consEnforelaxSuperindicator)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPenfopsCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT *result)
SCIP_RETCODE SCIPsepalpCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
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_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
static SCIP_DECL_CONSDELETE(consDeleteSuperindicator)
int SCIPgetNConss(SCIP *scip)
static SCIP_RETCODE consdataCreateSuperindicator(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_VAR *binvar, SCIP_CONS *slackcons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define CONSHDLR_DELAYSEPA
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_CONS * SCIPgetSlackConsSuperindicator(SCIP_CONS *cons)
#define CONSHDLR_PROP_TIMING
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
default user interface dialog
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_Bool solinfeasible, SCIP_RESULT *result)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
static SCIP_DECL_CONSPRINT(consPrintSuperindicator)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsLocks(SCIP *scip, SCIP_CONS *cons, int nlockspos, int nlocksneg)
static SCIP_RETCODE upgradeLinearSuperindicator(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success, SCIP_Bool *deleted)
SCIP_RETCODE SCIPreleaseDialog(SCIP *scip, SCIP_DIALOG **dialog)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_NEEDSCONS
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPincludeConshdlrSuperindicator(SCIP *scip)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
#define CONSHDLR_PRESOLTIMING
SCIP_RETCODE SCIPinitlpCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
static SCIP_DECL_CONSSEPALP(consSepalpSuperindicator)
SCIP_VAR * SCIPgetBinaryVarSuperindicator(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)