Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v9-minor'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Nov 9, 2024
2 parents 119a20e + 1077457 commit 467f15a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 21 deletions.
2 changes: 2 additions & 0 deletions src/scip/nodesel.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,8 @@ SCIP_RETCODE SCIPnodepqBound(
--pos;

node->cutoff = TRUE;
node->lowerbound = SCIPsetInfinity(set);
node->estimate = SCIPsetInfinity(set);

if( node->depth == 0 )
stat->rootlowerbound = SCIPsetInfinity(set);
Expand Down
13 changes: 9 additions & 4 deletions src/scip/scip_solvingstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,10 @@ SCIP_Real SCIPgetFirstLPLowerboundRoot(
return SCIPprobInternObjval(scip->transprob, scip->origprob, scip->set, scip->stat->firstlpdualbound);
}

/** the primal bound of the very first solution */
/** gets the primal bound of the very first solution
*
* @return the primal bound of the very first solution
*/
SCIP_Real SCIPgetFirstPrimalBound(
SCIP* scip /**< SCIP data structure */
)
Expand Down Expand Up @@ -2283,7 +2286,7 @@ void SCIPincAvgGMIeff(
SCIPhistoryIncGMIeffSum(scip->stat->glbhistory, gmieff);
}

/** Increases the cumulative normalized efficacy of average (over all variables) GMI cuts
/** returns the average normalized efficacy of a GMI cut over all variables
*
* @return the average normalized efficacy of a GMI cut over all variables
*
Expand Down Expand Up @@ -4513,7 +4516,6 @@ int SCIPgetNImplications(
* - \ref SCIP_STAGE_EXITSOLVE
*
* @deprecated because binary implications are now stored as cliques, please use SCIPwriteCliqueGraph() instead
*
*/ /*lint -e715*/
SCIP_RETCODE SCIPwriteImplicationConflictGraph(
SCIP* scip, /**< SCIP data structure */
Expand Down Expand Up @@ -4544,7 +4546,10 @@ void SCIPstoreSolutionGap(
}
}

/** recomputes and returns the primal dual gap stored in the stats */
/** recomputes and returns the primal dual gap stored in the stats
*
* @return returns the primal dual gap stored in the stats
*/
SCIP_EXPORT
SCIP_Real SCIPgetPrimalDualIntegral(
SCIP* scip /**< SCIP data structure */
Expand Down
57 changes: 42 additions & 15 deletions src/scip/scip_solvingstats.h
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,9 @@ int SCIPgetNSepaRounds(
SCIP* scip /**< SCIP data structure */
);

/** get total number of cuts found so far; this includes global cuts from the cut pool as often as they are separated
/** get total number of cuts added to the sepastore so far; this includes global cuts from the cut pool as often as they are separated
*
* @return the total number of cuts found so far
* @return the total number of cuts added to the sepastore so far
*
* @pre This method can be called if SCIP is in one of the following stages:
* - \ref SCIP_STAGE_PRESOLVED
Expand Down Expand Up @@ -834,9 +834,9 @@ int SCIPgetNCutsApplied(
SCIP* scip /**< SCIP data structure */
);

/** get total number of constraints found in conflict analysis (conflict and reconvergence constraints)
/** get total number of constraints found in conflict analysis (conflict, reconvergence constraints, and dual proofs)
*
* @return the total number of constraints found in conflict analysis (conflict and reconvergence constraints)
* @return the total number of constraints found in conflict analysis (conflict, reconvergence constraints, and dual proofs)
*
* @pre This method can be called if SCIP is in one of the following stages:
* - \ref SCIP_STAGE_TRANSFORMED
Expand Down Expand Up @@ -1003,7 +1003,15 @@ int SCIPgetNEnabledConss(
SCIP* scip /**< SCIP data structure */
);

/** gets average dual bound of all unprocessed nodes for original problem */
/** gets average dual bound of all unprocessed nodes for original problem
*
* @return the average dual bound of all unprocessed nodes for original problem
*
* @pre This method can be called if SCIP is in one of the following stages:
* - \ref SCIP_STAGE_PRESOLVED
* - \ref SCIP_STAGE_SOLVING
* - \ref SCIP_STAGE_SOLVED
*/
SCIP_EXPORT
SCIP_Real SCIPgetAvgDualbound(
SCIP* scip /**< SCIP data structure */
Expand Down Expand Up @@ -1036,6 +1044,7 @@ SCIP_Real SCIPgetAvgLowerbound(
* - \ref SCIP_STAGE_INITSOLVE
* - \ref SCIP_STAGE_SOLVING
* - \ref SCIP_STAGE_SOLVED
* - \ref SCIP_STAGE_EXITSOLVE
*/
SCIP_EXPORT
SCIP_Real SCIPgetDualbound(
Expand Down Expand Up @@ -1130,7 +1139,10 @@ SCIP_Real SCIPgetFirstLPLowerboundRoot(
);


/** the primal bound of the very first solution */
/** gets the primal bound of the very first solution
*
* @return the primal bound of the very first solution
*/
SCIP_EXPORT
SCIP_Real SCIPgetFirstPrimalBound(
SCIP* scip /**< SCIP data structure */
Expand Down Expand Up @@ -1216,6 +1228,7 @@ SCIP_Real SCIPgetCutoffbound(
* - \ref SCIP_STAGE_SOLVING
*
* @note the given cutoff bound has to better or equal to known one (SCIPgetCutoffbound())
* @note a given cutoff bound is also used for updating the objective limit, if possible
*/
SCIP_EXPORT
SCIP_RETCODE SCIPupdateCutoffbound(
Expand Down Expand Up @@ -1251,7 +1264,10 @@ SCIP_Bool SCIPisPrimalboundSol(
* or infinity, if they have opposite sign
*
* @pre This method can be called if SCIP is in one of the following stages:
* - \ref SCIP_STAGE_PRESOLVING
* - \ref SCIP_STAGE_EXITPRESOLVE
* - \ref SCIP_STAGE_PRESOLVED
* - \ref SCIP_STAGE_INITSOLVE
* - \ref SCIP_STAGE_SOLVING
* - \ref SCIP_STAGE_SOLVED
*/
Expand Down Expand Up @@ -1474,15 +1490,22 @@ SCIP_Real SCIPgetAvgPseudocostScoreCurrentRun(
SCIP* scip /**< SCIP data structure */
);

/** gets the average conflict score value over all variables */
/** gets the average conflict score value over all variables
*
* @return the average conflict score value over all variables
*
* @pre This method can be called if SCIP is in one of the following stages:
* - \ref SCIP_STAGE_SOLVING
* - \ref SCIP_STAGE_SOLVED
*/
SCIP_EXPORT
SCIP_Real SCIPgetAvgConflictScore(
SCIP* scip /**< SCIP data structure */
);

/** gets the average conflict score value over all variables, only using the conflict information of the current run
/** gets the average conflict score value over all variables, only using the conflict score information of the current run
*
* @return the average conflict score value over all variables, only using the conflict information of the current run
* @return the average conflict score value over all variables, only using the conflict score information of the current run
*
* @pre This method can be called if SCIP is in one of the following stages:
* - \ref SCIP_STAGE_SOLVING
Expand Down Expand Up @@ -1622,9 +1645,9 @@ SCIP_Real SCIPgetAvgCutoffScore(
SCIP* scip /**< SCIP data structure */
);

/** gets the average cutoff score value over all variables, only using the cutoff information of the current run
/** gets the average cutoff score value over all variables, only using the cutoff score information of the current run
*
* @return the average cutoff score value over all variables, only using the cutoff information of the current run
* @return the average cutoff score value over all variables, only using the cutoff score information of the current run
*
* @pre This method can be called if SCIP is in one of the following stages:
* - \ref SCIP_STAGE_SOLVING
Expand Down Expand Up @@ -1660,11 +1683,12 @@ void SCIPincAvgGMIeff(
SCIP_Real gmieff /**< average normalized GMI efficacy over all variables */
);

/** gets deterministic time number of LPs solved so far
/** computes a deterministic measure of time from statistics
*
* @return the total number of LPs solved so far
* @return the deterministic time
*
* @pre This method can be called if SCIP is in one of the following stages:
* - \ref SCIP_STAGE_PRESOLVING
* - \ref SCIP_STAGE_PRESOLVED
* - \ref SCIP_STAGE_SOLVING
* - \ref SCIP_STAGE_SOLVED
Expand Down Expand Up @@ -2241,7 +2265,7 @@ int SCIPgetNImplications(
* - \ref SCIP_STAGE_SOLVED
* - \ref SCIP_STAGE_EXITSOLVE
*
* @deprecated because binary implications are now stored as cliques
* @deprecated because binary implications are now stored as cliques, please use SCIPwriteCliqueGraph() instead
*/
SCIP_EXPORT
SCIP_DEPRECATED
Expand All @@ -2257,7 +2281,10 @@ void SCIPstoreSolutionGap(
SCIP* scip /**< SCIP data structure */
);

/** recomputes and returns the primal dual gap stored in the stats */
/** recomputes and returns the primal dual gap stored in the stats
*
* @return returns the primal dual gap stored in the stats
*/
SCIP_EXPORT
SCIP_Real SCIPgetPrimalDualIntegral(
SCIP* scip /**< SCIP data structure */
Expand Down
9 changes: 7 additions & 2 deletions src/scip/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,8 @@ SCIP_RETCODE SCIPnodeCutoff(
assert(set != NULL);
assert(stat != NULL);
assert(tree != NULL);
assert((tree->focusnode != NULL && SCIPnodeGetType(tree->focusnode) == SCIP_NODETYPE_REFOCUSNODE) || !set->misc_calcintegral || SCIPtreeGetLowerbound(tree, set) == stat->lastlowerbound); /*lint !e777*/
assert((tree->focusnode != NULL && SCIPnodeGetType(tree->focusnode) == SCIP_NODETYPE_REFOCUSNODE)
|| !set->misc_calcintegral || SCIPsetIsRelEQ(set, SCIPtreeGetLowerbound(tree, set), stat->lastlowerbound));

SCIPsetDebugMsg(set, "cutting off %s node #%" SCIP_LONGINT_FORMAT " at depth %d (cutoffdepth: %d)\n",
node->active ? "active" : "inactive", SCIPnodeGetNumber(node), SCIPnodeGetDepth(node), tree->cutoffdepth);
Expand Down Expand Up @@ -2389,7 +2390,8 @@ void SCIPnodeUpdateLowerbound(
assert(stat != NULL);
assert(set != NULL);
assert(!SCIPsetIsInfinity(set, newbound));
assert((tree->focusnode != NULL && SCIPnodeGetType(tree->focusnode) == SCIP_NODETYPE_REFOCUSNODE) || !set->misc_calcintegral || SCIPtreeGetLowerbound(tree, set) == stat->lastlowerbound); /*lint !e777*/
assert((tree->focusnode != NULL && SCIPnodeGetType(tree->focusnode) == SCIP_NODETYPE_REFOCUSNODE)
|| !set->misc_calcintegral || SCIPsetIsRelEQ(set, SCIPtreeGetLowerbound(tree, set), stat->lastlowerbound));

if( SCIPnodeGetLowerbound(node) < newbound )
{
Expand Down Expand Up @@ -4495,7 +4497,10 @@ SCIP_RETCODE SCIPnodeFocus(

/* remove node from the queue */
SCIP_CALL( SCIPnodepqRemove(tree->leaves, set, *node) );

(*node)->cutoff = TRUE;
(*node)->lowerbound = SCIPsetInfinity(set);
(*node)->estimate = SCIPsetInfinity(set);

if( (*node)->depth == 0 )
stat->rootlowerbound = SCIPsetInfinity(set);
Expand Down

0 comments on commit 467f15a

Please sign in to comment.