methods and datastructures for separators
Definition in file sepa.c.
#include <assert.h>
#include <string.h>
#include "scip/def.h"
#include "scip/set.h"
#include "scip/stat.h"
#include "scip/clock.h"
#include "scip/paramset.h"
#include "scip/sepastore.h"
#include "scip/scip.h"
#include "scip/sepa.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/struct_sepa.h"
Go to the source code of this file.
|
static |
method to call, when the priority of a separator was changed
Definition at line 65 of file sepa.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetSepaPriority().
SCIP_RETCODE SCIPsepaCopyInclude | ( | SCIP_SEPA * | sepa, |
SCIP_SET * | set ) |
copies the given separator to a new scip
Definition at line 79 of file sepa.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPsepaGetName(), and SCIPsetDebugMsg.
Referenced by SCIPsetCopyPlugins().
|
static |
internal method for creating a separator
sepa | pointer to separator data structure |
set | global SCIP settings |
messagehdlr | message handler |
blkmem | block memory for parameter settings |
name | name of separator |
desc | description of separator |
priority | priority of separator (>= 0: before, < 0: after constraint handlers) |
freq | frequency for calling separator |
maxbounddist | maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying separation |
usessubscip | does the separator use a secondary SCIP instance? |
delay | should separator be delayed, if other separators found cuts? |
sepadata | separator data |
Definition at line 98 of file sepa.c.
References assert(), BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_DECL_SEPACOPY, SCIP_DECL_SEPAEXECLP, SCIP_DECL_SEPAEXECSOL, SCIP_DECL_SEPAEXIT, SCIP_DECL_SEPAEXITSOL, SCIP_DECL_SEPAFREE, SCIP_DECL_SEPAINIT, SCIP_DECL_SEPAINITSOL, SCIP_MAXSTRLEN, SCIP_MAXTREEDEPTH, SCIP_OKAY, SCIP_Real, SCIPclockCreate(), SCIPsetAddBoolParam(), SCIPsetAddIntParam(), SCIPsetAddRealParam(), SCIPsnprintf(), sepadata, and TRUE.
Referenced by SCIPsepaCreate().
SCIP_RETCODE SCIPsepaCreate | ( | SCIP_SEPA ** | sepa, |
SCIP_SET * | set, | ||
SCIP_MESSAGEHDLR * | messagehdlr, | ||
BMS_BLKMEM * | blkmem, | ||
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
int | freq, | ||
SCIP_Real | maxbounddist, | ||
SCIP_Bool | usessubscip, | ||
SCIP_Bool | delay, | ||
SCIP_DECL_SEPACOPY((*sepacopy)) | , | ||
SCIP_DECL_SEPAFREE((*sepafree)) | , | ||
SCIP_DECL_SEPAINIT((*sepainit)) | , | ||
SCIP_DECL_SEPAEXIT((*sepaexit)) | , | ||
SCIP_DECL_SEPAINITSOL((*sepainitsol)) | , | ||
SCIP_DECL_SEPAEXITSOL((*sepaexitsol)) | , | ||
SCIP_DECL_SEPAEXECLP((*sepaexeclp)) | , | ||
SCIP_DECL_SEPAEXECSOL((*sepaexecsol)) | , | ||
SCIP_SEPADATA * | sepadata ) |
creates a separator
sepa | pointer to separator data structure |
set | global SCIP settings |
messagehdlr | message handler |
blkmem | block memory for parameter settings |
name | name of separator |
desc | description of separator |
priority | priority of separator (>= 0: before, < 0: after constraint handlers) |
freq | frequency for calling separator |
maxbounddist | maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying separation |
usessubscip | does the separator use a secondary SCIP instance? |
delay | should separator be delayed, if other separators found cuts? |
sepadata | separator data |
Definition at line 203 of file sepa.c.
References assert(), doSepaCreate(), NULL, SCIP_Bool, SCIP_CALL_FINALLY, SCIP_DECL_SEPACOPY, SCIP_DECL_SEPAEXECLP, SCIP_DECL_SEPAEXECSOL, SCIP_DECL_SEPAEXIT, SCIP_DECL_SEPAEXITSOL, SCIP_DECL_SEPAFREE, SCIP_DECL_SEPAINIT, SCIP_DECL_SEPAINITSOL, SCIP_OKAY, SCIP_Real, SCIPsepaFree(), and sepadata.
Referenced by SCIPincludeSepa(), and SCIPincludeSepaBasic().
SCIP_RETCODE SCIPsepaFree | ( | SCIP_SEPA ** | sepa, |
SCIP_SET * | set ) |
calls destructor and frees memory of separator
sepa | pointer to separator data structure |
set | global SCIP settings |
Definition at line 242 of file sepa.c.
References assert(), BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().
Referenced by SCIPsepaCreate().
SCIP_RETCODE SCIPsepaInit | ( | SCIP_SEPA * | sepa, |
SCIP_SET * | set ) |
initializes separator
sepa | separator |
set | global SCIP settings |
Definition at line 269 of file sepa.c.
References assert(), FALSE, SCIP_Sepa::initialized, SCIP_Sepa::lastsepanode, SCIP_Sepa::lpwasdelayed, SCIP_Sepa::name, SCIP_Sepa::ncalls, SCIP_Sepa::ncallsatnode, SCIP_Sepa::nconssfound, SCIP_Sepa::ncutoffs, SCIP_Sepa::ncutsadded, SCIP_Sepa::ncutsaddeddirect, SCIP_Sepa::ncutsaddedviapool, SCIP_Sepa::ncutsapplieddirect, SCIP_Sepa::ncutsappliedviapool, SCIP_Sepa::ncutsfound, SCIP_Sepa::ncutsfoundatnode, SCIP_Sepa::ndomredsfound, SCIP_Sepa::nrootcalls, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockReset(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIP_Sepa::sepaclock, SCIP_Sepa::setuptime, SCIP_Sepa::solwasdelayed, and TRUE.
SCIP_RETCODE SCIPsepaExit | ( | SCIP_SEPA * | sepa, |
SCIP_SET * | set ) |
calls exit method of separator
sepa | separator |
set | global SCIP settings |
Definition at line 322 of file sepa.c.
References assert(), FALSE, SCIP_Sepa::initialized, SCIP_Sepa::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Sepa::setuptime.
SCIP_RETCODE SCIPsepaInitsol | ( | SCIP_SEPA * | sepa, |
SCIP_SET * | set ) |
informs separator that the branch and bound process is being started
sepa | separator |
set | global SCIP settings |
Definition at line 352 of file sepa.c.
References assert(), FALSE, SCIP_Sepa::lpwasdelayed, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIP_Sepa::setuptime, and SCIP_Sepa::solwasdelayed.
SCIP_RETCODE SCIPsepaExitsol | ( | SCIP_SEPA * | sepa, |
SCIP_SET * | set ) |
informs separator that the branch and bound process data is being freed
sepa | separator |
set | global SCIP settings |
Definition at line 379 of file sepa.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Sepa::setuptime.
SCIP_RETCODE SCIPsepaExecLP | ( | SCIP_SEPA * | sepa, |
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_SEPASTORE * | sepastore, | ||
int | depth, | ||
SCIP_Real | bounddist, | ||
SCIP_Bool | allowlocal, | ||
SCIP_Bool | execdelayed, | ||
SCIP_RESULT * | result ) |
calls LP separation method of separator
sepa | separator |
set | global SCIP settings |
stat | dynamic problem statistics |
sepastore | separation storage |
depth | depth of current node |
bounddist | current relative distance of local dual bound to global dual bound |
allowlocal | should the separator be asked to separate local cuts |
execdelayed | execute separator even if it is marked to be delayed |
result | pointer to store the result of the callback method |
Definition at line 403 of file sepa.c.
References assert(), SCIP_Sepa::delay, depth, SCIP_Sepa::expbackoff, SCIP_Sepa::freq, SCIP_Sepa::lastsepanode, LOG2, SCIP_Sepa::lpwasdelayed, MAX, SCIP_Sepa::maxbounddist, SCIP_Stat::nactiveconss, SCIP_Sepa::name, SCIP_Stat::nboundchgs, SCIP_Sepa::ncalls, SCIP_Sepa::ncallsatnode, SCIP_Sepa::nconssfound, SCIP_Sepa::ncutoffs, SCIP_Sepa::ncutsfound, SCIP_Sepa::ncutsfoundatnode, SCIP_Sepa::ndomredsfound, SCIP_Stat::nholechgs, SCIP_Stat::nprobboundchgs, SCIP_Stat::nprobholechgs, SCIP_Sepa::nrootcalls, SCIP_Stat::ntotalnodes, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_NEWROUND, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPclockStart(), SCIPclockStop(), SCIPcutpoolGetNCuts(), SCIPerrorMessage, SCIPgetDelayedGlobalCutpool(), SCIPgetGlobalCutpool(), SCIPsepastoreGetNCuts(), SCIPsetDebugMsg, SCIPsetIsIntegral(), SCIPsetIsLE(), and SCIP_Sepa::sepaclock.
Referenced by separationRoundLP().
SCIP_RETCODE SCIPsepaExecSol | ( | SCIP_SEPA * | sepa, |
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_SEPASTORE * | sepastore, | ||
SCIP_SOL * | sol, | ||
int | depth, | ||
SCIP_Bool | allowlocal, | ||
SCIP_Bool | execdelayed, | ||
SCIP_RESULT * | result ) |
calls primal solution separation method of separator
sepa | separator |
set | global SCIP settings |
stat | dynamic problem statistics |
sepastore | separation storage |
sol | primal solution that should be separated |
depth | depth of current node |
allowlocal | should the separator allow local cuts |
execdelayed | execute separator even if it is marked to be delayed |
result | pointer to store the result of the callback method |
Definition at line 521 of file sepa.c.
References assert(), SCIP_Sepa::delay, depth, SCIP_Sepa::expbackoff, SCIP_Sepa::freq, SCIP_Sepa::lastsepanode, LOG2, MAX, SCIP_Stat::nactiveconss, SCIP_Sepa::name, SCIP_Stat::nboundchgs, SCIP_Sepa::ncalls, SCIP_Sepa::ncallsatnode, SCIP_Sepa::nconssfound, SCIP_Sepa::ncutoffs, SCIP_Sepa::ncutsfound, SCIP_Sepa::ncutsfoundatnode, SCIP_Sepa::ndomredsfound, SCIP_Stat::nholechgs, SCIP_Stat::nprobboundchgs, SCIP_Stat::nprobholechgs, SCIP_Sepa::nrootcalls, SCIP_Stat::ntotalnodes, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_NEWROUND, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPsepastoreGetNCuts(), SCIPsetDebugMsg, SCIPsetIsIntegral(), SCIP_Sepa::sepaclock, sol, and SCIP_Sepa::solwasdelayed.
Referenced by separationRoundSol().
void SCIPsepaSetCopy | ( | SCIP_SEPA * | sepa | ) |
sets copy method of separator
sepa | separator copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs |
Definition at line 656 of file sepa.c.
References assert(), NULL, and SCIP_DECL_SEPACOPY.
Referenced by SCIPsetSepaCopy().
void SCIPsepaSetFree | ( | SCIP_SEPA * | sepa | ) |
sets destructor method of separator
sepa | separator destructor of separator |
Definition at line 667 of file sepa.c.
References assert(), NULL, and SCIP_DECL_SEPAFREE.
Referenced by SCIPsetSepaFree().
void SCIPsepaSetInit | ( | SCIP_SEPA * | sepa | ) |
sets initialization method of separator
sepa | separator initialize separator |
Definition at line 678 of file sepa.c.
References assert(), NULL, and SCIP_DECL_SEPAINIT.
Referenced by SCIPsetSepaInit().
void SCIPsepaSetExit | ( | SCIP_SEPA * | sepa | ) |
sets deinitialization method of separator
sepa | separator deinitialize separator |
Definition at line 689 of file sepa.c.
References assert(), NULL, and SCIP_DECL_SEPAEXIT.
Referenced by SCIPsetSepaExit().
void SCIPsepaSetInitsol | ( | SCIP_SEPA * | sepa | ) |
sets solving process initialization method of separator
sepa | separator solving process initialization method of separator |
Definition at line 700 of file sepa.c.
References assert(), NULL, and SCIP_DECL_SEPAINITSOL.
Referenced by SCIPsetSepaInitsol().
void SCIPsepaSetExitsol | ( | SCIP_SEPA * | sepa | ) |
sets solving process deinitialization method of separator
sepa | separator solving process deinitialization method of separator |
Definition at line 711 of file sepa.c.
References assert(), NULL, and SCIP_DECL_SEPAEXITSOL.
Referenced by SCIPsetSepaExitsol().
void SCIPsepaSetIsParentsepa | ( | SCIP_SEPA * | sepa | ) |
declares separator to be a parent separator
sepa | separator |
Definition at line 722 of file sepa.c.
References assert(), SCIP_Sepa::isparentsepa, NULL, and TRUE.
Referenced by SCIPsetSepaIsParentsepa().
sets the parent separator
sepa | separator |
parentsepa | parent separator |
Definition at line 732 of file sepa.c.
References assert(), NULL, and SCIP_Sepa::parentsepa.
Referenced by SCIPsetSepaParentsepa().
sets priority of separator
sepa | separator |
set | global SCIP settings |
priority | new priority of the separator |
Definition at line 773 of file sepa.c.
References assert(), FALSE, NULL, and SCIP_Sepa::priority.
Referenced by SCIPsetSepaPriority().
enables or disables all clocks of sepa
, depending on the value of the flag
sepa | the separator for which all clocks should be enabled or disabled |
enable | should the clocks of the separator be enabled? |
Definition at line 828 of file sepa.c.
References assert(), NULL, SCIP_Bool, SCIPclockEnableOrDisable(), SCIP_Sepa::sepaclock, and SCIP_Sepa::setuptime.
increase count of applied cuts by one
sepa | separator |
fromcutpool | whether the cuts were added from the cutpool to sepastore |
Definition at line 971 of file sepa.c.
References assert(), SCIP_Sepa::ncutsapplieddirect, SCIP_Sepa::ncutsappliedviapool, NULL, SCIP_Bool, SCIPsepaGetParentsepa(), and SCIPsepaIncNCutsApplied().
Referenced by SCIPsepaIncNCutsApplied(), and sepastoreApplyCut().
increase count of added cuts by one
sepa | separator |
fromcutpool | whether the cuts were added from the cutpool to sepastore |
Definition at line 993 of file sepa.c.
References assert(), SCIP_Sepa::ncutsadded, SCIP_Sepa::ncutsaddeddirect, SCIP_Sepa::ncutsaddedviapool, NULL, SCIP_Bool, SCIPsepaGetParentsepa(), and SCIPsepaIncNCutsAdded().
Referenced by SCIPcutpoolSeparate(), SCIPsepaIncNCutsAdded(), and SCIPsepastoreAddCut().
decrease the count of added cuts by one
sepa | separator |
fromcutpool | whether the cuts were added from the cutpool to sepastore |
Definition at line 1016 of file sepa.c.
References assert(), SCIP_Sepa::ncutsadded, SCIP_Sepa::ncutsaddeddirect, SCIP_Sepa::ncutsaddedviapool, NULL, SCIP_Bool, SCIPsepaDecNCutsAdded(), and SCIPsepaGetParentsepa().
Referenced by SCIPsepaDecNCutsAdded(), SCIPsepastoreAddCut(), and sepastoreDelCut().
void SCIPsepaIncNCutsFound | ( | SCIP_SEPA * | sepa | ) |
increase count of found cuts by one
sepa | separator |
Definition at line 1039 of file sepa.c.
References assert(), SCIP_Sepa::ncutsfound, and NULL.
void SCIPsepaIncNCutsFoundAtNode | ( | SCIP_SEPA * | sepa | ) |
increase count of found cuts at current node by one
sepa | separator |
Definition at line 1049 of file sepa.c.
References assert(), SCIP_Sepa::ncutsfoundatnode, and NULL.
Referenced by SCIPcutpoolSeparate().