branch_lookahead.c
Go to the documentation of this file.
22 * The (multi-level) lookahead branching rule applies strong branching to every fractional value of the LP solution
23 * at the current node of the branch-and-bound tree, as well as recursivly to every temporary child problem created by this
33 * For a more mathematical description and a comparison between lookahead branching and other branching rules
47 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
80 #define DEFAULT_USEBINARYCONSTRAINTS TRUE /**< should binary constraints be collected and applied? */
81 #define DEFAULT_ADDCLIQUE FALSE /**< add binary constraints with two variables found at the root node also as a clique? */
84 #define DEFAULT_USEDOMAINREDUCTION TRUE /**< Should domain reductions be collected and applied? */
85 #define DEFAULT_MAXNVIOLATEDCONS 1 /**< How many constraints that are violated by the base lp solution
87 #define DEFAULT_MAXNVIOLATEDBINCONS 0 /**< How many binary constraints that are violated by the base lp
90 #define DEFAULT_MAXNVIOLATEDDOMREDS 0 /**< How many domain reductions that are violated by the base lp solution
92 #define DEFAULT_STOREUNVIOLATEDSOL TRUE /**< If only non violating constraints are added, should the branching
94 #define DEFAULT_REEVALAGE 10LL /**< Max number of LPs solved after which a previous prob branching
97 #define DEFAULT_ADDNONVIOCONS FALSE /**< Should binary constraints, that are not violated by the base LP, be
99 #define DEFAULT_PROPAGATE TRUE /**< Should domain propagation be executed before each temporary node is
101 #define DEFAULT_MAXPROPROUNDS -1 /**< maximum number of propagation rounds to perform at temporary
104 #define DEFAULT_MAXNCANDS 4 /**< If abbreviated: The max number of candidates to consider per node */
105 #define DEFAULT_REUSEBASIS TRUE /**< If abbreviated: Should the information gathered to obtain the best
107 #define DEFAULT_ABBREVPSEUDO FALSE /**< If abbreviated: Use pseudo costs to estimate the score of a
110 #define DEFAULT_MINWEIGHT 4.0 /**< default value for the min weight to get a weighted score of two
112 #define DEFAULT_MAXWEIGHT 1.0 /**< default value for the max weight to get a weighted score of two
143 /* Writes a debug message without the leading information. Can be used to append something to an output of LABdebugMessage*/
158 /** A struct holding information to speed up the solving time for solving a problem again. This is filled by the FSB
159 * scoring routine that is run to get the best candidates. It is then read by the actual ALAB routine. */
162 SCIP_LPISTATE* lpistate; /**< the basis information that may be set before another solve lp call */
168 /** Allocates the warm start information on the buffer and initializes it with default values. */
174 {
204 {
237 WARMSTARTINFO* downwarmstartinfo; /**< the warm start info containing the lp data from a previous down branch */
238 WARMSTARTINFO* upwarmstartinfo; /**< the warm start info containing the lp data from a previous up branch */
248 {
270 /** Frees the allocated buffer memory of the candidate and clears the contained lpi memories. */
286 {
305 SCIP_Bool downdbvalid; /**< Indicator for the validity of the downdb value. Is FALSE, if no actual
343 * this is used to store the most important information (i.e., the dual bounds obtained) so that it can be used in a
344 * subsequent call in case the LP solution did not change because we only added bound changes that did not forbid the
346 * however, we do not want to store all the domain changes for the two potential child nodes for this rare case, they
364 }
374 /* a branching decision is deemed valid, if the var point is not on the default NULL value (see the allocate method) */
432 SCIP_Real dualbound; /**< The best dual bound for this branching, may be changed by deeper level
436 SCIP_Bool dualboundvalid; /**< Is the value of the dual bound valid? That means, was the according LP
439 SCIP_Real bestgain; /**< best gain (w.r.t. to the base lp) on the lowest level below this child */
449 )
450 {
517 SCIP_SOL* prevbinsolution; /**< The previous solution for the case that in the previous run only
519 BRANCHINGDECISION* prevdecision; /**< The previous decision that gets used for the case that in the previous run
521 SCIP_Longint* lastbranchid; /**< The node id at which the var was last branched on (for a given branching
523 SCIP_Longint* lastbranchnlps; /**< The number of (non-probing) LPs that where solved when the var was last
526 BRANCHINGRESULTDATA** lastbranchupres; /**< The result of the last up branching for a given var. */
527 BRANCHINGRESULTDATA** lastbranchdownres; /**< The result of the last down branching for a given var. */
528 int restartindex; /**< The index at which the iteration over the number of candidates starts. */
532 /** The parameter that can be changed by the user/caller and alter the behaviour of the lookahead branching. */
535 SCIP_Longint reevalage; /**< The number of "normal" (not probing) lps that may have been solved before
537 int maxnviolatedcons; /**< The number of constraints (domain reductions and binary constraints) we
540 int maxnviolatedbincons;/**< The number of binary constraints we want to gather before restarting the
542 int maxnviolateddomreds;/**< The number of domain reductions we want to gather before restarting the
546 SCIP_Bool usedomainreduction; /**< indicates whether the data for domain reductions should be gathered and
552 SCIP_Bool stopbranching; /**< indicates whether we should stop the first level branching after finding
554 SCIP_Bool forcebranching; /**< Execute the lookahead logic even if only one branching candidate is given.
556 SCIP_Bool addnonviocons; /**< Should constraints be added, that are not violated by the base LP? */
558 SCIP_Bool reusebasis; /**< If abbreviated == TRUE, should the solution lp-basis of the FSB run be
560 SCIP_Bool storeunviolatedsol; /**< Should a solution/decision be stored, to speed up the next iteration
562 SCIP_Bool abbrevpseudo; /**< If abbreviated == TRUE, should pseudocost values be used, to approximate
564 SCIP_Bool addclique; /**< add binary constraints with two variables found at the root node also as a clique? */
578 )
579 {
704 SCIP_Longint* nlpiterations; /**< The number of all lp iterations needed for a given probingdepth
706 SCIP_Longint* nlpiterationsfsb; /**< The number of lp iterations needed to get the FSB scores. */
713 int nsinglecandidate; /**< number of times a single candidate was given to the recursion routine */
716 int nbinconstvio; /**< The number of binary constraints added to the base node, that are violated
721 int ndepthreached; /**< The number of times the branching was aborted due to a too small depth. */
734 int recursiondepth; /**< The recursiondepth of the LAB. Can be used to access the depth-dependent
873 SCIPinfoMessage(scip, NULL, "Lookahead Branching was called <%i> times.\n", statistics->ntotalresults);
879 SCIPinfoMessage(scip, NULL, "Result <%s> was chosen <%i> times\n", getStatusString(currentresult),
883 SCIPinfoMessage(scip, NULL, "Branching was stopped after the scoring FSB %i times. That was:\n",
886 SCIPinfoMessage(scip, NULL, " %i times because of a domain reduction.\n", statistics->domredafterfsb);
890 SCIPinfoMessage(scip, NULL, "The %i. variable (w.r.t. the FSB score) was chosen as the final result %i times.\n",
896 SCIPinfoMessage(scip, NULL, "In depth <%i>, <%i> fullcutoffs and <%i> single cutoffs were found.\n",
898 SCIPinfoMessage(scip, NULL, "In depth <%i>, <%i> LPs were solved, <%i> of them to calculate the FSB score.\n",
900 SCIPinfoMessage(scip, NULL, "In depth <%i>, <%" SCIP_LONGINT_FORMAT "> iterations were needed to solve the LPs, <%"
903 SCIPinfoMessage(scip, NULL, "In depth <%i>, a decision was discarded <%i> times due to domain reduction because of"
911 SCIPinfoMessage(scip, NULL, "Depth limit was reached <%i> times.\n", statistics->ndepthreached);
912 SCIPinfoMessage(scip, NULL, "Ignored <%i> binary constraints, that would be domain reductions.\n",
914 SCIPinfoMessage(scip, NULL, "Added <%i> binary constraints, of which <%i> where violated by the base LP.\n",
916 SCIPinfoMessage(scip, NULL, "Reduced the domain of <%i> vars, <%i> of them where violated by the base LP.\n",
920 SCIPinfoMessage(scip, NULL, "Needed <%i> additional nodes to proof the cutoffs of base nodes\n",
990 CONFIGURATION* config; /**< the parameter that influence the behaviour of the lookahead branching */
1016 )
1017 {
1062 SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &list->consvars[list->nelements], consvars, nconsvars) ); /*lint !e866*/
1097 * these variables are used to build the binary constraint in case that a ('binary') branch is cut off
1113 )
1117 assert(startsize > 0);
1123 (*list)->nbinaryvars = 0;
1180 {
1193 {
1196 assert(maxdepth > 0);
1225 int ncandidates; /**< the number of actual entries in candidates (without trailing NULLs); this
1230 /** allocates the candidate list on the buffer WITHOUT initializing the contained array of candidates. */
1236 )
1262 SCIP_Bool storewarmstartinfo /**< should the candidates be able to store warm start information? */
1281 /** Allocates the given list and fills it with all fractional candidates of the current LP solution. */
1286 SCIP_Bool storewarmstartinfo /**< should warm start info of the LP be stored in the candidates? */
1299 SCIP_CALL( SCIPgetLPBranchCands(scip, &lpcands, &lpcandssol, &lpcandsfrac, &nlpcands, NULL, NULL) );
1305 SCIP_CALL( candidateListCreateWithCandidates(scip, candidatelist, nlpcands, storewarmstartinfo) );
1320 /** Frees the allocated buffer memory of the candidate list and frees the contained candidates. */
1331 assert((*candidatelist)->ncandidates > 0 || ((*candidatelist)->ncandidates && (*candidatelist)->candidates == NULL));
1336 {
1386 SCIP_Bool* baselpviolated; /**< Indicates whether the base lp solution violates the new bounds of a var.*/
1387 int nviolatedvars; /**< Tracks the number of vars that have a violated (by the base lp) new lower
1389 int nchangedvars; /**< Tracks the number of vars, that have a changed domain. (a change on both,
1392 int* lowerboundnproofs; /**< The number of nodes needed to prove the lower bound for each variable. */
1393 int* upperboundnproofs; /**< The number of nodes needed to prove the upper bound for each variable. */
1403 {
1411 /* The arrays saves the data for all variables in the problem via the ProbIndex. See SCIPvarGetProbindex() */
1438 /** frees the given DOMAINREDUCTIONS and all contained Arrays in the opposite order of allocation */
1469 SCIP_Bool maxnconsreached; /**< was the max number of constraints (bin conss and dom red) reached? */
1477 )
1478 {
1512 CANDIDATE** bestsortedcands; /**< array containing the best sorted variable indices w.r.t. their score */
1525 }
1542 /* the container saves the score for all variables in the problem via the ProbIndex, see SCIPvarGetProbindex() */
1547 SCIP_CALL( SCIPallocBufferArray(scip, &(*scorecontainer)->bestsortedcands, config->maxncands) );
1560 /** Finds the insertion index for the given score in the candidate list. The score of each candidate is taken from the
1561 * scorecontainer. The first elements of the candidate list have to be sorted, as this method uses binary search to find
1569 CANDIDATE** candidates, /**< candidate list where the first nsorted elements are sorted (w.r.t. their
1607 /** Inserts the given probindex into the sorted array in the container, moving all indices after it to the right. Then
1624 {
1660 /* insert the current variable (cand) at the position calculated above, returning the candidate that
1661 * was removed at the end of the list; this candidate can be the given candidate for the case that the score does not
1672 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Stored score <%g> for var <%s>.\n", score, SCIPvarGetName(cand->branchvar));
1687 /* don't free the candidates inside the cands array, as those are handled by the candidate list */
1693 }
1704 PERSISTENTDATA* persistent, /**< container to store data over multiple calls to the branching rule; or NULL */
1715 SCIP_Longint* niterations, /**< pointer to store the total number of iterations for this variable */
1716 int* ndeepestcutoffs, /**< pointer to store the total number of cutoffs on the deepest level */
1718 SCIP_Real* totalgains, /**< pointer to store the sum over all gains that are valid in both children */
1731 PERSISTENTDATA* persistent, /**< container to store data over multiple calls to the branching rule */
1749 SCIP_SOL* baselpsol, /**< The LP solution of the base problem. Used to check whether the domain
1784 /* if the given lower bound is equal to the old one we take the smaller number of proof nodes */
1786 domainreductions->lowerboundnproofs[varindex] = MIN(domainreductions->lowerboundnproofs[varindex], nproofnodes);
1790 /* we get the solution value to check whether the domain reduction is violated in the base LP */
1793 /* in case the new lower bound is greater than the base solution val and the base solution val is not violated by a
1794 * previously found bound, we increment the nviolatedvars counter and set the baselpviolated flag */
1803 /** Add a lower bound to the DOMAINREDUCTIONS struct. This is used as a wrapper to the 'addLowerBoundProofNode' method. */
1809 SCIP_SOL* baselpsol, /**< The LP solution of the base problem. Used to check whether the domain
1814 /* We add the lower bound with number of proof nodes 2, as this method is only called from the recursion directly. There
1815 * it is called in case that only one child node is cut off. As proof nodes we count the cutoff node as well as the valid
1830 SCIP_SOL* baselpsol, /**< The LP solution of the base problem. Used to check whether the domain
1857 /* if the given upper bound is equal to the old one we take the smaller number of proof nodes */
1859 domainreductions->upperboundnproofs[varindex] = MIN(domainreductions->upperboundnproofs[varindex], nproofnodes);
1873 /* We get the solution value to check whether the domain reduction is violated in the base LP */
1876 /* In case the new upper bound is smaller than the base solution val and the base solution val is not violated by a
1877 * previously found bound, we increment the nviolatedvars counter and set the baselpviolated flag. */
1886 /** Add a lower bound to the DOMAINREDUCTIONS struct. This is used as a wrapper to the 'addUpperBoundProofNode' method. */
1892 SCIP_SOL* baselpsol, /**< The LP solution of the base problem. Used to check whether the domain
1897 /* We add the upper bound with number of proof nodes 2, as this method is only called from the recursion directly. There
1898 * it is called in case that only one child node is cutoff. As proof nodes we count the cutoff node as well as the valid
1907 /** apply the domain reductions from a single struct to another one; this may be used in case one of the two child
1913 SCIP_SOL* baselpsol, /**< The LP solution of the base problem. Used to check whether the domain
1915 DOMAINREDUCTIONS* targetdomreds, /**< The target that should be filled with the merged data. */
1951 * merges the domain reduction data from the two given branching children data into the target parent data
1956 SCIP_SOL* baselpsol, /**< The LP solution of the base problem. Used to check whether the domain
1958 DOMAINREDUCTIONS* targetdomreds, /**< The target that should be filled with the merged data. */
1980 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Combining domain reductions from up and down child.\n");
1981 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Previous number of changed variable domains: %d\n",
1984 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Number of changed variable domains in up child: %d\n",
1986 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Number of changed variable domains in down child: %d\n",
2019 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Subsequent number of changed variable domains: %d\n",
2027 SCIP_SOL* baselpsol, /**< The LP solution of the base problem. Used to check whether the domain
2029 DOMAINREDUCTIONS* domreds, /**< The domain reductions that should be applied to the current node. */
2030 SCIP_Bool* domredcutoff, /**< pointer to store whether a cutoff was found due to domain reductions */
2097 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Variable <%s>, old lower bound <%g>, proposed lower bound <%g>, new "
2105 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The domain reduction of variable <%s> resulted in an empty "
2111 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The lower bound of variable <%s> was successfully tightened.\n",
2124 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The lower bound of variable <%s> is violated by the base lp "
2145 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Variable <%s>, old upper bound <%g>, proposed upper bound <%g>, new "
2153 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The domain reduction of variable <%s> resulted in an empty "
2159 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The upper bound of variable <%s> was successfully tightened.\n",
2172 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The upper bound of variable <%s> is violated by the base lp "
2187 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Truly changed <%d> domains of the problem, <%d> of them are violated by the "
2230 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Effective branching on var <%s> with value <%g>. Old domain: [%g..%g].\n",
2246 /* update the lower bounds in the children; we must not do this if columns are missing in the LP
2257 SCIP_CALL( SCIPupdateNodeLowerbound(scip, downchild, bestdownvalid ? MAX(bestdown, provedbound) : provedbound) );
2258 SCIP_CALL( SCIPupdateNodeLowerbound(scip, upchild, bestupvalid ? MAX(bestup, provedbound) : provedbound) );
2297 /* update the upper bound of the lower child in case it is better than the current one AND it is not the
2311 /* update the lower bound of the upper child in case it is better than the current one AND it is not the
2333 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, " -> down child's lowerbound: %g\n", SCIPnodeGetLowerbound(downchild));
2334 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, " -> up child's lowerbound: %g\n", SCIPnodeGetLowerbound(upchild));
2370 /** Sets the lp state and norms of the current node to the values stored in the warm start info. */
2381 /* As we solved the very same LP some time earlier and stored the state (the basis) and the norms, we can now set those in
2383 * Some iterations may occur, as the conflict analysis may have added some constraints in the meantime. */
2384 SCIP_CALL( SCIPsetProbingLPState(scip, &(warmstartinfo->lpistate), &(warmstartinfo->lpinorms), warmstartinfo->primalfeas,
2387 /* The state and norms will be freed later by the SCIP framework. Therefore they are set to NULL to enforce that we won't
2419 /** Creates a new probing node with a new bound for the given candidate and solves the corresponding LP. */
2426 BRANCHINGRESULTDATA* resultdata, /**< pointer to the result data which gets filled with the status */
2428 DOMAINREDUCTIONS* domreds, /**< struct to store the domain reduction found during propagation */
2469 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "DownBranching: Var=<%s>, Proposed upper bound=<%g>, "
2470 "old bounds=[<%g>..<%g>], new bounds=[<%g>..<%g>]\n", SCIPvarGetName(branchvar), newbound, oldlowerbound,
2475 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "UpBranching: Var=<%s>, Proposed lower bound=<%g>, "
2476 "old bounds=[<%g>..<%g>], new bounds=[<%g>..<%g>]\n", SCIPvarGetName(branchvar), newbound, oldlowerbound,
2508 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Restoring lp information for down branch of variable <%s>\n",
2528 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Restoring lp information for up branch of variable <%s>\n",
2539 SCIP_CALL( SCIPpropagateProbing(scip, config->maxproprounds, &resultdata->cutoff, &ndomredsfound) );
2543 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Found %d domain reductions via propagation.\n", ndomredsfound);
2584 /* for us an error occurred, if an error during the solving occurred or the lp could not be solved but was not
2586 status->lperror = status->lperror || (solstat == SCIP_LPSOLSTAT_NOTSOLVED && resultdata->cutoff == FALSE);
2588 /* if we seem to have reached a {time, iteration}-limit or the user cancelled the execution, we want to stop
2590 status->limitreached = solstat == SCIP_LPSOLSTAT_ITERLIMIT || solstat == SCIP_LPSOLSTAT_TIMELIMIT;
2604 /* if we have no error, we save the new objective value and the cutoff decision in the resultdata */
2608 resultdata->cutoff = resultdata->cutoff || SCIPisGE(scip, resultdata->objval, SCIPgetCutoffbound(scip));
2617 /** Creates a logic or constraint based on the given 'consvars'. This array has to consist of the negated
2618 * versions of the variables present on a cutoff "path" (path means all variables from the root directly
2620 * Let x_1, ..., x_n be the variables on a path to a cutoff with the branchings x_i <= 1 for all i.
2659 SCIP_CALL( SCIPcreateConsLogicor(scip, constraint, constraintname, nconsvars, consvars, initial, separate, enforce,
2681 (void) SCIPsnprintf(constraintname, SCIP_MAXSTRLEN, "lookahead_bin_%s", SCIPvarGetName(binaryvars[0]));
2697 * The implied binary bounds were found when two or more consecutive branchings of binary variables were cutoff. Then these
2705 SCIP_SOL* baselpsol /**< the original lp solution, used to check the violation of the constraint */
2718 /* If we only have one var for the constraint, we can ignore it as it is already added as a domain reduction. */
2748 /* the constraint we will be building is a logic or: we have a list of binary variables that were
2751 * is violating this constraint we count this for our number of violated constraints and bounds. */
2778 SCIP_Bool* boundchange /**< pointer to store whether a bound change has been applied by adding the
2799 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "processing %d binary constraints.\n", conslist->nelements);
2863 /* a two-variable logicor constraint x + y >= 1 yields the implication x == 0 -> y == 1, and is represented
2883 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "added %d/%d binary constraints.\n", nconsadded, conslist->nelements);
2914 /* due to roundings the value might have changed slightly without an actual influence on the integral value */
2918 /** Checks whether the branching rule should continue or terminate with the currently gathered data */
2931 /** Checks whether the branching rule should continue or terminate with the currently gathered data. Additionally decrements
2932 * the given loopcounter. This is needed to better emulate the behavior of FSB by LAB with a depth of 1. */
2964 /* an old branching can be reused, if we are still at the same node and just a few LPs were solved in between */
2994 SCIP_CALL( SCIPgetVarStrongbranchLast(scip, branchvar, &downbranchingresult->dualbound, &upbranchingresult->dualbound,
3010 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Lookahead branching on variable <%s> already performed (lpage=%"
3044 SCIP_CALL( SCIPsetVarStrongbranchData(scip, branchvar, lpobjval, branchval, downbranchingresult->dualbound,
3045 upbranchingresult->dualbound, downbranchingresult->dualboundvalid, upbranchingresult->dualboundvalid, niterations,
3092 /* In deeper levels we don't want any constraints to be added or domains to be reduced, as we are just interested in the
3108 /* We need to allocate enough space for all possible depths, as there is currently a problem with setting the FSB stats.
3109 * E.G.: we want to gather statistics for the FSB run started on layer 2 (1-indexed). Then we start in probing depth 1
3112 SCIP_CALL( statisticsAllocate(scip, &statistics, parentconfig->recursiondepth, parentconfig->maxncands) );
3115 SCIP_CALL( selectVarStart(scip, config, NULL, status, decision, scorecontainer, TRUE, candidatelist,
3125 SCIP_CALL( selectVarStart(scip, config, NULL, status, decision, scorecontainer, TRUE, candidatelist) );
3197 /* in case a child is infeasible and therefore cutoff we take the gain of the other child to receive a somewhat
3235 /* in case a child is infeasible and therefore cutoff we take the gain of the other child to receive a somewhat
3247 /** calculates the score as mentioned in the lookahead branching paper by Glankwamdee and Linderoth;
3248 * their score scales the number of cutoffs on the last layer of a 2-level temporary branching tree with the average gain of
3249 * every last level problem; together with the best gain for each branch of a variable we get the final score
3268 nlowestlevelcutoffs = downbranchingresult->ndeepestcutoffs + upbranchingresult->ndeepestcutoffs;
3276 return bestdowngain + bestupgain + (totaldowngains/ntotaldowngains + totalupgains/ntotalupgains)*nlowestlevelcutoffs;
3308 score = calculateScoreFromResult(scip, branchvar, downbranchingresult, upbranchingresult, lpobjval);
3337 /** prints the names of the candidates of the given candidate list with their corresponding scores */
3358 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, " Index %2i: Var %s Score %g\n", i, SCIPvarGetName(var), score);
3363 /** sorts the best candidates (w.r.t. the score in the container) of the candidate list to the front of the list */
3369 int nbestcandidates /**< number of candidates that should be kept sorted at the start of the list*/
3395 insertionindex = findInsertionPoint(scip, scorecontainer, movescore, candidatelist->candidates, nsorted);
3422 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "All %i candidates, with the first %i candidates sorted by their FSB score:"
3461 /** Ensures that the scores are present in the scorecontainer for each of the candidates to consider */
3487 /* filter the candidates based on the presence of a score in the 'scorecontainer'. Only those without a score need a
3546 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Calculating the FSB result to get a score for the remaining "
3552 SCIP_CALL( getFSBResult(scip, config, unscoredcandidates, status, scorecontainer, statistics) );
3569 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Calculated the scores for the remaining candidates\n");
3578 /** Gets the best candidates w.r.t. the scores stored in the scorecontainer and stores them in the given list */
3611 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, " Index %2i: Var %s Score %g\n", i, SCIPvarGetName(var), score);
3644 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Getting the best (at most) %i of the given %i candidates: ",
3650 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "%s", "Ensuring that all candidates have a score.\n");
3652 SCIP_CALL( ensureScoresPresent(scip, config, status, candidatelist, scorecontainer, statistics) );
3680 /** Get the candidates to temporarily branch on. In the LAB case this is the complete list of possible candidates. In the
3687 SCORECONTAINER* scorecontainer, /**< container to store the scores for later usage; or NULL if not running
3707 SCIP_CALL( getBestCandidates(scip, config, status, candidatelist, scorecontainer, statistics) );
3714 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Getting the branching candidates by selecting all candidates.\n");
3720 /** Executes the general branching on a node in a given direction (up/down) and repeats the algorithm from the new node */
3732 BRANCHINGRESULTDATA* branchingresult, /**< container to store the result of the branching in */
3733 SCORECONTAINER* scorecontainer, /**< container to retrieve already calculated scores; or NULL */
3736 #ifdef SCIP_STATISTIC
3773 * This list is used to generate a set packing constraint for cutoff branches which were reached by only using
3789 * This list is used to generate a set packing constraint for cutoff branches which were reached by only using
3798 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Started %s branching on var <%s> with 'val > %g' and bounds [<%g>..<%g>]\n",
3799 downbranching ? "down" : "up", SCIPvarGetName(branchvar), branchval, SCIPvarGetLbLocal(branchvar),
3802 SCIP_CALL( executeBranching(scip, config, downbranching, candidate, branchingresult, baselpsol, domainreductions,
3809 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Solving the LP took %" SCIP_LONGINT_FORMAT " iterations.\n",
3819 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The solved LP was infeasible and as such is cutoff\n");
3823 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The solved LP was feasible and has an objval <%g> (the parent objval was "
3834 /* store the warm start information in the candidate, so that it can be reused in a later branching */
3835 WARMSTARTINFO* warmstartinfo = downbranching ? candidate->downwarmstartinfo : candidate->upwarmstartinfo;
3837 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Storing warm start information for %sbranching on var <%s>\n",
3859 SCIP_CALL( candidateListGetAllFractionalCandidates(scip, &candidatelist, config->abbreviated && config->reusebasis) );
3862 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "%sbranching has <%i> candidates.\n", downbranching ? "Down" : "Up",
3878 SCIP_CALL( filterCandidates(scip, config, deeperstatus, scorecontainer, candidatelist, statistics) );
3886 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Now the objval is <%g>\n", branchingresult->objval);
3892 SCIP_CALL( selectVarRecursive(scip, deeperstatus, deeperpersistent, config, baselpsol, domainreductions,
3893 binconsdata, candidatelist, deeperdecision, scorecontainer, storewarmstartinfo, recursiondepth - 1,
3898 SCIP_CALL( selectVarRecursive(scip, deeperstatus, deeperpersistent, config, baselpsol, domainreductions,
3899 binconsdata, candidatelist, deeperdecision, scorecontainer, storewarmstartinfo, recursiondepth - 1,
3904 /* the proved dual bound of the deeper branching cannot be less than the current dual bound, as every deeper
3912 /* branchingresult->cutoff is TRUE, if the current child was directly infeasible (so here it is always
3920 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Both deeper children were cutoff, so the %s branch is "
3940 /* the current branching child is infeasible and we only branched on binary variables in lookahead branching */
3967 PERSISTENTDATA* persistent, /**< container to store data over multiple calls to the branching rule; or NULL */
3970 DOMAINREDUCTIONS* domainreductions, /**< container collecting all domain reductions found; or NULL */
3974 SCORECONTAINER* scorecontainer, /**< container to retrieve already calculated scores; or NULL */
3978 SCIP_Longint* niterations, /**< pointer to store the total number of iterations for this variable; or NULL*/
3979 int* ndeepestcutoffs, /**< pointer to store the total number of cutoffs on the deepest level; or NULL */
3980 SCIP_Real* bestgain, /**< pointer to store the best gain found with these candidates; or NULL */
3981 SCIP_Real* totalgains, /**< pointer to store the sum over all gains that are valid in both children;
4040 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Started selectVarRecursive with <%i> candidates: ", nlpcands);
4046 /* iterate over all current branching candidates and evaluate their two potential child nodes by:
4049 * - potentially evaluating branching candidates at the potential child node again by applying this method recursively
4052 * - results obtained for a candidate in a previous lookahead branching call at this node may be re-used
4053 * - while i counts the number of candidates evaluated in this call, we do not always start at the front
4054 * of the candidate array, but rather store at which index we stopped last time (e.g., because a domain reduction was
4055 * found and applied) and start from that index next time. Even though the set of branching candidates is probably different
4088 * this may happen if domain propagation on other candidates finds better bounds for the current candidate
4094 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Domain Propagation changed the bounds of a branching candidate."
4102 /* Reset the cutoffproofnodes, as the number of proof nodes from previous branching vars (which where not
4114 SCIP_CALL( getOldBranching(scip, persistent, branchvar, downbranchingresult, upbranchingresult,
4126 LABdebugMessage(scip, SCIP_VERBLEVEL_NORMAL, "Started branching on var <%s> with val <%g> and bounds "
4150 SCIP_CALL( executeBranchingRecursive(scip, status, config, baselpsol, candidate, localbaselpsolval,
4155 SCIP_CALL( executeBranchingRecursive(scip, status, config, baselpsol, candidate, localbaselpsolval,
4176 LABdebugMessage(scip, SCIP_VERBLEVEL_NORMAL, "-> down=%.9g (gain=%.9g, valid=%u, inf=%u), up=%.9g "
4179 downbranchingresult->cutoff, upbranchingresult->dualbound, upbranchingresult->dualbound - lpobjval,
4195 weightedgain = calculateWeightedGain(config, downbranchingresult, upbranchingresult, lpobjval);
4208 SCIP_CALL( updateOldBranching(scip, persistent, branchvar, branchval, downbranchingresult, upbranchingresult,
4228 SCIP_Real score = calculateScore(scip, config, branchvar, downbranchingresult, upbranchingresult,
4234 LABdebugMessage(scip, SCIP_VERBLEVEL_NORMAL, " -> variable <%s> is infeasible in both directions\n",
4247 LABdebugMessage(scip, SCIP_VERBLEVEL_NORMAL, " -> variable <%s> is infeasible in upward branch\n",
4250 /* apply down branching bound change at current node if we proved that this node is really infeasible and
4277 LABdebugMessage(scip, SCIP_VERBLEVEL_NORMAL, " -> variable <%s> is infeasible in downward branch\n",
4280 /* apply up branching bound change at current node if we proved that this node is really infeasible and
4307 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Neither branch is cut off and no limit reached.\n");
4317 /* the current canidate variable has a better score than the best candidate investigated so far */
4322 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Old best var <%s> with bounds [<%g>..<%g>] and score %g\n",
4323 SCIPvarGetName(decision->cand->branchvar), bestscorelowerbound, bestscoreupperbound, bestscore);
4354 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "New best var <%s> with bounds [<%g>..<%g>] and score %g\n",
4355 SCIPvarGetName(decision->cand->branchvar), bestscorelowerbound, bestscoreupperbound, bestscore);
4364 LABdebugMessage(scip, SCIP_VERBLEVEL_NORMAL, " -> cand %d/%d var <%s> (solval=%g, downgain=%g, upgain=%g,"
4365 " score=%g) -- best: <%s> (%g)\n", c, nlpcands, SCIPvarGetName(branchvar), branchval, downgain,
4372 /* only for abbreviated lookahead branching: we are in the FSB filtering step and store the score for this
4373 * variable and the warm starting basis to reuse it in the subsequent lookahead evaluation of the best
4379 if( probingdepth == 0 && (config->usebincons || config->usedomainreduction) && !useoldbranching
4380 && (config->maxnviolatedcons >= 0 || config->maxnviolatedbincons >= 0 || config->maxnviolateddomreds >= 0 ) )
4393 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The max number of violated binary constraints <%i> is "
4414 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The max number of violated binary constraints and bound "
4421 if( areBoundsChanged(scip, decision->cand->branchvar, bestscorelowerbound, bestscoreupperbound) )
4423 /* in case the bounds of the current highest scored solution have changed due to domain propagation during
4424 * the lookahead branching we can/should not branch on this variable but instead report the domain
4430 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Domain Propagation changed the bounds of a branching candidate."
4455 /** checks whether the current decision should be stored. This is the case if we found domain reductions
4457 * Then our current decision still holds true for the next call and can be reused without further calculations
4463 DOMAINREDUCTIONS* domainreductions /**< container collecting all domain reductions found; or NULL */
4483 PERSISTENTDATA* persistent, /**< container to store data over multiple calls to the branching rule; or NULL */
4486 SCORECONTAINER* scorecontainer, /**< container to retrieve already calculated scores; or NULL */
4494 {
4519 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Cannot perform probing in selectVarRecursive, depth limit reached. "
4537 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Only one candidate (<%s>) is given. This one is chosen without "
4548 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The objective value of the base lp is <%g>\n", lpobjval);
4552 /* we have to copy the current solution before getting the candidates, as we possibly solve some LPs during
4558 SCIP_CALL( filterCandidates(scip, config, status, scorecontainer, candidatelist, statistics) );
4580 /* we are at the top level, allocate some more data structures and start strong branching mode */
4589 SCIP_CALL( selectVarRecursive(scip, status, persistent, config, baselpsol, domainreductions, binconsdata, candidatelist,
4590 decision, scorecontainer, storewarmstartinfo, recursiondepth, lpobjval, NULL, NULL, NULL, NULL, NULL,
4593 SCIP_CALL( selectVarRecursive(scip, status, persistent, config, baselpsol, domainreductions, binconsdata, candidatelist,
4594 decision, scorecontainer, storewarmstartinfo, recursiondepth, lpobjval, NULL, NULL, NULL, NULL, NULL) );
4707 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Lookahead Branching would branch on variable <%s>\n",
4713 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Strong Branching has added domain reductions. LAB restarts.\n");
4736 * We can use the previous result, stored in the branchruledata, if the branchingvariable (as an indicator) is set and
4745 PERSISTENTDATA* persistent /**< container to store data over multiple calls to the branching rule */
4758 * This is the case, if in the previous run only non-violating constraints were added. In that case we can use the
4762 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4782 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Result: Branched based on previous solution. Variable <%s>\n",
4785 /* reset the var pointer, as this is our indicator whether we should branch on prev data in the next call */
4877 /* The variables given by the SCIPgetVars() array are sorted with the binaries at first and the integer variables
4878 * directly afterwards. With the SCIPvarGetProbindex() method we can access the index of a given variable in the
4879 * SCIPgetVars() array and as such we can use it to access our arrays which should only contain binary and integer
4884 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &branchruledata->persistent->lastbranchid, nvars) );
4885 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &branchruledata->persistent->lastbranchnlps, nvars) );
4886 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &branchruledata->persistent->lastbranchupres, nvars) );
4887 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &branchruledata->persistent->lastbranchdownres, nvars) );
4888 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &branchruledata->persistent->lastbranchlpobjval, nvars) );
4898 SCIP_CALL( SCIPallocBlockMemory(scip, &branchruledata->persistent->lastbranchupres[i]) ); /*lint !e866*/
4899 SCIP_CALL( SCIPallocBlockMemory(scip, &branchruledata->persistent->lastbranchdownres[i]) ); /*lint !e866*/
4977 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->nsinglecutoffs, recursiondepth) );
4978 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->nfullcutoffs, recursiondepth) );
4979 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->nlpssolved, recursiondepth) );
4980 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->nlpssolvedfsb, recursiondepth) );
4981 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->nlpiterations, recursiondepth) );
4982 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->nlpiterationsfsb, recursiondepth) );
4983 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->npropdomred, recursiondepth) );
4984 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->noldbranchused, recursiondepth) );
4985 SCIP_CALL( SCIPallocMemoryArray(scip, &branchruledata->statistics->chosenfsbcand, maxncands) );
5031 /** solving process deinitialization method of branching rule (called before branch and bound process data is freed) */
5082 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Created an unlinked copy of the base lp solution.\n");
5089 /* in case we stopped the previous run without a branching decision, we have stored the decision and execute it
5110 /* allocate and init the container used to store the FSB scores, later used to filter the candidates */
5114 SCIP_CALL( candidateListGetAllFractionalCandidates(scip, &candidatelist, config->abbreviated && config->reusebasis) );
5116 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "The base lp has <%i> variables with fractional value.\n",
5149 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "LP error with no valid candidate: select first candidate variable\n");
5157 /* this case may occure if the domain reductions that reached the limit were already applied via domain
5163 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Result before branching is %s\n", getStatusString(*result));
5165 if( *result != SCIP_CUTOFF /* a variable could not be branched in any direction or any of the calculated domain
5167 && *result != SCIP_REDUCEDDOM /* the domain of a variable was reduced by evaluating the calculated cutoffs */
5174 LABdebugMessage(scip, SCIP_VERBLEVEL_NORMAL, " -> %d candidates, selected variable <%s> (solval=%g, down=%g, "
5175 "up=%g)\n", candidatelist->ncandidates, SCIPvarGetName(decision->cand->branchvar), decision->cand->branchval,
5185 LABdebugMessage(scip, SCIP_VERBLEVEL_FULL, "Result after branching is %s\n", getStatusString(*result));
5189 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Result: Finished LookaheadBranching by branching.\n");
5193 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Result: Finished LookaheadBranching by reducing domains.\n");
5197 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Result: Finished LookaheadBranching by cutting off, as the current "
5202 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Result: Finished LookaheadBranching by adding constraints.\n");
5206 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Result: The remaining tree depth did not allow for multi level "
5211 LABdebugMessage(scip, SCIP_VERBLEVEL_HIGH, "Result: Could not find any variable to branch on.\n");
5264 /* needs to be allocated here, such that the previous decision can be filled and reset over multiple runs */
5270 SCIP_CALL( SCIPincludeBranchruleBasic(scip, &branchrule, BRANCHRULE_NAME, BRANCHRULE_DESC, BRANCHRULE_PRIORITY,
5292 "should binary constraints be added as rows to the base LP? (0: no, 1: separate, 2: as initial rows)",
5295 "how many constraints that are violated by the base lp solution should be gathered until the rule is stopped and "\
5297 &branchruledata->config->maxnviolatedcons, TRUE, DEFAULT_MAXNVIOLATEDCONS, 0, INT_MAX, NULL, NULL) );
5299 "how many binary constraints that are violated by the base lp solution should be gathered until the rule is "\
5301 &branchruledata->config->maxnviolatedbincons, TRUE, DEFAULT_MAXNVIOLATEDBINCONS, 0, INT_MAX, NULL, NULL) );
5303 "how many domain reductions that are violated by the base lp solution should be gathered until the rule is "\
5305 &branchruledata->config->maxnviolateddomreds, TRUE, DEFAULT_MAXNVIOLATEDDOMREDS, 0, INT_MAX, NULL, NULL) );
5309 &branchruledata->config->reevalage, TRUE, DEFAULT_REEVALAGE, 0LL, SCIP_LONGINT_MAX, NULL, NULL) );
5312 &branchruledata->config->recursiondepth, TRUE, DEFAULT_RECURSIONDEPTH, 1, INT_MAX, NULL, NULL) );
5334 "if only non violating constraints are added, should the branching decision be stored till the next call?",
5351 &branchruledata->config->maxproprounds, TRUE, DEFAULT_MAXPROPROUNDS, -1, INT_MAX, NULL, NULL) );
5358 "if scoringfunction is 's', this value is used to weight the min of the gains of two child problems",
5359 &branchruledata->config->minweight, TRUE, DEFAULT_MINWEIGHT, 0.0, SCIP_REAL_MAX, NULL, NULL) );
5362 "if scoringfunction is 's', this value is used to weight the max of the gains of two child problems",
5363 &branchruledata->config->maxweight, TRUE, DEFAULT_MAXWEIGHT, 0.0, SCIP_REAL_MAX, NULL, NULL) );
static SCIP_RETCODE scoreContainerCreate(SCIP *scip, SCORECONTAINER **scorecontainer, CONFIGURATION *config)
Definition: branch_lookahead.c:1543
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
Definition: scip_branch.c:384
static SCIP_RETCODE executeBranching(SCIP *scip, CONFIGURATION *config, SCIP_Bool downbranching, CANDIDATE *candidate, BRANCHINGRESULTDATA *resultdata, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *domreds, STATUS *status)
Definition: branch_lookahead.c:2435
static SCIP_RETCODE candidateListCreateWithCandidates(SCIP *scip, CANDIDATELIST **candidatelist, int ncandidates, SCIP_Bool storewarmstartinfo)
Definition: branch_lookahead.c:1272
Definition: type_result.h:33
Definition: type_result.h:47
Definition: type_result.h:37
SCIP_BRANCHRULEDATA * SCIPbranchruleGetData(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1848
Definition: type_result.h:34
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5120
public methods for SCIP parameter handling
Definition: branch_lookahead.c:1396
public methods for branch and bound tree
Definition: type_lp.h:39
SCIP_RETCODE SCIPbacktrackProbing(SCIP *scip, int probingdepth)
Definition: scip_probing.c:280
Definition: type_result.h:50
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:864
Definition: struct_scip.h:58
static SCIP_RETCODE getOldBranching(SCIP *scip, PERSISTENTDATA *persistent, SCIP_VAR *branchvar, BRANCHINGRESULTDATA *downbranchingresult, BRANCHINGRESULTDATA *upbranchingresult, SCIP_Real *oldlpobjval)
Definition: branch_lookahead.c:2985
public methods for memory management
static SCIP_RETCODE selectVarRecursive(SCIP *scip, STATUS *status, PERSISTENTDATA *persistent, CONFIGURATION *config, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *domainreductions, BINCONSDATA *binconsdata, CANDIDATELIST *candidatelist, BRANCHINGDECISION *decision, SCORECONTAINER *scorecontainer, SCIP_Bool storewarmstartinfo, int recursiondepth, SCIP_Real lpobjval, SCIP_Longint *niterations, int *ndeepestcutoffs, SCIP_Real *bestgain, SCIP_Real *totalgains, int *ntotalgains)
Definition: branch_lookahead.c:3978
#define SCIPallocClearBufferArray(scip, ptr, num)
Definition: scip_mem.h:132
static SCIP_RETCODE freePersistent(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
Definition: branch_lookahead.c:4807
static void binaryVarListDrop(BINARYVARLIST *list)
Definition: branch_lookahead.c:1166
static SCIP_RETCODE getFSBResult(SCIP *scip, CONFIGURATION *parentconfig, CANDIDATELIST *candidatelist, STATUS *status, SCORECONTAINER *scorecontainer)
Definition: branch_lookahead.c:3073
SCIP_Real SCIPgetVarPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
Definition: scip_var.c:8613
static SCIP_RETCODE binaryVarListCreate(SCIP *scip, BINARYVARLIST **list, int startsize)
Definition: branch_lookahead.c:1123
Definition: type_result.h:49
static SCIP_RETCODE domainReductionsCreate(SCIP *scip, DOMAINREDUCTIONS **domreds)
Definition: branch_lookahead.c:1413
SCIP_RETCODE SCIPincludeBranchruleLookahead(SCIP *scip)
Definition: branch_lookahead.c:5266
SCIP_RETCODE SCIPgetVarStrongbranchLast(SCIP *scip, SCIP_VAR *var, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Real *solval, SCIP_Real *lpobjval)
Definition: scip_var.c:3951
Definition: type_result.h:38
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:568
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4783
Definition: struct_var.h:198
static SCIP_RETCODE restoreFromWarmStartInfo(SCIP *scip, WARMSTARTINFO *warmstartinfo)
Definition: branch_lookahead.c:2386
interface methods for specific LP solvers
static SCIP_RETCODE getBestCandidates(SCIP *scip, CONFIGURATION *config, STATUS *status, CANDIDATELIST *candidatelist, SCORECONTAINER *scorecontainer)
Definition: branch_lookahead.c:3636
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
SCIP_RETCODE SCIPsetBranchruleExit(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXIT((*branchexit)))
Definition: scip_branch.c:190
SCIP_Real SCIPgetVarPseudocostCountCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8749
static int findInsertionPoint(SCIP *scip, SCORECONTAINER *scorecontainer, SCIP_Real scoretoinsert, CANDIDATE **candidates, int ncandidates)
Definition: branch_lookahead.c:1579
Definition: branch_lookahead.c:547
SCIP_RETCODE SCIPsetBranchruleFree(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHFREE((*branchfree)))
Definition: scip_branch.c:158
Definition: type_message.h:45
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
Definition: scip_var.c:4582
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)
Definition: scip_param.c:183
static SCIP_RETCODE candidateListGetAllFractionalCandidates(SCIP *scip, CANDIDATELIST **candidatelist, SCIP_Bool storewarmstartinfo)
Definition: branch_lookahead.c:1297
static void configurationCopy(CONFIGURATION *config, CONFIGURATION *copysource)
Definition: branch_lookahead.c:604
SCIP_RETCODE SCIPsetBranchruleCopy(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHCOPY((*branchcopy)))
Definition: scip_branch.c:142
SCIP_Longint SCIPgetVarStrongbranchNode(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:4100
SCIP_RETCODE SCIPlpiGetNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
static SCIP_RETCODE binConsDataCreate(SCIP *scip, BINCONSDATA **consdata, int maxdepth, int nstartcons)
Definition: branch_lookahead.c:1201
static SCIP_DECL_BRANCHFREE(branchFreeLookahead)
Definition: branch_lookahead.c:4942
static SCIP_RETCODE getNIterationsLastLP(SCIP *scip, SCIP_Longint *iterations)
Definition: branch_lookahead.c:2411
Definition: type_result.h:48
public methods for problem variables
static void scoreContainterResetBestSortedIndices(SCORECONTAINER *scorecontainer)
Definition: branch_lookahead.c:1532
static SCIP_Bool isUseOldBranching(SCIP *scip, CONFIGURATION *config, SCIP_VAR *branchvar)
Definition: branch_lookahead.c:2968
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5236
static void branchingResultDataInit(SCIP *scip, BRANCHINGRESULTDATA *resultdata)
Definition: branch_lookahead.c:475
SCIP_RETCODE SCIPchgVarLbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_probing.c:356
Definition: type_result.h:40
public methods for branching rules
SCIP_RETCODE SCIPincludeBranchruleBasic(SCIP *scip, SCIP_BRANCHRULE **branchruleptr, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_BRANCHRULEDATA *branchruledata)
Definition: scip_branch.c:105
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4827
static void applyDeeperDomainReductions(SCIP *scip, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *targetdomreds, DOMAINREDUCTIONS *downdomreds, DOMAINREDUCTIONS *updomreds)
Definition: branch_lookahead.c:1968
static SCIP_RETCODE createBinaryConstraint(SCIP *scip, CONFIGURATION *config, SCIP_CONS **constraint, char *constraintname, SCIP_VAR **consvars, int nconsvars)
Definition: branch_lookahead.c:2639
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:516
static void domainReductionsFree(SCIP *scip, DOMAINREDUCTIONS **domreds)
Definition: branch_lookahead.c:1454
SCIP_RETCODE SCIPcreateLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
Definition: scip_sol.c:419
Definition: type_message.h:46
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
Definition: scip_var.c:4550
static SCIP_RETCODE ensureScoresPresent(SCIP *scip, CONFIGURATION *config, STATUS *status, CANDIDATELIST *allcandidates, SCORECONTAINER *scorecontainer)
Definition: branch_lookahead.c:3477
public methods for SCIP variables
static SCIP_RETCODE branchingDecisionEnsureBoundArraysSize(SCIP *scip, BRANCHINGDECISION *decision, int nvars)
Definition: branch_lookahead.c:394
static void sortFirstCandidatesByScore(SCIP *scip, CANDIDATELIST *candidatelist, SCORECONTAINER *scorecontainer, int nbestcandidates)
Definition: branch_lookahead.c:3379
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)
Definition: scip_param.c:155
static void constraintListFree(SCIP *scip, CONSTRAINTLIST **conslist)
Definition: branch_lookahead.c:1086
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip_message.c:279
Definition: struct_tree.h:133
static SCIP_Bool isInitBranchruleData(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
Definition: branch_lookahead.c:4856
Definition: branch_lookahead.c:529
static SCIP_RETCODE addBinaryConstraint(SCIP *scip, CONFIGURATION *config, BINCONSDATA *binconsdata, SCIP_SOL *baselpsol)
Definition: branch_lookahead.c:2715
SCIP_Bool SCIPisStrongbranchDownFirst(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2645
public methods for numerical tolerances
SCIP_RETCODE SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
Definition: scip_branch.c:238
static SCIP_Bool areBoundsChanged(SCIP *scip, SCIP_VAR *var, SCIP_Real lowerbound, SCIP_Real upperbound)
Definition: branch_lookahead.c:2914
static SCIP_RETCODE copyCurrentSolution(SCIP *scip, SCIP_SOL **lpsol)
Definition: branch_lookahead.c:2208
public methods for querying solving statistics
static SCIP_RETCODE candidateListKeep(SCIP *scip, CANDIDATELIST *candidatelist, int nindices)
Definition: branch_lookahead.c:1367
Definition: struct_sol.h:63
SCIP_RETCODE SCIPtryStrongbranchLPSol(SCIP *scip, SCIP_Bool *foundsol, SCIP_Bool *cutoff)
Definition: scip_var.c:4020
static void binConsDataFree(SCIP *scip, BINCONSDATA **consdata)
Definition: branch_lookahead.c:1222
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
Definition: scip_var.c:8579
SCIP_Real SCIPgetBranchScore(SCIP *scip, SCIP_VAR *var, SCIP_Real downgain, SCIP_Real upgain)
Definition: scip_branch.c:838
Definition: branch_lookahead.c:442
public methods for the branch-and-bound tree
static SCIP_RETCODE applyBinaryConstraints(SCIP *scip, SCIP_NODE *basenode, CONSTRAINTLIST *conslist, CONFIGURATION *config, SCIP_Bool *consadded, SCIP_Bool *cutoff, SCIP_Bool *boundchange)
Definition: branch_lookahead.c:2785
Definition: type_result.h:41
SCIP_RETCODE SCIPaddClique(SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
Definition: scip_var.c:6819
static void createBinaryConstraintName(SCIP_VAR **binaryvars, int nbinaryvars, char *constraintname)
Definition: branch_lookahead.c:2682
static void applySingleDeeperDomainReductions(SCIP *scip, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *targetdomreds, DOMAINREDUCTIONS *domreds)
Definition: branch_lookahead.c:1925
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
Definition: scip_mem.h:111
Definition: branch_lookahead.c:309
Definition: branch_lookahead.c:1523
static SCIP_Bool isStoreDecision(CONFIGURATION *config, BINCONSDATA *binconsdata, DOMAINREDUCTIONS *domainreductions)
Definition: branch_lookahead.c:4474
static SCIP_Bool isBranchFurtherLoopDecrement(STATUS *status, int *loopcounter)
Definition: branch_lookahead.c:2948
static CANDIDATE * scoreContainerUpdateSortOrder(SCORECONTAINER *scorecontainer, CANDIDATE *candidate, int insertpoint)
Definition: branch_lookahead.c:1624
static SCIP_RETCODE filterCandidates(SCIP *scip, CONFIGURATION *config, STATUS *status, SCORECONTAINER *scorecontainer, CANDIDATELIST *candidatelist)
Definition: branch_lookahead.c:3697
Definition: type_result.h:35
Definition: struct_cons.h:37
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:529
SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound)
Definition: scip_probing.c:630
static SCIP_DECL_BRANCHEXITSOL(branchExitSolLookahead)
Definition: branch_lookahead.c:5047
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
static void addLowerBound(SCIP *scip, SCIP_VAR *var, SCIP_Real lowerbound, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *domainreductions)
Definition: branch_lookahead.c:1819
SCIP_RETCODE SCIPlpiFreeState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
Definition: type_result.h:36
static SCIP_Real calculateScaledCutoffScore(BRANCHINGRESULTDATA *downbranchingresult, BRANCHINGRESULTDATA *upbranchingresult)
Definition: branch_lookahead.c:3266
static SCIP_RETCODE warmStartInfoCreate(SCIP *scip, WARMSTARTINFO **warmstartinfo)
Definition: branch_lookahead.c:184
static SCIP_RETCODE executeBranchingRecursive(SCIP *scip, STATUS *status, CONFIGURATION *config, SCIP_SOL *baselpsol, CANDIDATE *candidate, SCIP_Real localbaselpsolval, int recursiondepth, DOMAINREDUCTIONS *domainreductions, BINCONSDATA *binconsdata, BRANCHINGRESULTDATA *branchingresult, SCORECONTAINER *scorecontainer, SCIP_Bool storewarmstartinfo, SCIP_Bool downbranching)
Definition: branch_lookahead.c:3736
static void addUpperBound(SCIP *scip, SCIP_VAR *var, SCIP_Real upperbound, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *domainreductions)
Definition: branch_lookahead.c:1902
static SCIP_Real calculateScore(SCIP *scip, CONFIGURATION *config, SCIP_VAR *branchvar, BRANCHINGRESULTDATA *downbranchingresult, BRANCHINGRESULTDATA *upbranchingresult, SCIP_Real lpobjval)
Definition: branch_lookahead.c:3295
Definition: type_retcode.h:33
SCIP_Bool SCIPareSolsEqual(SCIP *scip, SCIP_SOL *sol1, SCIP_SOL *sol2)
Definition: scip_sol.c:1761
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:890
SCIP_RETCODE SCIPsolveProbingLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
Definition: scip_probing.c:866
SCIP_RETCODE SCIPbranchVarVal(SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_NODE **downchild, SCIP_NODE **eqchild, SCIP_NODE **upchild)
Definition: scip_branch.c:1068
SCIP_Longint SCIPgetVarStrongbranchLPAge(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:4134
Definition: type_result.h:42
static void branchingDecisionFree(SCIP *scip, BRANCHINGDECISION **decision)
Definition: branch_lookahead.c:417
SCIP_RETCODE SCIPlpiFreeNorms(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
static SCIP_RETCODE statusCreate(SCIP *scip, STATUS **status)
Definition: branch_lookahead.c:1488
Definition: struct_branch.h:69
static SCIP_Bool isUsePreviousResult(SCIP *scip, SCIP_SOL *currentsol, PERSISTENTDATA *persistent)
Definition: branch_lookahead.c:4756
Definition: branch_lookahead.c:1113
static SCIP_DECL_BRANCHEXECLP(branchExeclpLookahead)
Definition: branch_lookahead.c:5064
public methods for constraint handler plugins and constraints
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
Definition: scip_prob.c:3376
static SCIP_Bool isBranchFurther(STATUS *status, SCIP_Bool checkdomreds)
Definition: branch_lookahead.c:2934
static SCIP_RETCODE branchingDecisionCreate(SCIP *scip, BRANCHINGDECISION **decision)
Definition: branch_lookahead.c:331
static void branchingResultDataFree(SCIP *scip, BRANCHINGRESULTDATA **resultdata)
Definition: branch_lookahead.c:517
static void branchingResultDataCopy(BRANCHINGRESULTDATA *sourcedata, BRANCHINGRESULTDATA *targetdata)
Definition: branch_lookahead.c:496
SCIP_RETCODE SCIPstartStrongbranch(SCIP *scip, SCIP_Bool enablepropagation)
Definition: scip_var.c:2676
static void configurationFree(SCIP *scip, CONFIGURATION **config)
Definition: branch_lookahead.c:638
Definition: type_message.h:44
public data structures and miscellaneous methods
static SCIP_RETCODE constraintListCreate(SCIP *scip, CONSTRAINTLIST **conslist, int startsize)
Definition: branch_lookahead.c:1026
static SCIP_RETCODE filterBestCandidates(SCIP *scip, CONFIGURATION *config, SCORECONTAINER *scorecontainer, CANDIDATELIST *candidatelist)
Definition: branch_lookahead.c:3594
Definition: branch_lookahead.c:1193
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
SCIP_RETCODE SCIPlpiGetState(SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
Definition: scip_prob.c:3810
BRANCHINGRESULTDATA ** lastbranchdownres
Definition: branch_lookahead.c:541
void SCIPbranchruleSetData(SCIP_BRANCHRULE *branchrule, SCIP_BRANCHRULEDATA *branchruledata)
Definition: branch.c:1858
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
Definition: scip_cons.c:2550
SCIP_RETCODE SCIPsetBranchruleExitsol(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXITSOL((*branchexitsol)))
Definition: scip_branch.c:222
static void addUpperBoundProofNode(SCIP *scip, SCIP_VAR *var, SCIP_Real upperbound, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *domainreductions)
Definition: branch_lookahead.c:1840
static SCIP_RETCODE scoreContainerFree(SCIP *scip, SCORECONTAINER **scorecontainer)
Definition: branch_lookahead.c:1693
static SCIP_Real calculateWeightedGain(CONFIGURATION *config, BRANCHINGRESULTDATA *downbranchingresult, BRANCHINGRESULTDATA *upbranchingresult, SCIP_Real lpobjval)
Definition: branch_lookahead.c:3227
static SCIP_RETCODE updateOldBranching(SCIP *scip, PERSISTENTDATA *persistent, SCIP_VAR *branchvar, SCIP_Real branchval, BRANCHINGRESULTDATA *downbranchingresult, BRANCHINGRESULTDATA *upbranchingresult, SCIP_Real lpobjval)
Definition: branch_lookahead.c:3036
SCIP_RETCODE SCIPcreateConsLogicor(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)
Definition: cons_logicor.c:5165
Definition: branch_lookahead.c:246
Definition: branch_lookahead.c:1473
static SCIP_RETCODE candidateCreate(SCIP *scip, CANDIDATE **candidate, SCIP_Bool storelpi)
Definition: branch_lookahead.c:257
public methods for the LP relaxation, rows and columns
static SCIP_Real calculateScoreFromResult(SCIP *scip, SCIP_VAR *branchvar, BRANCHINGRESULTDATA *downbranchingresult, BRANCHINGRESULTDATA *upbranchingresult, SCIP_Real lpobjval)
Definition: branch_lookahead.c:3186
Definition: type_lp.h:36
Definition: type_history.h:34
Definition: branch_lookahead.c:1013
public methods for branching rule plugins and branching
SCIP_RETCODE SCIPsetVarStrongbranchData(SCIP *scip, SCIP_VAR *var, SCIP_Real lpobjval, SCIP_Real primsol, SCIP_Real down, SCIP_Real up, SCIP_Bool downvalid, SCIP_Bool upvalid, SCIP_Longint iter, int itlim)
Definition: scip_var.c:3985
general public methods
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:555
SCIP_RETCODE SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:239
Definition: type_history.h:35
public methods for solutions
static SCIP_RETCODE applyDomainReductions(SCIP *scip, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *domreds, SCIP_Bool *domredcutoff, SCIP_Bool *domred)
Definition: branch_lookahead.c:2039
static SCIP_Bool branchingDecisionIsValid(BRANCHINGDECISION *decision)
Definition: branch_lookahead.c:382
static SCIP_RETCODE initBranchruleData(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
Definition: branch_lookahead.c:4871
public methods for the probing mode
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
Definition: scip_cons.c:1187
public methods for message output
Definition: type_result.h:43
BRANCHINGRESULTDATA ** lastbranchupres
Definition: branch_lookahead.c:540
static SCIP_RETCODE branchingResultDataCreate(SCIP *scip, BRANCHINGRESULTDATA **resultdata)
Definition: branch_lookahead.c:460
static SCIP_RETCODE candidateListFree(SCIP *scip, CANDIDATELIST **candidatelist)
Definition: branch_lookahead.c:1336
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1970
SCIP_Bool SCIPlpiIsPrimalFeasible(SCIP_LPI *lpi)
static SCIP_RETCODE branchOnVar(SCIP *scip, BRANCHINGDECISION *decision)
Definition: branch_lookahead.c:2227
SCIP_RETCODE SCIPsetBranchruleInit(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINIT((*branchinit)))
Definition: scip_branch.c:174
public methods for message handling
static SCIP_RETCODE selectVarStart(SCIP *scip, CONFIGURATION *config, PERSISTENTDATA *persistent, STATUS *status, BRANCHINGDECISION *decision, SCORECONTAINER *scorecontainer, SCIP_Bool storewarmstartinfo, CANDIDATELIST *candidatelist)
Definition: branch_lookahead.c:4494
static void branchingDecisionCopy(BRANCHINGDECISION *sourcedecision, BRANCHINGDECISION *targetdecision)
Definition: branch_lookahead.c:364
SCIP_RETCODE SCIPsetProbingLPState(SCIP *scip, SCIP_LPISTATE **lpistate, SCIP_LPINORMS **lpinorms, SCIP_Bool primalfeas, SCIP_Bool dualfeas)
Definition: scip_probing.c:923
Definition: type_lp.h:35
static SCIP_DECL_BRANCHCOPY(branchCopyLookahead)
Definition: branch_lookahead.c:4929
Definition: type_result.h:45
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:542
static void binaryVarListFree(SCIP *scip, BINARYVARLIST **list)
Definition: branch_lookahead.c:1180
static SCIP_RETCODE warmStartInfoFree(SCIP *scip, WARMSTARTINFO **warmstartinfo)
Definition: branch_lookahead.c:214
static void addLowerBoundProofNode(SCIP *scip, SCIP_VAR *var, SCIP_Real lowerbound, SCIP_SOL *baselpsol, DOMAINREDUCTIONS *domainreductions)
Definition: branch_lookahead.c:1759
Definition: type_result.h:44
static SCIP_RETCODE storeWarmStartInfo(SCIP *scip, WARMSTARTINFO *warmstartinfo)
Definition: branch_lookahead.c:2355
static SCIP_RETCODE scoreContainerSetScore(SCIP *scip, SCORECONTAINER *scorecontainer, CANDIDATE *cand, SCIP_Real score)
Definition: branch_lookahead.c:1649
Definition: type_lp.h:33
Definition: type_lp.h:38
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
Definition: scip_numerics.c:952
Definition: type_result.h:46
Definition: branch_lookahead.c:1236
static SCIP_RETCODE candidateFree(SCIP *scip, CANDIDATE **candidate)
Definition: branch_lookahead.c:286
Definition: branch_lookahead.c:174
static SCIP_RETCODE binaryVarListAppend(SCIP *scip, BINARYVARLIST *list, SCIP_VAR *vartoadd)
Definition: branch_lookahead.c:1145
static SCIP_RETCODE candidateListCreate(SCIP *scip, CANDIDATELIST **candidatelist, int ncandidates)
Definition: branch_lookahead.c:1246
Definition: objbenders.h:33
public methods for global and local (sub)problems
SCIP_RETCODE SCIPchgVarUbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_probing.c:400
lookahead LP branching rule
static SCIP_RETCODE usePreviousResult(SCIP *scip, BRANCHINGDECISION *decision, SCIP_RESULT *result)
Definition: branch_lookahead.c:4780
static SCIP_Real calculateScoreFromPseudocosts(SCIP *scip, CANDIDATE *lpcand)
Definition: branch_lookahead.c:3330
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
Definition: scip_sol.c:1410
static SCIP_DECL_BRANCHINIT(branchInitLookahead)
Definition: branch_lookahead.c:4963
static SCIP_RETCODE configurationCreate(SCIP *scip, CONFIGURATION **config)
Definition: branch_lookahead.c:589
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)
Definition: scip_param.c:211
static SCIP_Bool isCandidateReliable(SCIP *scip, SCIP_VAR *branchvar)
Definition: branch_lookahead.c:3444
Definition: type_result.h:39
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
Definition: scip_var.c:1530
static SCIP_RETCODE constraintListAppend(SCIP *scip, CONSTRAINTLIST *list, SCIP_VAR **consvars, int nconsvars, SCIP_Bool violated)
Definition: branch_lookahead.c:1051
static SCIP_Bool warmStartInfoIsReadable(WARMSTARTINFO *warmstartinfo)
Definition: branch_lookahead.c:204
static SCIP_Bool isCurrentNodeCutoff(SCIP *scip)
Definition: branch_lookahead.c:3466
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)
Definition: scip_param.c:129
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
Definition: scip_sol.c:377
memory allocation routines
Definition: type_var.h:58