GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
decomp.c File Reference

Detailed Description

generic methods for working with different decomposition structures

Author
Martin Bergner
Michael Bastubbe

Various methods to work with the decomp structure

Definition in file decomp.c.

#include "gcg/decomp.h"
#include "gcg/gcg.h"
#include "gcg/cons_decomp.h"
#include "scip/scip.h"
#include "gcg/struct_decomp.h"
#include "gcg/scip_misc.h"
#include "gcg/relax_gcg.h"
#include <assert.h>

Go to the source code of this file.

Data Structures

struct  DEC_STATISTIC

Macros

#define ELEM_SWAP(a, b)

Functions

static SCIP_Real quick_select_median (SCIP_Real arr[], int n)
static SCIP_RETCODE fillOutVarsFromVartoblock (GCG *gcg, GCG_DECOMP *decomp, SCIP_HASHMAP *vartoblock, int nblocks, SCIP_VAR **vars, int nvars, SCIP_Bool *haslinking)
static SCIP_RETCODE fillOutConsFromConstoblock (GCG *gcg, GCG_DECOMP *decomp, SCIP_HASHMAP *constoblock, int nblocks, SCIP_CONS **conss, int nconss, SCIP_Bool *haslinking)
static SCIP_RETCODE removeFromLinkingvars (GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR *var, SCIP_Bool *success)
static SCIP_RETCODE assignConsvarsToBlock (GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS *cons, int block)
const char * GCGdecompGetStrType (GCG_DECTYPE type)
SCIP_RETCODE GCGdecompCreate (GCG *gcg, GCG_DECOMP **decdecomp)
SCIP_RETCODE GCGdecompFree (GCG *gcg, GCG_DECOMP **decdecomp)
SCIP_RETCODE GCGdecompSetType (GCG_DECOMP *decomp, GCG_DECTYPE type)
GCG_DECTYPE GCGdecompGetType (GCG_DECOMP *decomp)
SCIP_Real GCGdecompGetMaxwhiteScore (GCG_DECOMP *decomp)
void GCGdecompSetPresolved (GCG_DECOMP *decomp, SCIP_Bool presolved)
SCIP_Bool GCGdecompGetPresolved (GCG_DECOMP *decomp)
void GCGdecompSetNBlocks (GCG_DECOMP *decomp, int nblocks)
int GCGdecompGetNBlocks (GCG_DECOMP *decomp)
SCIP_RETCODE GCGdecompSetSubscipvars (GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR ***subscipvars, int *nsubscipvars)
SCIP_VAR *** GCGdecompGetSubscipvars (GCG_DECOMP *decomp)
int * GCGdecompGetNSubscipvars (GCG_DECOMP *decomp)
SCIP_RETCODE GCGdecompSetSubscipconss (GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS ***subscipconss, int *nsubscipconss)
SCIP_CONS *** GCGdecompGetSubscipconss (GCG_DECOMP *decomp)
int * GCGdecompGetNSubscipconss (GCG_DECOMP *decomp)
SCIP_RETCODE GCGdecompSetLinkingconss (GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS **linkingconss, int nlinkingconss)
SCIP_CONS ** GCGdecompGetLinkingconss (GCG_DECOMP *decomp)
int GCGdecompGetNLinkingconss (GCG_DECOMP *decomp)
SCIP_RETCODE GCGdecompSetLinkingvars (GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR **linkingvars, int nlinkingvars, int nfixedlinkingvars, int nmastervars)
SCIP_VAR ** GCGdecompGetLinkingvars (GCG_DECOMP *decomp)
int GCGdecompGetNLinkingvars (GCG_DECOMP *decomp)
int GCGdecompGetNFixedLinkingvars (GCG_DECOMP *decomp)
int GCGdecompGetNMastervars (GCG_DECOMP *decomp)
SCIP_RETCODE GCGdecompSetStairlinkingvars (GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR ***stairlinkingvars, int *nstairlinkingvars)
SCIP_VAR *** GCGdecompGetStairlinkingvars (GCG_DECOMP *decomp)
int * GCGdecompGetNStairlinkingvars (GCG_DECOMP *decomp)
int GCGdecompGetNTotalStairlinkingvars (GCG_DECOMP *decomp)
void GCGdecompSetVartoblock (GCG_DECOMP *decomp, SCIP_HASHMAP *vartoblock)
SCIP_HASHMAP * GCGdecompGetVartoblock (GCG_DECOMP *decomp)
void GCGdecompSetConstoblock (GCG_DECOMP *decomp, SCIP_HASHMAP *constoblock)
SCIP_HASHMAP * GCGdecompGetConstoblock (GCG_DECOMP *decomp)
void GCGdecompSetVarindex (GCG_DECOMP *decomp, SCIP_HASHMAP *varindex)
SCIP_HASHMAP * GCGdecompGetVarindex (GCG_DECOMP *decomp)
void GCGdecompSetConsindex (GCG_DECOMP *decomp, SCIP_HASHMAP *consindex)
SCIP_HASHMAP * GCGdecompGetConsindex (GCG_DECOMP *decomp)
SCIP_RETCODE GCGfilloutDecompFromHashmaps (GCG *gcg, GCG_DECOMP *decomp, SCIP_HASHMAP *vartoblock, SCIP_HASHMAP *constoblock, int nblocks, SCIP_Bool staircase)
SCIP_RETCODE GCGfilloutDecompFromConstoblock (GCG *gcg, GCG_DECOMP *decomp, SCIP_HASHMAP *constoblock, int nblocks, SCIP_Bool staircase)
void GCGdecompSetDetector (GCG_DECOMP *decomp, GCG_DETECTOR *detector)
GCG_DETECTOR * GCGdecompGetDetector (GCG_DECOMP *decomp)
GCG_DETECTOR ** GCGdecompGetDetectorChain (GCG_DECOMP *decomp)
SCIP_RETCODE GCGdecompSetDetectorChain (GCG *gcg, GCG_DECOMP *decomp, GCG_DETECTOR **detectors, int ndetectors)
int GCGdecompGetDetectorChainSize (GCG_DECOMP *decomp)
void GCGdecompSetPartialdecID (GCG_DECOMP *decomp, int id)
int GCGdecompGetPartialdecID (GCG_DECOMP *decomp)
void GCGdecompSetDetectorClockTimes (GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *detectorClockTimes)
SCIP_Real * GCGdecompGetDetectorClockTimes (GCG_DECOMP *decomp)
GCG_EXPORT SCIP_RETCODE GCGdecompSetDetectorChainString (GCG *gcg, GCG_DECOMP *decomp, const char *detectorchainstring)
GCG_EXPORT char * GCGdecompGetDetectorChainString (GCG *gcg, GCG_DECOMP *decomp)
void GCGdecompSetDetectorPctVarsToBorder (GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsToBorder)
GCG_EXPORT SCIP_Real * GCGdecompGetDetectorPctVarsToBorder (GCG_DECOMP *decomp)
void GCGdecompSetDetectorPctConssToBorder (GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssToBorder)
SCIP_Real * GCGdecompGetDetectorPctConssToBorder (GCG_DECOMP *decomp)
void GCGdecompSetDetectorPctVarsToBlock (GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsToBlock)
SCIP_Real * GCGdecompGetDetectorPctVarsToBlock (GCG_DECOMP *decomp)
void GCGdecompSetDetectorPctConssToBlock (GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssToBlock)
GCG_EXPORT SCIP_Real * GCGdecompGetDetectorPctConssToBlock (GCG_DECOMP *decomp)
void GCGdecompSetDetectorPctVarsFromOpen (GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsFromOpen)
SCIP_Real * GCGdecompGetDetectorPctVarsFromOpen (GCG_DECOMP *decomp)
void GCGdecompSetDetectorPctConssFromOpen (GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssFromOpen)
SCIP_Real * GCGdecompGetDetectorPctConssFromOpen (GCG_DECOMP *decomp)
void GCGdecompSetNNewBlocks (GCG *gcg, GCG_DECOMP *decomp, int *nNewBlocks)
int * GCGdecompGetNNewBlocks (GCG_DECOMP *decomp)
SCIP_RETCODE GCGdecompTransform (GCG *gcg, GCG_DECOMP *decomp)
SCIP_RETCODE GCGdecompRemoveDeletedConss (GCG *gcg, GCG_DECOMP *decdecomp)
SCIP_RETCODE GCGdecompAddRemainingConss (GCG *gcg, GCG_DECOMP *decdecomp)
SCIP_RETCODE GCGdecompCheckConsistency (GCG *gcg, GCG_DECOMP *decdecomp)
SCIP_RETCODE GCGcreateBasicDecomp (GCG *gcg, GCG_DECOMP **decomp, SCIP_Bool solveorigprob)
static int processBlockRepresentatives (int maxblock, int *blockrepresentative)
static SCIP_RETCODE assignConstraintsToRepresentatives (GCG *gcg, SCIP_CONS **conss, int nconss, SCIP_Bool *consismaster, SCIP_HASHMAP *constoblock, int *vartoblock, int *nextblock, int *blockrepresentative)
static SCIP_RETCODE fillConstoblock (SCIP_CONS **conss, int nconss, SCIP_Bool *consismaster, int nblocks, SCIP_HASHMAP *constoblock, SCIP_HASHMAP *newconstoblock, int *blockrepresentative)
SCIP_RETCODE GCGcreateDecompFromMasterconss (GCG *gcg, GCG_DECOMP **decomp, SCIP_CONS **masterconss, int nmasterconss)
static void incVarsData (SCIP_VAR *var, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars, int nproblems, int i)
void GCGgetSubproblemVarsData (GCG *gcg, GCG_DECOMP *decomp, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars, int nproblems)
void GCGgetLinkingVarsData (GCG *gcg, GCG_DECOMP *decomp, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_RETCODE GCGgetDensityData (GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR **vars, int nvars, SCIP_CONS **conss, int nconss, int *varsubproblemdensity, int *varmasterdensity, int *conssubproblemdensity, int *consmasterdensity)
static void increaseLock (GCG *gcg, SCIP_Real lhs, SCIP_Real coef, SCIP_Real rhs, int *downlock, int *uplock)
SCIP_RETCODE GCGgetVarLockData (GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR **vars, int nvars, int nsubproblems, int **subsciplocksdown, int **subsciplocksup, int *masterlocksdown, int *masterlocksup)
void GCGdecompSetMaxWhiteScore (GCG *gcg, GCG_DECOMP *decdecomp, SCIP_Real maxwhitescore)
SCIP_Real GCGdecompGetMaxWhiteScore (GCG *gcg, GCG_DECOMP *decdecomp)
SCIP_RETCODE GCGdecompEvaluateDecomposition (GCG *gcg, GCG_DECOMP *decdecomp, DEC_SCORES *score)
static SCIP_RETCODE computeVarDensities (GCG *gcg, GCG_DECOMP *decomp, int *varprobdensity, int *varmasterdensity, SCIP_VAR **vars, int nvars, DEC_STATISTIC *blockvardensities, DEC_STATISTIC *mastervardensity, int nblocks)
int GCGdecompGetNConss (GCG_DECOMP *decomp)
static SCIP_RETCODE computeConssNzeros (GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS *cons, int *nzeros, int *nintzeros, int *nbzeros, int *nintbzeros)
static SCIP_RETCODE computeNonzeros (GCG *gcg, GCG_DECOMP *decomp, int *mnzeros, int *mintnzeros, int *lnzeros, int *lintnzeros, int *nonzeros, int *intnzeros)
SCIP_RETCODE GCGprintDecompStatistics (GCG *gcg, FILE *file, GCG_DECOMP *decomp)
SCIP_Bool GCGdecompositionsAreEqual (GCG *gcg, GCG_DECOMP *decomp1, GCG_DECOMP *decomp2)
int GCGfilterSimilarDecompositions (GCG *gcg, GCG_DECOMP **decs, int ndecs)
SCIP_RETCODE GCGdetermineConsBlock (GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS *cons, int *block)
SCIP_RETCODE GCGdecompMoveLinkingConsToPricing (GCG *gcg, GCG_DECOMP *decomp, int consindex, int block)
SCIP_RETCODE GCGdecompTryAssignMasterconssToExistingPricing (GCG *gcg, GCG_DECOMP *decomp, int *transferred)
SCIP_RETCODE GCGdecompTryAssignMasterconssToNewPricing (GCG *gcg, GCG_DECOMP *decomp, GCG_DECOMP **newdecomp, int *transferred)
SCIP_RETCODE GCGcreatePolishedDecomp (GCG *gcg, GCG_DECOMP *decomp, GCG_DECOMP **newdecomp)
SCIP_RETCODE GCGpermuteDecomp (GCG *gcg, GCG_DECOMP *decomp, SCIP_RANDNUMGEN *randnumgen)

Macro Definition Documentation

◆ ELEM_SWAP

#define ELEM_SWAP ( a,
b )
Value:
{ register SCIP_Real t=(a);(a)=(b);(b)=t; }
SCIP_VAR * a
SCIP_VAR ** b
#define SCIP_Real

Definition at line 60 of file decomp.c.

Referenced by quick_select_median().

Function Documentation

◆ quick_select_median()

SCIP_Real quick_select_median ( SCIP_Real arr[],
int n )
static

Definition at line 63 of file decomp.c.

References ELEM_SWAP, and quick_select_median().

Referenced by computeVarDensities(), and quick_select_median().

◆ fillOutVarsFromVartoblock()

SCIP_RETCODE fillOutVarsFromVartoblock ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_HASHMAP * vartoblock,
int nblocks,
SCIP_VAR ** vars,
int nvars,
SCIP_Bool * haslinking )
static

fill out subscipvars arrays from the information from vartoblock

Parameters
gcgGCG data structure
decompdecomposition data structure
vartoblockvariable to block hashmap
nblocksnumber of blocks
varsvariable array
nvarsnumber of variables
haslinkingreturns whether there are linking variables

Definition at line 124 of file decomp.c.

References assert(), fillOutVarsFromVartoblock(), GCGdecompSetLinkingvars(), GCGdecompSetSubscipvars(), GCGdecompSetVartoblock(), GCGgetOrigprob(), i, nmastervars, nvars, SCIP_CALL(), SCIPdebugMessage(), SCIPfreeBufferArray(), var, and vars.

Referenced by fillOutVarsFromVartoblock(), and GCGfilloutDecompFromHashmaps().

◆ fillOutConsFromConstoblock()

SCIP_RETCODE fillOutConsFromConstoblock ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_HASHMAP * constoblock,
int nblocks,
SCIP_CONS ** conss,
int nconss,
SCIP_Bool * haslinking )
static

fill out subscipcons arrays from the information from constoblock

Parameters
gcgGCG data structure
decompdecomposition data structure
constoblockconstraint to block hashmap
nblocksnumber of blocks
conssconstraint array
nconssnumber of constraints
haslinkingreturns whether there are linking constraints

Definition at line 245 of file decomp.c.

References assert(), GCG_Decomp::constoblock, fillOutConsFromConstoblock(), GCGdecompSetConstoblock(), GCGdecompSetLinkingconss(), GCGdecompSetSubscipconss(), GCGgetOrigprob(), i, nvars, retcode, SCIP_CALL(), SCIPdebugMessage(), SCIPfreeBufferArray(), and success.

Referenced by fillOutConsFromConstoblock(), and GCGfilloutDecompFromHashmaps().

◆ removeFromLinkingvars()

SCIP_RETCODE removeFromLinkingvars ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_VAR * var,
SCIP_Bool * success )
static

removes a variable from the linking variable array

Parameters
gcgGCG data structure
decompdecomposition data structure
varvariable to remove
successindicates whether the variable was successfully removed

Definition at line 360 of file decomp.c.

References assert(), GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCGdecompGetNLinkingconss(), GCGdecompSetType(), GCGgetOrigprob(), GCG_Decomp::linkingvars, GCG_Decomp::nlinkingvars, removeFromLinkingvars(), SCIP_CALL(), success, and var.

Referenced by assignConsvarsToBlock(), and removeFromLinkingvars().

◆ assignConsvarsToBlock()

SCIP_RETCODE assignConsvarsToBlock ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_CONS * cons,
int block )
static

for a given constraint, check which of its variables were previously determined to be copied directly to the master, and assign them to the block to which the constraint belongs

Parameters
gcgGCG data structure
decompdecomposition data structure
consconstraint whose variables should be assigned to its block
blockblock to which the constraint has been assigned

Definition at line 417 of file decomp.c.

References assert(), assignConsvarsToBlock(), GCGgetOrigprob(), GCG_Decomp::nblocks, GCG_Decomp::nsubscipvars, removeFromLinkingvars(), SCIP_CALL(), GCG_Decomp::subscipvars, success, and GCG_Decomp::vartoblock.

Referenced by assignConsvarsToBlock(), GCGdecompAddRemainingConss(), and GCGdecompMoveLinkingConsToPricing().

◆ GCGdecompGetStrType()

const char * GCGdecompGetStrType ( GCG_DECTYPE type)

converts the GCG_DECTYPE enum to a string

Parameters
typedecomposition type

Definition at line 471 of file decomp.c.

References GCGdecompGetStrType().

Referenced by GCGdecompEvaluateDecomposition(), GCGdecompGetStrType(), GCGprintDecompStatistics(), and GCGwriteDecompositionData().

◆ GCGdecompCreate()

SCIP_RETCODE GCGdecompCreate ( GCG * gcg,
GCG_DECOMP ** decomp )

initializes the decomposition to absolutely nothing

Parameters
gcgGCG data structure
decdecomppointer to the decomposition data structure

Definition at line 480 of file decomp.c.

References assert(), GCG_Decomp::consindex, GCG_Decomp::constoblock, GCG_Decomp::detector, GCG_Decomp::detectorchain, GCG_Decomp::detectorchainstring, GCG_Decomp::detectorclocktimes, GCG_DECTYPE_UNKNOWN, GCGconshdlrDecompIncreaseNCallsCreateDecomp(), GCGdecompCreate(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::linkingvars, GCG_Decomp::maxwhitescore, GCG_Decomp::nblocks, ncalls, GCG_Decomp::nfixedlinkingvars, GCG_Decomp::nlinkingconss, GCG_Decomp::nlinkingvars, GCG_Decomp::nmastervars, GCG_Decomp::nnewblocks, GCG_Decomp::nstairlinkingvars, GCG_Decomp::nsubscipconss, GCG_Decomp::nsubscipvars, GCG_Decomp::partialdecid, GCG_Decomp::pctconssfromopen, GCG_Decomp::pctconsstoblock, GCG_Decomp::pctconsstoborder, GCG_Decomp::pctvarsfromopen, GCG_Decomp::pctvarstoblock, GCG_Decomp::pctvarstoborder, GCG_Decomp::presolved, SCIP_CALL(), GCG_Decomp::sizedetectorchain, GCG_Decomp::stairlinkingvars, GCG_Decomp::subscipconss, GCG_Decomp::subscipvars, GCG_Decomp::type, GCG_Decomp::varindex, and GCG_Decomp::vartoblock.

Referenced by createDecompFromPartialdec(), gcg::ColumnGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createDecompFromPartition(), gcg::HyperrowcolGraph< T >::createDecompFromPartition(), gcg::HyperrowGraph< T >::createDecompFromPartition(), gcg::RowGraph< T >::createDecompFromPartition(), GCGcreateBasicDecomp(), GCGcreateDecompFromMasterconss(), GCGdecompCreate(), GCGdecompTryAssignMasterconssToNewPricing(), readBLKFile(), and readRef().

◆ GCGdecompFree()

◆ GCGdecompSetType()

◆ GCGdecompGetType()

◆ GCGdecompGetMaxwhiteScore()

SCIP_Real GCGdecompGetMaxwhiteScore ( GCG_DECOMP * decomp)
Parameters
decompdecomposition data structure

Definition at line 713 of file decomp.c.

References assert(), GCGdecompGetMaxwhiteScore(), and GCG_Decomp::maxwhitescore.

Referenced by GCGdecompGetMaxwhiteScore(), and initRelaxator().

◆ GCGdecompSetPresolved()

void GCGdecompSetPresolved ( GCG_DECOMP * decomp,
SCIP_Bool presolved )

sets the presolved flag for decomposition

Parameters
decompdecomposition data structure
presolvedpresolved flag for decomposition

Definition at line 724 of file decomp.c.

References assert(), GCGdecompSetPresolved(), and GCG_Decomp::presolved.

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

◆ GCGdecompGetPresolved()

SCIP_Bool GCGdecompGetPresolved ( GCG_DECOMP * decomp)

gets the presolved flag for decomposition

Parameters
decompdecomposition data structure

Definition at line 735 of file decomp.c.

References assert(), GCGdecompGetPresolved(), and GCG_Decomp::presolved.

Referenced by GCGdecompGetPresolved().

◆ GCGdecompSetNBlocks()

void GCGdecompSetNBlocks ( GCG_DECOMP * decomp,
int nblocks )

sets the number of blocks for decomposition

Parameters
decompdecomposition data structure
nblocksnumber of blocks for decomposition

Definition at line 745 of file decomp.c.

References assert(), GCGdecompSetNBlocks(), and GCG_Decomp::nblocks.

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

◆ GCGdecompGetNBlocks()

◆ GCGdecompSetSubscipvars()

SCIP_RETCODE GCGdecompSetSubscipvars ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_VAR *** subscipvars,
int * nsubscipvars )

copies the input subscipvars array to the given decomposition

Parameters
gcgGCG data structure
decompdecomposition data structure
subscipvarssubscipvars array
nsubscipvarsnumber of subscipvars per block

Definition at line 767 of file decomp.c.

References assert(), GCGdecompSetSubscipvars(), GCGgetOrigprob(), i, GCG_Decomp::nblocks, GCG_Decomp::nsubscipvars, SCIP_CALL(), and GCG_Decomp::subscipvars.

Referenced by createDecompFromPartialdec(), fillOutVarsFromVartoblock(), and GCGdecompSetSubscipvars().

◆ GCGdecompGetSubscipvars()

SCIP_VAR *** GCGdecompGetSubscipvars ( GCG_DECOMP * decomp)

returns the subscipvars array of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 837 of file decomp.c.

References assert(), GCGdecompGetSubscipvars(), and GCG_Decomp::subscipvars.

Referenced by computeVarDensities(), convertStructToGCG(), GCGdecompCheckConsistency(), GCGdecompGetSubscipvars(), GCGgetSubproblemVarsData(), and GCGpermuteDecomp().

◆ GCGdecompGetNSubscipvars()

int * GCGdecompGetNSubscipvars ( GCG_DECOMP * decomp)

◆ GCGdecompSetSubscipconss()

SCIP_RETCODE GCGdecompSetSubscipconss ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_CONS *** subscipconss,
int * nsubscipconss )

copies the input subscipconss array to the given decomposition

Parameters
gcgGCG data structure
decompdecomposition data structure
subscipconsssubscipconss array
nsubscipconssnumber of subscipconss per block

Definition at line 857 of file decomp.c.

References assert(), GCGdecompSetSubscipconss(), GCGgetOrigprob(), i, GCG_Decomp::nblocks, GCG_Decomp::nsubscipconss, SCIP_CALL(), and GCG_Decomp::subscipconss.

Referenced by createDecompFromPartialdec(), fillOutConsFromConstoblock(), and GCGdecompSetSubscipconss().

◆ GCGdecompGetSubscipconss()

SCIP_CONS *** GCGdecompGetSubscipconss ( GCG_DECOMP * decomp)

◆ GCGdecompGetNSubscipconss()

◆ GCGdecompSetLinkingconss()

SCIP_RETCODE GCGdecompSetLinkingconss ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_CONS ** linkingconss,
int nlinkingconss )

copies the input linkingconss array to the given decomposition

Parameters
gcgGCG data structure
decompdecomposition data structure
linkingconsslinkingconss array
nlinkingconssnumber of linkingconss per block

Definition at line 942 of file decomp.c.

References assert(), GCGdecompSetLinkingconss(), GCGgetOrigprob(), i, GCG_Decomp::linkingconss, GCG_Decomp::nlinkingconss, and SCIP_CALL().

Referenced by createDecompFromPartialdec(), fillOutConsFromConstoblock(), and GCGdecompSetLinkingconss().

◆ GCGdecompGetLinkingconss()

SCIP_CONS ** GCGdecompGetLinkingconss ( GCG_DECOMP * decomp)

returns the linkingconss array of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 985 of file decomp.c.

References assert(), GCGdecompGetLinkingconss(), and GCG_Decomp::linkingconss.

Referenced by checkSetppcStructure(), computeNonzeros(), convertStructToGCG(), createMasterprobConss(), createPartialdecFromDecomp(), GCGdecompCheckConsistency(), GCGdecompGetLinkingconss(), GCGgetDensityData(), GCGgetVarLockData(), and GCGpermuteDecomp().

◆ GCGdecompGetNLinkingconss()

◆ GCGdecompSetLinkingvars()

SCIP_RETCODE GCGdecompSetLinkingvars ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_VAR ** linkingvars,
int nlinkingvars,
int nfixedlinkingvars,
int nmastervars )

copies the input linkingvars array to the given decdecomp structure

copies the input linkingvars array to the given decomposition

Parameters
gcgGCG data structure
decompdecomposition data structure
linkingvarslinkingvars array
nlinkingvarsnumber of total linkingvars (including fixed linking vars, )
nfixedlinkingvarsnumber of fixed linking variables
nmastervarsnumber of linking variables that are purely master variables

Definition at line 1007 of file decomp.c.

References assert(), GCGdecompSetLinkingvars(), GCGgetOrigprob(), i, GCG_Decomp::linkingvars, GCG_Decomp::nfixedlinkingvars, GCG_Decomp::nlinkingvars, GCG_Decomp::nmastervars, nmastervars, and SCIP_CALL().

Referenced by createDecompFromPartialdec(), fillOutVarsFromVartoblock(), and GCGdecompSetLinkingvars().

◆ GCGdecompGetLinkingvars()

SCIP_VAR ** GCGdecompGetLinkingvars ( GCG_DECOMP * decomp)

returns the linkingvars array of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1056 of file decomp.c.

References assert(), GCGdecompGetLinkingvars(), and GCG_Decomp::linkingvars.

Referenced by convertStructToGCG(), GCGdecompCheckConsistency(), GCGdecompGetLinkingvars(), GCGgetLinkingVarsData(), and GCGpermuteDecomp().

◆ GCGdecompGetNLinkingvars()

int GCGdecompGetNLinkingvars ( GCG_DECOMP * decomp)

◆ GCGdecompGetNFixedLinkingvars()

int GCGdecompGetNFixedLinkingvars ( GCG_DECOMP * decomp)

returns the nlinkingvars array of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1077 of file decomp.c.

References assert(), GCGdecompGetNFixedLinkingvars(), and GCG_Decomp::nfixedlinkingvars.

Referenced by GCGdecompGetNFixedLinkingvars().

◆ GCGdecompGetNMastervars()

int GCGdecompGetNMastervars ( GCG_DECOMP * decomp)

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

returns the number of master variables of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1089 of file decomp.c.

References assert(), GCGdecompGetNMastervars(), and GCG_Decomp::nmastervars.

Referenced by GCGdecompEvaluateDecomposition(), GCGdecompGetNMastervars(), GCGprintDecompStatistics(), and initRelaxator().

◆ GCGdecompSetStairlinkingvars()

SCIP_RETCODE GCGdecompSetStairlinkingvars ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_VAR *** stairlinkingvars,
int * nstairlinkingvars )

copies the input stairlinkingvars array to the given decomposition

Parameters
gcgGCG data structure
decompdecomposition data structure
stairlinkingvarsstairlinkingvars array
nstairlinkingvarsnumber of linkingvars per block

Definition at line 1101 of file decomp.c.

References assert(), GCGdecompSetStairlinkingvars(), GCGgetOrigprob(), i, GCG_Decomp::nblocks, GCG_Decomp::nstairlinkingvars, SCIP_CALL(), and GCG_Decomp::stairlinkingvars.

Referenced by createDecompFromPartialdec(), GCGdecompSetStairlinkingvars(), and GCGfilloutDecompFromHashmaps().

◆ GCGdecompGetStairlinkingvars()

SCIP_VAR *** GCGdecompGetStairlinkingvars ( GCG_DECOMP * decomp)

returns the stairlinkingvars array of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1173 of file decomp.c.

References assert(), GCGdecompGetStairlinkingvars(), and GCG_Decomp::stairlinkingvars.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetStairlinkingvars().

◆ GCGdecompGetNStairlinkingvars()

int * GCGdecompGetNStairlinkingvars ( GCG_DECOMP * decomp)

returns the nstairlinkingvars array of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1182 of file decomp.c.

References assert(), GCGdecompGetNStairlinkingvars(), and GCG_Decomp::nstairlinkingvars.

Referenced by createPartialdecFromDecomp(), GCGdecompGetNStairlinkingvars(), and GCGdecompGetNTotalStairlinkingvars().

◆ GCGdecompGetNTotalStairlinkingvars()

int GCGdecompGetNTotalStairlinkingvars ( GCG_DECOMP * decomp)

returns the total number of stairlinkingvars array of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1192 of file decomp.c.

References GCGdecompGetNBlocks(), GCGdecompGetNStairlinkingvars(), and GCGdecompGetNTotalStairlinkingvars().

Referenced by GCGdecompCheckConsistency(), and GCGdecompGetNTotalStairlinkingvars().

◆ GCGdecompSetVartoblock()

void GCGdecompSetVartoblock ( GCG_DECOMP * decomp,
SCIP_HASHMAP * vartoblock )

sets the vartoblock hashmap of the given decomposition

Parameters
decompdecomposition data structure
vartoblockVartoblock hashmap

Definition at line 1209 of file decomp.c.

References assert(), GCGdecompSetVartoblock(), and GCG_Decomp::vartoblock.

Referenced by createDecompFromPartialdec(), fillOutVarsFromVartoblock(), and GCGdecompSetVartoblock().

◆ GCGdecompGetVartoblock()

SCIP_HASHMAP * GCGdecompGetVartoblock ( GCG_DECOMP * decomp)

◆ GCGdecompSetConstoblock()

void GCGdecompSetConstoblock ( GCG_DECOMP * decomp,
SCIP_HASHMAP * constoblock )

sets the constoblock hashmap of the given decomposition

Parameters
decompdecomposition data structure
constoblockConstoblock hashmap

Definition at line 1231 of file decomp.c.

References assert(), GCG_Decomp::constoblock, and GCGdecompSetConstoblock().

Referenced by createDecompFromPartialdec(), fillOutConsFromConstoblock(), and GCGdecompSetConstoblock().

◆ GCGdecompGetConstoblock()

SCIP_HASHMAP * GCGdecompGetConstoblock ( GCG_DECOMP * decomp)

returns the constoblock hashmap of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1243 of file decomp.c.

References assert(), GCG_Decomp::constoblock, and GCGdecompGetConstoblock().

Referenced by createPartialdecFromDecomp(), GCGdecompAddRemainingConss(), GCGdecompCheckConsistency(), GCGdecompGetConstoblock(), and GCGdecompositionsAreEqual().

◆ GCGdecompSetVarindex()

void GCGdecompSetVarindex ( GCG_DECOMP * decomp,
SCIP_HASHMAP * varindex )

sets the varindex hashmap of the given decomposition

Parameters
decompdecomposition data structure
varindexVarindex hashmap

Definition at line 1253 of file decomp.c.

References assert(), GCGdecompSetVarindex(), and GCG_Decomp::varindex.

Referenced by createDecompFromPartialdec(), GCGdecompSetVarindex(), and GCGfilloutDecompFromHashmaps().

◆ GCGdecompGetVarindex()

SCIP_HASHMAP * GCGdecompGetVarindex ( GCG_DECOMP * decomp)

returns the varindex hashmap of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1264 of file decomp.c.

References assert(), GCGdecompGetVarindex(), and GCG_Decomp::varindex.

Referenced by GCGdecompGetVarindex().

◆ GCGdecompSetConsindex()

void GCGdecompSetConsindex ( GCG_DECOMP * decomp,
SCIP_HASHMAP * consindex )

sets the consindex hashmap of the given decomposition

Parameters
decompdecomposition data structure
consindexConsindex hashmap

Definition at line 1273 of file decomp.c.

References assert(), GCG_Decomp::consindex, and GCGdecompSetConsindex().

Referenced by createDecompFromPartialdec(), GCGdecompSetConsindex(), and GCGfilloutDecompFromHashmaps().

◆ GCGdecompGetConsindex()

SCIP_HASHMAP * GCGdecompGetConsindex ( GCG_DECOMP * decomp)

returns the consindex hashmap of the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1284 of file decomp.c.

References assert(), GCG_Decomp::consindex, and GCGdecompGetConsindex().

Referenced by GCGdecompGetConsindex().

◆ GCGfilloutDecompFromHashmaps()

SCIP_RETCODE GCGfilloutDecompFromHashmaps ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_HASHMAP * vartoblock,
SCIP_HASHMAP * constoblock,
int nblocks,
SCIP_Bool staircase )

completely initializes decomposition structure from the values of the hashmaps

Parameters
gcgGCG data structure
decompdecomposition data structure
vartoblockvariable to block hashmap
constoblockconstraint to block hashmap
nblocksnumber of blocks
staircaseshould the decomposition be a staircase structure

Definition at line 1293 of file decomp.c.

References assert(), fillOutConsFromConstoblock(), fillOutVarsFromVartoblock(), GCG_DECTYPE_ARROWHEAD, GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCG_DECTYPE_STAIRCASE, GCGdecompCheckConsistency(), GCGdecompGetNSubscipconss(), GCGdecompGetNSubscipvars(), GCGdecompGetSubscipconss(), GCGdecompSetConsindex(), GCGdecompSetNBlocks(), GCGdecompSetStairlinkingvars(), GCGdecompSetType(), GCGdecompSetVarindex(), GCGfilloutDecompFromHashmaps(), GCGgetOrigprob(), i, j, nvars, SCIP_CALL(), SCIPdebugMessage(), SCIPfreeBufferArray(), success, and vars.

Referenced by GCGcreateBasicDecomp(), GCGfilloutDecompFromConstoblock(), GCGfilloutDecompFromHashmaps(), and readREFFile().

◆ GCGfilloutDecompFromConstoblock()

SCIP_RETCODE GCGfilloutDecompFromConstoblock ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_HASHMAP * constoblock,
int nblocks,
SCIP_Bool staircase )

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)

completely fills out decomposition structure from only the constraint partition

Parameters
gcgGCG data structure
decompdecomposition data structure
constoblockconstraint to block hashmap, start with 1 for first block and nblocks+1 for linking constraints
nblocksnumber of blocks
staircaseshould the decomposition be a staircase structure

Definition at line 1479 of file decomp.c.

References assert(), GCGfilloutDecompFromConstoblock(), GCGfilloutDecompFromHashmaps(), GCGgetOrigprob(), i, j, nvars, retcode, SCIP_CALL(), SCIPdebugMessage(), SCIPfreeBufferArray(), success, and vars.

Referenced by gcg::ColumnGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createDecompFromPartition(), gcg::HyperrowcolGraph< T >::createDecompFromPartition(), gcg::HyperrowGraph< T >::createDecompFromPartition(), gcg::RowGraph< T >::createDecompFromPartition(), fillDecompStruct(), GCGcreateDecompFromMasterconss(), GCGdecompTryAssignMasterconssToNewPricing(), and GCGfilloutDecompFromConstoblock().

◆ GCGdecompSetDetector()

void GCGdecompSetDetector ( GCG_DECOMP * decomp,
GCG_DETECTOR * detector )

sets the detector for the given decomposition

Parameters
decompdecomposition data structure
detectordetector data structure

Definition at line 1605 of file decomp.c.

References assert(), GCG_Decomp::detector, and GCGdecompSetDetector().

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

◆ GCGdecompGetDetector()

GCG_DETECTOR * GCGdecompGetDetector ( GCG_DECOMP * decomp)

gets the detector for the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1616 of file decomp.c.

References assert(), GCG_Decomp::detector, and GCGdecompGetDetector().

Referenced by GCGdecompGetDetector(), and GCGwriteDecompositionData().

◆ GCGdecompGetDetectorChain()

GCG_DETECTOR ** GCGdecompGetDetectorChain ( GCG_DECOMP * decomp)

gets the detectors for the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1626 of file decomp.c.

References assert(), GCG_Decomp::detectorchain, and GCGdecompGetDetectorChain().

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorChain().

◆ GCGdecompSetDetectorChain()

SCIP_RETCODE GCGdecompSetDetectorChain ( GCG * gcg,
GCG_DECOMP * decomp,
GCG_DETECTOR ** detectors,
int ndetectors )

sets the detectors for the given decomposition

Note
make sure you know what you are doing, only use at initialization
Parameters
gcgGCG data structure
decompdecomposition data structure
detectorsnew detector chain
ndetectorsnumber of new detectors (i.e. length of the detector array)

Definition at line 1635 of file decomp.c.

References GCG_Decomp::detectorchain, GCGdecompSetDetectorChain(), GCGgetOrigprob(), and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorChain().

◆ GCGdecompGetDetectorChainSize()

int GCGdecompGetDetectorChainSize ( GCG_DECOMP * decomp)

gets the number of detectors for the given decomposition

Parameters
decompdecomposition data structure

Definition at line 1663 of file decomp.c.

References assert(), GCGdecompGetDetectorChainSize(), and GCG_Decomp::sizedetectorchain.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorChainSize().

◆ GCGdecompSetPartialdecID()

void GCGdecompSetPartialdecID ( GCG_DECOMP * decomp,
int id )

sets the id of the original partialdec

Parameters
decompdecomposition data structure
idID of partialdec

Definition at line 1673 of file decomp.c.

References assert(), GCGdecompSetPartialdecID(), and GCG_Decomp::partialdecid.

Referenced by createDecompFromPartialdec(), and GCGdecompSetPartialdecID().

◆ GCGdecompGetPartialdecID()

int GCGdecompGetPartialdecID ( GCG_DECOMP * decomp)

gets the id of the original partialdec

Parameters
decompdecomposition data structure

Definition at line 1685 of file decomp.c.

References assert(), GCGdecompGetPartialdecID(), and GCG_Decomp::partialdecid.

Referenced by checkIdenticalBlocks(), and GCGdecompGetPartialdecID().

◆ GCGdecompSetDetectorClockTimes()

void GCGdecompSetDetectorClockTimes ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_Real * detectorClockTimes )

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

Parameters
gcgGCG data structure
decompdecomposition data structure
detectorClockTimestime used by the detectors

Definition at line 1694 of file decomp.c.

References assert(), GCG_Decomp::detectorclocktimes, GCGdecompSetDetectorClockTimes(), GCGgetOrigprob(), and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorClockTimes().

◆ GCGdecompGetDetectorClockTimes()

SCIP_Real * GCGdecompGetDetectorClockTimes ( GCG_DECOMP * decomp)

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

Parameters
decompdecomposition data structure

Definition at line 1721 of file decomp.c.

References GCG_Decomp::detectorclocktimes, and GCGdecompGetDetectorClockTimes().

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorClockTimes().

◆ GCGdecompSetDetectorChainString()

GCG_EXPORT SCIP_RETCODE GCGdecompSetDetectorChainString ( GCG * gcg,
GCG_DECOMP * decomp,
const char * detectorchainstring )

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

Parameters
gcgGCG data structure
decompdecomposition data structure
detectorchainstringstring for the detector information working on that decomposition

Definition at line 1730 of file decomp.c.

References GCG_Decomp::detectorchainstring, GCGdecompSetDetectorChainString(), GCGgetOrigprob(), and SCIP_CALL().

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorChainString().

◆ GCGdecompGetDetectorChainString()

GCG_EXPORT char * GCGdecompGetDetectorChainString ( GCG * gcg,
GCG_DECOMP * decomp )

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

Parameters
gcgGCG data structure
decompdecomposition data structure

Definition at line 1745 of file decomp.c.

References GCG_Decomp::detectorchainstring, and GCGdecompGetDetectorChainString().

Referenced by GCGdecompGetDetectorChainString().

◆ GCGdecompSetDetectorPctVarsToBorder()

void GCGdecompSetDetectorPctVarsToBorder ( GCG * gcg,
GCG_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

Parameters
gcgGCG data structure
decompdecomposition data structure
pctVarsToBorderpercentage of variables assigned to border

Definition at line 1754 of file decomp.c.

References assert(), GCGdecompSetDetectorPctVarsToBorder(), GCGgetOrigprob(), GCG_Decomp::pctvarstoborder, and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorPctVarsToBorder().

◆ GCGdecompGetDetectorPctVarsToBorder()

GCG_EXPORT SCIP_Real * GCGdecompGetDetectorPctVarsToBorder ( GCG_DECOMP * decomp)

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

Parameters
decompdecomposition data structure

Definition at line 1780 of file decomp.c.

References GCGdecompGetDetectorPctVarsToBorder(), and GCG_Decomp::pctvarstoborder.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorPctVarsToBorder().

◆ GCGdecompSetDetectorPctConssToBorder()

void GCGdecompSetDetectorPctConssToBorder ( GCG * gcg,
GCG_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

Parameters
gcgGCG data structure
decompdecomposition data structure
pctConssToBorderpercentage of constraints assigned to border

Definition at line 1788 of file decomp.c.

References assert(), GCGdecompSetDetectorPctConssToBorder(), GCGgetOrigprob(), GCG_Decomp::pctconsstoborder, and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorPctConssToBorder().

◆ GCGdecompGetDetectorPctConssToBorder()

SCIP_Real * GCGdecompGetDetectorPctConssToBorder ( GCG_DECOMP * decomp)

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

Parameters
decompdecomposition data structure

Definition at line 1816 of file decomp.c.

References GCGdecompGetDetectorPctConssToBorder(), and GCG_Decomp::pctconsstoborder.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorPctConssToBorder().

◆ GCGdecompSetDetectorPctVarsToBlock()

void GCGdecompSetDetectorPctVarsToBlock ( GCG * gcg,
GCG_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

Parameters
gcgGCG data structure
decompdecomposition data structure
pctVarsToBlockpercentage of variables assigned to some block in the detector chain

Definition at line 1824 of file decomp.c.

References assert(), GCGdecompSetDetectorPctVarsToBlock(), GCGgetOrigprob(), GCG_Decomp::pctvarstoblock, and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorPctVarsToBlock().

◆ GCGdecompGetDetectorPctVarsToBlock()

SCIP_Real * GCGdecompGetDetectorPctVarsToBlock ( GCG_DECOMP * decomp)

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

Parameters
decompdecomposition data structure

Definition at line 1850 of file decomp.c.

References GCGdecompGetDetectorPctVarsToBlock(), and GCG_Decomp::pctvarstoblock.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorPctVarsToBlock().

◆ GCGdecompSetDetectorPctConssToBlock()

void GCGdecompSetDetectorPctConssToBlock ( GCG * gcg,
GCG_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

Parameters
gcgGCG data structure
decompdecomposition data structure
pctConssToBlockpercentage of constraints assigned to some block in the detector chain

Definition at line 1858 of file decomp.c.

References assert(), GCGdecompSetDetectorPctConssToBlock(), GCGgetOrigprob(), GCG_Decomp::pctconsstoblock, and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorPctConssToBlock().

◆ GCGdecompGetDetectorPctConssToBlock()

GCG_EXPORT SCIP_Real * GCGdecompGetDetectorPctConssToBlock ( GCG_DECOMP * decomp)

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

Parameters
decompdecomposition data structure

Definition at line 1886 of file decomp.c.

References GCGdecompGetDetectorPctConssToBlock(), and GCG_Decomp::pctconsstoblock.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorPctConssToBlock().

◆ GCGdecompSetDetectorPctVarsFromOpen()

void GCGdecompSetDetectorPctVarsFromOpen ( GCG * gcg,
GCG_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

Parameters
gcgGCG data structure
decompdecomposition data structure
pctVarsFromOpenpercentage of open variables assigned to some block in the detector chain

Definition at line 1895 of file decomp.c.

References assert(), GCGdecompSetDetectorPctVarsFromOpen(), GCGgetOrigprob(), GCG_Decomp::pctvarsfromopen, and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorPctVarsFromOpen().

◆ GCGdecompGetDetectorPctVarsFromOpen()

SCIP_Real * GCGdecompGetDetectorPctVarsFromOpen ( GCG_DECOMP * decomp)

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

Parameters
decompdecomposition data structure

Definition at line 1924 of file decomp.c.

References GCGdecompGetDetectorPctVarsFromOpen(), and GCG_Decomp::pctvarsfromopen.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorPctVarsFromOpen().

◆ GCGdecompSetDetectorPctConssFromOpen()

void GCGdecompSetDetectorPctConssFromOpen ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_Real * pctConssToBorder )

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

Parameters
gcgGCG data structure
decompdecomposition data structure
pctConssFromOpenpercentage of open variables assigned to some block in the detector chain

Definition at line 1932 of file decomp.c.

References assert(), GCGdecompSetDetectorPctConssFromOpen(), GCGgetOrigprob(), GCG_Decomp::pctconssfromopen, and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetDetectorPctConssFromOpen().

◆ GCGdecompGetDetectorPctConssFromOpen()

SCIP_Real * GCGdecompGetDetectorPctConssFromOpen ( GCG_DECOMP * decomp)

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

Parameters
decompdecomposition data structure

Definition at line 1962 of file decomp.c.

References GCGdecompGetDetectorPctConssFromOpen(), and GCG_Decomp::pctconssfromopen.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetDetectorPctConssFromOpen().

◆ GCGdecompSetNNewBlocks()

void GCGdecompSetNNewBlocks ( GCG * gcg,
GCG_DECOMP * decomp,
int * nNewBlocks )

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

Parameters
gcgGCG data structure
decompdecomposition data structure
nNewBlocksnumber of newly found blocks in this decomposition

Definition at line 1970 of file decomp.c.

References assert(), GCGdecompSetNNewBlocks(), GCGgetOrigprob(), GCG_Decomp::nnewblocks, and GCG_Decomp::sizedetectorchain.

Referenced by createDecompFromPartialdec(), and GCGdecompSetNNewBlocks().

◆ GCGdecompGetNNewBlocks()

int * GCGdecompGetNNewBlocks ( GCG_DECOMP * decomp)

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

Parameters
decompdecomposition data structure

Definition at line 1997 of file decomp.c.

References GCGdecompGetNNewBlocks(), and GCG_Decomp::nnewblocks.

Referenced by createPartialdecFromDecomp(), and GCGdecompGetNNewBlocks().

◆ GCGdecompTransform()

◆ GCGdecompRemoveDeletedConss()

SCIP_RETCODE GCGdecompRemoveDeletedConss ( GCG * gcg,
GCG_DECOMP * decomp )

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

Parameters
gcgGCG data structure
decdecompdecomposition data structure

Definition at line 2148 of file decomp.c.

References assert(), c, GCGdecompRemoveDeletedConss(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::nblocks, GCG_Decomp::nlinkingconss, GCG_Decomp::nsubscipconss, SCIP_CALL(), and GCG_Decomp::subscipconss.

Referenced by GCGdecompRemoveDeletedConss().

◆ GCGdecompAddRemainingConss()

SCIP_RETCODE GCGdecompAddRemainingConss ( GCG * gcg,
GCG_DECOMP * decomp )

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

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

Parameters
gcgGCG data structure
decdecompdecomposition data structure

Definition at line 2206 of file decomp.c.

References assert(), assignConsvarsToBlock(), c, GCG_Decomp::constoblock, GCG_DECTYPE_ARROWHEAD, GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCG_DECTYPE_STAIRCASE, GCGdecompAddRemainingConss(), GCGdecompGetConstoblock(), GCGdecompGetNBlocks(), GCGdetermineConsBlock(), GCGgetOrigprob(), GCGisConsGCGCons(), GCG_Decomp::linkingconss, GCG_Decomp::nlinkingconss, GCG_Decomp::nsubscipconss, SCIP_CALL(), SCIPdebugMessage(), GCG_Decomp::subscipconss, and GCG_Decomp::type.

Referenced by convertStructToGCG(), createDecompFromPartialdec(), and GCGdecompAddRemainingConss().

◆ GCGdecompCheckConsistency()

◆ GCGcreateBasicDecomp()

SCIP_RETCODE GCGcreateBasicDecomp ( GCG * gcg,
GCG_DECOMP ** decomp,
SCIP_Bool solveorigprob )

creates a decomposition with all constraints in the master

Parameters
gcgGCG data structure
decompdecomposition data structure
solveorigprobis the original problem being solved?

Definition at line 2418 of file decomp.c.

References assert(), c, GCGcreateBasicDecomp(), GCGdecompCreate(), GCGdecompSetPresolved(), GCGfilloutDecompFromHashmaps(), GCGgetOrigprob(), GCGisConsGCGCons(), nvars, SCIP_CALL(), and vars.

Referenced by GCGcreateBasicDecomp(), and initRelaxator().

◆ processBlockRepresentatives()

int processBlockRepresentatives ( int maxblock,
int * blockrepresentative )
static

processes block representatives

Returns
returns the number of blocks
Parameters
maxblockmaximal number of blocks
blockrepresentativearray blockrepresentatives

Definition at line 2485 of file decomp.c.

References assert(), i, and processBlockRepresentatives().

Referenced by GCGcreateDecompFromMasterconss(), and processBlockRepresentatives().

◆ assignConstraintsToRepresentatives()

SCIP_RETCODE assignConstraintsToRepresentatives ( GCG * gcg,
SCIP_CONS ** conss,
int nconss,
SCIP_Bool * consismaster,
SCIP_HASHMAP * constoblock,
int * vartoblock,
int * nextblock,
int * blockrepresentative )
static
Parameters
gcgGCG data structure
conssarray of all constraints
nconssnumber of constraints
consismasterarray of flags whether a constraint belongs to the master problem
constoblockhashmap from constraints to block numbers, to be filled
vartoblockarray mapping variables to block numbers, initially all -1, to be set
nextblockindex of next free block to which no constraints have been assigned yet
blockrepresentativearray of blockrepresentatives

Definition at line 2520 of file decomp.c.

References assert(), assignConstraintsToRepresentatives(), GCGconsGetNVars(), GCGconsGetVars(), GCGgetOrigprob(), GCGisConsGCGCons(), i, j, SCIP_CALL(), and SCIPdebugMessage().

Referenced by assignConstraintsToRepresentatives(), and GCGcreateDecompFromMasterconss().

◆ fillConstoblock()

SCIP_RETCODE fillConstoblock ( SCIP_CONS ** conss,
int nconss,
SCIP_Bool * consismaster,
int nblocks,
SCIP_HASHMAP * constoblock,
SCIP_HASHMAP * newconstoblock,
int * blockrepresentative )
static
Parameters
conssarray of all constraints
nconssnumber of constraints
consismasterarray of flags whether a constraint belongs to the master problem
nblocksnumber of blocks
constoblockcurrent hashmap from constraints to block numbers
newconstoblocknew hashmap from constraints to block numbers, to be filled
blockrepresentativearray of blockrepresentatives

Definition at line 2703 of file decomp.c.

References assert(), fillConstoblock(), GCGisConsGCGCons(), i, SCIP_CALL(), and SCIPdebugMessage().

Referenced by fillConstoblock(), and GCGcreateDecompFromMasterconss().

◆ GCGcreateDecompFromMasterconss()

SCIP_RETCODE GCGcreateDecompFromMasterconss ( GCG * gcg,
GCG_DECOMP ** decomp,
SCIP_CONS ** conss,
int nconss )

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.

Parameters
gcgGCG data structure
decompdecomposition data structure
masterconssconstraints to be put in the master
nmasterconssnumber of constraints in the master

Definition at line 2748 of file decomp.c.

References assert(), assignConstraintsToRepresentatives(), fillConstoblock(), GCGcreateDecompFromMasterconss(), GCGdecompCreate(), GCGfilloutDecompFromConstoblock(), GCGgetOrigprob(), GCGisConsGCGCons(), i, nvars, processBlockRepresentatives(), SCIP_CALL(), and SCIPfreeBufferArray().

Referenced by GCGcreateDecompFromMasterconss().

◆ incVarsData()

void incVarsData ( SCIP_VAR * var,
int * nbinvars,
int * nintvars,
int * nimplvars,
int * ncontvars,
int nproblems,
int i )
static

increase the corresponding count of the variable stats

Parameters
varvariable to consider
nbinvarspointer to array of size nproblems to store number of binary subproblem vars
nintvarspointer to array of size nproblems to store number of integer subproblem vars
nimplvarspointer to array of size nproblems to store number of implied subproblem vars
ncontvarspointer to array of size nproblems to store number of continues subproblem vars
nproblemssize of the arrays
iindex of the array to increase

Definition at line 2834 of file decomp.c.

References assert(), i, incVarsData(), nbinvars, nintvars, and var.

Referenced by GCGgetLinkingVarsData(), GCGgetSubproblemVarsData(), and incVarsData().

◆ GCGgetSubproblemVarsData()

void GCGgetSubproblemVarsData ( GCG * gcg,
GCG_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

Parameters
gcgGCG data structure
decompdecomposition data structure
nvarspointer to array of size nproblems to store number of subproblem vars or NULL
nbinvarspointer to array of size nproblems to store number of binary subproblem vars or NULL
nintvarspointer to array of size nproblems to store number of integer subproblem vars or NULL
nimplvarspointer to array of size nproblems to store number of implied subproblem vars or NULL
ncontvarspointer to array of size nproblems to store number of continuous subproblem vars or NULL
nproblemssize of the arrays

Definition at line 2873 of file decomp.c.

References assert(), GCG_DECTYPE_UNKNOWN, GCGdecompGetNSubscipvars(), GCGdecompGetSubscipvars(), GCGdecompGetType(), GCGgetSubproblemVarsData(), i, incVarsData(), j, nbinvars, nintvars, and nvars.

Referenced by GCGgetSubproblemVarsData(), and GCGprintDecompStatistics().

◆ GCGgetLinkingVarsData()

void GCGgetLinkingVarsData ( GCG * gcg,
GCG_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

Parameters
gcgGCG data structure
decompdecomposition data structure
nvarspointer to store number of linking vars or NULL
nbinvarspointer to store number of binary linking vars or NULL
nintvarspointer to store number of integer linking vars or NULL
nimplvarspointer to store number of implied linking vars or NULL
ncontvarspointer to store number of continuous linking vars or NULL

Definition at line 2922 of file decomp.c.

References assert(), GCG_DECTYPE_UNKNOWN, GCGdecompGetLinkingvars(), GCGdecompGetNLinkingvars(), GCGdecompGetType(), GCGgetLinkingVarsData(), i, incVarsData(), nbinvars, nintvars, and nvars.

Referenced by GCGgetLinkingVarsData(), and GCGprintDecompStatistics().

◆ GCGgetDensityData()

SCIP_RETCODE GCGgetDensityData ( GCG * gcg,
GCG_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
Parameters
gcgGCG data structure
decompdecomposition data structure
varspointer to array store variables belonging to density
nvarsnumber of variables
consspointer to array to store constraints belonging to the density
nconssnumber of constraints
varsubproblemdensitypointer to array to store the nonzeros for the subproblems
varmasterdensitypointer to array to store the nonzeros for the master
conssubproblemdensitypointer to array to store the nonzeros for the subproblems
consmasterdensitypointer to array to store the nonzeros for the master

Definition at line 2972 of file decomp.c.

References assert(), c, GCGdecompGetLinkingconss(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNSubscipconss(), GCGdecompGetSubscipconss(), GCGdecompGetVartoblock(), GCGgetDensityData(), GCGgetOrigprob(), i, j, nvars, SCIP_CALL(), SCIPdebugMessage(), SCIPfreeBufferArray(), success, var, and vars.

Referenced by GCGgetDensityData(), and GCGprintDecompStatistics().

◆ increaseLock()

void increaseLock ( GCG * gcg,
SCIP_Real lhs,
SCIP_Real coef,
SCIP_Real rhs,
int * downlock,
int * uplock )
static

helper function to increase correct lock

Parameters
gcgGCG data structure
lhsleft side of constraint
coefcoefficient of variable in constraint
rhsright side of constraint
downlockpointer to store downlock
uplockpointer to store uplock

Definition at line 3118 of file decomp.c.

References assert(), GCGgetOrigprob(), and increaseLock().

Referenced by GCGgetVarLockData(), and increaseLock().

◆ GCGgetVarLockData()

SCIP_RETCODE GCGgetVarLockData ( GCG * gcg,
GCG_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
Parameters
gcgGCG data structure
decompdecomposition data structure
varspointer to array store variables belonging to density
nvarsnumber of variables
nsubproblemsnumber of sub problems
subsciplocksdownpointer to two dimensional array to store the down locks for the subproblems
subsciplocksuppointer to two dimensional array to store the down locks for the subproblems
masterlocksdownpointer to array to store the down locks for the master
masterlocksuppointer to array to store the down locks for the master

Definition at line 3158 of file decomp.c.

References assert(), GCGconsGetLhs(), GCGconsGetRhs(), GCGconsGetVals(), GCGdecompGetLinkingconss(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingvars(), GCGdecompGetNSubscipconss(), GCGdecompGetSubscipconss(), GCGdecompGetVartoblock(), GCGgetOrigprob(), GCGgetVarLockData(), i, increaseLock(), j, nvars, SCIP_CALL(), SCIPfreeBufferArray(), success, var, and vars.

Referenced by GCGgetVarLockData().

◆ GCGdecompSetMaxWhiteScore()

void GCGdecompSetMaxWhiteScore ( GCG * gcg,
GCG_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

Parameters
gcgGCG data structure
decdecompdecomposition data structure
maxwhitescorescore related to max white measure (i.e. fraction of white (nonblock and nonborder) matrix area )

Definition at line 3296 of file decomp.c.

References assert(), GCGdecompSetMaxWhiteScore(), and GCG_Decomp::maxwhitescore.

Referenced by createDecompFromPartialdec(), and GCGdecompSetMaxWhiteScore().

◆ GCGdecompGetMaxWhiteScore()

SCIP_Real GCGdecompGetMaxWhiteScore ( GCG * gcg,
GCG_DECOMP * decomp )

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

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

Parameters
gcgGCG data structure
decdecompdecomposition data structure

Definition at line 3313 of file decomp.c.

References assert(), GCGdecompEvaluateDecomposition(), GCGdecompGetMaxWhiteScore(), and GCG_Decomp::maxwhitescore.

Referenced by GCGdecompGetMaxWhiteScore().

◆ GCGdecompEvaluateDecomposition()

◆ computeVarDensities()

SCIP_RETCODE computeVarDensities ( GCG * gcg,
GCG_DECOMP * decomp,
int * varprobdensity,
int * varmasterdensity,
SCIP_VAR ** vars,
int nvars,
DEC_STATISTIC * blockvardensities,
DEC_STATISTIC * mastervardensity,
int nblocks )
static

compute the density of variables in blocks and master

Parameters
gcgGCG data structure
decompdecomposition data structure
varprobdensitydensity information
varmasterdensitydensity information
varsarray of variables
nvarsnumber of variables
blockvardensitiesarray of statistic structs to store density information of each block
mastervardensitypointer to store density information of master variables
nblocksnumber of blocks

Definition at line 3557 of file decomp.c.

References assert(), computeVarDensities(), GCGdecompGetNLinkingconss(), GCGdecompGetNSubscipconss(), GCGdecompGetNSubscipvars(), GCGdecompGetSubscipvars(), GCGdecompGetVartoblock(), GCGgetOrigprob(), DEC_STATISTIC::max, DEC_STATISTIC::mean, DEC_STATISTIC::median, DEC_STATISTIC::min, nvars, quick_select_median(), SCIP_CALL(), SCIPdebugMessage(), and vars.

Referenced by computeVarDensities(), and GCGprintDecompStatistics().

◆ GCGdecompGetNConss()

int GCGdecompGetNConss ( GCG_DECOMP * decomp)

returns the number of constraints saved in the decomposition

Parameters
decompdecomposition data structure

Definition at line 3697 of file decomp.c.

References assert(), GCGdecompGetNBlocks(), GCGdecompGetNConss(), GCGdecompGetNLinkingconss(), and GCGdecompGetNSubscipconss().

Referenced by GCGdecompGetNConss(), and GCGprintDecompStatistics().

◆ computeConssNzeros()

SCIP_RETCODE computeConssNzeros ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_CONS * cons,
int * nzeros,
int * nintzeros,
int * nbzeros,
int * nintbzeros )
static

computes nonzero elements of a given constraint, separated into linking variables and normal vars

Parameters
gcgGCG data structure
decompdecomposition data structure
consSCIP data structure
nzerospointer to store nonzero elements
nintzerospointer to store integer nonzeros
nbzerospointer to store border nonzero elements
nintbzerospointer to store border integer nonzeros

Definition at line 3714 of file decomp.c.

References assert(), computeConssNzeros(), GCGconsGetNVars(), GCGconsGetVals(), GCGconsGetVars(), GCGdecompGetNBlocks(), GCGdecompGetVartoblock(), GCGgetOrigprob(), and SCIP_CALL().

Referenced by computeConssNzeros(), and computeNonzeros().

◆ computeNonzeros()

SCIP_RETCODE computeNonzeros ( GCG * gcg,
GCG_DECOMP * decomp,
int * mnzeros,
int * mintnzeros,
int * lnzeros,
int * lintnzeros,
int * nonzeros,
int * intnzeros )
static

computes nonzero elements of the pricing problems and the master

Parameters
gcgGCG data structure
decompdecomposition data structure
mnzerosnumber of nonzero elements in row border
mintnzerosnumber of integral nonzero elements in row border
lnzerosnumber of nonzero elements in column border
lintnzerosnumber of integral nonzero elements in column border
nonzerosnumber of nonzero elements per pricing problem
intnzerosnumber of integral nonzero elements per pricing problem

Definition at line 3785 of file decomp.c.

References assert(), c, computeConssNzeros(), computeNonzeros(), GCGdecompGetLinkingconss(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNSubscipconss(), GCGdecompGetSubscipconss(), and SCIP_CALL().

Referenced by computeNonzeros(), and GCGprintDecompStatistics().

◆ GCGprintDecompStatistics()

◆ GCGdecompositionsAreEqual()

SCIP_Bool GCGdecompositionsAreEqual ( GCG * gcg,
GCG_DECOMP * decomp1,
GCG_DECOMP * decomp2 )

returns whether both structures lead to the same decomposition

Parameters
gcgGCG data structure
decomp1first decomp data structure
decomp2second decomp data structure

Definition at line 3990 of file decomp.c.

References assert(), GCGdecompGetConstoblock(), GCGdecompGetNBlocks(), GCGdecompGetVartoblock(), GCGdecompositionsAreEqual(), GCGgetOrigprob(), i, nvars, and vars.

Referenced by GCGdecompositionsAreEqual(), and GCGfilterSimilarDecompositions().

◆ GCGfilterSimilarDecompositions()

int GCGfilterSimilarDecompositions ( GCG * gcg,
GCG_DECOMP ** decs,
int ndecs )

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

Returns
the number of unique decompositions
Parameters
gcgGCG data structure
decsarray of decompositions
ndecsnumber of decompositions

Definition at line 4057 of file decomp.c.

References assert(), GCGdecompositionsAreEqual(), GCGfilterSimilarDecompositions(), i, and j.

Referenced by GCGfilterSimilarDecompositions().

◆ GCGdetermineConsBlock()

SCIP_RETCODE GCGdetermineConsBlock ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_CONS * cons,
int * block )

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

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

Parameters
gcgGCG data structure
decompdecomposition data structure
consconstraint to check
blockblock of the constraint (or nblocks for master)

Definition at line 4100 of file decomp.c.

References assert(), GCGdecompGetNBlocks(), GCGdecompGetVartoblock(), GCGdetermineConsBlock(), GCGgetOrigprob(), i, nmastervars, SCIP_CALL(), success, and var.

Referenced by GCGdecompAddRemainingConss(), GCGdecompTryAssignMasterconssToExistingPricing(), GCGdecompTryAssignMasterconssToNewPricing(), and GCGdetermineConsBlock().

◆ GCGdecompMoveLinkingConsToPricing()

SCIP_RETCODE GCGdecompMoveLinkingConsToPricing ( GCG * gcg,
GCG_DECOMP * decomp,
int consindex,
int block )

move a master constraint to pricing problem

Parameters
gcgGCG data structure
decompdecomposition data structure
consindexindex of constraint to move
blockblock of the pricing problem where to move

Definition at line 4192 of file decomp.c.

References assert(), assignConsvarsToBlock(), GCG_Decomp::constoblock, GCGdecompMoveLinkingConsToPricing(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::nlinkingconss, GCG_Decomp::nsubscipconss, SCIP_CALL(), and GCG_Decomp::subscipconss.

Referenced by GCGdecompMoveLinkingConsToPricing(), and GCGdecompTryAssignMasterconssToExistingPricing().

◆ GCGdecompTryAssignMasterconssToExistingPricing()

SCIP_RETCODE GCGdecompTryAssignMasterconssToExistingPricing ( GCG * gcg,
GCG_DECOMP * decomp,
int * transferred )

tries to assign masterconss to pricing problem

Parameters
gcgGCG data structure
decompdecomposition data structure
transferrednumber of master constraints reassigned

Definition at line 4229 of file decomp.c.

References assert(), c, GCGdecompGetNBlocks(), GCGdecompMoveLinkingConsToPricing(), GCGdecompTryAssignMasterconssToExistingPricing(), GCGdetermineConsBlock(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::nlinkingconss, and SCIP_CALL().

Referenced by GCGcreatePolishedDecomp(), and GCGdecompTryAssignMasterconssToExistingPricing().

◆ GCGdecompTryAssignMasterconssToNewPricing()

SCIP_RETCODE GCGdecompTryAssignMasterconssToNewPricing ( GCG * gcg,
GCG_DECOMP * decomp,
GCG_DECOMP ** newdecomp,
int * transferred )

tries to assign masterconss to new pricing problem

Parameters
gcgGCG data structure
decompdecomposition data structure
newdecompnew decomposition, if successful
transferrednumber of master constraints reassigned

Definition at line 4279 of file decomp.c.

References assert(), c, GCG_Decomp::constoblock, GCGdecompCreate(), GCGdecompTryAssignMasterconssToNewPricing(), GCGdetermineConsBlock(), GCGfilloutDecompFromConstoblock(), GCGgetOrigprob(), i, GCG_Decomp::linkingconss, GCG_Decomp::nblocks, GCG_Decomp::nlinkingconss, SCIP_CALL(), and SCIPdebugMessage().

Referenced by GCGcreatePolishedDecomp(), and GCGdecompTryAssignMasterconssToNewPricing().

◆ GCGcreatePolishedDecomp()

SCIP_RETCODE GCGcreatePolishedDecomp ( GCG * gcg,
GCG_DECOMP * decomp,
GCG_DECOMP ** newdecomp )

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

Parameters
gcgGCG data structure
decompdecomposition data structure
newdecompnew decomposition, if successful

Definition at line 4337 of file decomp.c.

References assert(), GCGcreatePolishedDecomp(), GCGdecompFree(), GCGdecompGetNBlocks(), GCGdecompTryAssignMasterconssToExistingPricing(), GCGdecompTryAssignMasterconssToNewPricing(), SCIP_CALL(), and SCIPdebugMessage().

Referenced by GCGcreatePolishedDecomp().

◆ GCGpermuteDecomp()

SCIP_RETCODE GCGpermuteDecomp ( GCG * gcg,
GCG_DECOMP * decomp,
SCIP_RANDNUMGEN * randnumgen )

permutes the decomposition according to the permutation seed

Parameters
gcgGCG data structure
decompdecomposition data structure
randnumgenrandom number generator

Definition at line 4384 of file decomp.c.

References assert(), GCGdecompCheckConsistency(), GCGdecompGetLinkingconss(), GCGdecompGetLinkingvars(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNLinkingvars(), GCGdecompGetNSubscipconss(), GCGdecompGetNSubscipvars(), GCGdecompGetSubscipconss(), GCGdecompGetSubscipvars(), GCGpermuteDecomp(), and SCIP_CALL().

Referenced by GCGpermuteDecomp(), and initRelaxator().