Scippy

GCG

Branch-and-Price & Column Generation for Everyone

Detailed Description

public methods for working with decomposition structures

public methods for working with priority queues

Author
Martin Bergner
Jonas Witt

Definition in file pub_decomp.h.

#include "type_decomp.h"
#include "scip/type_scip.h"
#include "scip/type_retcode.h"
#include "scip/type_var.h"
#include "scip/type_cons.h"
#include "scip/type_misc.h"
#include "type_detector.h"

Go to the source code of this file.

Data Structures

struct  Dec_Scores
 
typedef struct Dec_Scores DEC_SCORES
 
const char * DECgetStrType (DEC_DECTYPE type)
 
SCIP_RETCODE DECdecompCreate (SCIP *scip, DEC_DECOMP **decomp)
 
SCIP_RETCODE DECdecompFree (SCIP *scip, DEC_DECOMP **decomp)
 
SCIP_RETCODE DECdecompSetType (DEC_DECOMP *decomp, DEC_DECTYPE type)
 
DEC_DECTYPE DECdecompGetType (DEC_DECOMP *decomp)
 
SCIP_Real DECdecompGetMaxwhiteScore (DEC_DECOMP *decomp)
 
void DECsetMaxWhiteScore (SCIP *scip, DEC_DECOMP *decomp, SCIP_Real maxwhitescore)
 
void DECdecompSetPresolved (DEC_DECOMP *decomp, SCIP_Bool presolved)
 
SCIP_Bool DECdecompGetPresolved (DEC_DECOMP *decomp)
 
void DECdecompSetNBlocks (DEC_DECOMP *decomp, int nblocks)
 
int DECdecompGetNBlocks (DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompSetSubscipvars (SCIP *scip, DEC_DECOMP *decomp, SCIP_VAR ***subscipvars, int *nsubscipvars)
 
SCIP_VAR *** DECdecompGetSubscipvars (DEC_DECOMP *decomp)
 
int * DECdecompGetNSubscipvars (DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompSetSubscipconss (SCIP *scip, DEC_DECOMP *decomp, SCIP_CONS ***subscipconss, int *nsubscipconss)
 
SCIP_CONS *** DECdecompGetSubscipconss (DEC_DECOMP *decomp)
 
int * DECdecompGetNSubscipconss (DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompSetLinkingconss (SCIP *scip, DEC_DECOMP *decomp, SCIP_CONS **linkingconss, int nlinkingconss)
 
SCIP_CONS ** DECdecompGetLinkingconss (DEC_DECOMP *decomp)
 
int DECdecompGetNLinkingconss (DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompSetLinkingvars (SCIP *scip, DEC_DECOMP *decomp, SCIP_VAR **linkingvars, int nlinkingvars, int nfixedlinkingvars, int nmastervars)
 
SCIP_VAR ** DECdecompGetLinkingvars (DEC_DECOMP *decomp)
 
int DECdecompGetNMastervars (DEC_DECOMP *decomp)
 
int DECdecompGetNLinkingvars (DEC_DECOMP *decomp)
 
int DECdecompGetNFixedLinkingvars (DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompSetStairlinkingvars (SCIP *scip, DEC_DECOMP *decomp, SCIP_VAR ***stairlinkingvars, int *nstairlinkingvars)
 
SCIP_VAR *** DECdecompGetStairlinkingvars (DEC_DECOMP *decomp)
 
int * DECdecompGetNStairlinkingvars (DEC_DECOMP *decomp)
 
int DECdecompGetNTotalStairlinkingvars (DEC_DECOMP *decomp)
 
void DECdecompSetVartoblock (DEC_DECOMP *decomp, SCIP_HASHMAP *vartoblock)
 
SCIP_HASHMAP * DECdecompGetVartoblock (DEC_DECOMP *decomp)
 
void DECdecompSetConstoblock (DEC_DECOMP *decomp, SCIP_HASHMAP *constoblock)
 
SCIP_HASHMAP * DECdecompGetConstoblock (DEC_DECOMP *decomp)
 
void DECdecompSetVarindex (DEC_DECOMP *decomp, SCIP_HASHMAP *varindex)
 
SCIP_HASHMAP * DECdecompGetVarindex (DEC_DECOMP *decomp)
 
void DECdecompSetConsindex (DEC_DECOMP *decomp, SCIP_HASHMAP *consindex)
 
SCIP_HASHMAP * DECdecompGetConsindex (DEC_DECOMP *decomp)
 
SCIP_RETCODE DECfilloutDecompFromHashmaps (SCIP *scip, DEC_DECOMP *decomp, SCIP_HASHMAP *vartoblock, SCIP_HASHMAP *constoblock, int nblocks, SCIP_Bool staircase)
 
SCIP_RETCODE DECfilloutDecompFromConstoblock (SCIP *scip, DEC_DECOMP *decomp, SCIP_HASHMAP *constoblock, int nblocks, SCIP_Bool staircase)
 
void DECdecompSetDetector (DEC_DECOMP *decomp, DEC_DETECTOR *detector)
 
DEC_DETECTORDECdecompGetDetector (DEC_DECOMP *decomp)
 
DEC_DETECTOR ** DECdecompGetDetectorChain (DEC_DECOMP *decomp)
 
int DECdecompGetDetectorChainSize (DEC_DECOMP *decomp)
 
int DECdecompGetPartialdecID (DEC_DECOMP *decomp)
 
void DECdecompSetDetectorClockTimes (SCIP *scip, DEC_DECOMP *decomp, SCIP_Real *detectorClockTimes)
 
SCIP_Real * DECdecompGetDetectorClockTimes (DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompSetDetectorChainString (SCIP *scip, DEC_DECOMP *decomp, const char *detectorchainstring)
 
char * DECdecompGetDetectorChainString (SCIP *scip, DEC_DECOMP *decomp)
 
void DECdecompSetDetectorPctVarsToBorder (SCIP *scip, DEC_DECOMP *decomp, SCIP_Real *pctVarsToBorder)
 
SCIP_Real * DECdecompGetDetectorPctVarsToBorder (DEC_DECOMP *decomp)
 
void DECdecompSetDetectorPctConssToBorder (SCIP *scip, DEC_DECOMP *decomp, SCIP_Real *pctConssToBorder)
 
SCIP_Real * DECdecompGetDetectorPctConssToBorder (DEC_DECOMP *decomp)
 
void DECdecompSetDetectorPctVarsToBlock (SCIP *scip, DEC_DECOMP *decomp, SCIP_Real *pctVarsToBlock)
 
SCIP_Real * DECdecompGetDetectorPctVarsToBlock (DEC_DECOMP *decomp)
 
void DECdecompSetDetectorPctConssToBlock (SCIP *scip, DEC_DECOMP *decomp, SCIP_Real *pctConssToBlock)
 
SCIP_Real * DECdecompGetDetectorPctConssToBlock (DEC_DECOMP *decomp)
 
void DECdecompSetDetectorPctVarsFromOpen (SCIP *scip, DEC_DECOMP *decomp, SCIP_Real *pctVarsFromOpen)
 
SCIP_Real * DECdecompGetDetectorPctVarsFromOpen (DEC_DECOMP *decomp)
 
void DECdecompSetDetectorPctConssFromOpen (SCIP *scip, DEC_DECOMP *decomp, SCIP_Real *pctConssToBorder)
 
SCIP_Real * DECdecompGetDetectorPctConssFromOpen (DEC_DECOMP *decomp)
 
void DECdecompSetNNewBlocks (SCIP *scip, DEC_DECOMP *decomp, int *nNewBlocks)
 
int * DECdecompGetNNewBlocks (DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompTransform (SCIP *scip, DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompRemoveDeletedConss (SCIP *scip, DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompAddRemainingConss (SCIP *scip, DEC_DECOMP *decomp)
 
SCIP_RETCODE DECdecompCheckConsistency (SCIP *scip, DEC_DECOMP *decomp)
 
SCIP_RETCODE DECcreateBasicDecomp (SCIP *scip, DEC_DECOMP **decomp, SCIP_Bool solveorigprob)
 
SCIP_RETCODE DECcreateDecompFromMasterconss (SCIP *scip, DEC_DECOMP **decomp, SCIP_CONS **conss, int nconss)
 
void DECgetSubproblemVarsData (SCIP *scip, DEC_DECOMP *decomp, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars, int nproblems)
 
void DECgetLinkingVarsData (SCIP *scip, DEC_DECOMP *decomp, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
 
SCIP_RETCODE DECgetDensityData (SCIP *scip, DEC_DECOMP *decomp, SCIP_VAR **vars, int nvars, SCIP_CONS **conss, int nconss, int *varsubproblemdensity, int *varmasterdensity, int *conssubproblemdensity, int *consmasterdensity)
 
SCIP_RETCODE DECgetVarLockData (SCIP *scip, DEC_DECOMP *decomp, SCIP_VAR **vars, int nvars, int nsubproblems, int **subsciplocksdown, int **subsciplocksup, int *masterlocksdown, int *masterlocksup)
 
SCIP_Real DECgetMaxWhiteScore (SCIP *scip, DEC_DECOMP *decomp)
 
SCIP_RETCODE DECevaluateDecomposition (SCIP *scip, DEC_DECOMP *decomp, DEC_SCORES *score)
 
int DECdecompGetNConss (DEC_DECOMP *decomp)
 
SCIP_RETCODE GCGprintDecompStatistics (SCIP *scip, FILE *file, DEC_DECOMP *decomp)
 
SCIP_Bool DECdecompositionsAreEqual (SCIP *scip, DEC_DECOMP *decomp1, DEC_DECOMP *decomp2)
 
int DECfilterSimilarDecompositions (SCIP *scip, DEC_DECOMP **decs, int ndecs)
 
SCIP_RETCODE DECdetermineConsBlock (SCIP *scip, DEC_DECOMP *decomp, SCIP_CONS *cons, int *block)
 
SCIP_RETCODE DECdecompMoveLinkingConsToPricing (SCIP *scip, DEC_DECOMP *decomp, int consindex, int block)
 
SCIP_RETCODE DECtryAssignMasterconssToExistingPricing (SCIP *scip, DEC_DECOMP *decomp, int *transferred)
 
SCIP_RETCODE DECtryAssignMasterconssToNewPricing (SCIP *scip, DEC_DECOMP *decomp, DEC_DECOMP **newdecomp, int *transferred)
 
SCIP_RETCODE DECcreatePolishedDecomp (SCIP *scip, DEC_DECOMP *decomp, DEC_DECOMP **newdecomp)
 
SCIP_RETCODE DECpermuteDecomp (SCIP *scip, DEC_DECOMP *decomp, SCIP_RANDNUMGEN *randnumgen)
 
int DECgetNDecomps (SCIP *scip)
 

Typedef Documentation

◆ DEC_SCORES

typedef struct Dec_Scores DEC_SCORES

Definition at line 66 of file pub_decomp.h.

Function Documentation

◆ DECgetStrType()

const char* DECgetStrType ( DEC_DECTYPE  type)

converts the DEC_DECTYPE enum to a string

Parameters
typedecomposition type

Definition at line 462 of file decomp.c.

Referenced by DECevaluateDecomposition(), GCGprintDecompStatistics(), and GCGwriteDecompositionData().

◆ DECdecompCreate()

SCIP_RETCODE DECdecompCreate ( SCIP *  scip,
DEC_DECOMP **  decdecomp 
)

◆ DECdecompFree()

◆ DECdecompSetType()

◆ DECdecompGetType()

◆ DECdecompGetMaxwhiteScore()

SCIP_Real DECdecompGetMaxwhiteScore ( DEC_DECOMP decomp)
Parameters
decompdecomposition data structure

Definition at line 701 of file decomp.c.

References DecDecomp::maxwhitescore.

Referenced by initRelaxator().

◆ DECsetMaxWhiteScore()

void DECsetMaxWhiteScore ( SCIP *  scip,
DEC_DECOMP decdecomp,
SCIP_Real  maxwhitescore 
)

sets the score of the given decomposition based on the border, the average density score and the ratio of linking variables

Definition at line 3253 of file decomp.c.

References DecDecomp::maxwhitescore.

Referenced by createDecompFromPartialdec().

◆ DECdecompSetPresolved()

void DECdecompSetPresolved ( DEC_DECOMP decomp,
SCIP_Bool  presolved 
)

sets the presolved flag for decomposition

Definition at line 712 of file decomp.c.

References DecDecomp::presolved.

Referenced by createDecompFromPartialdec(), DECcreateBasicDecomp(), fillDecompStruct(), and readREFFile().

◆ DECdecompGetPresolved()

SCIP_Bool DECdecompGetPresolved ( DEC_DECOMP decomp)

gets the presolved flag for decomposition

Definition at line 723 of file decomp.c.

References DecDecomp::presolved.

◆ DECdecompSetNBlocks()

void DECdecompSetNBlocks ( DEC_DECOMP decomp,
int  nblocks 
)

sets the number of blocks for decomposition

Definition at line 733 of file decomp.c.

References DecDecomp::nblocks.

Referenced by createDecompFromPartialdec(), DECfilloutDecompFromHashmaps(), fillDecompStruct(), and readREFFile().

◆ DECdecompGetNBlocks()

◆ DECdecompSetSubscipvars()

SCIP_RETCODE DECdecompSetSubscipvars ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_VAR ***  subscipvars,
int *  nsubscipvars 
)

copies the input subscipvars array to the given decomposition

Definition at line 755 of file decomp.c.

References DecDecomp::nblocks, DecDecomp::nsubscipvars, and DecDecomp::subscipvars.

Referenced by createDecompFromPartialdec(), and fillOutVarsFromVartoblock().

◆ DECdecompGetSubscipvars()

SCIP_VAR*** DECdecompGetSubscipvars ( DEC_DECOMP decomp)

returns the subscipvars array of the given decomposition

Definition at line 823 of file decomp.c.

References DecDecomp::subscipvars.

Referenced by computeVarDensities(), convertStructToGCG(), DECdecompCheckConsistency(), DECgetSubproblemVarsData(), and DECpermuteDecomp().

◆ DECdecompGetNSubscipvars()

int* DECdecompGetNSubscipvars ( DEC_DECOMP decomp)

◆ DECdecompSetSubscipconss()

SCIP_RETCODE DECdecompSetSubscipconss ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_CONS ***  subscipconss,
int *  nsubscipconss 
)

copies the input subscipconss array to the given decomposition

Definition at line 843 of file decomp.c.

References DecDecomp::nblocks, DecDecomp::nsubscipconss, and DecDecomp::subscipconss.

Referenced by createDecompFromPartialdec(), and fillOutConsFromConstoblock().

◆ DECdecompGetSubscipconss()

SCIP_CONS*** DECdecompGetSubscipconss ( DEC_DECOMP decomp)

◆ DECdecompGetNSubscipconss()

◆ DECdecompSetLinkingconss()

SCIP_RETCODE DECdecompSetLinkingconss ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_CONS **  linkingconss,
int  nlinkingconss 
)

copies the input linkingconss array to the given decomposition

Definition at line 926 of file decomp.c.

References DecDecomp::linkingconss, and DecDecomp::nlinkingconss.

Referenced by createDecompFromPartialdec(), and fillOutConsFromConstoblock().

◆ DECdecompGetLinkingconss()

SCIP_CONS** DECdecompGetLinkingconss ( DEC_DECOMP decomp)

◆ DECdecompGetNLinkingconss()

◆ DECdecompSetLinkingvars()

SCIP_RETCODE DECdecompSetLinkingvars ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_VAR **  linkingvars,
int  nlinkingvars,
int  nfixedlinkingvars,
int  nmastervars 
)

copies the input linkingvars array to the given decomposition

copies the input linkingvars array to the given decdecomp structure

Definition at line 989 of file decomp.c.

References DecDecomp::linkingvars, DecDecomp::nfixedlinkingvars, DecDecomp::nlinkingvars, and DecDecomp::nmastervars.

Referenced by createDecompFromPartialdec(), and fillOutVarsFromVartoblock().

◆ DECdecompGetLinkingvars()

SCIP_VAR** DECdecompGetLinkingvars ( DEC_DECOMP decomp)

returns the linkingvars array of the given decomposition

Definition at line 1036 of file decomp.c.

References DecDecomp::linkingvars.

Referenced by convertStructToGCG(), DECdecompCheckConsistency(), DECgetLinkingVarsData(), and DECpermuteDecomp().

◆ DECdecompGetNMastervars()

int DECdecompGetNMastervars ( DEC_DECOMP decomp)

returns the number of master variables of the given decomposition

returns the number of linking variables that are purely master ("static") variables of the given decomposition

Definition at line 1069 of file decomp.c.

References DecDecomp::nmastervars.

Referenced by DECevaluateDecomposition(), GCGprintDecompStatistics(), and initRelaxator().

◆ DECdecompGetNLinkingvars()

int DECdecompGetNLinkingvars ( DEC_DECOMP decomp)

◆ DECdecompGetNFixedLinkingvars()

int DECdecompGetNFixedLinkingvars ( DEC_DECOMP decomp)

returns the nlinkingvars array of the given decomposition

Definition at line 1057 of file decomp.c.

References DecDecomp::nfixedlinkingvars.

◆ DECdecompSetStairlinkingvars()

SCIP_RETCODE DECdecompSetStairlinkingvars ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_VAR ***  stairlinkingvars,
int *  nstairlinkingvars 
)

copies the input stairlinkingvars array to the given decomposition

Definition at line 1081 of file decomp.c.

References DecDecomp::nblocks, DecDecomp::nstairlinkingvars, and DecDecomp::stairlinkingvars.

Referenced by createDecompFromPartialdec(), and DECfilloutDecompFromHashmaps().

◆ DECdecompGetStairlinkingvars()

SCIP_VAR*** DECdecompGetStairlinkingvars ( DEC_DECOMP decomp)

returns the stairlinkingvars array of the given decomposition

Definition at line 1151 of file decomp.c.

References DecDecomp::stairlinkingvars.

Referenced by createPartialdecFromDecomp().

◆ DECdecompGetNStairlinkingvars()

int* DECdecompGetNStairlinkingvars ( DEC_DECOMP decomp)

returns the nstairlinkingvars array of the given decomposition

Definition at line 1160 of file decomp.c.

References DecDecomp::nstairlinkingvars.

Referenced by createPartialdecFromDecomp(), and DECdecompGetNTotalStairlinkingvars().

◆ DECdecompGetNTotalStairlinkingvars()

int DECdecompGetNTotalStairlinkingvars ( DEC_DECOMP decomp)

returns the total number of stairlinkingvars array of the given decomposition

Definition at line 1170 of file decomp.c.

References DECdecompGetNBlocks(), and DECdecompGetNStairlinkingvars().

Referenced by DECdecompCheckConsistency().

◆ DECdecompSetVartoblock()

void DECdecompSetVartoblock ( DEC_DECOMP decomp,
SCIP_HASHMAP *  vartoblock 
)

sets the vartoblock hashmap of the given decomposition

Definition at line 1187 of file decomp.c.

References DecDecomp::vartoblock.

Referenced by createDecompFromPartialdec(), and fillOutVarsFromVartoblock().

◆ DECdecompGetVartoblock()

SCIP_HASHMAP* DECdecompGetVartoblock ( DEC_DECOMP decomp)

◆ DECdecompSetConstoblock()

void DECdecompSetConstoblock ( DEC_DECOMP decomp,
SCIP_HASHMAP *  constoblock 
)

sets the constoblock hashmap of the given decomposition

Definition at line 1209 of file decomp.c.

References DecDecomp::constoblock.

Referenced by createDecompFromPartialdec(), and fillOutConsFromConstoblock().

◆ DECdecompGetConstoblock()

SCIP_HASHMAP* DECdecompGetConstoblock ( DEC_DECOMP decomp)

returns the constoblock hashmap of the given decomposition

Definition at line 1221 of file decomp.c.

References DecDecomp::constoblock.

Referenced by createPartialdecFromDecomp(), DECdecompAddRemainingConss(), DECdecompCheckConsistency(), and DECdecompositionsAreEqual().

◆ DECdecompSetVarindex()

void DECdecompSetVarindex ( DEC_DECOMP decomp,
SCIP_HASHMAP *  varindex 
)

sets the varindex hashmap of the given decomposition

Definition at line 1231 of file decomp.c.

References DecDecomp::varindex.

Referenced by createDecompFromPartialdec(), and DECfilloutDecompFromHashmaps().

◆ DECdecompGetVarindex()

SCIP_HASHMAP* DECdecompGetVarindex ( DEC_DECOMP decomp)

returns the varindex hashmap of the given decomposition

Definition at line 1242 of file decomp.c.

References DecDecomp::varindex.

◆ DECdecompSetConsindex()

void DECdecompSetConsindex ( DEC_DECOMP decomp,
SCIP_HASHMAP *  consindex 
)

sets the consindex hashmap of the given decomposition

Definition at line 1251 of file decomp.c.

References DecDecomp::consindex.

Referenced by createDecompFromPartialdec(), and DECfilloutDecompFromHashmaps().

◆ DECdecompGetConsindex()

SCIP_HASHMAP* DECdecompGetConsindex ( DEC_DECOMP decomp)

returns the consindex hashmap of the given decomposition

Definition at line 1262 of file decomp.c.

References DecDecomp::consindex.

◆ DECfilloutDecompFromHashmaps()

SCIP_RETCODE DECfilloutDecompFromHashmaps ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_HASHMAP *  vartoblock,
SCIP_HASHMAP *  constoblock,
int  nblocks,
SCIP_Bool  staircase 
)

◆ DECfilloutDecompFromConstoblock()

SCIP_RETCODE DECfilloutDecompFromConstoblock ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_HASHMAP *  constoblock,
int  nblocks,
SCIP_Bool  staircase 
)

completely fills out decomposition structure from only the constraint partition

completely fills out decomposition structure from only the constraint partition in the following manner: given constraint block/border assignment (by constoblock), one gets the following assignment of probvars: let C(j) be the set of constraints containing variable j, set block of j to (i) constoblock(i) iff constoblock(i1) == constoblock(i2) for all i1,i2 in C(j) with constoblock(i1) != nblocks+1 && constoblock(i2) != nblocks+1 (ii) nblocks+2 ["linking var"] iff exists i1,i2 with constoblock(i1) != constoblock(i2) && constoblock(i1) != nblocks+1 && constoblock(i2) != nblocks+1 (iii) nblocks+1 ["master var"] iff constoblock(i) == nblocks+1 for all i in C(j)

Definition at line 1455 of file decomp.c.

References DECfilloutDecompFromHashmaps().

Referenced by gcg::ColumnGraph< T >::createDecompFromPartition(), gcg::RowGraph< T >::createDecompFromPartition(), gcg::HyperrowcolGraph< T >::createDecompFromPartition(), gcg::HyperrowGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createDecompFromPartition(), DECcreateDecompFromMasterconss(), DECtryAssignMasterconssToNewPricing(), and fillDecompStruct().

◆ DECdecompSetDetector()

void DECdecompSetDetector ( DEC_DECOMP decomp,
DEC_DETECTOR detector 
)

sets the detector for the given decomposition

Definition at line 1579 of file decomp.c.

References DecDecomp::detector.

Referenced by createDecompFromPartialdec(), fillDecompStruct(), and readREFFile().

◆ DECdecompGetDetector()

DEC_DETECTOR* DECdecompGetDetector ( DEC_DECOMP decomp)

gets the detector for the given decomposition

Definition at line 1590 of file decomp.c.

References DecDecomp::detector.

Referenced by GCGwriteDecompositionData().

◆ DECdecompGetDetectorChain()

DEC_DETECTOR** DECdecompGetDetectorChain ( DEC_DECOMP decomp)

gets the detectors for the given decomposition

Definition at line 1600 of file decomp.c.

References DecDecomp::detectorchain.

Referenced by createPartialdecFromDecomp().

◆ DECdecompGetDetectorChainSize()

int DECdecompGetDetectorChainSize ( DEC_DECOMP decomp)

gets the number of detectors for the given decomposition

Definition at line 1637 of file decomp.c.

References DecDecomp::sizedetectorchain.

Referenced by createPartialdecFromDecomp().

◆ DECdecompGetPartialdecID()

int DECdecompGetPartialdecID ( DEC_DECOMP decomp)

gets the id of the original partialdec

Definition at line 1660 of file decomp.c.

References DecDecomp::partialdecid.

Referenced by checkIdenticalBlocks(), and pricingprobsAreIdenticalFromDetectionInfo().

◆ DECdecompSetDetectorClockTimes()

void DECdecompSetDetectorClockTimes ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_Real *  detectorClockTimes 
)

sets the detector clock times of the detectors of the detector chain

Definition at line 1671 of file decomp.c.

References DecDecomp::detectorclocktimes, and DecDecomp::sizedetectorchain.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetDetectorClockTimes()

SCIP_Real* DECdecompGetDetectorClockTimes ( DEC_DECOMP decomp)

gets the detector clock times of the detectors of the detector chain

Definition at line 1696 of file decomp.c.

References DecDecomp::detectorclocktimes.

Referenced by createPartialdecFromDecomp().

◆ DECdecompSetDetectorChainString()

SCIP_RETCODE DECdecompSetDetectorChainString ( SCIP *  scip,
DEC_DECOMP decomp,
const char *  detectorchainstring 
)

sets the detector clock times of the detectors of the detector chain

Definition at line 1705 of file decomp.c.

References DecDecomp::detectorchainstring.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetDetectorChainString()

char* DECdecompGetDetectorChainString ( SCIP *  scip,
DEC_DECOMP decomp 
)

sets the detector clock times of the detectors of the detector chain

Definition at line 1718 of file decomp.c.

References DecDecomp::detectorchainstring.

◆ DECdecompSetDetectorPctVarsToBorder()

void DECdecompSetDetectorPctVarsToBorder ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_Real *  pctVarsToBorder 
)

sets the percentages of variables assigned to the border of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1728 of file decomp.c.

References DecDecomp::pctvarstoborder, and DecDecomp::sizedetectorchain.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetDetectorPctVarsToBorder()

SCIP_Real* DECdecompGetDetectorPctVarsToBorder ( DEC_DECOMP decomp)

gets the percentages of variables assigned to the border of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1756 of file decomp.c.

References DecDecomp::pctvarstoborder.

Referenced by createPartialdecFromDecomp().

◆ DECdecompSetDetectorPctConssToBorder()

void DECdecompSetDetectorPctConssToBorder ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_Real *  pctConssToBorder 
)

sets the percentages of constraints assigned to the border of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1764 of file decomp.c.

References DecDecomp::pctconsstoborder, and DecDecomp::sizedetectorchain.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetDetectorPctConssToBorder()

SCIP_Real* DECdecompGetDetectorPctConssToBorder ( DEC_DECOMP decomp)

gets the percentages of constraints assigned to the border of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1791 of file decomp.c.

References DecDecomp::pctconsstoborder.

Referenced by createPartialdecFromDecomp().

◆ DECdecompSetDetectorPctVarsToBlock()

void DECdecompSetDetectorPctVarsToBlock ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_Real *  pctVarsToBlock 
)

sets the percentages of variables assigned to some block of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1799 of file decomp.c.

References DecDecomp::pctvarstoblock, and DecDecomp::sizedetectorchain.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetDetectorPctVarsToBlock()

SCIP_Real* DECdecompGetDetectorPctVarsToBlock ( DEC_DECOMP decomp)

gets the percentages of variables assigned to some block of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1826 of file decomp.c.

References DecDecomp::pctvarstoblock.

Referenced by createPartialdecFromDecomp().

◆ DECdecompSetDetectorPctConssToBlock()

void DECdecompSetDetectorPctConssToBlock ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_Real *  pctConssToBlock 
)

sets the percentages of constraints assigned to some block of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1834 of file decomp.c.

References DecDecomp::pctconsstoblock, and DecDecomp::sizedetectorchain.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetDetectorPctConssToBlock()

SCIP_Real* DECdecompGetDetectorPctConssToBlock ( DEC_DECOMP decomp)

gets the percentages of constraints assigned to some block of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1862 of file decomp.c.

References DecDecomp::pctconsstoblock.

Referenced by createPartialdecFromDecomp().

◆ DECdecompSetDetectorPctVarsFromOpen()

void DECdecompSetDetectorPctVarsFromOpen ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_Real *  pctVarsFromOpen 
)

sets the percentages of variables assigned to some block of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1871 of file decomp.c.

References DecDecomp::pctvarsfromopen, and DecDecomp::sizedetectorchain.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetDetectorPctVarsFromOpen()

SCIP_Real* DECdecompGetDetectorPctVarsFromOpen ( DEC_DECOMP decomp)

gets the percentages of variables assigned to some block of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1899 of file decomp.c.

References DecDecomp::pctvarsfromopen.

Referenced by createPartialdecFromDecomp().

◆ DECdecompSetDetectorPctConssFromOpen()

void DECdecompSetDetectorPctConssFromOpen ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_Real *  pctConssFromOpen 
)

sets the percentages of constraints assigned to some block of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1907 of file decomp.c.

References DecDecomp::pctconssfromopen, and DecDecomp::sizedetectorchain.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetDetectorPctConssFromOpen()

SCIP_Real* DECdecompGetDetectorPctConssFromOpen ( DEC_DECOMP decomp)

gets the percentages of constraints assigned to some block of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1936 of file decomp.c.

References DecDecomp::pctconssfromopen.

Referenced by createPartialdecFromDecomp().

◆ DECdecompSetNNewBlocks()

void DECdecompSetNNewBlocks ( SCIP *  scip,
DEC_DECOMP decomp,
int *  nNewBlocks 
)

sets the number of new blocks of the corresponding detectors (of the detector chain) on this decomposition

Definition at line 1944 of file decomp.c.

References DecDecomp::nnewblocks, and DecDecomp::sizedetectorchain.

Referenced by createDecompFromPartialdec().

◆ DECdecompGetNNewBlocks()

int* DECdecompGetNNewBlocks ( DEC_DECOMP decomp)

gets the number of new blocks corresponding detectors (of the detector chain) on this decomposition

Definition at line 1970 of file decomp.c.

References DecDecomp::nnewblocks.

Referenced by createPartialdecFromDecomp().

◆ DECdecompTransform()

SCIP_RETCODE DECdecompTransform ( SCIP *  scip,
DEC_DECOMP decomp 
)

◆ DECdecompRemoveDeletedConss()

SCIP_RETCODE DECdecompRemoveDeletedConss ( SCIP *  scip,
DEC_DECOMP decdecomp 
)

Remove all those constraints that were removed from the problem after the decomposition had been created

Definition at line 2123 of file decomp.c.

References DecDecomp::linkingconss, DecDecomp::nblocks, DecDecomp::nlinkingconss, DecDecomp::nsubscipconss, and DecDecomp::subscipconss.

◆ DECdecompAddRemainingConss()

SCIP_RETCODE DECdecompAddRemainingConss ( SCIP *  scip,
DEC_DECOMP decdecomp 
)

Adds all those constraints that were added to the problem after the decomposition as created

Adds all those constraints that were added to the problem after the decomposition had been created

Definition at line 2179 of file decomp.c.

References assignConsvarsToBlock(), DecDecomp::constoblock, DEC_DECTYPE_ARROWHEAD, DEC_DECTYPE_BORDERED, DEC_DECTYPE_DIAGONAL, DEC_DECTYPE_STAIRCASE, DECdecompGetConstoblock(), DECdecompGetNBlocks(), DECdetermineConsBlock(), GCGisConsGCGCons(), DecDecomp::linkingconss, DecDecomp::nlinkingconss, DecDecomp::nsubscipconss, DecDecomp::subscipconss, and DecDecomp::type.

Referenced by convertStructToGCG(), and createDecompFromPartialdec().

◆ DECdecompCheckConsistency()

SCIP_RETCODE DECdecompCheckConsistency ( SCIP *  scip,
DEC_DECOMP decdecomp 
)

◆ DECcreateBasicDecomp()

SCIP_RETCODE DECcreateBasicDecomp ( SCIP *  scip,
DEC_DECOMP **  decomp,
SCIP_Bool  solveorigprob 
)

creates a decomposition with all constraints in the master

Definition at line 2388 of file decomp.c.

References DECdecompCreate(), DECdecompSetPresolved(), DECfilloutDecompFromHashmaps(), and GCGisConsGCGCons().

Referenced by initRelaxator().

◆ DECcreateDecompFromMasterconss()

SCIP_RETCODE DECcreateDecompFromMasterconss ( SCIP *  scip,
DEC_DECOMP **  decomp,
SCIP_CONS **  masterconss,
int  nmasterconss 
)

creates a decomposition with provided constraints in the master The function will put the remaining constraints in one or more pricing problems depending on whether the subproblems decompose with no variables in common.

Definition at line 2715 of file decomp.c.

References assignConstraintsToRepresentatives(), DECdecompCreate(), DECfilloutDecompFromConstoblock(), fillConstoblock(), GCGisConsGCGCons(), and processBlockRepresentatives().

◆ DECgetSubproblemVarsData()

void DECgetSubproblemVarsData ( SCIP *  scip,
DEC_DECOMP decomp,
int *  nvars,
int *  nbinvars,
int *  nintvars,
int *  nimplvars,
int *  ncontvars,
int  nproblems 
)

return the number of variables and binary, integer, implied integer, continuous variables of all subproblems

Definition at line 2837 of file decomp.c.

References DEC_DECTYPE_UNKNOWN, DECdecompGetNSubscipvars(), DECdecompGetSubscipvars(), DECdecompGetType(), and incVarsData().

Referenced by GCGprintDecompStatistics().

◆ DECgetLinkingVarsData()

void DECgetLinkingVarsData ( SCIP *  scip,
DEC_DECOMP decomp,
int *  nvars,
int *  nbinvars,
int *  nintvars,
int *  nimplvars,
int *  ncontvars 
)

return the number of variables and binary, integer, implied integer, continuous variables of the master

Definition at line 2886 of file decomp.c.

References DEC_DECTYPE_UNKNOWN, DECdecompGetLinkingvars(), DECdecompGetNLinkingvars(), DECdecompGetType(), and incVarsData().

Referenced by GCGprintDecompStatistics().

◆ DECgetDensityData()

SCIP_RETCODE DECgetDensityData ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_VAR **  vars,
int  nvars,
SCIP_CONS **  conss,
int  nconss,
int *  varsubproblemdensity,
int *  varmasterdensity,
int *  conssubproblemdensity,
int *  consmasterdensity 
)

returns the number of nonzeros of each column of the constraint matrix both in the subproblem and in the master

Note
For linking variables, the number of nonzeros in the subproblems corresponds to the number on nonzeros in the border
The arrays have to be allocated by the caller
Precondition
This function assumes that constraints are partitioned in the decomp structure, no constraint is present in more than one block

Definition at line 2936 of file decomp.c.

References DECdecompGetLinkingconss(), DECdecompGetNBlocks(), DECdecompGetNLinkingconss(), DECdecompGetNSubscipconss(), DECdecompGetSubscipconss(), and DECdecompGetVartoblock().

Referenced by GCGprintDecompStatistics().

◆ DECgetVarLockData()

SCIP_RETCODE DECgetVarLockData ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_VAR **  vars,
int  nvars,
int  nsubproblems,
int **  subsciplocksdown,
int **  subsciplocksup,
int *  masterlocksdown,
int *  masterlocksup 
)

calculates the number of up and down locks of variables for a given decomposition in both the original problem and the pricingproblems

Note
All arrays need to be allocated by the caller
Warning
This function needs a lot of memory (nvars*nblocks+1) array entries

Definition at line 3117 of file decomp.c.

References DECdecompGetLinkingconss(), DECdecompGetNBlocks(), DECdecompGetNLinkingvars(), DECdecompGetNSubscipconss(), DECdecompGetSubscipconss(), DECdecompGetVartoblock(), GCGconsGetLhs(), GCGconsGetRhs(), GCGconsGetVals(), and increaseLock().

◆ DECgetMaxWhiteScore()

SCIP_Real DECgetMaxWhiteScore ( SCIP *  scip,
DEC_DECOMP decdecomp 
)

returns the maximum white score ( if it is not calculated yet is decomp is evaluated)

computes the score of the given decomposition based on the border, the average density score and the ratio of linking variables

Definition at line 3270 of file decomp.c.

References DECevaluateDecomposition(), and DecDecomp::maxwhitescore.

◆ DECevaluateDecomposition()

◆ DECdecompGetNConss()

int DECdecompGetNConss ( DEC_DECOMP decomp)

returns the number of constraints saved in the decomposition

Definition at line 3650 of file decomp.c.

References DECdecompGetNBlocks(), DECdecompGetNLinkingconss(), and DECdecompGetNSubscipconss().

Referenced by GCGprintDecompStatistics().

◆ GCGprintDecompStatistics()

◆ DECdecompositionsAreEqual()

SCIP_Bool DECdecompositionsAreEqual ( SCIP *  scip,
DEC_DECOMP decomp1,
DEC_DECOMP decomp2 
)

returns whether both structures lead to the same decomposition

Definition at line 3939 of file decomp.c.

References DECdecompGetConstoblock(), DECdecompGetNBlocks(), and DECdecompGetVartoblock().

Referenced by DECfilterSimilarDecompositions().

◆ DECfilterSimilarDecompositions()

int DECfilterSimilarDecompositions ( SCIP *  scip,
DEC_DECOMP **  decs,
int  ndecs 
)

filters similar decompositions from a given list and moves them to the end

Returns
the number of unique decompositions

Definition at line 4004 of file decomp.c.

References DECdecompositionsAreEqual().

◆ DECdetermineConsBlock()

SCIP_RETCODE DECdetermineConsBlock ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_CONS *  cons,
int *  block 
)

returns the number of the block that the constraint is with respect to the decomposition

returns the number of the block that the constraint is with respect to the decomposition; set *block = -2, if it has no variables *block = -1, if it has only variables belonging only to the master (meaning that this constraint should build a new block) *block in [0,...,nblocks-1] if it only contains variables of a particular block (plus linking variables) *block = nblocks, if it contains

  • either variables from more than one block (plus linking variables or master only variables)
  • or linking variables only

Definition at line 4047 of file decomp.c.

References DECdecompGetNBlocks(), and DECdecompGetVartoblock().

Referenced by DECdecompAddRemainingConss(), DECtryAssignMasterconssToExistingPricing(), and DECtryAssignMasterconssToNewPricing().

◆ DECdecompMoveLinkingConsToPricing()

SCIP_RETCODE DECdecompMoveLinkingConsToPricing ( SCIP *  scip,
DEC_DECOMP decomp,
int  consindex,
int  block 
)

◆ DECtryAssignMasterconssToExistingPricing()

SCIP_RETCODE DECtryAssignMasterconssToExistingPricing ( SCIP *  scip,
DEC_DECOMP decomp,
int *  transferred 
)

tries to assign masterconss to pricing problem

Definition at line 4172 of file decomp.c.

References DECdecompGetNBlocks(), DECdecompMoveLinkingConsToPricing(), DECdetermineConsBlock(), DecDecomp::linkingconss, and DecDecomp::nlinkingconss.

Referenced by DECcreatePolishedDecomp().

◆ DECtryAssignMasterconssToNewPricing()

SCIP_RETCODE DECtryAssignMasterconssToNewPricing ( SCIP *  scip,
DEC_DECOMP decomp,
DEC_DECOMP **  newdecomp,
int *  transferred 
)

◆ DECcreatePolishedDecomp()

SCIP_RETCODE DECcreatePolishedDecomp ( SCIP *  scip,
DEC_DECOMP decomp,
DEC_DECOMP **  newdecomp 
)

polish the decomposition and try to greedily assign master constraints to pricing problem where useful

Definition at line 4276 of file decomp.c.

References DECdecompFree(), DECdecompGetNBlocks(), DECtryAssignMasterconssToExistingPricing(), and DECtryAssignMasterconssToNewPricing().

◆ DECpermuteDecomp()

SCIP_RETCODE DECpermuteDecomp ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_RANDNUMGEN *  randnumgen 
)

◆ DECgetNDecomps()

int DECgetNDecomps ( SCIP *  scip)

gets the number of existing decompositions

Returns
number of decompositions
Parameters
scipSCIP data structure

Definition at line 2554 of file cons_decomp.cpp.

References GCGconshdlrDecompGetNDecomps().