SCIP Doxygen Documentation
Loading...
Searching...
No Matches

Detailed Description

internal methods for decompositions and the decomposition store

Author
Gregor Hendel

Definition in file dcmp.c.

#include <assert.h>
#include "scip/dcmp.h"
#include "scip/mem.h"
#include "scip/pub_cons.h"
#include "scip/pub_dcmp.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_var.h"
#include "scip/scip_cons.h"
#include "scip/scip_dcmp.h"
#include "scip/scip_mem.h"
#include "scip/scip_prob.h"
#include "scip/scip_var.h"
#include "scip/scip_general.h"
#include "scip/scip_datastructures.h"
#include "scip/scip_message.h"
#include "scip/struct_dcmp.h"
#include "scip/struct_scip.h"

Go to the source code of this file.

Macros

#define INIT_MAP_SIZE   2000

Functions

SCIP_RETCODE SCIPdecompCreate (SCIP_DECOMP **decomp, BMS_BLKMEM *blkmem, int nblocks, SCIP_Bool original, SCIP_Bool benderslabels)
void SCIPdecompFree (SCIP_DECOMP **decomp, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPdecompSetVarsLabels (SCIP_DECOMP *decomp, SCIP_VAR **vars, int *labels, int nvars)
void SCIPdecompGetVarsLabels (SCIP_DECOMP *decomp, SCIP_VAR **vars, int *labels, int nvars)
SCIP_RETCODE SCIPdecompSetConsLabels (SCIP_DECOMP *decomp, SCIP_CONS **conss, int *labels, int nconss)
void SCIPdecompGetConsLabels (SCIP_DECOMP *decomp, SCIP_CONS **conss, int *labels, int nconss)
SCIP_RETCODE SCIPdecompClear (SCIP_DECOMP *decomp, SCIP_Bool clearvarlabels, SCIP_Bool clearconslabels)
SCIP_Bool SCIPdecompIsOriginal (SCIP_DECOMP *decomp)
void SCIPdecompSetUseBendersLabels (SCIP_DECOMP *decomp, SCIP_Bool benderslabels)
SCIP_Bool SCIPdecompUseBendersLabels (SCIP_DECOMP *decomp)
int SCIPdecompGetNBlocks (SCIP_DECOMP *decomp)
SCIP_Real SCIPdecompGetAreaScore (SCIP_DECOMP *decomp)
SCIP_Real SCIPdecompGetModularity (SCIP_DECOMP *decomp)
SCIP_RETCODE SCIPdecompGetVarsSize (SCIP_DECOMP *decomp, int *varssize, int nlabels)
SCIP_RETCODE SCIPdecompGetConssSize (SCIP_DECOMP *decomp, int *consssize, int nlabels)
int SCIPdecompGetNBorderVars (SCIP_DECOMP *decomp)
int SCIPdecompGetNBorderConss (SCIP_DECOMP *decomp)
int SCIPdecompGetNBlockGraphEdges (SCIP_DECOMP *decomp)
int SCIPdecompGetNBlockGraphComponents (SCIP_DECOMP *decomp)
int SCIPdecompGetNBlockGraphArticulations (SCIP_DECOMP *decomp)
int SCIPdecompGetBlockGraphMaxDegree (SCIP_DECOMP *decomp)
int SCIPdecompGetBlockGraphMinDegree (SCIP_DECOMP *decomp)
char * SCIPdecompPrintStats (SCIP_DECOMP *decomp, char *strbuf)
SCIP_RETCODE SCIPdecompstoreCreate (SCIP_DECOMPSTORE **decompstore, BMS_BLKMEM *blkmem, int nslots)
static void freeDecompositions (BMS_BLKMEM *blkmem, SCIP_DECOMP **decomps, int *ndecomps)
void SCIPexitSolveDecompstore (SCIP *scip)
void SCIPdecompstoreFree (SCIP_DECOMPSTORE **decompstore, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPdecompstoreAdd (SCIP_DECOMPSTORE *decompstore, SCIP_DECOMP *decomp)
SCIP_DECOMP ** SCIPdecompstoreGetDecomps (SCIP_DECOMPSTORE *decompstore)
int SCIPdecompstoreGetNDecomps (SCIP_DECOMPSTORE *decompstore)
SCIP_DECOMP ** SCIPdecompstoreGetOrigDecomps (SCIP_DECOMPSTORE *decompstore)
int SCIPdecompstoreGetNOrigDecomps (SCIP_DECOMPSTORE *decompstore)
SCIP_RETCODE SCIPtransformDecompstore (SCIP *scip)

Macro Definition Documentation

◆ INIT_MAP_SIZE

#define INIT_MAP_SIZE   2000

Definition at line 54 of file dcmp.c.

Referenced by SCIPdecompCreate().

Function Documentation

◆ SCIPdecompstoreCreate()

SCIP_RETCODE SCIPdecompstoreCreate ( SCIP_DECOMPSTORE ** decompstore,
BMS_BLKMEM * blkmem,
int nslots )

creates a decomposition storage

Parameters
decompstorepointer to store decomposition storage
blkmemblock memory data structure
nslotsmaximum number of decomposition slots in storage

Definition at line 500 of file dcmp.c.

References assert(), BMSallocBlockMemory, BMSallocBlockMemoryArray, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPdecompstoreCreate().

Referenced by copyProb(), SCIPcreateProb(), and SCIPdecompstoreCreate().

◆ freeDecompositions()

void freeDecompositions ( BMS_BLKMEM * blkmem,
SCIP_DECOMP ** decomps,
int * ndecomps )
static

frees array of decompositions

Parameters
blkmemblock memory data structure
decompsdecomposition array
ndecompspointer for initial number of decompositions, will be set to 0

Definition at line 524 of file dcmp.c.

References assert(), freeDecompositions(), NULL, and SCIPdecompFree().

Referenced by freeDecompositions(), SCIPdecompstoreFree(), and SCIPexitSolveDecompstore().

◆ SCIPexitSolveDecompstore()

void SCIPexitSolveDecompstore ( SCIP * scip)

frees all decompositions in transformed space

Parameters
scipSCIP data structure

Definition at line 543 of file dcmp.c.

References assert(), SCIP_DecompStore::decomps, freeDecompositions(), SCIP_DecompStore::ndecomps, NULL, SCIPblkmem(), and SCIPexitSolveDecompstore().

Referenced by freeSolve(), and SCIPexitSolveDecompstore().

◆ SCIPdecompstoreFree()

void SCIPdecompstoreFree ( SCIP_DECOMPSTORE ** decompstore,
BMS_BLKMEM * blkmem )

frees a decomposition storage

Parameters
decompstorepointer to store decomposition storage
blkmemblock memory data structure

Definition at line 555 of file dcmp.c.

References assert(), BMSfreeBlockMemory, BMSfreeBlockMemoryArray, freeDecompositions(), NULL, and SCIPdecompstoreFree().

Referenced by SCIPdecompstoreFree(), and SCIPfreeProb().

◆ SCIPdecompstoreAdd()

SCIP_RETCODE SCIPdecompstoreAdd ( SCIP_DECOMPSTORE * decompstore,
SCIP_DECOMP * decomp )

◆ SCIPdecompstoreGetDecomps()

SCIP_DECOMP ** SCIPdecompstoreGetDecomps ( SCIP_DECOMPSTORE * decompstore)

gets decompositions from storage

Parameters
decompstoredecomposition storage

Definition at line 611 of file dcmp.c.

References assert(), SCIP_DecompStore::decomps, NULL, and SCIPdecompstoreGetDecomps().

Referenced by SCIPdecompstoreGetDecomps(), and SCIPgetDecomps().

◆ SCIPdecompstoreGetNDecomps()

int SCIPdecompstoreGetNDecomps ( SCIP_DECOMPSTORE * decompstore)

gets number of decompositions in storage

Parameters
decompstoredecomposition storage

Definition at line 621 of file dcmp.c.

References assert(), SCIP_DecompStore::ndecomps, NULL, and SCIPdecompstoreGetNDecomps().

Referenced by SCIPdecompstoreGetNDecomps(), and SCIPgetDecomps().

◆ SCIPdecompstoreGetOrigDecomps()

SCIP_DECOMP ** SCIPdecompstoreGetOrigDecomps ( SCIP_DECOMPSTORE * decompstore)

gets decompositions from storage

gets decompositions in original space from storage

Parameters
decompstoredecomposition storage

Definition at line 630 of file dcmp.c.

References assert(), NULL, SCIP_DecompStore::origdecomps, and SCIPdecompstoreGetOrigDecomps().

Referenced by SCIPdecompstoreGetOrigDecomps(), and SCIPgetDecomps().

◆ SCIPdecompstoreGetNOrigDecomps()

int SCIPdecompstoreGetNOrigDecomps ( SCIP_DECOMPSTORE * decompstore)

gets number of decompositions in storage

gets number of decompositions in original space in storage

Parameters
decompstoredecomposition storage

Definition at line 640 of file dcmp.c.

References assert(), SCIP_DecompStore::norigdecomps, NULL, and SCIPdecompstoreGetNOrigDecomps().

Referenced by SCIPdecompstoreGetNOrigDecomps(), and SCIPgetDecomps().

◆ SCIPtransformDecompstore()