largestrepr tree compression
Definition in file compr_largestrepr.c.
#include "blockmemshell/memory.h"
#include "scip/compr_largestrepr.h"
#include "scip/pub_compr.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_reopt.h"
#include "scip/pub_var.h"
#include "scip/scip_compr.h"
#include "scip/scip_general.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_reopt.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | COMPR_NAME "largestrepr" |
#define | COMPR_DESC "heuristic searching for large common representatives" |
#define | COMPR_PRIORITY 2000 |
#define | COMPR_MINNNODES 20 |
#define | DEFAUL_MEM_REPR 10 |
#define | DEFAULT_ITERS 5 |
#define | DEFAULT_MINCOMMONVARS 3 |
Functions | |
static void | calcSignature (SCIP_VAR **vars, SCIP_Real *vals, int nvars, uint64_t *signature0, uint64_t *signature1) |
static SCIP_RETCODE | constructCompression (SCIP *scip, SCIP_COMPR *compr, SCIP_COMPRDATA *comprdata, SCIP_RESULT *result) |
static SCIP_RETCODE | applyCompression (SCIP *scip, SCIP_COMPR *compr, SCIP_COMPRDATA *comprdata, SCIP_RESULT *result) |
static | SCIP_DECL_COMPRCOPY (comprCopyLargestrepr) |
static | SCIP_DECL_COMPRFREE (comprFreeLargestrepr) |
static | SCIP_DECL_COMPREXIT (comprExitLargestrepr) |
static | SCIP_DECL_COMPREXEC (comprExecLargestrepr) |
SCIP_RETCODE | SCIPincludeComprLargestrepr (SCIP *scip) |
#define COMPR_NAME "largestrepr" |
Definition at line 50 of file compr_largestrepr.c.
Referenced by constructCompression(), constructCompression(), SCIP_DECL_COMPRCOPY(), SCIP_DECL_COMPRCOPY(), SCIP_DECL_COMPREXEC(), SCIP_DECL_COMPREXEC(), SCIPincludeComprLargestrepr(), and SCIPincludeComprWeakcompr().
#define COMPR_DESC "heuristic searching for large common representatives" |
Definition at line 51 of file compr_largestrepr.c.
Referenced by SCIPincludeComprLargestrepr(), and SCIPincludeComprWeakcompr().
#define COMPR_PRIORITY 2000 |
Definition at line 52 of file compr_largestrepr.c.
Referenced by SCIPincludeComprLargestrepr(), and SCIPincludeComprWeakcompr().
#define COMPR_MINNNODES 20 |
Definition at line 53 of file compr_largestrepr.c.
Referenced by SCIPincludeComprLargestrepr(), and SCIPincludeComprWeakcompr().
#define DEFAUL_MEM_REPR 10 |
Definition at line 55 of file compr_largestrepr.c.
Referenced by SCIP_DECL_COMPREXEC().
#define DEFAULT_ITERS 5 |
Definition at line 56 of file compr_largestrepr.c.
Referenced by SCIPincludeComprLargestrepr().
#define DEFAULT_MINCOMMONVARS 3 |
Definition at line 57 of file compr_largestrepr.c.
Referenced by SCIPincludeComprLargestrepr().
|
static |
calculate a bit signature of variables fixed to 0 and 1 on the basis of SCIPvarGetProbindex()
vars | variable array |
vals | value array |
nvars | number of variables |
signature0 | pointer to store the signatures of variables fixed to 0 |
signature1 | pointer to store the signatures of variables fixed to 1 |
Definition at line 90 of file compr_largestrepr.c.
References nvars, SCIP_Real, SCIPhashSignature64, SCIPvarGetProbindex(), and vars.
Referenced by constructCompression().
|
static |
try to find a representation of the current search frontier.
We use the signatures of variables fixed to 0 and 1 to decide if there is definitely no intersection or if the intersection is potentially non-empty.
To find a good representation we start the procedure with a node and choose the best one. the heuristic tries to find a representation of size 2 in each iteration, i.e., runs in the constrained part.
scip | SCIP data structure |
compr | compression method |
comprdata | compression data |
result | result pointer |
Definition at line 126 of file compr_largestrepr.c.
References assert(), calcSignature(), COMPR_NAME, FALSE, i, MAX, NULL, nvars, r, REOPT_CONSTYPE_DUALREDS, result, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVED, SCIP_SUCCESS, SCIPaddReoptnodeBndchg(), SCIPaddReoptnodeCons(), SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPallocClearBlockMemoryArray, SCIPallocClearBufferArray, SCIPcomprGetMinNodes(), SCIPdebugMessage, SCIPdebugMsg, SCIPfindVar(), SCIPfreeBlockMemoryArray, SCIPfreeBufferArray, SCIPfreeRepresentation(), SCIPgetNBinVars(), SCIPgetNOrigVars(), SCIPgetNReoptLeaves(), SCIPgetReoptLeaveIDs(), SCIPgetReoptnode(), SCIPgetReoptnodePath(), SCIPgetStage(), SCIPinfinity(), SCIPinitRepresentation(), SCIPisEQ(), SCIPisFeasEQ(), SCIPisSumGT(), SCIPreallocMemoryArray, SCIPreoptnodeGetLowerbound(), SCIPreoptnodeGetNVars(), SCIPresetRepresentation(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarIsOriginal(), TRUE, and vars.
Referenced by SCIP_DECL_COMPREXEC().
|
static |
apply the found representation to the reopttree.
scip | SCIP data structure |
compr | compression method |
comprdata | compression data |
result | result pointer |
Definition at line 611 of file compr_largestrepr.c.
References assert(), FALSE, NULL, r, result, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SUCCESS, SCIPfreeRepresentation(), SCIPreoptnodeSetParentID(), and SCIPsetReoptCompression().
Referenced by SCIP_DECL_COMPREXEC().
|
static |
copy method for tree compression plugins (called when SCIP copies plugins)
Definition at line 651 of file compr_largestrepr.c.
References assert(), COMPR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPcomprGetName(), and SCIPincludeComprLargestrepr().
|
static |
destructor of tree compression to free user data (called when SCIP is exiting)
Definition at line 665 of file compr_largestrepr.c.
References assert(), NULL, SCIP_OKAY, SCIPcomprGetData(), SCIPcomprSetData(), and SCIPfreeBlockMemory.
|
static |
deinitialization method of tree compression (called before transformed problem is freed)
Definition at line 683 of file compr_largestrepr.c.
References assert(), FALSE, NULL, SCIP_OKAY, SCIPcomprGetData(), and SCIPfreeMemoryArray.
|
static |
execution method of tree compression
Definition at line 711 of file compr_largestrepr.c.
References applyCompression(), assert(), COMPR_NAME, constructCompression(), DEFAUL_MEM_REPR, NULL, result, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SUCCESS, SCIPallocClearMemoryArray, SCIPcomprGetData(), SCIPdebugMsg, SCIPfreeRepresentation(), SCIPinitRepresentation(), and TRUE.
SCIP_RETCODE SCIPincludeComprLargestrepr | ( | SCIP * | scip | ) |
creates the largestrepr tree compression and includes it in SCIP
scip | SCIP data structure |
Definition at line 763 of file compr_largestrepr.c.
References assert(), COMPR_DESC, COMPR_MINNNODES, COMPR_NAME, COMPR_PRIORITY, DEFAULT_ITERS, DEFAULT_MINCOMMONVARS, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddIntParam(), SCIPallocBlockMemory, SCIPincludeComprBasic(), SCIPsetComprCopy(), SCIPsetComprExit(), and SCIPsetComprFree().
Referenced by SCIP_DECL_COMPRCOPY(), and SCIPincludeDefaultPlugins().