methods for tree compressions
Definition in file compr.c.
#include <assert.h>#include <string.h>#include "scip/def.h"#include "scip/set.h"#include "scip/clock.h"#include "scip/paramset.h"#include "scip/scip.h"#include "scip/compr.h"#include "scip/reopt.h"#include "scip/pub_message.h"#include "scip/pub_misc.h"#include "scip/struct_compr.h"Go to the source code of this file.
|
static |
method to call, when the priority of a compression was changed
Definition at line 60 of file compr.c.
References SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetComprPriority().
| SCIP_RETCODE SCIPcomprCopyInclude | ( | SCIP_COMPR * | compr, |
| SCIP_SET * | set | ||
| ) |
copies the given tree compression to a new scip
| compr | tree compression |
| set | SCIP_SET of SCIP to copy to |
Definition at line 74 of file compr.c.
References SCIP_CALL, SCIP_OKAY, SCIPcomprGetName(), and SCIPsetDebugMsg.
| SCIP_RETCODE SCIPcomprCreate | ( | SCIP_COMPR ** | compr, |
| SCIP_SET * | set, | ||
| SCIP_MESSAGEHDLR * | messagehdlr, | ||
| BMS_BLKMEM * | blkmem, | ||
| const char * | name, | ||
| const char * | desc, | ||
| int | priority, | ||
| int | minnnodes, | ||
| SCIP_DECL_COMPRCOPY((*comprcopy)) | , | ||
| SCIP_DECL_COMPRFREE((*comprfree)) | , | ||
| SCIP_DECL_COMPRINIT((*comprinit)) | , | ||
| SCIP_DECL_COMPREXIT((*comprexit)) | , | ||
| SCIP_DECL_COMPRINITSOL((*comprinitsol)) | , | ||
| SCIP_DECL_COMPREXITSOL((*comprexitsol)) | , | ||
| SCIP_DECL_COMPREXEC((*comprexec)) | , | ||
| SCIP_COMPRDATA * | comprdata | ||
| ) |
creates a tree compression
| compr | pointer to tree compression data structure |
| set | global SCIP settings |
| messagehdlr | message handler |
| blkmem | block memory for parameter settings |
| name | name of tree compression |
| desc | description of tree compression |
| priority | priority of the tree compression |
| minnnodes | minimal number of nodes for calling compression |
| comprdata | tree compression data |
Definition at line 93 of file compr.c.
References BMSallocMemory, BMSduplicateMemoryArray, FALSE, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPclockCreate(), SCIPsetAddIntParam(), SCIPsnprintf(), and TRUE.
Referenced by SCIPincludeCompr(), and SCIPincludeComprBasic().
| SCIP_RETCODE SCIPcomprFree | ( | SCIP_COMPR ** | compr, |
| SCIP_SET * | set | ||
| ) |
calls destructor and frees memory of tree compression
| compr | pointer to tree compression data structure |
| set | global SCIP settings |
Definition at line 157 of file compr.c.
References BMSfreeMemory, BMSfreeMemoryArray, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().
Referenced by SCIPsetFree().
| SCIP_RETCODE SCIPcomprInit | ( | SCIP_COMPR * | compr, |
| SCIP_SET * | set | ||
| ) |
initializes tree compression
| compr | tree compression |
| set | global SCIP settings |
Definition at line 183 of file compr.c.
References SCIP_Compr::comprclock, SCIP_Compr::initialized, SCIP_Compr::name, SCIP_Compr::ncalls, SCIP_Compr::nfound, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockReset(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIP_Compr::setuptime, and TRUE.
| SCIP_RETCODE SCIPcomprExit | ( | SCIP_COMPR * | compr, |
| SCIP_SET * | set | ||
| ) |
calls exit method of tree compression
| compr | tree compression |
| set | global SCIP settings |
Definition at line 222 of file compr.c.
References FALSE, SCIP_Compr::initialized, SCIP_Compr::name, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Compr::setuptime.
Referenced by SCIPsetInitPlugins().
| SCIP_RETCODE SCIPcomprExec | ( | SCIP_COMPR * | compr, |
| SCIP_SET * | set, | ||
| SCIP_REOPT * | reopt, | ||
| SCIP_RESULT * | result | ||
| ) |
calls execution method of tree compression
| compr | tree compression |
| set | global SCIP settings |
| reopt | reoptimization data structure |
| result | pointer to store the result of the callback method |
Definition at line 252 of file compr.c.
References SCIP_Compr::comprclock, SCIP_Compr::minnnodes, SCIP_Compr::name, SCIP_Compr::ncalls, SCIP_Compr::nfound, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_SUCCESS, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPreoptGetNLeaves(), and SCIPsetDebugMsg.
Referenced by compressReoptTree().
| void SCIPcomprSetCopy | ( | SCIP_COMPR * | compr, |
| SCIP_DECL_COMPRCOPY((*comprcopy)) | |||
| ) |
sets copy callback of tree compression
| compr | tree compression |
Definition at line 329 of file compr.c.
Referenced by SCIPsetComprCopy().
| void SCIPcomprSetFree | ( | SCIP_COMPR * | compr, |
| SCIP_DECL_COMPRFREE((*comprfree)) | |||
| ) |
sets destructor callback of tree compression
| compr | tree compression |
Definition at line 340 of file compr.c.
Referenced by SCIPsetComprFree().
| void SCIPcomprSetInit | ( | SCIP_COMPR * | compr, |
| SCIP_DECL_COMPRINIT((*comprinit)) | |||
| ) |
sets initialization callback of tree compression
| compr | tree compression |
Definition at line 351 of file compr.c.
Referenced by SCIPsetComprInit().
| void SCIPcomprSetExit | ( | SCIP_COMPR * | compr, |
| SCIP_DECL_COMPREXIT((*comprexit)) | |||
| ) |
sets deinitialization callback of tree compression
| compr | tree compression |
Definition at line 362 of file compr.c.
Referenced by SCIPsetComprExit().
| void SCIPcomprSetInitsol | ( | SCIP_COMPR * | compr, |
| SCIP_DECL_COMPRINITSOL((*comprinitsol)) | |||
| ) |
sets solving process initialization callback of tree compression
| compr | tree compression |
Definition at line 373 of file compr.c.
Referenced by SCIPsetComprInitsol().
| void SCIPcomprSetExitsol | ( | SCIP_COMPR * | compr, |
| SCIP_DECL_COMPREXITSOL((*comprexitsol)) | |||
| ) |
sets solving process deinitialization callback of tree compression
| compr | tree compression |
Definition at line 384 of file compr.c.
Referenced by SCIPsetComprExitsol().
| SCIP_Bool SCIPcomprShouldBeExecuted | ( | SCIP_COMPR * | compr, |
| int | depth, | ||
| int | nnodes | ||
| ) |
should the compression be executed at the given depth, number of nodes
| compr | tree compression |
| depth | depth of current node |
| nnodes | number of open nodes |
Definition at line 395 of file compr.c.
References SCIP_Compr::minnnodes.
| void SCIPcomprSetPriority | ( | SCIP_COMPR * | compr, |
| SCIP_SET * | set, | ||
| int | priority | ||
| ) |
sets priority of tree compression
| compr | tree compression |
| set | global SCIP settings |
| priority | new priority of the tree compression |
Definition at line 439 of file compr.c.
References FALSE, and SCIP_Compr::priority.
Referenced by SCIPsetComprPriority().