81typedef SCIP_Longint
Int;
85#define CONSHDLR_NAME "countsols"
86#define CONSHDLR_DESC "constraint to count feasible solutions"
87#define CONSHDLR_ENFOPRIORITY -9999999
88#define CONSHDLR_CHECKPRIORITY -9999999
89#define CONSHDLR_EAGERFREQ 100
91#define CONSHDLR_NEEDSCONS FALSE
94#define DEFAULT_SPARSETEST TRUE
95#define DEFAULT_DISCARDSOLS TRUE
96#define DEFAULT_ACTIVE FALSE
97#define DEFAULT_COLLECT FALSE
98#define DEFAULT_SOLLIMIT -1LL
101#define DISP_SOLS_NAME "sols"
102#define DISP_SOLS_DESC "number of detected feasible solutions"
103#define DISP_SOLS_HEADER " sols "
104#define DISP_SOLS_WIDTH 7
105#define DISP_SOLS_PRIORITY 110000
106#define DISP_SOLS_POSITION 100000
107#define DISP_SOLS_STRIPLINE TRUE
109#define DISP_CUTS_NAME "feasST"
110#define DISP_CUTS_DESC "number of detected non trivial feasible subtrees"
111#define DISP_CUTS_HEADER "feasST"
112#define DISP_CUTS_WIDTH 6
113#define DISP_CUTS_PRIORITY 110000
114#define DISP_CUTS_POSITION 110000
115#define DISP_CUTS_STRIPLINE TRUE
124#define CUTOFF_CONSTRAINT(x) SCIP_RETCODE x (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLRDATA* conshdlrdata)
128struct SCIP_ConshdlrData
141 SCIP_Longint sollimit;
143 SCIP_Bool discardsols;
144 SCIP_Bool sparsetest;
155 SCIP_Bool continuous;
196 SCIP_Longint exponent
246 (*value) += (*summand);
332 (*conshdlrdata)->feasST = 0;
333 (*conshdlrdata)->nDiscardSols = 0;
334 (*conshdlrdata)->nNonSparseSols = 0;
335 (*conshdlrdata)->solutions =
NULL;
336 (*conshdlrdata)->nsolutions = 0;
337 (*conshdlrdata)->ssolutions = 0;
341 (*conshdlrdata)->cutoffSolution =
NULL;
342 (*conshdlrdata)->warning =
FALSE;
343 (*conshdlrdata)->hashmap =
NULL;
344 (*conshdlrdata)->allvars =
NULL;
345 (*conshdlrdata)->vars =
NULL;
346 (*conshdlrdata)->nallvars = 0;
347 (*conshdlrdata)->nvars = 0;
348 (*conshdlrdata)->continuous =
FALSE;
367 conshdlrdata->active =
FALSE;
385 conshdlrdata->active =
TRUE;
388#define checkSolutionOrig(scip, sol, conshdlrdata)
420 "At least one heuristic is not turned off! Heuristic solutions are currently not accepted while couting.\n");
474 vars = conshdlrdata->vars;
475 nvars = conshdlrdata->nvars;
480 for( v = 0; v <
nvars; ++v )
536 vars = conshdlrdata->vars;
537 nvars = conshdlrdata->nvars;
539 nconsvars =
nvars * 2;
549 for( v =
nvars - 1; v >= 0; --v )
564 bounds[nconsvars] = 1;
569 bounds[nconsvars] = 0;
589 bounds[nconsvars] = lb + 1.0;
594 bounds[nconsvars] = ub - 1.0;
600 consvars[nconsvars] =
var;
607 consvars[nconsvars] =
var;
616 for( v =
nbinvars - 1; v >= 0; --v )
631 nconsvars, consvars, boundtypes, bounds,
656 SCIP_Longint* lbvalues;
657 SCIP_Longint* ubvalues;
666 if( conshdlrdata->nsolutions == conshdlrdata->ssolutions )
668 if( conshdlrdata->ssolutions == 0 )
670 conshdlrdata->ssolutions = 100;
676 conshdlrdata->ssolutions *= 2;
680 assert( conshdlrdata->nsolutions < conshdlrdata->ssolutions );
683 nvars = conshdlrdata->nvars;
685 SCIPdebugMsg(
scip,
"creating solution number %d\n", conshdlrdata->nsolutions);
696 for( v =
nvars - 1; v >= 0; --v )
700 var = conshdlrdata->vars[v];
711 ubvalues[v] = lbvalues[v];
718 conshdlrdata->solutions[conshdlrdata->nsolutions] =
solution;
719 conshdlrdata->nsolutions++;
755 SCIPdebugMsg(
scip,
"counts number of solutions represented through the given one\n");
780 SCIP_Real scalar = 1.0;
781 SCIP_Real constant = 0.0;
785 for( v = 0; v <
nvars; ++v )
815 conshdlrdata->feasST++;
817 if( conshdlrdata->collect )
825 else if(!conshdlrdata->discardsols)
828 addOne(&conshdlrdata->nsols);
829 conshdlrdata->nNonSparseSols++;
830 if( conshdlrdata->collect )
836 conshdlrdata->nDiscardSols++;
876 for( ;
c >= 0 && nconss > 0 && (*satisfied); --
c )
902 (*satisfied) =
FALSE;
931 SCIP_Longint* weights;
932 SCIP_Longint capacity;
951 for( ;
c >= 0 && nconss > 0 && (*satisfied); --
c )
967 capa = capacity + 0.1;
969 for( v =
nvars - 1; v >= 0 &&
capa >= 0 ; --v )
985 else if( weights[v] >= 1 )
998 (*satisfied) =
FALSE;
1041 (*satisfied) =
TRUE;
1044 for( ;
c >= 0 && nconss > 0 && (*satisfied); --
c )
1076 (*satisfied) =
FALSE;
1120 (*satisfied) =
TRUE;
1123 for( ;
c >= 0 && nconss > 0 && (*satisfied); --
c )
1151 (*satisfied) =
FALSE;
1195 for(
h = nconshdlrs ;
h >= 0 ; --
h )
1197 conshdlr = conshdlrs[
h];
1236 SCIPdebugMsg(
scip,
"a <bounddisjunction> constraint cannot be disabled\n");
1251 SCIPdebugMsg(
scip,
"sparse solution is infeasible since the following constraint (and maybe more) is(/are) enabled\n");
1313 for( v = 0; v <
nvars; ++v )
1316 SCIPdebugMsg(
scip,
"variables <%s> Local Bounds are [%g,%g] Global Bounds are [%g,%g]\n",
1328 addOne(&conshdlrdata->nsols);
1329 conshdlrdata->nNonSparseSols++;
1333 if( conshdlrdata->collect )
1341 if( conshdlrdata->continuous )
1349 else if( conshdlrdata->sparsetest )
1359 if( conshdlrdata->sollimit > -1 && (!
valid || conshdlrdata->sollimit <= nsols) )
1391 if( conshdlrdata->active )
1408#define consCopyCountsols NULL
1424 freeInt(&conshdlrdata->nsols);
1427 assert( conshdlrdata->nsolutions == 0 );
1428 assert( conshdlrdata->ssolutions == 0 );
1449 conshdlrdata->feasST = 0;
1450 conshdlrdata->nDiscardSols = 0;
1451 conshdlrdata->nNonSparseSols = 0;
1454 conshdlrdata->solutions =
NULL;
1455 conshdlrdata->nsolutions = 0;
1456 conshdlrdata->ssolutions = 0;
1458 if( conshdlrdata->active )
1483 assert(conshdlrdata->allvars[nallvars] !=
NULL);
1497 assert(nallvars == conshdlrdata->nallvars);
1521 for( v = conshdlrdata->nvars - 1; v >= 0; --v )
1526 if( conshdlrdata->hashmap !=
NULL)
1534 conshdlrdata->nvars = 0;
1536 if( conshdlrdata->allvars !=
NULL )
1539 for( v = 0; v < conshdlrdata->nallvars; ++v )
1551 conshdlrdata->nallvars = 0;
1554 if( conshdlrdata->nsolutions > 0 )
1556 for( s = conshdlrdata->nsolutions - 1; s >= 0 ; --s )
1562 conshdlrdata->nsolutions = 0;
1563 conshdlrdata->ssolutions = 0;
1567 conshdlrdata->continuous =
FALSE;
1570 assert( conshdlrdata->nsolutions == 0 );
1571 assert( conshdlrdata->ssolutions == 0 );
1593 if( conshdlrdata->active )
1598 assert(conshdlrdata->nsolutions == 0);
1605 for( v = conshdlrdata->nvars - 1; v >= 0; --v )
1608 SCIP_Real scalar = 1.0;
1609 SCIP_Real constant = 0.0;
1619 conshdlrdata->nvars = v + 1;
1625 for( v = conshdlrdata->nvars - 1; v >= 0; --v )
1628 SCIP_Real scalar = 1.0;
1629 SCIP_Real constant = 0.0;
1649 for( v = conshdlrdata->nvars - 1; v >= 0; --v )
1680 if( conshdlrdata->active && restart )
1682 SCIPerrorMessage(
"When collecting and counting solutions restarts need to be disabled (presolving/maxrestarts = 0).\n");
1705 if( conshdlrdata->active )
1733 SCIPdebugMsg(
scip,
"method SCIP_DECL_CONSENFORELAX(consEnfolpCountsols)\n");
1742 if( conshdlrdata->active )
1774 if( conshdlrdata->active )
1810 if( conshdlrdata->active )
1812 if( !conshdlrdata->warning )
1814 SCIPwarningMessage(
scip,
"a solution comes in over <SCIP_DECL_CONSCHECK(consCheckCountsols)>; currently these solutions are ignored.\n");
1815 conshdlrdata->warning =
TRUE;
1847 if ( usesymmetry != 0 )
1856 else if ( usesymmetry == 2 )
1864 SCIPerrorMessage(
"Symmetry handling and solution counting are not compatible. " \
1865 "You might want to disable symmetry by setting parameter <misc/usesymmetry> to 0.\n");
1870 SCIPwarningMessage(
scip,
"Symmetry handling has been deactivated since it is not compatible with counting.\n");
1967 if ( usesymmetry != 0 )
1976 else if ( usesymmetry == 2 )
1984 SCIPerrorMessage(
"Symmetry handling and solution counting are not compatible. " \
1985 "You might want to disable symmetry by setting parameter <misc/usesymmetry> to 0.\n");
1990 SCIPwarningMessage(
scip,
"Symmetry handling has been deactivated since it is not compatible with counting.\n");
2026 "Problem contains continuous variables (after presolving). Counting projection to integral variables!\n");
2203 for( s = 0; s < nsols; ++s )
2224 for( v = 0; v < nallvars; ++v )
2233 vars[0] = allvars[v];
2350 else if( nsols == 0 )
2356 SCIPdialogMessage(
scip,
NULL,
"there is no solution collect (set parameter <constraints/countsols/collect> to TRUE)\n");
2373 if( filename[0] !=
'\0' )
2375 file =
fopen(filename,
"w");
2394 nvars = conshdlrdata->nvars;
2440 assert(transvar == allvars[v]);
2499 "count",
"count number of feasible solutions",
FALSE,
NULL) );
2508 "countpresolve",
"presolve instance before counting number of feasible solutions",
FALSE,
NULL) );
2525 "allsolutions",
"write all counted primal solutions to file",
FALSE,
NULL) );
2638 "is the constraint handler active?",
2642 "should the sparse solution test be turned on?",
2646 "is it allowed to discard solutions?",
2650 "should the solutions be collected?",
2654 "counting stops, if the given number of solutions were found (-1: no limit)",
2775 toString(conshdlrdata->nsols, buffer, buffersize);
2777 if( conshdlrdata->nsols <
pow(10.0, (
double)buffersize) )
2779 toString(conshdlrdata->nsols, buffer, buffersize);
2805 return conshdlrdata->feasST;
2837 *
vars = conshdlrdata->vars;
2838 *
nvars = conshdlrdata->nvars;
2839 *sols = conshdlrdata->solutions;
2840 *nsols = conshdlrdata->nsolutions;
static GRAPHNODE ** active
constraint handler for bound disjunction constraints
#define DISP_SOLS_STRIPLINE
static SCIP_Longint getNCountedSols(Int value, SCIP_Bool *valid)
#define CONSHDLR_NEEDSCONS
static SCIP_RETCODE createCountDialog(SCIP *scip)
#define DEFAULT_DISCARDSOLS
#define CONSHDLR_CHECKPRIORITY
static void toString(Int value, char **buffer, int buffersize)
#define DISP_SOLS_PRIORITY
static SCIP_RETCODE checkFeasSubtree(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible)
#define DISP_CUTS_POSITION
static SCIP_RETCODE writeExpandedSolutions(SCIP *scip, FILE *file, SCIP_VAR **allvars, int nallvars, SCIP_VAR **activevars, int nactivevars, SCIP_HASHMAP *hashmap, SCIP_SPARSESOL **sols, int nsols)
static SCIP_RETCODE checkLogicor(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_Bool *satisfied)
static void multInt(Int *value, SCIP_Longint factor)
static void addInt(Int *value, Int *summand)
static SCIP_RETCODE checkSolution(SCIP *scip, SCIP_SOL *sol, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_RESULT *result)
#define CUTOFF_CONSTRAINT(x)
static SCIP_RETCODE collectSolution(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_SOL *sol)
#define DEFAULT_SPARSETEST
static void setInt(Int *value, SCIP_Longint newvalue)
static SCIP_RETCODE checkParameters(SCIP *scip)
static void checkSolutionOrig(SCIP *scip, SCIP_SOL *sol, SCIP_CONSHDLRDATA *conshdlrdata)
static void allocInt(Int *value)
#define DISP_CUTS_PRIORITY
static void addOne(Int *value)
static void freeInt(Int *value)
static SCIP_RETCODE checkVarbound(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_Bool *satisfied)
#define DISP_CUTS_STRIPLINE
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static void setPowerOfTwo(Int *value, SCIP_Longint exponent)
static SCIP_RETCODE includeConshdlrCountsols(SCIP *scip, SCIP_Bool dialogs)
#define CONSHDLR_EAGERFREQ
static SCIP_Bool varIsUnfixedLocal(SCIP_VAR *var)
static SCIP_RETCODE checkBounddisjunction(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_Bool *satisfied)
#define CONSHDLR_ENFOPRIORITY
static SCIP_RETCODE checkKnapsack(SCIP *scip, SCIP_CONSHDLR *conshdlr, int nconss, SCIP_Bool *satisfied)
#define consCopyCountsols
static SCIP_RETCODE countSparseSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool feasible, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_RESULT *result)
#define DISP_SOLS_POSITION
Constraint handler for counting feasible solutions.
Constraint handler for knapsack constraints of the form , x binary and .
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
Constraint handler for the set partitioning / packing / covering constraints .
Constraint handler for variable bound constraints .
#define SCIP_CALL_FINALLY(x, y)
default user interface dialog
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_Real * SCIPgetBoundsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
void SCIPgetNCountedSolsstr(SCIP *scip, char **buffer, int buffersize, int *requiredsize)
SCIP_RETCODE SCIPcreateConsBounddisjunction(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_BOUNDTYPE *boundtypes, SCIP_Real *bounds, 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)
int SCIPgetNVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_BOUNDTYPE * SCIPgetBoundtypesBounddisjunction(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Longint SCIPgetNCountedSols(SCIP *scip, SCIP_Bool *valid)
SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_Longint SCIPgetNCountedFeasSubtrees(SCIP *scip)
SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsSetcover(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, 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 SCIPsetParamsCountsols(SCIP *scip)
SCIP_VAR ** SCIPgetVarsBounddisjunction(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcount(SCIP *scip)
void SCIPgetCountedSparseSols(SCIP *scip, SCIP_VAR ***vars, int *nvars, SCIP_SPARSESOL ***sols, int *nsols)
SCIP_RETCODE SCIPincludeConshdlrCountsols(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_VAR ** SCIPgetOrigVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNOrigVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
void SCIPprintError(SCIP_RETCODE retcode)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPunfixParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetEmphasis(SCIP *scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)
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)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPgetPseudoBranchCands(SCIP *scip, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
int SCIPgetNPseudoBranchCands(SCIP *scip)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
int SCIPgetNConshdlrs(SCIP *scip)
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)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNEnabledConss(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 SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLR ** SCIPgetConshdlrs(SCIP *scip)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
void SCIPdialoghdlrClearBuffer(SCIP_DIALOGHDLR *dialoghdlr)
SCIP_RETCODE SCIPreleaseDialog(SCIP *scip, SCIP_DIALOG **dialog)
SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)
SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)
SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)
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 SCIPaddDialogEntry(SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOG *subdialog)
SCIP_RETCODE SCIPdialoghdlrGetWord(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *prompt, char **inputword, SCIP_Bool *endoffile)
SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)
int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)
void SCIPdispLongint(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Longint val, int width)
const char * SCIPdispGetName(SCIP_DISP *disp)
SCIP_RETCODE SCIPincludeDisp(SCIP *scip, const char *name, const char *desc, const char *header, SCIP_DISPSTATUS dispstatus, SCIP_DECL_DISPCOPY((*dispcopy)), SCIP_DECL_DISPFREE((*dispfree)), SCIP_DECL_DISPINIT((*dispinit)), SCIP_DECL_DISPEXIT((*dispexit)), SCIP_DECL_DISPINITSOL((*dispinitsol)), SCIP_DECL_DISPEXITSOL((*dispexitsol)), SCIP_DECL_DISPOUTPUT((*dispoutput)), SCIP_DISPDATA *dispdata, int width, int priority, int position, SCIP_Bool stripline)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
int SCIPgetNHeurs(SCIP *scip)
int SCIPheurGetFreq(SCIP_HEUR *heur)
#define SCIPfreeMemoryArrayNull(scip, ptr)
#define SCIPreallocMemoryArray(scip, ptr, newnum)
#define SCIPallocMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
SCIP_RETCODE SCIPcreateLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPretransformObj(SCIP *scip, SCIP_Real obj)
SCIP_RETCODE SCIPcreatePseudoSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPpresolve(SCIP *scip)
SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Longint SCIPconvertRealToLongint(SCIP *scip, SCIP_Real real)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPprintVar(SCIP *scip, SCIP_VAR *var, FILE *file)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
void SCIPsortDownPtrPtr(void **ptrarray1, void **ptrarray2, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
int SCIPsparseSolGetNVars(SCIP_SPARSESOL *sparsesol)
SCIP_Longint * SCIPsparseSolGetLbs(SCIP_SPARSESOL *sparsesol)
void SCIPsparseSolGetFirstSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)
SCIP_RETCODE SCIPsparseSolCreate(SCIP_SPARSESOL **sparsesol, SCIP_VAR **vars, int nvars, SCIP_Bool cleared)
SCIP_Longint * SCIPsparseSolGetUbs(SCIP_SPARSESOL *sparsesol)
void SCIPsparseSolFree(SCIP_SPARSESOL **sparsesol)
SCIP_Bool SCIPsparseSolGetNextSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeSol(scip, &heurdata->sol))
assert(minobj< SCIPgetCutoffbound(scip))
static const SCIP_Real scalars[]
memory allocation routines
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for managing constraints
public methods for user interface dialog
public methods for displaying runtime statistics
public methods for primal heuristics
public methods for message output
#define SCIPdebugPrintCons(x, y, z)
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for primal CIP solutions
public methods for problem variables
public methods for branching rule plugins and branching
public methods for constraint handler plugins and constraints
public methods for dialog handler plugins
public methods for display handler plugins
public methods for primal heuristic plugins and divesets
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for solutions
public methods for SCIP variables
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSEXIT(x)
#define SCIP_DECL_CONSINITSOL(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSLOCK(x)
#define SCIP_DECL_CONSINIT(x)
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_DIALOGEXEC(x)
#define SCIP_DECL_DISPOUTPUT(x)
enum SCIP_BoundType SCIP_BOUNDTYPE
#define SCIP_DECL_SORTPTRCOMP(x)
@ SCIP_PARAMEMPHASIS_COUNTER
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_INITPRESOLVE
@ SCIP_STAGE_EXITPRESOLVE
@ SCIP_STAGE_TRANSFORMING
type definitions for symmetry computations
#define SYM_COMPUTETIMING_AFTERPRESOL
#define SYM_HANDLETYPE_SYMCONS
@ SCIP_VARTYPE_CONTINUOUS