Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for dive sets to control the generic diving algorithm

Functions

SCIP_EXPORT const char * SCIPdivesetGetName (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetMinRelDepth (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetMaxRelDepth (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Longint SCIPdivesetGetSolSuccess (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT int SCIPdivesetGetNCalls (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT int SCIPdivesetGetNSolutionCalls (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT int SCIPdivesetGetMinDepth (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT int SCIPdivesetGetMaxDepth (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetAvgDepth (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT int SCIPdivesetGetMinSolutionDepth (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT int SCIPdivesetGetMaxSolutionDepth (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetAvgSolutionDepth (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT SCIP_Longint SCIPdivesetGetNLPIterations (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT SCIP_Longint SCIPdivesetGetNProbingNodes (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT SCIP_Longint SCIPdivesetGetNBacktracks (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT SCIP_Longint SCIPdivesetGetNConflicts (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT SCIP_Longint SCIPdivesetGetNSols (SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetMaxLPIterQuot (SCIP_DIVESET *diveset)
 
SCIP_EXPORT int SCIPdivesetGetMaxLPIterOffset (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetUbQuotNoSol (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetAvgQuotNoSol (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetUbQuot (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetAvgQuot (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Bool SCIPdivesetUseBacktrack (SCIP_DIVESET *diveset)
 
SCIP_EXPORT int SCIPdivesetGetLPSolveFreq (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Real SCIPdivesetGetLPResolveDomChgQuot (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Bool SCIPdivesetUseOnlyLPBranchcands (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Bool SCIPdivesetSupportsType (SCIP_DIVESET *diveset, SCIP_DIVETYPE divetype)
 
SCIP_EXPORT SCIP_RANDNUMGENSCIPdivesetGetRandnumgen (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_Bool SCIPdivesetIsPublic (SCIP_DIVESET *diveset)
 
SCIP_EXPORT SCIP_RETCODE SCIPcreateDiveset (SCIP *scip, SCIP_DIVESET **diveset, SCIP_HEUR *heur, const char *name, SCIP_Real minreldepth, SCIP_Real maxreldepth, SCIP_Real maxlpiterquot, SCIP_Real maxdiveubquot, SCIP_Real maxdiveavgquot, SCIP_Real maxdiveubquotnosol, SCIP_Real maxdiveavgquotnosol, SCIP_Real lpresolvedomchgquot, int lpsolvefreq, int maxlpiterofs, unsigned int initialseed, SCIP_Bool backtrack, SCIP_Bool onlylpbranchcands, SCIP_Bool ispublic, SCIP_Bool specificsos1score, SCIP_DECL_DIVESETGETSCORE((*divesetgetscore)), SCIP_DECL_DIVESETAVAILABLE((*divesetavailable)))
 
SCIP_EXPORT SCIP_RETCODE SCIPisDivesetAvailable (SCIP *scip, SCIP_DIVESET *diveset, SCIP_Bool *available)
 

Function Documentation

◆ SCIPdivesetGetName()

SCIP_EXPORT const char* SCIPdivesetGetName ( SCIP_DIVESET diveset)

get the name of the dive set

Parameters
divesetdiving settings

Definition at line 425 of file heur.c.

References SCIP_Diveset::name, and NULL.

Referenced by findAndStoreDivesets(), SCIPperformGenericDivingAlgorithm(), SCIPprintHeuristicStatistics(), and solveLP().

◆ SCIPdivesetGetMinRelDepth()

SCIP_EXPORT SCIP_Real SCIPdivesetGetMinRelDepth ( SCIP_DIVESET diveset)

get the minimum relative depth of the diving settings

Parameters
divesetdiving settings

Definition at line 435 of file heur.c.

References SCIP_Diveset::minreldepth.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetGetMaxRelDepth()

SCIP_EXPORT SCIP_Real SCIPdivesetGetMaxRelDepth ( SCIP_DIVESET diveset)

get the maximum relative depth of the diving settings

Parameters
divesetdiving settings

Definition at line 443 of file heur.c.

References SCIP_Diveset::maxreldepth.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetGetSolSuccess()

SCIP_EXPORT SCIP_Longint SCIPdivesetGetSolSuccess ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the number of successful runs of the diving settings

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 451 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::nbestsolsfound, SCIP_DivesetStats::nsolsfound, and NULL.

Referenced by divesetGetSelectionScore().

◆ SCIPdivesetGetNCalls()

SCIP_EXPORT int SCIPdivesetGetNCalls ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the number of calls to this dive set

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 465 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::ncalls, and NULL.

Referenced by divesetGetSelectionScore(), getDivesetIterLimit(), and SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetNSolutionCalls()

SCIP_EXPORT int SCIPdivesetGetNSolutionCalls ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the number of calls successfully terminated at a feasible leaf node

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 478 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::nsolcalls, and NULL.

Referenced by SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetMinDepth()

SCIP_EXPORT int SCIPdivesetGetMinDepth ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the minimum depth reached by this dive set

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 491 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::mindepth, and NULL.

Referenced by SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetMaxDepth()

SCIP_EXPORT int SCIPdivesetGetMaxDepth ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the maximum depth reached by this dive set

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 504 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::maxdepth, and NULL.

Referenced by SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetAvgDepth()

SCIP_EXPORT SCIP_Real SCIPdivesetGetAvgDepth ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the average depth this dive set reached during execution

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 517 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::ncalls, NULL, SCIP_Real, and SCIP_DivesetStats::totaldepth.

Referenced by divesetGetSelectionScore(), and SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetMinSolutionDepth()

SCIP_EXPORT int SCIPdivesetGetMinSolutionDepth ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the minimum depth at which this dive set found a solution

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 530 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::minsoldepth, and NULL.

Referenced by SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetMaxSolutionDepth()

SCIP_EXPORT int SCIPdivesetGetMaxSolutionDepth ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the maximum depth at which this dive set found a solution

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 543 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::maxsoldepth, and NULL.

Referenced by SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetAvgSolutionDepth()

SCIP_EXPORT SCIP_Real SCIPdivesetGetAvgSolutionDepth ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the average depth at which this dive set found a solution

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 556 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::nsolcalls, NULL, SCIP_Real, and SCIP_DivesetStats::totalsoldepth.

Referenced by SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetNLPIterations()

SCIP_EXPORT SCIP_Longint SCIPdivesetGetNLPIterations ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the total number of LP iterations used by this dive set

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 569 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::nlpiterations, and NULL.

Referenced by divesetGetSelectionScore(), getDivesetIterLimit(), getLPIterlimit(), SCIPperformGenericDivingAlgorithm(), SCIPprintHeuristicStatistics(), and solveLP().

◆ SCIPdivesetGetNProbingNodes()

SCIP_EXPORT SCIP_Longint SCIPdivesetGetNProbingNodes ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the total number of probing nodes used by this dive set

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 582 of file heur.c.

References divesetGetStats(), NULL, and SCIP_DivesetStats::totalnnodes.

Referenced by divesetGetSelectionScore(), and SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetNBacktracks()

SCIP_EXPORT SCIP_Longint SCIPdivesetGetNBacktracks ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the total number of backtracks performed by this dive set

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 595 of file heur.c.

References divesetGetStats(), NULL, and SCIP_DivesetStats::totalnbacktracks.

Referenced by divesetGetSelectionScore(), and SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetNConflicts()

SCIP_EXPORT SCIP_Longint SCIPdivesetGetNConflicts ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the total number of conflicts found by this dive set

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 608 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::nconflictsfound, and NULL.

Referenced by divesetGetSelectionScore(), and SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetNSols()

SCIP_EXPORT SCIP_Longint SCIPdivesetGetNSols ( SCIP_DIVESET diveset,
SCIP_DIVECONTEXT  divecontext 
)

get the total number of solutions (leaf and rounded solutions) found by the dive set

Parameters
divesetdiving settings
divecontextcontext for diving statistics

Definition at line 621 of file heur.c.

References divesetGetStats(), SCIP_DivesetStats::nsolsfound, and NULL.

Referenced by divesetGetSelectionScore(), getDivesetIterLimit(), and SCIPprintHeuristicStatistics().

◆ SCIPdivesetGetMaxLPIterQuot()

SCIP_EXPORT SCIP_Real SCIPdivesetGetMaxLPIterQuot ( SCIP_DIVESET diveset)

get the maximum LP iterations quotient of the diving settings

Parameters
divesetdiving settings

Definition at line 635 of file heur.c.

References SCIP_Diveset::maxlpiterquot.

Referenced by getDivesetIterLimit().

◆ SCIPdivesetGetMaxLPIterOffset()

SCIP_EXPORT int SCIPdivesetGetMaxLPIterOffset ( SCIP_DIVESET diveset)

get the maximum LP iterations offset of the diving settings

Parameters
divesetdiving settings

Definition at line 643 of file heur.c.

References SCIP_Diveset::maxlpiterofs.

Referenced by getDivesetIterLimit().

◆ SCIPdivesetGetUbQuotNoSol()

SCIP_EXPORT SCIP_Real SCIPdivesetGetUbQuotNoSol ( SCIP_DIVESET diveset)

get the maximum upper bound quotient parameter of the diving settings if no solution is available

Parameters
divesetdiving settings

Definition at line 651 of file heur.c.

References SCIP_Diveset::maxdiveubquotnosol.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetGetAvgQuotNoSol()

SCIP_EXPORT SCIP_Real SCIPdivesetGetAvgQuotNoSol ( SCIP_DIVESET diveset)

get the average quotient parameter of the diving settings if no solution is available

Parameters
divesetdiving settings

Definition at line 659 of file heur.c.

References SCIP_Diveset::maxdiveavgquotnosol.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetGetUbQuot()

SCIP_EXPORT SCIP_Real SCIPdivesetGetUbQuot ( SCIP_DIVESET diveset)

get the maximum upper bound quotient parameter of the diving settings if an incumbent solution exists

Parameters
divesetdiving settings

Definition at line 666 of file heur.c.

References SCIP_Diveset::maxdiveubquot.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetGetAvgQuot()

SCIP_EXPORT SCIP_Real SCIPdivesetGetAvgQuot ( SCIP_DIVESET diveset)

get the average upper bound quotient parameter of the diving settings if an incumbent solution exists

Parameters
divesetdiving settings

Definition at line 674 of file heur.c.

References SCIP_Diveset::maxdiveavgquot.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetUseBacktrack()

SCIP_EXPORT SCIP_Bool SCIPdivesetUseBacktrack ( SCIP_DIVESET diveset)

should backtracking be applied?

Parameters
divesetdiving settings

Definition at line 682 of file heur.c.

References SCIP_Diveset::backtrack.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetGetLPSolveFreq()

SCIP_EXPORT int SCIPdivesetGetLPSolveFreq ( SCIP_DIVESET diveset)

returns the LP solve frequency for diving LPs (0: dynamically based on number of intermediate domain reductions)

Parameters
divesetdiving settings

Definition at line 690 of file heur.c.

References SCIP_Diveset::lpsolvefreq, and NULL.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetGetLPResolveDomChgQuot()

SCIP_EXPORT SCIP_Real SCIPdivesetGetLPResolveDomChgQuot ( SCIP_DIVESET diveset)

returns the domain reduction quotient for triggering an immediate resolve of the diving LP (0.0: always resolve)

Parameters
divesetdiving settings

Definition at line 711 of file heur.c.

References SCIP_Diveset::lpresolvedomchgquot, and NULL.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetUseOnlyLPBranchcands()

SCIP_EXPORT SCIP_Bool SCIPdivesetUseOnlyLPBranchcands ( SCIP_DIVESET diveset)

should only LP branching candidates be considered instead of the slower but more general constraint handler diving variable selection?

Parameters
divesetdiving settings

Definition at line 723 of file heur.c.

References NULL, and SCIP_Diveset::onlylpbranchcands.

Referenced by SCIPperformGenericDivingAlgorithm().

◆ SCIPdivesetSupportsType()

SCIP_EXPORT SCIP_Bool SCIPdivesetSupportsType ( SCIP_DIVESET diveset,
SCIP_DIVETYPE  divetype 
)

returns TRUE if dive set supports diving of the specified type

Parameters
divesetdiving settings
divetypebit mask that represents the supported dive types by this dive set

Definition at line 733 of file heur.c.

References SCIP_Diveset::divetypemask, and NULL.

Referenced by getDiveBdChgsSOS1conflictgraph(), and getDiveBdChgsSOS1constraints().

◆ SCIPdivesetGetRandnumgen()

SCIP_EXPORT SCIP_RANDNUMGEN* SCIPdivesetGetRandnumgen ( SCIP_DIVESET diveset)

returns the random number generator of this diveset for tie-breaking

Parameters
divesetdiving settings

Definition at line 700 of file heur.c.

References NULL, and SCIP_Diveset::randnumgen.

Referenced by SCIP_DECL_DIVESETGETSCORE().

◆ SCIPdivesetIsPublic()

SCIP_EXPORT SCIP_Bool SCIPdivesetIsPublic ( SCIP_DIVESET diveset)

is this dive set publicly available (ie., can be used by other primal heuristics?)

Parameters
divesetdiving settings

Definition at line 744 of file heur.c.

References SCIP_Diveset::ispublic, and NULL.

Referenced by findAndStoreDivesets().

◆ SCIPcreateDiveset()

SCIP_EXPORT SCIP_RETCODE SCIPcreateDiveset ( SCIP scip,
SCIP_DIVESET **  diveset,
SCIP_HEUR heur,
const char *  name,
SCIP_Real  minreldepth,
SCIP_Real  maxreldepth,
SCIP_Real  maxlpiterquot,
SCIP_Real  maxdiveubquot,
SCIP_Real  maxdiveavgquot,
SCIP_Real  maxdiveubquotnosol,
SCIP_Real  maxdiveavgquotnosol,
SCIP_Real  lpresolvedomchgquot,
int  lpsolvefreq,
int  maxlpiterofs,
unsigned int  initialseed,
SCIP_Bool  backtrack,
SCIP_Bool  onlylpbranchcands,
SCIP_Bool  ispublic,
SCIP_Bool  specificsos1score,
SCIP_DECL_DIVESETGETSCORE((*divesetgetscore))  ,
SCIP_DECL_DIVESETAVAILABLE((*divesetavailable))   
)

create a diving set associated with a primal heuristic. The primal heuristic needs to be included before this method can be called. The diveset is installed in the array of divesets of the heuristic and can be retrieved later by accessing SCIPheurGetDivesets()

Returns
SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if scip is in one of the following stages:
Parameters
scipSCIP data structure
divesetpointer to created diving heuristic settings, or NULL if not needed
heurprimal heuristic to which the diveset belongs
namename for the diveset, or NULL if the name of the heuristic should be used
minreldepthminimal relative depth to start diving
maxreldepthmaximal relative depth to start diving
maxlpiterquotmaximal fraction of diving LP iterations compared to node LP iterations
maxdiveubquotmaximal quotient (curlowerbound - lowerbound)/(cutoffbound - lowerbound) where diving is performed (0.0: no limit)
maxdiveavgquotmaximal quotient (curlowerbound - lowerbound)/(avglowerbound - lowerbound) where diving is performed (0.0: no limit)
maxdiveubquotnosolmaximal UBQUOT when no solution was found yet (0.0: no limit)
maxdiveavgquotnosolmaximal AVGQUOT when no solution was found yet (0.0: no limit)
lpresolvedomchgquotpercentage of immediate domain changes during probing to trigger LP resolve
lpsolvefreqLP solve frequency for (0: only if enough domain reductions are found by propagation)
maxlpiterofsadditional number of allowed LP iterations
initialseedinitial seed for random number generation
backtrackuse one level of backtracking if infeasibility is encountered?
onlylpbranchcandsshould only LP branching candidates be considered instead of the slower but more general constraint handler diving variable selection?
ispublicis this dive set publicly available (ie., can be used by other primal heuristics?)
specificsos1scoreshould SOS1 variables be scored by the diving heuristics specific score function; otherwise use the score function of the SOS1 constraint handler

Definition at line 311 of file scip_heur.c.

References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPdivesetCreate(), Scip::set, SCIP_Mem::setmem, and TRUE.

Referenced by SCIPincludeHeurActconsdiving(), SCIPincludeHeurCoefdiving(), SCIPincludeHeurConflictdiving(), SCIPincludeHeurFracdiving(), SCIPincludeHeurGuideddiving(), SCIPincludeHeurLinesearchdiving(), SCIPincludeHeurPscostdiving(), and SCIPincludeHeurVeclendiving().

◆ SCIPisDivesetAvailable()

SCIP_EXPORT SCIP_RETCODE SCIPisDivesetAvailable ( SCIP scip,
SCIP_DIVESET diveset,
SCIP_Bool available 
)

check specific preconditions for diving, e.g., if an incumbent solution is available

Parameters
scipSCIP data structure
divesetdiving heuristic settings
availablepointer to store if the diving can run at the current solving stage

Definition at line 356 of file scip_heur.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPdivesetIsAvailable(), and Scip::set.

Referenced by selectDiving().