68#define CONSHDLR_NAME "components"
69#define CONSHDLR_DESC "independent components constraint handler"
70#define CONSHDLR_ENFOPRIORITY 0
71#define CONSHDLR_CHECKPRIORITY -9999999
72#define CONSHDLR_EAGERFREQ -1
74#define CONSHDLR_NEEDSCONS FALSE
76#define CONSHDLR_PROPFREQ -1
77#define CONSHDLR_MAXPREROUNDS -1
78#define CONSHDLR_DELAYPROP TRUE
80#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FINAL
81#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
83#define DEFAULT_MAXDEPTH INT_MAX
84#define DEFAULT_MAXINTVARS 200
85#define DEFAULT_MINSIZE 50
86#define DEFAULT_MINRELSIZE 0.1
87#define DEFAULT_NODELIMIT 10000LL
88#define DEFAULT_MAXCOMPWEIGHT 200.0
89#define DEFAULT_INTFACTOR 1.0
90#define DEFAULT_CONTFACTOR 0.2
91#define DEFAULT_FEASTOLFACTOR 1.0
147struct SCIP_ConshdlrData
188 else if( comp2->
ncalls == 0 )
225 minsize =
MAX(minsize, conshdlrdata->minsize);
240 assert(problem->ncomponents < problem->componentssize);
242 scip = problem->scip;
245 component = &problem->components[problem->ncomponents];
262 component->
nvars = 0;
265 component->
number = problem->ncomponents;
267 ++problem->ncomponents;
286 scip = problem->scip;
355 scip = problem->scip;
367 for( v = 0; v < nsourcevars; ++v )
384 component->
fixedvars[idx] = sourcevars[v];
404 SCIPdebugMsg(
scip,
"%d locally fixed variables have been copied, objective contribution: %g\n",
409#ifdef WITH_DEBUG_SOLUTION
419 scip = problem->scip;
431 for(
i = 0;
i < component->
nvars; ++
i )
470#ifdef SCIP_MORE_DEBUG
472 TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
FALSE,
TRUE,
FALSE,
TRUE,
TRUE,
TRUE,
TRUE, &success) );
475 TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
FALSE,
TRUE,
FALSE,
FALSE,
TRUE,
TRUE,
TRUE, &success) );
483#ifdef WITH_DEBUG_SOLUTION
509#ifdef WITH_DEBUG_SOLUTION
531 newconshdlrdata->subscipdepth = conshdlrdata->subscipdepth +
SCIPgetDepth(
scip);
534#ifndef SCIP_MORE_DEBUG
591 for(
i = 0;
i < nconss; ++
i )
638 scip = problem->scip;
656 conss, varmap, consmap, component->
nvars, nconss, success) );
708 if( avoidmemout && memorylimit <= 0.0 )
713 else if( timelimit <= 0.0 )
734 if( softtimelimit > -0.5 )
738 softtimelimit =
MAX(softtimelimit, 0.0);
753#ifdef SCIP_MORE_DEBUG
774 int* ntightenedbounds,
847 SCIPdebugMsg(
scip,
"variable <%s> fixval: %f violates global upperbound: %f\n",
854 SCIPdebugMsg(
scip,
"variable <%s> fixval: %f violates global lowerbound: %f\n",
874 fixvals[
i] =
MIN(fixvals[
i], gub);
875 fixvals[
i] =
MAX(fixvals[
i], glb);
888 SCIPdebugMsg(
scip,
"solution violates bounds by more than epsilon, check the corrected solution...\n");
899 if( subvars[
i] !=
NULL )
917 SCIPdebugMsg(
scip,
"--> corrected solution is%s feasible\n", feasible ?
"" :
" not");
921 SCIPdebugMsg(
scip,
"--> corrected solution has a different objective value (old = %.9g, corrected = %.9g)\n",
949 for(
i = 0;
i < nconss; ++
i )
991 if( subvars[
i] ==
NULL )
995 &infeasible, &tightened) );
1001 &infeasible, &tightened) );
1009 *ntightenedbounds += ntightened;
1011 SCIPdebugMsg(
scip,
"--> tightened %d bounds of variables due to global bounds in the sub-SCIP\n", ntightened);
1040 scip = problem->scip;
1065 for( v = 0; v <
nvars; ++v )
1067 if( subvars[v] !=
NULL )
1086 SCIPdebugMsg(
scip,
"checking new solution in component <%s> inherited from problem <%s>: primal bound %.9g --> %.9g\n",
1104 if( problem->nlowerboundinf == 0 || (problem->nlowerboundinf == 1
1109 assert(problem->nlowerboundinf > 0 ||
SCIPisGE(
scip, newcutoffbound, problem->lowerbound));
1111 newcutoffbound = newcutoffbound - problem->lowerbound + component->
fixedvarsobjsum;
1113 if( problem->nlowerboundinf == 0 )
1128 SCIPdebugMsg(
scip,
"solve sub-SCIP for component <%s> (ncalls = %d, absgap = %.9g)\n",
1131 if( component->
ncalls == 0 )
1146 nodelimit = 2 * lastnnodes;
1147 nodelimit =
MAX(nodelimit, 10LL);
1149 if( mainnodelimit != -1 )
1151 assert(mainnodelimit >= lastnnodes);
1152 nodelimit =
MIN(nodelimit, mainnodelimit - lastnnodes);
1176 SCIPdebugMsg(
scip,
"--> (status = %d, nodes = %lld, time = %.2f): gap = %.5g%%, absgap = %.9g\n",
1249 --problem->nlowerboundinf;
1250 problem->lowerbound += newdualbound;
1255 problem->lowerbound += (newdualbound - component->
lastdualbound);
1259 if( problem->nlowerboundinf == 0 )
1261 SCIPdebugMsg(
scip,
"component <%s>: dual bound increased from %.9g to %.9g, new dual bound of problem <%s>: %.9g (gap = %.9g, absgap = %.9g)\n",
1264 problem->nfeascomps == problem->ncomponents ?
1268 problem->nfeascomps == problem->ncomponents ?
1289 ++(problem->nfeascomps);
1292 for( v = 0; v < component->
nvars; ++v )
1295 subvar = component->
subvars[v];
1299 if( subvar ==
NULL )
1306 if( problem->nfeascomps == problem->ncomponents )
1309#ifdef SCIP_MORE_DEBUG
1315 SCIPdebugMsg(
scip,
"component <%s>: primal bound decreased from %.9g to %.9g, new primal bound of problem <%s>: %.9g (gap = %.9g, absgap = %.9g)\n",
1318 problem->nfeascomps == problem->ncomponents ?
1322 problem->nfeascomps == problem->ncomponents ?
1334 ++(problem->nsolvedcomps);
1378 (*problem)->scip =
scip;
1379 (*problem)->lowerbound = fixedvarsobjsum;
1380 (*problem)->fixedvarsobjsum = fixedvarsobjsum;
1381 (*problem)->ncomponents = 0;
1382 (*problem)->componentssize = ncomponents;
1383 (*problem)->nlowerboundinf = ncomponents;
1384 (*problem)->nfeascomps = 0;
1385 (*problem)->nsolvedcomps = 0;
1396 for( v = 0; v <
nvars; v++ )
1422 scip = (*problem)->scip;
1426 if( (*problem)->bestsol !=
NULL )
1432 for(
c = (*problem)->ncomponents - 1;
c >= 0; --
c )
1436 if( (*problem)->components !=
NULL )
1467 if( conshdlr ==
NULL )
1494 int* firstvaridxpercons,
1534 for(
c = 0;
c < ncomponents; ++
c )
1544 for( v = 0; v < ncvars; ++v )
1554 ncontvars = ncvars - nintvars - nbinvars;
1557 ndiscvars = (int)(nbinvars + conshdlrdata->intfactor * nintvars);
1558 compsize[
c] = nbinvars + conshdlrdata->intfactor * nintvars + conshdlrdata->contfactor * ncontvars;
1561 if( ndiscvars <= conshdlrdata->maxintvars && compsize[
c] <= conshdlrdata->maxcompweight )
1565 if( ncvars >= minsize )
1575 for(
c = 0;
c < ncomponents; ++
c )
1576 conscomponent[permu[
c]] =
c;
1580 varcomponent[
c] = conscomponent[varcomponent[
c]];
1589 for(
c = 0;
c < nconss;
c++ )
1590 conscomponent[
c] = (firstvaridxpercons[
c] == -1 ? -1 : varcomponent[firstvaridxpercons[
c]]);
1608 int* compstartsvars,
1609 int* compstartsconss,
1632 for( comp = 0; comp < ncomponents; comp++ )
1635 assert((*problem)->ncomponents == comp+1);
1637 component = &(*problem)->components[comp];
1640 compvars = &(sortedvars[compstartsvars[comp]]);
1641 component->
nvars = compstartsvars[comp + 1 ] - compstartsvars[comp];
1647 compconss = &(sortedconss[compstartsconss[comp]]);
1648 ncompconss = compstartsconss[comp + 1] - compstartsconss[comp];
1650#ifdef DETAILED_OUTPUT
1652 if( component->
nvars > 1 && ncompconss > 1 )
1659 for(
i = 0;
i < component->
nvars; ++
i )
1668 SCIPdebugMsg(
scip,
"component %d at node %lld, depth %d (%d): %d vars (%d bin, %d int, %d cont), %d conss\n",
1670 component->
nvars, nbinvars, nintvars, ncontvars, ncompconss);
1675 SCIPdebugMsg(
scip,
"build sub-SCIP for component %d of problem <%s>: %d vars, %d conss\n",
1676 component->
number, (*problem)->name, component->
nvars, ncompconss);
1681 for(
i = 0;
i < component->
nvars; ++
i )
1739 else if( !component->
solved )
1767 int* firstvaridxpercons,
1796 for(
c = 0;
c < nconss; ++
c )
1812 if( nconsvars >
nvars )
1820 if( nconsvars ==
nvars )
1845 for( v = nconsvars - 1; v >= 0; --v )
1847 if( nconsvars <
nvars )
1855 firstvaridxpercons[
c] = -1;
1864 while( idx1 == -1 && v < nconsvars )
1868 idx1 = unfixedvarpos[idx1];
1869 assert(idx1 < nunfixedvars);
1876 firstvaridxpercons[
c] = idx1;
1881 for(; v < nconsvars; ++v )
1885 idx2 = unfixedvarpos[idx2];
1886 assert(idx2 < nunfixedvars);
1915 int* compstartsvars,
1916 int* compstartsconss,
1947 if( fixedvarsobjsum !=
NULL )
1948 *fixedvarsobjsum = 0.0;
1957 (*nsortedconss) = 0;
1958 for(
c = 0;
c < ntmpconss;
c++ )
1960 sortedconss[(*nsortedconss)] = tmpconss[
c];
1964 if(
nvars > 1 && *nsortedconss > 1 )
1967 int* firstvaridxpercons;
1969 int nunfixedvars = 0;
1983 for( v = 0; v <
nvars; ++v )
1988 assert(nunfixedvars <= v);
1989 sortedvars[nunfixedvars] =
vars[v];
1992 unfixedvarpos[v] = nunfixedvars;
1998 unfixedvarpos[v] = -1;
2002 *nsortedvars = nunfixedvars;
2004 if( nunfixedvars > 0 )
2011 SCIP_CALL(
fillDigraph(
scip, digraph, sortedconss, *nsortedconss, unfixedvarpos, nunfixedvars, firstvaridxpercons, &success) );
2024 if( *ncomponents > 1 )
2026 int nconss = *nsortedconss;
2029 nvars = *nsortedvars;
2032 "cons components found %d undirected components at node %lld, depth %d (%d)\n",
2036 SCIP_CALL(
sortComponents(
scip, conshdlrdata, digraph, sortedconss, sortedvars, varcomponent, conscomponent, nconss, *nsortedvars,
2037 firstvaridxpercons, ncompsminsize, ncompsmaxsize) );
2042 while(
i < nconss && conscomponent[
i] == -1 )
2045 for(
c = 0;
c < *ncomponents + 1; ++
c )
2047 assert(
i == nconss || conscomponent[
i] >=
c);
2049 compstartsconss[
c] =
i;
2051 while(
i < nconss && conscomponent[
i] ==
c )
2055 for(
c = 0,
i = 0;
c < *ncomponents + 1; ++
c )
2059 compstartsvars[
c] =
i;
2061 while(
i <
nvars && varcomponent[
i] ==
c )
2066 for(
c = 0;
c < *ncomponents; ++
c )
2068 for(
i = compstartsconss[
c];
i < compstartsconss[
c+1]; ++
i )
2070 for(
i = compstartsvars[
c];
i < compstartsvars[
c+1]; ++
i )
2148 if(
SCIPgetDepth(
scip) + conshdlrdata->subscipdepth > conshdlrdata->maxdepth
2188 int* compstartsvars;
2189 int* compstartsconss;
2206 compstartsconss, &nsortedvars, &nsortedconss, &ncomponents, &ncompsminsize, &ncompsmaxsize) );
2208 if( ncompsminsize > 1 )
2212 SCIPdebugMsg(
scip,
"found %d components (%d fulfilling the minsize requirement) at node %lld at depth %d (%d)\n",
2217 if( ncomponents > ncompsminsize )
2227 for(
c = 0;
c < ncomponents; ++
c )
2229 size = compstartsvars[
c+1] - compstartsvars[
c];
2231 if( size >= minsize )
2234 compstartsvars[m] = compstartsvars[
c+1];
2235 compstartsconss[m] = compstartsconss[
c+1];
2238 else if(
c == ncomponents - 1 )
2240 assert(m == ncompsminsize);
2241 compstartsvars[m] = compstartsvars[
c+1];
2242 compstartsconss[m] = compstartsconss[
c+1];
2245 assert(m == ncompsminsize);
2246 assert(compstartsvars[m] == nsortedvars);
2247 assert(compstartsconss[m] == nsortedconss);
2253 compstartsconss, ncomponents, &problem) );
2256 if( problem !=
NULL )
2280 if( nodelimit == -1 )
2285 if( problem !=
NULL )
2301 int* compstartsvars;
2302 int* compstartsconss;
2358 compstartsconss, &nsortedvars, &nsortedconss, &ncomponents, &ncompsminsize, &ncompsmaxsize) );
2360 if( ncompsmaxsize > 0 )
2376 SCIPdebugMsg(
scip,
"found %d components (%d with small size) during presolving; overall problem size: %d vars (%d int, %d bin, %d cont), %d conss\n",
2382 if( subscip ==
NULL )
2396#ifdef WITH_DEBUG_SOLUTION
2404 compvars = &(sortedvars[compstartsvars[comp]]);
2405 ncompvars = compstartsvars[comp + 1 ] - compstartsvars[comp];
2408 compconss = &(sortedconss[compstartsconss[comp]]);
2409 ncompconss = compstartsconss[comp + 1] - compstartsconss[comp];
2412 if( ncompconss == 0 )
2419#ifdef DETAILED_OUTPUT
2426 for(
i = 0;
i < ncompvars; ++
i )
2435 SCIPdebugMsg(
scip,
"solve component %d: %d vars (%d bin, %d int, %d cont), %d conss\n",
2436 comp, ncompvars, nbinvars, nintvars, ncontvars, ncompconss);
2442 for(
i = 0;
i < ncompvars; ++
i )
2451 compconss, varmap, consmap, ncompvars, ncompconss, &success) );
2460#ifdef WITH_DEBUG_SOLUTION
2470 if( debugsol !=
NULL )
2474 for(
i = 0;
i < ncompvars; ++
i )
2476 if( subvars[
i] !=
NULL )
2488 ncompvars, ncompconss, ndelconss, nfixedvars, nchgbds,
result, &solved) );
2500 else if( nsolved == ncomponents - 1 )
2563#define consEnfolpComponents NULL
2564#define consEnfopsComponents NULL
2565#define consCheckComponents NULL
2577 conshdlrdata->subscipdepth = 0;
2601 "maximum depth of a node to run components detection (-1: disable component detection during solving)",
2605 "maximum number of integer (or binary) variables to solve a subproblem during presolving (-1: unlimited)",
2609 "minimum absolute size (in terms of variables) to solve a component individually during branch-and-bound",
2613 "minimum relative size (in terms of variables) to solve a component individually during branch-and-bound",
2617 "maximum number of nodes to be solved in subproblems during presolving",
2621 "the maximum weight of a component, in terms of the used factors",
2625 "the weight of an integer variable compared to binary variables",
2629 "the weight of a continuous variable compared to binary variables",
2633 "factor to increase the feasibility tolerance of the main SCIP in all sub-SCIPs, default value 1.0",
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_PROP_TIMING
#define CONSHDLR_MAXPREROUNDS
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PRESOLTIMING
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYPROP
static SCIP_RETCODE copyToSubscip(SCIP *scip, SCIP *subscip, const char *name, SCIP_VAR **vars, SCIP_VAR **subvars, SCIP_CONS **conss, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, int nvars, int nconss, SCIP_Bool *success)
#define DEFAULT_CONTFACTOR
#define DEFAULT_MINRELSIZE
static SCIP_RETCODE createConsComponents(SCIP *scip, SCIP_CONS **cons, const char *name, PROBLEM *problem)
static SCIP_RETCODE createAndSplitProblem(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Real fixedvarsobjsum, SCIP_VAR **sortedvars, SCIP_CONS **sortedconss, int *compstartsvars, int *compstartsconss, int ncomponents, PROBLEM **problem)
static SCIP_RETCODE initComponent(PROBLEM *problem)
static SCIP_RETCODE fillDigraph(SCIP *scip, SCIP_DIGRAPH *digraph, SCIP_CONS **conss, int nconss, int *unfixedvarpos, int nunfixedvars, int *firstvaridxpercons, SCIP_Bool *success)
static int getMinsize(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
#define DEFAULT_FEASTOLFACTOR
#define consEnfolpComponents
#define consEnfopsComponents
#define DEFAULT_MAXINTVARS
static SCIP_RETCODE componentSetupWorkingSol(COMPONENT *component, SCIP_HASHMAP *varmap)
static SCIP_RETCODE freeProblem(PROBLEM **problem)
static SCIP_RETCODE componentCreateSubscip(COMPONENT *component, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_CONS **conss, int nconss, SCIP_Bool *success)
static SCIP_RETCODE createSubscip(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP **subscip)
#define DEFAULT_INTFACTOR
#define DEFAULT_NODELIMIT
static SCIP_RETCODE sortComponents(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DIGRAPH *digraph, SCIP_CONS **conss, SCIP_VAR **vars, int *varcomponent, int *conscomponent, int nconss, int nvars, int *firstvaridxpercons, int *ncompsminsize, int *ncompsmaxsize)
#define DEFAULT_MAXCOMPWEIGHT
#define consCheckComponents
static SCIP_RETCODE solveProblem(PROBLEM *problem, SCIP_RESULT *result)
static SCIP_RETCODE solveSubscip(SCIP *scip, SCIP *subscip, SCIP_Longint nodelimit, SCIP_Real gaplimit)
static SCIP_RETCODE solveComponent(COMPONENT *component, SCIP_Bool lastcomponent, SCIP_RESULT *result)
static SCIP_RETCODE freeComponent(COMPONENT *component)
static SCIP_RETCODE solveAndEvalSubscip(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP *subscip, SCIP_VAR **vars, SCIP_VAR **subvars, SCIP_CONS **conss, int nvars, int nconss, int *ndeletedconss, int *nfixedvars, int *ntightenedbounds, SCIP_RESULT *result, SCIP_Bool *solved)
static SCIP_RETCODE findComponents(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Real *fixedvarsobjsum, SCIP_VAR **sortedvars, SCIP_CONS **sortedconss, int *compstartsvars, int *compstartsconss, int *nsortedvars, int *nsortedconss, int *ncomponents, int *ncompsminsize, int *ncompsmaxsize)
static SCIP_RETCODE initProblem(SCIP *scip, PROBLEM **problem, SCIP_Real fixedvarsobjsum, int ncomponents)
struct Component COMPONENT
constraint handler for handling independent components
#define SCIPdebugGetSolVal(scip, var, val)
#define SCIPdebugSolEnable(scip)
#define SCIPdebugAddSolVal(scip, var, val)
#define SCIPdebugSolIsEnabled(scip)
#define SCIPdebugSolIsValidInSubtree(scip, isvalidinsubtree)
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPincludeConshdlrComponents(SCIP *scip)
SCIP_RETCODE SCIPcopyPlugins(SCIP *sourcescip, SCIP *targetscip, SCIP_Bool copyreaders, SCIP_Bool copypricers, SCIP_Bool copyconshdlrs, SCIP_Bool copyconflicthdlrs, SCIP_Bool copypresolvers, SCIP_Bool copyrelaxators, SCIP_Bool copyseparators, SCIP_Bool copycutselectors, SCIP_Bool copypropagators, SCIP_Bool copyheuristics, SCIP_Bool copyeventhdlrs, SCIP_Bool copynodeselectors, SCIP_Bool copybranchrules, SCIP_Bool copyiisfinders, SCIP_Bool copydisplays, SCIP_Bool copydialogs, SCIP_Bool copytables, SCIP_Bool copyexprhdlrs, SCIP_Bool copynlpis, SCIP_Bool passmessagehdlr, SCIP_Bool *valid)
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 SCIPcopyProb(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, const char *name)
SCIP_RETCODE SCIPcopyParamSettings(SCIP *sourcescip, SCIP *targetscip)
SCIP_RETCODE SCIPcopyLimits(SCIP *sourcescip, SCIP *targetscip)
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 SCIPdigraphComputeUndirectedComponents(SCIP_DIGRAPH *digraph, int minsize, int *components, int *ncomponents)
void SCIPdigraphGetComponent(SCIP_DIGRAPH *digraph, int compidx, int **nodes, int *nnodes)
SCIP_RETCODE SCIPdigraphAddArc(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)
SCIP_RETCODE SCIPdigraphSetSizes(SCIP_DIGRAPH *digraph, int *sizes)
void SCIPdigraphFree(SCIP_DIGRAPH **digraph)
int SCIPdigraphGetNComponents(SCIP_DIGRAPH *digraph)
SCIP_RETCODE SCIPcreateDigraph(SCIP *scip, SCIP_DIGRAPH **digraph, int nnodes)
SCIP_Bool SCIPisPresolveFinished(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNOrigVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_RETCODE SCIPupdateLocalLowerbound(SCIP *scip, SCIP_Real newbound)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
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 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_PARAM * SCIPgetParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
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 SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetLongintParam(SCIP *scip, const char *name, SCIP_Longint *value)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPfixParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPpqueueCreate(SCIP_PQUEUE **pqueue, int initsize, SCIP_Real sizefac, SCIP_DECL_SORTPTRCOMP((*ptrcomp)),)
void SCIPpqueueFree(SCIP_PQUEUE **pqueue)
SCIP_RETCODE SCIPpqueueInsert(SCIP_PQUEUE *pqueue, void *elem)
int SCIPpqueueNElems(SCIP_PQUEUE *pqueue)
void * SCIPpqueueRemove(SCIP_PQUEUE *pqueue)
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
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 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)
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 SCIPsetConshdlrDelete(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_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
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_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
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)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
const char * SCIPheurGetName(SCIP_HEUR *heur)
SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateMemoryArray(scip, ptr, source, num)
#define SCIPfreeMemoryArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
int SCIPgetNActivePricers(SCIP *scip)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_Real SCIPsolGetOrigObj(SCIP_SOL *sol)
SCIP_RETCODE SCIPprintBestSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
int SCIPgetNSols(SCIP *scip)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
SCIP_RETCODE SCIPcreateOrigSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPaddSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *stored)
int SCIPsolGetIndex(SCIP_SOL *sol)
SCIP_RETCODE SCIPcheckSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *feasible)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPgetSolTransObj(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPretransformObj(SCIP *scip, SCIP_Real obj)
void SCIPsolSetHeur(SCIP_SOL *sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
SCIP_RETCODE SCIPfreeTransform(SCIP *scip)
SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
void SCIPaddNNodes(SCIP *scip, SCIP_Longint nnodes)
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
SCIP_RETCODE SCIPupdateCutoffbound(SCIP *scip, SCIP_Real cutoffbound)
SCIP_Real SCIPgetGap(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_RETCODE SCIPprintDisplayLine(SCIP *scip, FILE *file, SCIP_VERBLEVEL verblevel, SCIP_Bool endline)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumLT(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 SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisNegative(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 SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPinRepropagation(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
void SCIPvarMarkDeleteGlobalStructures(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 SCIPgetActiveVars(SCIP *scip, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
void SCIPsortIntPtr(int *intarray, void **ptrarray, int len)
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeSol(scip, &heurdata->sol))
SCIPcreateSol(scip, &heurdata->sol, heur))
assert(minobj< SCIPgetCutoffbound(scip))
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
public methods for managing constraints
public methods for primal heuristics
public methods for message output
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for primal CIP solutions
public methods for branch and bound tree
public methods for problem variables
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for data structures
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 variable pricer plugins
public methods for global and local (sub)problems
public methods for the probing mode
public methods for solutions
public methods for querying solving statistics
public methods for timing
public methods for the branch-and-bound tree
public methods for SCIP variables
SCIP_Real fixedvarsobjsum
SCIP_Real lastprimalbound
#define SCIP_DECL_CONSDELETE(x)
struct SCIP_Cons SCIP_CONS
#define SCIP_DECL_CONSINITSOL(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSLOCK(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSFREE(x)
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_Digraph SCIP_DIGRAPH
#define SCIP_DECL_SORTPTRCOMP(x)
struct SCIP_PQueue SCIP_PQUEUE
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STATUS_TOTALNODELIMIT
@ SCIP_STATUS_BESTSOLLIMIT
@ SCIP_STATUS_PRIMALLIMIT
@ SCIP_STATUS_USERINTERRUPT
@ SCIP_STATUS_STALLNODELIMIT
@ SCIP_STATUS_RESTARTLIMIT
enum SCIP_Status SCIP_STATUS