Scippy

SCIP

Solving Constraint Integer Programs

sepastore.h File Reference

Detailed Description

internal methods for storing separated cuts

Author
Tobias Achterberg

Definition in file sepastore.h.

#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_retcode.h"
#include "scip/type_set.h"
#include "scip/type_stat.h"
#include "scip/type_event.h"
#include "scip/type_lp.h"
#include "scip/type_prob.h"
#include "scip/type_tree.h"
#include "scip/type_sepastore.h"
#include "scip/type_branch.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPsepastoreCreate (SCIP_SEPASTORE **sepastore)
 
SCIP_RETCODE SCIPsepastoreFree (SCIP_SEPASTORE **sepastore)
 
void SCIPsepastoreStartInitialLP (SCIP_SEPASTORE *sepastore)
 
void SCIPsepastoreEndInitialLP (SCIP_SEPASTORE *sepastore)
 
void SCIPsepastoreStartForceCuts (SCIP_SEPASTORE *sepastore)
 
void SCIPsepastoreEndForceCuts (SCIP_SEPASTORE *sepastore)
 
SCIP_RETCODE SCIPsepastoreAddCut (SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool root, SCIP_Bool *infeasible)
 
SCIP_RETCODE SCIPsepastoreApplyCuts (SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_Bool root, SCIP_EFFICIACYCHOICE efficiacychoice, SCIP_Bool *cutoff)
 
SCIP_RETCODE SCIPsepastoreClearCuts (SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp)
 
SCIP_RETCODE SCIPsepastoreRemoveInefficaciousCuts (SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_Bool root, SCIP_EFFICIACYCHOICE efficiacychoice)
 
SCIP_Bool SCIPsepastoreIsCutApplicable (SCIP_SET *set, SCIP_ROW *cut)
 
SCIP_ROW ** SCIPsepastoreGetCuts (SCIP_SEPASTORE *sepastore)
 
int SCIPsepastoreGetNCuts (SCIP_SEPASTORE *sepastore)
 
int SCIPsepastoreGetNCutsFound (SCIP_SEPASTORE *sepastore)
 
int SCIPsepastoreGetNCutsFoundRound (SCIP_SEPASTORE *sepastore)
 
int SCIPsepastoreGetNCutsApplied (SCIP_SEPASTORE *sepastore)
 

Function Documentation

SCIP_RETCODE SCIPsepastoreCreate ( SCIP_SEPASTORE **  sepastore)

creates separation storage

Parameters
sepastorepointer to store separation storage

Definition at line 78 of file sepastore.c.

References BMSallocMemory, FALSE, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by initSolve().

SCIP_RETCODE SCIPsepastoreFree ( SCIP_SEPASTORE **  sepastore)

frees separation storage

Parameters
sepastorepointer to store separation storage

Definition at line 104 of file sepastore.c.

References BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, and SCIP_OKAY.

Referenced by freeSolve().

void SCIPsepastoreStartInitialLP ( SCIP_SEPASTORE sepastore)

informs separation storage, that the setup of the initial LP starts now

Parameters
sepastoreseparation storage

Definition at line 123 of file sepastore.c.

References SCIP_SepaStore::initiallp, SCIP_SepaStore::ncuts, NULL, and TRUE.

Referenced by SCIPinitConssLP().

void SCIPsepastoreEndInitialLP ( SCIP_SEPASTORE sepastore)

informs separation storage, that the setup of the initial LP is now finished

Parameters
sepastoreseparation storage

Definition at line 135 of file sepastore.c.

References FALSE, SCIP_SepaStore::initiallp, SCIP_SepaStore::ncuts, and NULL.

Referenced by SCIPinitConssLP().

void SCIPsepastoreStartForceCuts ( SCIP_SEPASTORE sepastore)

informs separation storage, that the following cuts should be used in any case

Parameters
sepastoreseparation storage

Definition at line 147 of file sepastore.c.

References SCIP_SepaStore::forcecuts, NULL, and TRUE.

Referenced by enforceConstraints().

void SCIPsepastoreEndForceCuts ( SCIP_SEPASTORE sepastore)

informs separation storage, that the following cuts should no longer be used in any case

Parameters
sepastoreseparation storage

Definition at line 158 of file sepastore.c.

References FALSE, SCIP_SepaStore::forcecuts, and NULL.

Referenced by enforceConstraints().

SCIP_RETCODE SCIPsepastoreAddCut ( SCIP_SEPASTORE sepastore,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_LP lp,
SCIP_SOL sol,
SCIP_ROW cut,
SCIP_Bool  forcecut,
SCIP_Bool  root,
SCIP_Bool infeasible 
)

adds cut to separation storage and captures it; if the cut should be forced to enter the LP, an infinite score has to be used

Parameters
sepastoreseparation storage
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
eventqueueevent queue
eventfilterevent filter for global events
lpLP data
solprimal solution that was separated, or NULL for LP solution
cutseparated cut
forcecutshould the cut be forced to enter the LP?
rootare we at the root node?
infeasiblepointer to store whether the cut is infeasible

Definition at line 546 of file sepastore.c.

References SCIP_SepaStore::initiallp, SCIP_SepaStore::ncutsfound, SCIP_SepaStore::ncutsfoundround, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugCheckRow, SCIProwGetLhs(), SCIProwGetRhs(), SCIProwIsInLP(), SCIPsetIsInfinity(), and sepastoreAddCut().

Referenced by SCIPaddCut(), and SCIPcutpoolSeparate().

SCIP_RETCODE SCIPsepastoreApplyCuts ( SCIP_SEPASTORE sepastore,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_PROB transprob,
SCIP_PROB origprob,
SCIP_TREE tree,
SCIP_LP lp,
SCIP_BRANCHCAND branchcand,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_Bool  root,
SCIP_EFFICIACYCHOICE  efficiacychoice,
SCIP_Bool cutoff 
)

adds cuts to the LP and clears separation storage

Parameters
sepastoreseparation storage
blkmemblock memory
setglobal SCIP settings
statproblem statistics
transprobtransformed problem
origproboriginal problem
treebranch and bound tree
lpLP data
branchcandbranching candidate storage
eventqueueevent queue
eventfilterglobal event filter
rootare we at the root node?
efficiacychoicetype of solution to base efficiacy computation on
cutoffpointer to store whether an empty domain was created

Definition at line 1097 of file sepastore.c.

References computeScore(), SCIP_SepaStore::cuts, SCIP_SepaStore::efficacies, FALSE, MAX, SCIP_SepaStore::ncuts, SCIP_SepaStore::nforcedcuts, NULL, SCIP_SepaStore::objparallelisms, SCIP_SepaStore::orthogonalities, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPnodeGetDepth(), SCIProwCapture(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwIsModifiable(), SCIProwRelease(), SCIPsepastoreClearCuts(), SCIPsetGetSepaMaxcuts(), SCIPsetIsFeasPositive(), SCIPsetIsInfinity(), SCIPtreeGetCurrentNode(), SCIP_SepaStore::scores, sepastoreApplyBdchg(), sepastoreApplyCut(), sepastoreDelCut(), sepastoreGetBestCut(), sepastoreIsBdchgApplicable(), and TRUE.

Referenced by applyCuts(), priceAndCutLoop(), and SCIPinitConssLP().

SCIP_RETCODE SCIPsepastoreClearCuts ( SCIP_SEPASTORE sepastore,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_LP lp 
)

clears the separation storage without adding the cuts to the LP

Parameters
sepastoreseparation storage
blkmemblock memory
setglobal SCIP settings
eventqueueevent queue
eventfilterevent filter for global events
lpLP data

Definition at line 1226 of file sepastore.c.

References BMSfreeMemoryArrayNull, SCIP_SepaStore::cuts, SCIP_SepaStore::cutssize, SCIP_EventFilter::eventmask, SCIP_SepaStore::initiallp, SCIP_EventFilter::len, SCIP_SepaStore::ncuts, SCIP_SepaStore::ncutsfoundround, SCIP_SepaStore::nforcedcuts, NULL, SCIP_CALL, SCIP_EVENTTYPE_ROWDELETEDSEPA, SCIP_OKAY, SCIPdebugMessage, SCIPeventCreateRowDeletedSepa(), SCIPeventqueueAdd(), and SCIProwRelease().

Referenced by applyCuts(), priceAndCutLoop(), SCIPclearCuts(), and SCIPsepastoreApplyCuts().

SCIP_RETCODE SCIPsepastoreRemoveInefficaciousCuts ( SCIP_SEPASTORE sepastore,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_STAT stat,
SCIP_EVENTQUEUE eventqueue,
SCIP_EVENTFILTER eventfilter,
SCIP_LP lp,
SCIP_Bool  root,
SCIP_EFFICIACYCHOICE  efficiacychoice 
)

removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP

Parameters
sepastoreseparation storage
blkmemblock memory
setglobal SCIP settings
statproblem statistics data
eventqueueevent queue
eventfilterevent filter for global events
lpLP data
rootare we at the root node?
efficiacychoicetype of solution to base efficiacy computation on

Definition at line 1274 of file sepastore.c.

References computeScore(), SCIP_SepaStore::efficacies, FALSE, SCIP_SepaStore::nforcedcuts, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPdebugMessage, SCIPsetIsEfficacious(), and sepastoreDelCut().

Referenced by SCIPremoveInefficaciousCuts().

SCIP_Bool SCIPsepastoreIsCutApplicable ( SCIP_SET set,
SCIP_ROW cut 
)

indicates whether a cut is applicable

A cut is applicable if it is modifiable, not a bound change, or a bound change that changes bounds by at least epsilon.

Parameters
setglobal SCIP settings
cutcut to check

Definition at line 1315 of file sepastore.c.

References SCIProwGetNNonz(), SCIProwIsModifiable(), and sepastoreIsBdchgApplicable().

Referenced by SCIPisCutApplicable().

SCIP_ROW** SCIPsepastoreGetCuts ( SCIP_SEPASTORE sepastore)

get cuts in the separation storage

Parameters
sepastoreseparation storage

Definition at line 1324 of file sepastore.c.

References SCIP_SepaStore::cuts, and NULL.

Referenced by SCIPgetCuts().

int SCIPsepastoreGetNCutsFound ( SCIP_SEPASTORE sepastore)

get total number of cuts found so far

Parameters
sepastoreseparation storage

Definition at line 1344 of file sepastore.c.

References SCIP_SepaStore::ncutsfound, and NULL.

Referenced by SCIPgetNCutsFound().

int SCIPsepastoreGetNCutsFoundRound ( SCIP_SEPASTORE sepastore)

get number of cuts found so far in current separation round

Parameters
sepastoreseparation storage

Definition at line 1354 of file sepastore.c.

References SCIP_SepaStore::ncutsfoundround, and NULL.

Referenced by SCIPgetNCutsFoundRound().

int SCIPsepastoreGetNCutsApplied ( SCIP_SEPASTORE sepastore)

get total number of cuts applied to the LPs

Parameters
sepastoreseparation storage

Definition at line 1364 of file sepastore.c.

References SCIP_SepaStore::ncutsapplied, and NULL.

Referenced by SCIPgetNCutsApplied().