Scippy

SCIP

Solving Constraint Integer Programs

sepa.h File Reference

Detailed Description

internal methods for separators

Author
Tobias Achterberg

Definition in file sepa.h.

#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_set.h"
#include "scip/type_stat.h"
#include "scip/type_sepastore.h"
#include "scip/type_sepa.h"
#include "scip/pub_sepa.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPsepaCopyInclude (SCIP_SEPA *sepa, SCIP_SET *set)
 
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)
 
SCIP_RETCODE SCIPsepaFree (SCIP_SEPA **sepa, SCIP_SET *set)
 
SCIP_RETCODE SCIPsepaInit (SCIP_SEPA *sepa, SCIP_SET *set)
 
SCIP_RETCODE SCIPsepaExit (SCIP_SEPA *sepa, SCIP_SET *set)
 
SCIP_RETCODE SCIPsepaInitsol (SCIP_SEPA *sepa, SCIP_SET *set)
 
SCIP_RETCODE SCIPsepaExitsol (SCIP_SEPA *sepa, SCIP_SET *set)
 
SCIP_RETCODE SCIPsepaExecLP (SCIP_SEPA *sepa, SCIP_SET *set, SCIP_STAT *stat, SCIP_SEPASTORE *sepastore, int depth, SCIP_Real bounddist, SCIP_Bool execdelayed, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPsepaExecSol (SCIP_SEPA *sepa, SCIP_SET *set, SCIP_STAT *stat, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, int depth, SCIP_Bool execdelayed, SCIP_RESULT *result)
 
void SCIPsepaSetPriority (SCIP_SEPA *sepa, SCIP_SET *set, int priority)
 
void SCIPsepaSetCopy (SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
 
void SCIPsepaSetFree (SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
 
void SCIPsepaSetInit (SCIP_SEPA *sepa, SCIP_DECL_SEPAINIT((*sepainit)))
 
void SCIPsepaSetExit (SCIP_SEPA *sepa, SCIP_DECL_SEPAEXIT((*sepaexit)))
 
void SCIPsepaSetInitsol (SCIP_SEPA *sepa, SCIP_DECL_SEPAINITSOL((*sepainitsol)))
 
void SCIPsepaSetExitsol (SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
 
void SCIPsepaIncNAppliedCuts (SCIP_SEPA *sepa)
 
void SCIPsepaIncNCutsFound (SCIP_SEPA *sepa)
 
void SCIPsepaIncNCutsFoundAtNode (SCIP_SEPA *sepa)
 

Function Documentation

SCIP_RETCODE SCIPsepaCopyInclude ( SCIP_SEPA sepa,
SCIP_SET set 
)

copies the given separator to a new scip

Parameters
sepaseparator
setSCIP_SET of SCIP to copy to

Definition at line 70 of file sepa.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPsepaGetName().

Referenced by SCIPsetCopyPlugins().

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

Parameters
sepapointer to separator data structure
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory for parameter settings
namename of separator
descdescription of separator
prioritypriority of separator (>= 0: before, < 0: after constraint handlers)
freqfrequency for calling separator
maxbounddistmaximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying separation
usessubscipdoes the separator use a secondary SCIP instance?
delayshould separator be delayed, if other separators found cuts?
sepadataseparator data

Definition at line 88 of file sepa.c.

References BMSallocMemory, BMSduplicateMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPclockCreate(), SCIPsetAddBoolParam(), SCIPsetAddIntParam(), SCIPsetAddRealParam(), SCIPsnprintf(), and TRUE.

Referenced by SCIPincludeSepa(), and SCIPincludeSepaBasic().

SCIP_RETCODE SCIPsepaFree ( SCIP_SEPA **  sepa,
SCIP_SET set 
)

calls destructor and frees memory of separator

Parameters
sepapointer to separator data structure
setglobal SCIP settings

Definition at line 180 of file sepa.c.

References BMSfreeMemory, BMSfreeMemoryArray, NULL, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().

Referenced by SCIPsetFree().

SCIP_RETCODE SCIPsepaExit ( SCIP_SEPA sepa,
SCIP_SET set 
)

calls exit method of separator

Parameters
sepaseparator
setglobal SCIP settings

Definition at line 254 of file sepa.c.

References FALSE, SCIP_Sepa::initialized, SCIP_Sepa::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Sepa::setuptime.

Referenced by SCIPsetExitPlugins().

SCIP_RETCODE SCIPsepaInitsol ( SCIP_SEPA sepa,
SCIP_SET set 
)

informs separator that the branch and bound process is being started

Parameters
sepaseparator
setglobal SCIP settings

Definition at line 284 of file sepa.c.

References FALSE, SCIP_Sepa::lpwasdelayed, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIP_Sepa::setuptime, and SCIP_Sepa::solwasdelayed.

Referenced by SCIPsetInitsolPlugins().

SCIP_RETCODE SCIPsepaExitsol ( SCIP_SEPA sepa,
SCIP_SET set 
)

informs separator that the branch and bound process data is being freed

Parameters
sepaseparator
setglobal SCIP settings

Definition at line 311 of file sepa.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Sepa::setuptime.

Referenced by SCIPsetExitsolPlugins().

SCIP_RETCODE SCIPsepaExecLP ( SCIP_SEPA sepa,
SCIP_SET set,
SCIP_STAT stat,
SCIP_SEPASTORE sepastore,
int  depth,
SCIP_Real  bounddist,
SCIP_Bool  execdelayed,
SCIP_RESULT result 
)

calls LP separation method of separator

Parameters
sepaseparator
setglobal SCIP settings
statdynamic problem statistics
sepastoreseparation storage
depthdepth of current node
bounddistcurrent relative distance of local dual bound to global dual bound
execdelayedexecute separator even if it is marked to be delayed
resultpointer to store the result of the callback method

Definition at line 335 of file sepa.c.

References SCIP_Sepa::delay, SCIP_Sepa::freq, SCIP_Sepa::lastsepanode, 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_Stat::ntotalnodes, NULL, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_NEWROUND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPclockStart(), SCIPclockStop(), SCIPdebugMessage, SCIPerrorMessage, SCIPsepastoreGetNCuts(), 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  execdelayed,
SCIP_RESULT result 
)

calls primal solution separation method of separator

Parameters
sepaseparator
setglobal SCIP settings
statdynamic problem statistics
sepastoreseparation storage
solprimal solution that should be separated
depthdepth of current node
execdelayedexecute separator even if it is marked to be delayed
resultpointer to store the result of the callback method

Definition at line 441 of file sepa.c.

References SCIP_Sepa::delay, SCIP_Sepa::freq, SCIP_Sepa::lastsepanode, 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_Stat::ntotalnodes, NULL, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_NEWROUND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPclockStart(), SCIPclockStop(), SCIPdebugMessage, SCIPerrorMessage, SCIPsepastoreGetNCuts(), SCIP_Sepa::sepaclock, and SCIP_Sepa::solwasdelayed.

Referenced by separationRoundSol().

void SCIPsepaSetPriority ( SCIP_SEPA sepa,
SCIP_SET set,
int  priority 
)

sets priority of separator

Parameters
sepaseparator
setglobal SCIP settings
prioritynew priority of the separator

Definition at line 663 of file sepa.c.

References FALSE, NULL, and SCIP_Sepa::priority.

Referenced by SCIPsetSepaPriority().

void SCIPsepaSetCopy ( SCIP_SEPA sepa,
SCIP_DECL_SEPACOPY((*sepacopy))   
)

sets copy method of separator

Parameters
sepaseparator

Definition at line 567 of file sepa.c.

References NULL.

Referenced by SCIPsetSepaCopy().

void SCIPsepaSetFree ( SCIP_SEPA sepa,
SCIP_DECL_SEPAFREE((*sepafree))   
)

sets destructor method of separator

Parameters
sepaseparator

Definition at line 578 of file sepa.c.

References NULL.

Referenced by SCIPsetSepaFree().

void SCIPsepaSetInit ( SCIP_SEPA sepa,
SCIP_DECL_SEPAINIT((*sepainit))   
)

sets initialization method of separator

Parameters
sepaseparator

Definition at line 589 of file sepa.c.

References NULL.

Referenced by SCIPsetSepaInit().

void SCIPsepaSetExit ( SCIP_SEPA sepa,
SCIP_DECL_SEPAEXIT((*sepaexit))   
)

sets deinitialization method of separator

Parameters
sepaseparator

Definition at line 600 of file sepa.c.

References NULL.

Referenced by SCIPsetSepaExit().

void SCIPsepaSetInitsol ( SCIP_SEPA sepa,
SCIP_DECL_SEPAINITSOL((*sepainitsol))   
)

sets solving process initialization method of separator

Parameters
sepaseparator

Definition at line 611 of file sepa.c.

References NULL.

Referenced by SCIPsetSepaInitsol().

void SCIPsepaSetExitsol ( SCIP_SEPA sepa,
SCIP_DECL_SEPAEXITSOL((*sepaexitsol))   
)

sets solving process deinitialization method of separator

Parameters
sepaseparator

Definition at line 622 of file sepa.c.

References NULL.

Referenced by SCIPsetSepaExitsol().

void SCIPsepaIncNAppliedCuts ( SCIP_SEPA sepa)

increase count of applied cuts

Parameters
sepaseparator

Definition at line 788 of file sepa.c.

References SCIP_Sepa::ncutsapplied, and NULL.

Referenced by sepastoreApplyCut().

void SCIPsepaIncNCutsFound ( SCIP_SEPA sepa)

increase count of found cuts

Parameters
sepaseparator

Definition at line 798 of file sepa.c.

References SCIP_Sepa::ncutsfound, and NULL.

Referenced by SCIPcutpoolSeparate().

void SCIPsepaIncNCutsFoundAtNode ( SCIP_SEPA sepa)

increase count of found cuts at current node

Parameters
sepaseparator

Definition at line 808 of file sepa.c.

References SCIP_Sepa::ncutsfoundatnode, and NULL.

Referenced by SCIPcutpoolSeparate().