Detailed Description
generic methods for working with different decomposition structures
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) { register SCIP_Real t=(a);(a)=(b);(b)=t; } |
Macro Definition Documentation
◆ ELEM_SWAP
Function Documentation
◆ quick_select_median()
Definition at line 63 of file decomp.c.
References ELEM_SWAP, and SCIP_Real.
Referenced by computeVarDensities().
◆ fillOutVarsFromVartoblock()
|
static |
fill out subscipvars arrays from the information from vartoblock
- Parameters
-
gcg GCG data structure decomp decomposition data structure vartoblock variable to block hashmap nblocks number of blocks vars variable array nvars number of variables haslinking returns whether there are linking variables
Definition at line 124 of file decomp.c.
References FALSE, GCGdecompSetLinkingvars(), GCGdecompSetSubscipvars(), GCGdecompSetVartoblock(), GCGgetOrigprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPvarGetName(), SCIPvarIsActive(), and TRUE.
Referenced by GCGfilloutDecompFromHashmaps().
◆ fillOutConsFromConstoblock()
|
static |
fill out subscipcons arrays from the information from constoblock
- Parameters
-
gcg GCG data structure decomp decomposition data structure constoblock constraint to block hashmap nblocks number of blocks conss constraint array nconss number of constraints haslinking returns whether there are linking constraints
Definition at line 245 of file decomp.c.
References GCG_Decomp::constoblock, FALSE, GCGdecompSetConstoblock(), GCGdecompSetLinkingconss(), GCGdecompSetSubscipconss(), GCGgetOrigprob(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetConsNVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), and TRUE.
Referenced by GCGfilloutDecompFromHashmaps().
◆ removeFromLinkingvars()
|
static |
removes a variable from the linking variable array
- Parameters
-
gcg GCG data structure decomp decomposition data structure var variable to remove success indicates whether the variable was successfully removed
Definition at line 360 of file decomp.c.
References FALSE, GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCGdecompGetNLinkingconss(), GCGdecompSetType(), GCGgetOrigprob(), GCG_Decomp::linkingvars, GCG_Decomp::nlinkingvars, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPfreeBlockMemoryArrayNull, SCIPreallocBlockMemoryArray, and TRUE.
Referenced by assignConsvarsToBlock().
◆ assignConsvarsToBlock()
|
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
-
gcg GCG data structure decomp decomposition data structure cons constraint whose variables should be assigned to its block block block to which the constraint has been assigned
Definition at line 417 of file decomp.c.
References GCGgetOrigprob(), GCG_Decomp::nblocks, GCG_Decomp::nsubscipvars, NULL, removeFromLinkingvars(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPcalcMemGrowSize(), SCIPfreeBufferArrayNull, SCIPgetConsNVars(), SCIPgetConsVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapSetImage(), SCIPreallocBlockMemoryArray, SCIPvarGetProbvar(), SCIPvarGetStatus(), GCG_Decomp::subscipvars, and GCG_Decomp::vartoblock.
Referenced by GCGdecompAddRemainingConss(), and GCGdecompMoveLinkingConsToPricing().
◆ GCGdecompGetStrType()
| const char * GCGdecompGetStrType | ( | GCG_DECTYPE | type | ) |
converts the GCG_DECTYPE enum to a string
- Parameters
-
type decomposition type
Definition at line 471 of file decomp.c.
Referenced by GCGdecompEvaluateDecomposition(), GCGprintDecompStatistics(), and GCGwriteDecompositionData().
◆ GCGdecompCreate()
| SCIP_RETCODE GCGdecompCreate | ( | GCG * | gcg, |
| GCG_DECOMP ** | decdecomp | ||
| ) |
initializes the decomposition to absolutely nothing
- Parameters
-
gcg GCG data structure decdecomp pointer to the decomposition data structure
Definition at line 480 of file decomp.c.
References GCG_Decomp::consindex, GCG_Decomp::constoblock, GCG_Decomp::detector, GCG_Decomp::detectorchain, GCG_Decomp::detectorchainstring, GCG_Decomp::detectorclocktimes, GCG_DECTYPE_UNKNOWN, GCGconshdlrDecompIncreaseNCallsCreateDecomp(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::linkingvars, GCG_Decomp::maxwhitescore, GCG_Decomp::nblocks, GCG_Decomp::nfixedlinkingvars, GCG_Decomp::nlinkingconss, GCG_Decomp::nlinkingvars, GCG_Decomp::nmastervars, GCG_Decomp::nnewblocks, GCG_Decomp::nstairlinkingvars, GCG_Decomp::nsubscipconss, GCG_Decomp::nsubscipvars, NULL, 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, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIP_VERBLEVEL_FULL, SCIPallocMemory, SCIPgetStage(), SCIPverbMessage(), 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(), GCGdecompTryAssignMasterconssToNewPricing(), readBLKFile(), and readRef().
◆ GCGdecompFree()
| SCIP_RETCODE GCGdecompFree | ( | GCG * | gcg, |
| GCG_DECOMP ** | decdecomp | ||
| ) |
frees the decdecomp structure
- Parameters
-
gcg pointer to the GCG instance decdecomp pointer to the decomposition data structure
Definition at line 541 of file decomp.c.
References GCG_Decomp::consindex, GCG_Decomp::constoblock, GCG_Decomp::detectorchain, GCG_Decomp::detectorchainstring, GCG_Decomp::detectorclocktimes, GCGconshdlrDecompDecreaseNCallsCreateDecomp(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::linkingvars, GCG_Decomp::nblocks, GCG_Decomp::nlinkingconss, GCG_Decomp::nlinkingvars, GCG_Decomp::nnewblocks, GCG_Decomp::nstairlinkingvars, GCG_Decomp::nsubscipconss, GCG_Decomp::nsubscipvars, NULL, GCG_Decomp::pctconssfromopen, GCG_Decomp::pctconsstoblock, GCG_Decomp::pctconsstoborder, GCG_Decomp::pctvarsfromopen, GCG_Decomp::pctvarstoblock, GCG_Decomp::pctvarstoborder, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_VERBLEVEL_FULL, SCIPcalcMemGrowSize(), SCIPfreeBlockMemoryArrayNull, SCIPfreeMemoryNull, SCIPhashmapFree(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPverbMessage(), GCG_Decomp::sizedetectorchain, GCG_Decomp::stairlinkingvars, GCG_Decomp::subscipconss, GCG_Decomp::subscipvars, GCG_Decomp::varindex, and GCG_Decomp::vartoblock.
Referenced by GCGconshdlrDecompGetDecomps(), GCGcreatePolishedDecomp(), GCGsetStructDecomp(), GCGsolve(), GCGwriteDecompositionData(), readBLKFile(), readRef(), SCIP_DECL_CONSEXIT(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_RELAXEXIT(), SCIP_DECL_RELAXEXITSOL(), SCIP_DECL_RELAXFREE(), and writeREFFile().
◆ GCGdecompSetType()
| SCIP_RETCODE GCGdecompSetType | ( | GCG_DECOMP * | decomp, |
| GCG_DECTYPE | type | ||
| ) |
sets the type of the decomposition
- Parameters
-
decomp decomposition data structure type type of the decomposition
Definition at line 659 of file decomp.c.
References FALSE, GCG_DECTYPE_ARROWHEAD, GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCG_DECTYPE_STAIRCASE, GCG_DECTYPE_UNKNOWN, GCG_Decomp::linkingconss, GCG_Decomp::linkingvars, GCG_Decomp::nlinkingconss, GCG_Decomp::nlinkingvars, NULL, SCIP_Bool, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, TRUE, and GCG_Decomp::type.
Referenced by createDecompFromPartialdec(), fillDecompStruct(), GCGfilloutDecompFromHashmaps(), and removeFromLinkingvars().
◆ GCGdecompGetType()
| GCG_DECTYPE GCGdecompGetType | ( | GCG_DECOMP * | decomp | ) |
gets the type of the decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 703 of file decomp.c.
References NULL, and GCG_Decomp::type.
Referenced by createPricingProblem(), GCGdecompCheckConsistency(), GCGdecompEvaluateDecomposition(), GCGgetLinkingVarsData(), GCGgetSubproblemVarsData(), GCGprintDecompStatistics(), GCGwriteDecompositionData(), SCIP_DECL_DIALOGEXEC(), and solveMasterProblem().
◆ GCGdecompGetMaxwhiteScore()
| SCIP_Real GCGdecompGetMaxwhiteScore | ( | GCG_DECOMP * | decomp | ) |
- Parameters
-
decomp decomposition data structure
Definition at line 713 of file decomp.c.
References GCG_Decomp::maxwhitescore, NULL, and SCIP_Real.
Referenced by initRelaxator().
◆ GCGdecompSetPresolved()
| void GCGdecompSetPresolved | ( | GCG_DECOMP * | decomp, |
| SCIP_Bool | presolved | ||
| ) |
sets the presolved flag for decomposition
- Parameters
-
decomp decomposition data structure presolved presolved flag for decomposition
Definition at line 724 of file decomp.c.
References NULL, and GCG_Decomp::presolved.
Referenced by createDecompFromPartialdec(), fillDecompStruct(), GCGcreateBasicDecomp(), and readREFFile().
◆ GCGdecompGetPresolved()
| SCIP_Bool GCGdecompGetPresolved | ( | GCG_DECOMP * | decomp | ) |
gets the presolved flag for decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 735 of file decomp.c.
References NULL, GCG_Decomp::presolved, and SCIP_Bool.
◆ GCGdecompSetNBlocks()
| void GCGdecompSetNBlocks | ( | GCG_DECOMP * | decomp, |
| int | nblocks | ||
| ) |
sets the number of blocks for decomposition
- Parameters
-
decomp decomposition data structure nblocks number of blocks for decomposition
Definition at line 745 of file decomp.c.
References GCG_Decomp::nblocks, and NULL.
Referenced by createDecompFromPartialdec(), fillDecompStruct(), GCGfilloutDecompFromHashmaps(), and readREFFile().
◆ GCGdecompGetNBlocks()
| int GCGdecompGetNBlocks | ( | GCG_DECOMP * | decomp | ) |
gets the number of blocks for decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 757 of file decomp.c.
References GCG_Decomp::nblocks, and NULL.
Referenced by computeConssNzeros(), computeNonzeros(), convertStructToGCG(), createPartialdecFromDecomp(), createPricingprobConss(), createPricingVariables(), GCGcreatePolishedDecomp(), GCGdecompAddRemainingConss(), GCGdecompCheckConsistency(), GCGdecompEvaluateDecomposition(), GCGdecompGetNConss(), GCGdecompGetNTotalStairlinkingvars(), GCGdecompositionsAreEqual(), GCGdecompTryAssignMasterconssToExistingPricing(), GCGdetermineConsBlock(), GCGgetDensityData(), GCGgetVarLockData(), GCGpermuteDecomp(), GCGprintDecompStatistics(), GCGwriteDecompositionData(), initRelaxator(), and writeREFFile().
◆ GCGdecompSetSubscipvars()
| SCIP_RETCODE GCGdecompSetSubscipvars | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp, | ||
| SCIP_VAR *** | subscipvars, | ||
| int * | nsubscipvars | ||
| ) |
copies the input subscipvars array to the given decomposition
- Parameters
-
gcg GCG data structure decomp decomposition data structure subscipvars subscipvars array nsubscipvars number of subscipvars per block
Definition at line 767 of file decomp.c.
References b, BMSclearMemoryArray, BMScopyMemoryArray, FALSE, GCGgetOrigprob(), GCG_Decomp::nblocks, GCG_Decomp::nsubscipvars, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPcaptureVar(), SCIPerrorMessage, GCG_Decomp::subscipvars, and TRUE.
Referenced by createDecompFromPartialdec(), and fillOutVarsFromVartoblock().
◆ GCGdecompGetSubscipvars()
| SCIP_VAR *** GCGdecompGetSubscipvars | ( | GCG_DECOMP * | decomp | ) |
returns the subscipvars array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 837 of file decomp.c.
References NULL, and GCG_Decomp::subscipvars.
Referenced by computeVarDensities(), convertStructToGCG(), GCGdecompCheckConsistency(), GCGgetSubproblemVarsData(), and GCGpermuteDecomp().
◆ GCGdecompGetNSubscipvars()
| int * GCGdecompGetNSubscipvars | ( | GCG_DECOMP * | decomp | ) |
returns the nsubscipvars array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 847 of file decomp.c.
References GCG_Decomp::nsubscipvars, and NULL.
Referenced by computeVarDensities(), convertStructToGCG(), GCGdecompCheckConsistency(), GCGdecompEvaluateDecomposition(), GCGfilloutDecompFromHashmaps(), GCGgetSubproblemVarsData(), GCGpermuteDecomp(), and GCGwriteDecompositionData().
◆ GCGdecompSetSubscipconss()
| SCIP_RETCODE GCGdecompSetSubscipconss | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp, | ||
| SCIP_CONS *** | subscipconss, | ||
| int * | nsubscipconss | ||
| ) |
copies the input subscipconss array to the given decomposition
- Parameters
-
gcg GCG data structure decomp decomposition data structure subscipconss subscipconss array nsubscipconss number of subscipconss per block
Definition at line 857 of file decomp.c.
References b, BMSclearMemoryArray, BMScopyMemoryArray, FALSE, GCGgetOrigprob(), GCG_Decomp::nblocks, GCG_Decomp::nsubscipconss, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPcaptureCons(), SCIPerrorMessage, GCG_Decomp::subscipconss, and TRUE.
Referenced by createDecompFromPartialdec(), and fillOutConsFromConstoblock().
◆ GCGdecompGetSubscipconss()
| SCIP_CONS *** GCGdecompGetSubscipconss | ( | GCG_DECOMP * | decomp | ) |
returns the subscipconss array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 924 of file decomp.c.
References NULL, and GCG_Decomp::subscipconss.
Referenced by computeNonzeros(), convertStructToGCG(), createPricingprobConss(), GCGdecompCheckConsistency(), GCGdecompEvaluateDecomposition(), GCGfilloutDecompFromHashmaps(), GCGgetDensityData(), GCGgetVarLockData(), GCGpermuteDecomp(), and writeREFFile().
◆ GCGdecompGetNSubscipconss()
| int * GCGdecompGetNSubscipconss | ( | GCG_DECOMP * | decomp | ) |
returns the nsubscipconss array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 933 of file decomp.c.
References GCG_Decomp::nsubscipconss, and NULL.
Referenced by computeNonzeros(), computeVarDensities(), convertStructToGCG(), createPricingprobConss(), GCGdecompCheckConsistency(), GCGdecompEvaluateDecomposition(), GCGdecompGetNConss(), GCGfilloutDecompFromHashmaps(), GCGgetDensityData(), GCGgetVarLockData(), GCGpermuteDecomp(), GCGprintDecompStatistics(), GCGwriteDecompositionData(), and writeREFFile().
◆ GCGdecompSetLinkingconss()
| SCIP_RETCODE GCGdecompSetLinkingconss | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp, | ||
| SCIP_CONS ** | linkingconss, | ||
| int | nlinkingconss | ||
| ) |
copies the input linkingconss array to the given decomposition
- Parameters
-
gcg GCG data structure decomp decomposition data structure linkingconss linkingconss array nlinkingconss number of linkingconss per block
Definition at line 942 of file decomp.c.
References BMScopyMemoryArray, GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::nlinkingconss, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPcaptureCons(), and SCIPerrorMessage.
Referenced by createDecompFromPartialdec(), and fillOutConsFromConstoblock().
◆ GCGdecompGetLinkingconss()
| SCIP_CONS ** GCGdecompGetLinkingconss | ( | GCG_DECOMP * | decomp | ) |
returns the linkingconss array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 985 of file decomp.c.
References GCG_Decomp::linkingconss, and NULL.
Referenced by checkSetppcStructure(), computeNonzeros(), convertStructToGCG(), createMasterprobConss(), createPartialdecFromDecomp(), GCGdecompCheckConsistency(), GCGgetDensityData(), GCGgetVarLockData(), and GCGpermuteDecomp().
◆ GCGdecompGetNLinkingconss()
| int GCGdecompGetNLinkingconss | ( | GCG_DECOMP * | decomp | ) |
returns the nlinkingconss array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 995 of file decomp.c.
References GCG_Decomp::nlinkingconss, and NULL.
Referenced by checkSetppcStructure(), computeNonzeros(), computeVarDensities(), convertStructToGCG(), createDecompFromPartialdec(), createMasterprobConss(), createPartialdecFromDecomp(), GCGdecompCheckConsistency(), GCGdecompEvaluateDecomposition(), GCGdecompGetNConss(), GCGgetDensityData(), GCGpermuteDecomp(), GCGprintDecompStatistics(), GCGwriteDecompositionData(), initRelaxator(), and removeFromLinkingvars().
◆ 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
- Parameters
-
gcg GCG data structure decomp decomposition data structure linkingvars linkingvars array nlinkingvars number of total linkingvars (including fixed linking vars, ) nfixedlinkingvars number of fixed linking variables nmastervars number of linking variables that are purely master variables
Definition at line 1007 of file decomp.c.
References BMScopyMemoryArray, GCGgetOrigprob(), GCG_Decomp::linkingvars, GCG_Decomp::nfixedlinkingvars, GCG_Decomp::nlinkingvars, GCG_Decomp::nmastervars, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPcaptureVar(), and SCIPerrorMessage.
Referenced by createDecompFromPartialdec(), and fillOutVarsFromVartoblock().
◆ GCGdecompGetLinkingvars()
| SCIP_VAR ** GCGdecompGetLinkingvars | ( | GCG_DECOMP * | decomp | ) |
returns the linkingvars array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1056 of file decomp.c.
References GCG_Decomp::linkingvars, and NULL.
Referenced by convertStructToGCG(), GCGdecompCheckConsistency(), GCGgetLinkingVarsData(), and GCGpermuteDecomp().
◆ GCGdecompGetNLinkingvars()
| int GCGdecompGetNLinkingvars | ( | GCG_DECOMP * | decomp | ) |
returns the nlinkingvars array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1066 of file decomp.c.
References GCG_Decomp::nlinkingvars, and NULL.
Referenced by convertStructToGCG(), createDecompFromPartialdec(), GCGdecompCheckConsistency(), GCGdecompEvaluateDecomposition(), GCGgetLinkingVarsData(), GCGgetVarLockData(), GCGpermuteDecomp(), GCGwriteDecompositionData(), and initRelaxator().
◆ GCGdecompGetNFixedLinkingvars()
| int GCGdecompGetNFixedLinkingvars | ( | GCG_DECOMP * | decomp | ) |
returns the nlinkingvars array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1077 of file decomp.c.
References GCG_Decomp::nfixedlinkingvars, and NULL.
◆ GCGdecompGetNMastervars()
| int GCGdecompGetNMastervars | ( | GCG_DECOMP * | decomp | ) |
returns the number of linking variables that are purely master ("static") variables of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1089 of file decomp.c.
References GCG_Decomp::nmastervars, and NULL.
Referenced by GCGdecompEvaluateDecomposition(), 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
-
gcg GCG data structure decomp decomposition data structure stairlinkingvars stairlinkingvars array nstairlinkingvars number of linkingvars per block
Definition at line 1101 of file decomp.c.
References b, BMSclearMemoryArray, BMScopyMemoryArray, GCGgetOrigprob(), GCG_Decomp::nblocks, GCG_Decomp::nstairlinkingvars, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPcaptureVar(), SCIPerrorMessage, GCG_Decomp::stairlinkingvars, and TRUE.
Referenced by createDecompFromPartialdec(), and GCGfilloutDecompFromHashmaps().
◆ GCGdecompGetStairlinkingvars()
| SCIP_VAR *** GCGdecompGetStairlinkingvars | ( | GCG_DECOMP * | decomp | ) |
returns the stairlinkingvars array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1173 of file decomp.c.
References NULL, and GCG_Decomp::stairlinkingvars.
Referenced by createPartialdecFromDecomp().
◆ GCGdecompGetNStairlinkingvars()
| int * GCGdecompGetNStairlinkingvars | ( | GCG_DECOMP * | decomp | ) |
returns the nstairlinkingvars array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1182 of file decomp.c.
References GCG_Decomp::nstairlinkingvars, and NULL.
Referenced by createPartialdecFromDecomp(), and GCGdecompGetNTotalStairlinkingvars().
◆ GCGdecompGetNTotalStairlinkingvars()
| int GCGdecompGetNTotalStairlinkingvars | ( | GCG_DECOMP * | decomp | ) |
returns the total number of stairlinkingvars array of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1192 of file decomp.c.
References b, GCGdecompGetNBlocks(), and GCGdecompGetNStairlinkingvars().
Referenced by GCGdecompCheckConsistency().
◆ GCGdecompSetVartoblock()
| void GCGdecompSetVartoblock | ( | GCG_DECOMP * | decomp, |
| SCIP_HASHMAP * | vartoblock | ||
| ) |
sets the vartoblock hashmap of the given decomposition
- Parameters
-
decomp decomposition data structure vartoblock Vartoblock hashmap
Definition at line 1209 of file decomp.c.
References NULL, and GCG_Decomp::vartoblock.
Referenced by createDecompFromPartialdec(), and fillOutVarsFromVartoblock().
◆ GCGdecompGetVartoblock()
| SCIP_HASHMAP * GCGdecompGetVartoblock | ( | GCG_DECOMP * | decomp | ) |
returns the vartoblock hashmap of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1221 of file decomp.c.
References NULL, and GCG_Decomp::vartoblock.
Referenced by computeConssNzeros(), computeVarDensities(), createPartialdecFromDecomp(), createPricingVariables(), GCGdecompCheckConsistency(), GCGdecompEvaluateDecomposition(), GCGdecompositionsAreEqual(), GCGdetermineConsBlock(), GCGgetDensityData(), and GCGgetVarLockData().
◆ GCGdecompSetConstoblock()
| void GCGdecompSetConstoblock | ( | GCG_DECOMP * | decomp, |
| SCIP_HASHMAP * | constoblock | ||
| ) |
sets the constoblock hashmap of the given decomposition
- Parameters
-
decomp decomposition data structure constoblock Constoblock hashmap
Definition at line 1231 of file decomp.c.
References GCG_Decomp::constoblock, and NULL.
Referenced by createDecompFromPartialdec(), and fillOutConsFromConstoblock().
◆ GCGdecompGetConstoblock()
| SCIP_HASHMAP * GCGdecompGetConstoblock | ( | GCG_DECOMP * | decomp | ) |
returns the constoblock hashmap of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1243 of file decomp.c.
References GCG_Decomp::constoblock, and NULL.
Referenced by createPartialdecFromDecomp(), GCGdecompAddRemainingConss(), GCGdecompCheckConsistency(), and GCGdecompositionsAreEqual().
◆ GCGdecompSetVarindex()
| void GCGdecompSetVarindex | ( | GCG_DECOMP * | decomp, |
| SCIP_HASHMAP * | varindex | ||
| ) |
sets the varindex hashmap of the given decomposition
- Parameters
-
decomp decomposition data structure varindex Varindex hashmap
Definition at line 1253 of file decomp.c.
References NULL, and GCG_Decomp::varindex.
Referenced by createDecompFromPartialdec(), and GCGfilloutDecompFromHashmaps().
◆ GCGdecompGetVarindex()
| SCIP_HASHMAP * GCGdecompGetVarindex | ( | GCG_DECOMP * | decomp | ) |
returns the varindex hashmap of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1264 of file decomp.c.
References NULL, and GCG_Decomp::varindex.
◆ GCGdecompSetConsindex()
| void GCGdecompSetConsindex | ( | GCG_DECOMP * | decomp, |
| SCIP_HASHMAP * | consindex | ||
| ) |
sets the consindex hashmap of the given decomposition
- Parameters
-
decomp decomposition data structure consindex Consindex hashmap
Definition at line 1273 of file decomp.c.
References GCG_Decomp::consindex, and NULL.
Referenced by createDecompFromPartialdec(), and GCGfilloutDecompFromHashmaps().
◆ GCGdecompGetConsindex()
| SCIP_HASHMAP * GCGdecompGetConsindex | ( | GCG_DECOMP * | decomp | ) |
returns the consindex hashmap of the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1284 of file decomp.c.
References GCG_Decomp::consindex, and NULL.
◆ 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
-
gcg GCG data structure decomp decomposition data structure vartoblock variable to block hashmap constoblock constraint to block hashmap nblocks number of blocks staircase should the decomposition be a staircase structure
Definition at line 1293 of file decomp.c.
References b, fillOutConsFromConstoblock(), fillOutVarsFromVartoblock(), GCG_DECTYPE_ARROWHEAD, GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCG_DECTYPE_STAIRCASE, GCGdecompCheckConsistency(), GCGdecompGetNSubscipconss(), GCGdecompGetNSubscipvars(), GCGdecompGetSubscipconss(), GCGdecompSetConsindex(), GCGdecompSetNBlocks(), GCGdecompSetStairlinkingvars(), GCGdecompSetType(), GCGdecompSetVarindex(), GCGgetOrigprob(), NULL, SCIP_Bool, SCIP_CALL, SCIP_CALL_QUIET, SCIP_OKAY, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPblkmem(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetConsNVars(), SCIPgetConss(), SCIPgetConsVars(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPvarGetName(), SCIPvarGetProbvar(), and SCIPvarGetStatus().
Referenced by GCGcreateBasicDecomp(), GCGfilloutDecompFromConstoblock(), 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)
- Parameters
-
gcg GCG data structure decomp decomposition data structure constoblock constraint to block hashmap, start with 1 for first block and nblocks+1 for linking constraints nblocks number of blocks staircase should the decomposition be a staircase structure
Definition at line 1479 of file decomp.c.
References FALSE, GCGfilloutDecompFromHashmaps(), GCGgetOrigprob(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPblkmem(), SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetConsNVars(), SCIPgetConss(), SCIPgetConsVars(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapSetImage(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarIsActive(), and TRUE.
Referenced by gcg::ColumnGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createDecompFromPartition(), gcg::HyperrowcolGraph< T >::createDecompFromPartition(), gcg::HyperrowGraph< T >::createDecompFromPartition(), gcg::RowGraph< T >::createDecompFromPartition(), fillDecompStruct(), GCGcreateDecompFromMasterconss(), and GCGdecompTryAssignMasterconssToNewPricing().
◆ GCGdecompSetDetector()
| void GCGdecompSetDetector | ( | GCG_DECOMP * | decomp, |
| GCG_DETECTOR * | detector | ||
| ) |
sets the detector for the given decomposition
- Parameters
-
decomp decomposition data structure detector detector data structure
Definition at line 1605 of file decomp.c.
References GCG_Decomp::detector, and NULL.
Referenced by createDecompFromPartialdec(), fillDecompStruct(), and readREFFile().
◆ GCGdecompGetDetector()
| GCG_DETECTOR * GCGdecompGetDetector | ( | GCG_DECOMP * | decomp | ) |
gets the detector for the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1616 of file decomp.c.
References GCG_Decomp::detector, and NULL.
Referenced by GCGwriteDecompositionData().
◆ GCGdecompGetDetectorChain()
| GCG_DETECTOR ** GCGdecompGetDetectorChain | ( | GCG_DECOMP * | decomp | ) |
gets the detectors for the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1626 of file decomp.c.
References GCG_Decomp::detectorchain, and NULL.
Referenced by createPartialdecFromDecomp().
◆ 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
-
gcg GCG data structure decomp decomposition data structure detectors new detector chain ndetectors number of new detectors (i.e. length of the detector array)
Definition at line 1635 of file decomp.c.
References BMSclearMemoryArray, GCG_Decomp::detectorchain, GCGgetOrigprob(), SCIP_CALL_ABORT, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ GCGdecompGetDetectorChainSize()
| int GCGdecompGetDetectorChainSize | ( | GCG_DECOMP * | decomp | ) |
gets the number of detectors for the given decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1663 of file decomp.c.
References NULL, and GCG_Decomp::sizedetectorchain.
Referenced by createPartialdecFromDecomp().
◆ GCGdecompSetPartialdecID()
| void GCGdecompSetPartialdecID | ( | GCG_DECOMP * | decomp, |
| int | id | ||
| ) |
sets the id of the original partialdec
- Parameters
-
decomp decomposition data structure id ID of partialdec
Definition at line 1673 of file decomp.c.
References NULL, and GCG_Decomp::partialdecid.
Referenced by createDecompFromPartialdec().
◆ GCGdecompGetPartialdecID()
| int GCGdecompGetPartialdecID | ( | GCG_DECOMP * | decomp | ) |
gets the id of the original partialdec
- Parameters
-
decomp decomposition data structure
Definition at line 1685 of file decomp.c.
References NULL, and GCG_Decomp::partialdecid.
Referenced by checkIdenticalBlocks().
◆ GCGdecompSetDetectorClockTimes()
| void GCGdecompSetDetectorClockTimes | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp, | ||
| SCIP_Real * | detectorClockTimes | ||
| ) |
sets the detector clock times of the detectors of the detector chain
- Parameters
-
gcg GCG data structure decomp decomposition data structure detectorClockTimes time used by the detectors
Definition at line 1694 of file decomp.c.
References BMSclearMemoryArray, GCG_Decomp::detectorclocktimes, GCGgetOrigprob(), SCIP_CALL_ABORT, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ GCGdecompGetDetectorClockTimes()
| SCIP_Real * GCGdecompGetDetectorClockTimes | ( | GCG_DECOMP * | decomp | ) |
gets the detector clock times of the detectors of the detector chain
- Parameters
-
decomp decomposition data structure
Definition at line 1721 of file decomp.c.
References GCG_Decomp::detectorclocktimes, and SCIP_Real.
Referenced by createPartialdecFromDecomp().
◆ 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
-
gcg GCG data structure decomp decomposition data structure detectorchainstring string for the detector information working on that decomposition
Definition at line 1730 of file decomp.c.
References GCG_Decomp::detectorchainstring, GCGgetOrigprob(), SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, and SCIPduplicateBlockMemoryArray.
Referenced by createDecompFromPartialdec().
◆ GCGdecompGetDetectorChainString()
| GCG_EXPORT char * GCGdecompGetDetectorChainString | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp | ||
| ) |
sets the detector clock times of the detectors of the detector chain
- Parameters
-
gcg GCG data structure decomp decomposition data structure
Definition at line 1745 of file decomp.c.
References GCG_Decomp::detectorchainstring.
◆ 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
-
gcg GCG data structure decomp decomposition data structure pctVarsToBorder percentage of variables assigned to border
Definition at line 1754 of file decomp.c.
References BMSclearMemoryArray, GCGgetOrigprob(), GCG_Decomp::pctvarstoborder, SCIP_CALL_ABORT, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ 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
-
decomp decomposition data structure
Definition at line 1780 of file decomp.c.
References GCG_Decomp::pctvarstoborder, and SCIP_Real.
Referenced by createPartialdecFromDecomp().
◆ 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
-
gcg GCG data structure decomp decomposition data structure pctConssToBorder percentage of constraints assigned to border
Definition at line 1788 of file decomp.c.
References BMSclearMemoryArray, GCGgetOrigprob(), GCG_Decomp::pctconsstoborder, SCIP_CALL_ABORT, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ 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
-
decomp decomposition data structure
Definition at line 1816 of file decomp.c.
References GCG_Decomp::pctconsstoborder, and SCIP_Real.
Referenced by createPartialdecFromDecomp().
◆ 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
-
gcg GCG data structure decomp decomposition data structure pctVarsToBlock percentage of variables assigned to some block in the detector chain
Definition at line 1824 of file decomp.c.
References BMSclearMemoryArray, GCGgetOrigprob(), GCG_Decomp::pctvarstoblock, SCIP_CALL_ABORT, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ 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
-
decomp decomposition data structure
Definition at line 1850 of file decomp.c.
References GCG_Decomp::pctvarstoblock, and SCIP_Real.
Referenced by createPartialdecFromDecomp().
◆ 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
-
gcg GCG data structure decomp decomposition data structure pctConssToBlock percentage of constraints assigned to some block in the detector chain
Definition at line 1858 of file decomp.c.
References BMSclearMemoryArray, GCGgetOrigprob(), GCG_Decomp::pctconsstoblock, SCIP_CALL_ABORT, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ 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
-
decomp decomposition data structure
Definition at line 1886 of file decomp.c.
References GCG_Decomp::pctconsstoblock, and SCIP_Real.
Referenced by createPartialdecFromDecomp().
◆ 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
-
gcg GCG data structure decomp decomposition data structure pctVarsFromOpen percentage of open variables assigned to some block in the detector chain
Definition at line 1895 of file decomp.c.
References BMSclearMemoryArray, GCGgetOrigprob(), GCG_Decomp::pctvarsfromopen, SCIP_CALL_ABORT, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ 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
-
decomp decomposition data structure
Definition at line 1924 of file decomp.c.
References GCG_Decomp::pctvarsfromopen, and SCIP_Real.
Referenced by createPartialdecFromDecomp().
◆ GCGdecompSetDetectorPctConssFromOpen()
| void GCGdecompSetDetectorPctConssFromOpen | ( | GCG * | gcg, |
| GCG_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
- Parameters
-
gcg GCG data structure decomp decomposition data structure pctConssFromOpen percentage of open variables assigned to some block in the detector chain
Definition at line 1932 of file decomp.c.
References BMSclearMemoryArray, GCGgetOrigprob(), GCG_Decomp::pctconssfromopen, SCIP_CALL_ABORT, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ 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
-
decomp decomposition data structure
Definition at line 1962 of file decomp.c.
References GCG_Decomp::pctconssfromopen, and SCIP_Real.
Referenced by createPartialdecFromDecomp().
◆ 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
-
gcg GCG data structure decomp decomposition data structure nNewBlocks number of newly found blocks in this decomposition
Definition at line 1970 of file decomp.c.
References BMSclearMemoryArray, GCGgetOrigprob(), GCG_Decomp::nnewblocks, SCIP_CALL_ABORT, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), and GCG_Decomp::sizedetectorchain.
Referenced by createDecompFromPartialdec().
◆ GCGdecompGetNNewBlocks()
| int * GCGdecompGetNNewBlocks | ( | GCG_DECOMP * | decomp | ) |
gets the number of new blocks corresponding detectors (of the detector chain) on this decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 1997 of file decomp.c.
References GCG_Decomp::nnewblocks.
Referenced by createPartialdecFromDecomp().
◆ GCGdecompTransform()
| SCIP_RETCODE GCGdecompTransform | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp | ||
| ) |
transforms all constraints and variables, updating the arrays
- Parameters
-
gcg GCG data structure decomp decomposition data structure
Definition at line 2005 of file decomp.c.
References b, GCG_Decomp::constoblock, GCGdecompCheckConsistency(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::linkingvars, GCG_Decomp::nblocks, GCG_Decomp::nlinkingconss, GCG_Decomp::nlinkingvars, GCG_Decomp::nsubscipconss, GCG_Decomp::nsubscipvars, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMED, SCIPblkmem(), SCIPcaptureCons(), SCIPcaptureVar(), SCIPconsGetName(), SCIPconsIsTransformed(), SCIPdebugMessage, SCIPfindCons(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapSetImage(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarIsActive(), SCIPvarIsTransformed(), GCG_Decomp::subscipconss, GCG_Decomp::subscipvars, and GCG_Decomp::vartoblock.
◆ GCGdecompRemoveDeletedConss()
| SCIP_RETCODE GCGdecompRemoveDeletedConss | ( | GCG * | gcg, |
| GCG_DECOMP * | decdecomp | ||
| ) |
Remove all those constraints that were removed from the problem after the decomposition had been created
- Parameters
-
gcg GCG data structure decdecomp decomposition data structure
Definition at line 2148 of file decomp.c.
References GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::nblocks, GCG_Decomp::nlinkingconss, GCG_Decomp::nsubscipconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPconsIsDeleted(), SCIPreallocBlockMemoryArray, SCIPreleaseCons(), and GCG_Decomp::subscipconss.
◆ GCGdecompAddRemainingConss()
| SCIP_RETCODE GCGdecompAddRemainingConss | ( | GCG * | gcg, |
| GCG_DECOMP * | decdecomp | ||
| ) |
Adds all those constraints that were added to the problem after the decomposition had been created
- Parameters
-
gcg GCG data structure decdecomp decomposition data structure
Definition at line 2206 of file decomp.c.
References assignConsvarsToBlock(), GCG_Decomp::constoblock, GCG_DECTYPE_ARROWHEAD, GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCG_DECTYPE_STAIRCASE, GCGdecompGetConstoblock(), GCGdecompGetNBlocks(), GCGdetermineConsBlock(), GCGgetOrigprob(), GCGisConsGCGCons(), GCG_Decomp::linkingconss, GCG_Decomp::nlinkingconss, GCG_Decomp::nsubscipconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPcaptureCons(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetConss(), SCIPgetNConss(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPreallocBlockMemoryArray, SCIPwarningMessage(), GCG_Decomp::subscipconss, and GCG_Decomp::type.
Referenced by convertStructToGCG(), and createDecompFromPartialdec().
◆ GCGdecompCheckConsistency()
| SCIP_RETCODE GCGdecompCheckConsistency | ( | GCG * | gcg, |
| GCG_DECOMP * | decdecomp | ||
| ) |
checks the consistency of the data structure
In particular, it checks whether the redundant information in the structure agree and whether the variables in the structure are both existant in the arrays and in the problem
- Parameters
-
gcg GCG data structure decdecomp decomposition data structure
Definition at line 2297 of file decomp.c.
References b, FALSE, GCG_DECTYPE_ARROWHEAD, GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCG_DECTYPE_STAIRCASE, GCG_DECTYPE_UNKNOWN, GCGconsGetNVars(), GCGconsGetVars(), GCGdecompGetConstoblock(), GCGdecompGetLinkingconss(), GCGdecompGetLinkingvars(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNLinkingvars(), GCGdecompGetNSubscipconss(), GCGdecompGetNSubscipvars(), GCGdecompGetNTotalStairlinkingvars(), GCGdecompGetSubscipconss(), GCGdecompGetSubscipvars(), GCGdecompGetType(), GCGdecompGetVartoblock(), GCGgetOrigprob(), GCGisConsGCGCons(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIP_STAGE_TRANSFORMED, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPconsGetName(), SCIPdebugMessage, SCIPfindCons(), SCIPfindVar(), SCIPfreeBufferArray, SCIPgetConss(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetStage(), SCIPgetVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPisEQ(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), and SCIPvarIsActive().
Referenced by convertStructToGCG(), createDecompFromPartialdec(), createPartialdecFromDecomp(), GCGdecompTransform(), GCGfilloutDecompFromHashmaps(), and GCGpermuteDecomp().
◆ GCGcreateBasicDecomp()
| SCIP_RETCODE GCGcreateBasicDecomp | ( | GCG * | gcg, |
| GCG_DECOMP ** | decomp, | ||
| SCIP_Bool | solveorigprob | ||
| ) |
creates a decomposition with all constraints in the master
- Parameters
-
gcg GCG data structure decomp decomposition data structure solveorigprob is the original problem being solved?
Definition at line 2418 of file decomp.c.
References FALSE, GCGdecompCreate(), GCGdecompSetPresolved(), GCGfilloutDecompFromHashmaps(), GCGgetOrigprob(), GCGisConsGCGCons(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_FIXED, SCIPblkmem(), SCIPgetConss(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapInsert(), SCIPvarGetProbvar(), SCIPvarGetStatus(), and TRUE.
Referenced by initRelaxator().
◆ processBlockRepresentatives()
|
static |
processes block representatives
- Returns
- returns the number of blocks
- Parameters
-
maxblock maximal number of blocks blockrepresentative array blockrepresentatives
Definition at line 2485 of file decomp.c.
References NULL, and SCIPdebugPrintf.
Referenced by GCGcreateDecompFromMasterconss().
◆ assignConstraintsToRepresentatives()
|
static |
- Parameters
-
gcg GCG data structure conss array of all constraints nconss number of constraints consismaster array of flags whether a constraint belongs to the master problem constoblock hashmap from constraints to block numbers, to be filled vartoblock array mapping variables to block numbers, initially all -1, to be set nextblock index of next free block to which no constraints have been assigned yet blockrepresentative array of blockrepresentatives
Definition at line 2520 of file decomp.c.
References GCGconsGetNVars(), GCGconsGetVars(), GCGgetOrigprob(), GCGisConsGCGCons(), MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPconsGetName(), SCIPdebugMessage, SCIPdebugPrintf, SCIPfreeBufferArrayNull, SCIPgetConss(), SCIPgetNConss(), SCIPgetNVars(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetProbvar(), and SCIPvarGetStatus().
Referenced by GCGcreateDecompFromMasterconss().
◆ fillConstoblock()
|
static |
- Parameters
-
conss array of all constraints nconss number of constraints consismaster array of flags whether a constraint belongs to the master problem nblocks number of blocks constoblock current hashmap from constraints to block numbers newconstoblock new hashmap from constraints to block numbers, to be filled blockrepresentative array of blockrepresentatives
Definition at line 2703 of file decomp.c.
References GCGisConsGCGCons(), SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPdebugMessage, SCIPhashmapExists(), SCIPhashmapGetImage(), and SCIPhashmapInsert().
Referenced by GCGcreateDecompFromMasterconss().
◆ GCGcreateDecompFromMasterconss()
| SCIP_RETCODE GCGcreateDecompFromMasterconss | ( | GCG * | gcg, |
| GCG_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.
- Parameters
-
gcg GCG data structure decomp decomposition data structure masterconss constraints to be put in the master nmasterconss number of constraints in the master
Definition at line 2748 of file decomp.c.
References assignConstraintsToRepresentatives(), FALSE, fillConstoblock(), GCGdecompCreate(), GCGfilloutDecompFromConstoblock(), GCGgetOrigprob(), GCGisConsGCGCons(), NULL, processBlockRepresentatives(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMED, SCIPallocBufferArray, SCIPblkmem(), SCIPfreeBufferArray, SCIPgetConss(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetStage(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), and SCIPhashmapInsert().
◆ incVarsData()
|
static |
increase the corresponding count of the variable stats
- Parameters
-
var variable to consider nbinvars pointer to array of size nproblems to store number of binary subproblem vars nintvars pointer to array of size nproblems to store number of integer subproblem vars nimplvars pointer to array of size nproblems to store number of implied subproblem vars ncontvars pointer to array of size nproblems to store number of continues subproblem vars nproblems size of the arrays i index of the array to increase
Definition at line 2834 of file decomp.c.
References NULL, SCIP_IMPLINTTYPE_NONE, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_INTEGER, SCIPvarGetImplType(), SCIPvarGetType(), and SCIPvarIsBinary().
Referenced by GCGgetLinkingVarsData(), and GCGgetSubproblemVarsData().
◆ 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
-
gcg GCG data structure decomp decomposition data structure nvars pointer to array of size nproblems to store number of subproblem vars or NULL nbinvars pointer to array of size nproblems to store number of binary subproblem vars or NULL nintvars pointer to array of size nproblems to store number of integer subproblem vars or NULL nimplvars pointer to array of size nproblems to store number of implied subproblem vars or NULL ncontvars pointer to array of size nproblems to store number of continuous subproblem vars or NULL nproblems size of the arrays
Definition at line 2873 of file decomp.c.
References BMSclearMemoryArray, GCG_DECTYPE_UNKNOWN, GCGdecompGetNSubscipvars(), GCGdecompGetSubscipvars(), GCGdecompGetType(), incVarsData(), and NULL.
Referenced by 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
-
gcg GCG data structure decomp decomposition data structure nvars pointer to store number of linking vars or NULL nbinvars pointer to store number of binary linking vars or NULL nintvars pointer to store number of integer linking vars or NULL nimplvars pointer to store number of implied linking vars or NULL ncontvars pointer to store number of continuous linking vars or NULL
Definition at line 2922 of file decomp.c.
References GCG_DECTYPE_UNKNOWN, GCGdecompGetLinkingvars(), GCGdecompGetNLinkingvars(), GCGdecompGetType(), incVarsData(), and NULL.
Referenced by 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
-
gcg GCG data structure decomp decomposition data structure vars pointer to array store variables belonging to density nvars number of variables conss pointer to array to store constraints belonging to the density nconss number of constraints varsubproblemdensity pointer to array to store the nonzeros for the subproblems varmasterdensity pointer to array to store the nonzeros for the master conssubproblemdensity pointer to array to store the nonzeros for the subproblems consmasterdensity pointer to array to store the nonzeros for the master
Definition at line 2972 of file decomp.c.
References BMSclearMemoryArray, BMScopyMemoryArray, GCGdecompGetLinkingconss(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNSubscipconss(), GCGdecompGetSubscipconss(), GCGdecompGetVartoblock(), GCGgetOrigprob(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetConsNVars(), SCIPgetConsVars(), SCIPgetVars(), SCIPhashmapGetImage(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetProbvar(), and SCIPvarGetStatus().
Referenced by GCGprintDecompStatistics().
◆ increaseLock()
|
static |
helper function to increase correct lock
- Parameters
-
gcg GCG data structure lhs left side of constraint coef coefficient of variable in constraint rhs right side of constraint downlock pointer to store downlock uplock pointer to store uplock
Definition at line 3118 of file decomp.c.
References GCGgetOrigprob(), NULL, SCIPisInfinity(), SCIPisNegative(), and SCIPisPositive().
Referenced by GCGgetVarLockData().
◆ 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
-
gcg GCG data structure decomp decomposition data structure vars pointer to array store variables belonging to density nvars number of variables nsubproblems number of sub problems subsciplocksdown pointer to two dimensional array to store the down locks for the subproblems subsciplocksup pointer to two dimensional array to store the down locks for the subproblems masterlocksdown pointer to array to store the down locks for the master masterlocksup pointer to array to store the down locks for the master
Definition at line 3158 of file decomp.c.
References BMSclearMemoryArray, BMScopyMemoryArray, GCGconsGetLhs(), GCGconsGetRhs(), GCGconsGetVals(), GCGdecompGetLinkingconss(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingvars(), GCGdecompGetNSubscipconss(), GCGdecompGetSubscipconss(), GCGdecompGetVartoblock(), GCGgetOrigprob(), increaseLock(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetConsNVars(), SCIPgetConsVars(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapExists(), SCIPvarGetProbindex(), SCIPvarGetProbvar(), and SCIPvarGetStatus().
◆ 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
-
gcg GCG data structure decdecomp decomposition data structure maxwhitescore score related to max white measure (i.e. fraction of white (nonblock and nonborder) matrix area )
Definition at line 3296 of file decomp.c.
References GCG_Decomp::maxwhitescore.
Referenced by createDecompFromPartialdec().
◆ GCGdecompGetMaxWhiteScore()
| SCIP_Real GCGdecompGetMaxWhiteScore | ( | GCG * | gcg, |
| GCG_DECOMP * | decdecomp | ||
| ) |
computes the score of the given decomposition based on the border, the average density score and the ratio of linking variables
- Parameters
-
gcg GCG data structure decdecomp decomposition data structure
Definition at line 3313 of file decomp.c.
References GCGdecompEvaluateDecomposition(), GCG_Decomp::maxwhitescore, and SCIP_Real.
◆ GCGdecompEvaluateDecomposition()
| SCIP_RETCODE GCGdecompEvaluateDecomposition | ( | GCG * | gcg, |
| GCG_DECOMP * | decdecomp, | ||
| DEC_SCORES * | score | ||
| ) |
computes the score of the given decomposition based on the border, the average density score and the ratio of linking variables
- Parameters
-
gcg GCG data structure decdecomp decomposition data structure score returns the score of the decomposition
Definition at line 3331 of file decomp.c.
References Dec_Scores::borderscore, Dec_Scores::densityscore, FALSE, GCG_DECTYPE_ARROWHEAD, GCG_DECTYPE_BORDERED, GCG_DECTYPE_DIAGONAL, GCG_DECTYPE_STAIRCASE, GCG_DECTYPE_UNKNOWN, GCGconsGetNVars(), GCGconsGetVars(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNLinkingvars(), GCGdecompGetNMastervars(), GCGdecompGetNSubscipconss(), GCGdecompGetNSubscipvars(), GCGdecompGetStrType(), GCGdecompGetSubscipconss(), GCGdecompGetType(), GCGdecompGetVartoblock(), GCGgetOrigprob(), GCGisVarRelevant(), Dec_Scores::linkingscore, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetNConss(), SCIPgetNVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPvarGetProbindex(), SCIPvarGetProbvar(), SCIPvarIsActive(), SCIPvarIsDeleted(), Dec_Scores::totalscore, and TRUE.
Referenced by GCGdecompGetMaxWhiteScore(), and GCGprintDecompStatistics().
◆ computeVarDensities()
|
static |
compute the density of variables in blocks and master
- Parameters
-
gcg GCG data structure decomp decomposition data structure varprobdensity density information varmasterdensity density information vars array of variables nvars number of variables blockvardensities array of statistic structs to store density information of each block mastervardensity pointer to store density information of master variables nblocks number of blocks
Definition at line 3557 of file decomp.c.
References b, BMSclearMemoryArray, GCGdecompGetNLinkingconss(), GCGdecompGetNSubscipconss(), GCGdecompGetNSubscipvars(), GCGdecompGetSubscipvars(), GCGdecompGetVartoblock(), GCGgetOrigprob(), max(), MAX, DEC_STATISTIC::max, DEC_STATISTIC::mean, DEC_STATISTIC::median, min(), MIN, DEC_STATISTIC::min, NULL, quick_select_median(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPdebugMessage, SCIPdebugPrintf, SCIPfreeBlockMemoryArray, SCIPhashmapGetImage(), and SCIPvarGetName().
Referenced by GCGprintDecompStatistics().
◆ GCGdecompGetNConss()
| int GCGdecompGetNConss | ( | GCG_DECOMP * | decomp | ) |
returns the number of constraints saved in the decomposition
- Parameters
-
decomp decomposition data structure
Definition at line 3697 of file decomp.c.
References b, GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNSubscipconss(), and NULL.
Referenced by GCGprintDecompStatistics().
◆ computeConssNzeros()
|
static |
computes nonzero elements of a given constraint, separated into linking variables and normal vars
- Parameters
-
gcg GCG data structure decomp decomposition data structure cons SCIP data structure nzeros pointer to store nonzero elements nintzeros pointer to store integer nonzeros nbzeros pointer to store border nonzero elements nintbzeros pointer to store border integer nonzeros
Definition at line 3714 of file decomp.c.
References GCGconsGetNVars(), GCGconsGetVals(), GCGconsGetVars(), GCGdecompGetNBlocks(), GCGdecompGetVartoblock(), GCGgetOrigprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_FIXED, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPfreeBufferArrayNull, SCIPhashmapGetImage(), SCIPisZero(), SCIPvarGetProbvar(), SCIPvarGetStatus(), and SCIPvarGetType().
Referenced by computeNonzeros().
◆ computeNonzeros()
|
static |
computes nonzero elements of the pricing problems and the master
- Parameters
-
gcg GCG data structure decomp decomposition data structure mnzeros number of nonzero elements in row border mintnzeros number of integral nonzero elements in row border lnzeros number of nonzero elements in column border lintnzeros number of integral nonzero elements in column border nonzeros number of nonzero elements per pricing problem intnzeros number of integral nonzero elements per pricing problem
Definition at line 3785 of file decomp.c.
References b, computeConssNzeros(), GCGdecompGetLinkingconss(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNSubscipconss(), GCGdecompGetSubscipconss(), NULL, SCIP_CALL, and SCIP_OKAY.
Referenced by GCGprintDecompStatistics().
◆ GCGprintDecompStatistics()
| SCIP_RETCODE GCGprintDecompStatistics | ( | GCG * | gcg, |
| FILE * | file, | ||
| GCG_DECOMP * | decomp | ||
| ) |
display statistics about the decomposition
- Parameters
-
gcg GCG data structure file output file or NULL for standard output decomp decomp that should be evaluated
Definition at line 3827 of file decomp.c.
References b, BMSclearMemoryArray, Dec_Scores::borderscore, computeNonzeros(), computeVarDensities(), Dec_Scores::densityscore, GCG_Decomp::detectorchainstring, GCGdecompEvaluateDecomposition(), GCGdecompGetNBlocks(), GCGdecompGetNConss(), GCGdecompGetNLinkingconss(), GCGdecompGetNMastervars(), GCGdecompGetNSubscipconss(), GCGdecompGetStrType(), GCGdecompGetType(), GCGgetDensityData(), GCGgetLinkingVarsData(), GCGgetMasterprob(), GCGgetNIdenticalBlocks(), GCGgetOrigprob(), GCGgetSubproblemVarsData(), GCGisPricingprobRelevant(), Dec_Scores::linkingscore, max(), DEC_STATISTIC::max, DEC_STATISTIC::mean, DEC_STATISTIC::median, min(), DEC_STATISTIC::min, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PRESOLVED, SCIPallocBlockMemoryArray, SCIPfreeBlockMemoryArray, SCIPgetMessagehdlr(), SCIPgetNVars(), SCIPgetStage(), SCIPmessageFPrintInfo(), and TRUE.
Referenced by GCGprintStatistics().
◆ GCGdecompositionsAreEqual()
| SCIP_Bool GCGdecompositionsAreEqual | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp1, | ||
| GCG_DECOMP * | decomp2 | ||
| ) |
returns whether both structures lead to the same decomposition
- Parameters
-
gcg GCG data structure decomp1 first decomp data structure decomp2 second decomp data structure
Definition at line 3990 of file decomp.c.
References FALSE, GCGdecompGetConstoblock(), GCGdecompGetNBlocks(), GCGdecompGetVartoblock(), GCGgetOrigprob(), NULL, SCIP_Bool, SCIPgetConss(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapGetImage(), and TRUE.
Referenced by 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
-
gcg GCG data structure decs array of decompositions ndecs number of decompositions
Definition at line 4057 of file decomp.c.
References GCGdecompositionsAreEqual(), and NULL.
◆ 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
- Parameters
-
gcg GCG data structure decomp decomposition data structure cons constraint to check block block of the constraint (or nblocks for master)
Definition at line 4100 of file decomp.c.
References FALSE, GCGdecompGetNBlocks(), GCGdecompGetVartoblock(), GCGgetOrigprob(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_FIXED, SCIPallocBufferArray, SCIPfreeBufferArrayNull, SCIPgetConsNVars(), SCIPgetConsVars(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPvarGetProbvar(), and SCIPvarGetStatus().
Referenced by GCGdecompAddRemainingConss(), GCGdecompTryAssignMasterconssToExistingPricing(), and GCGdecompTryAssignMasterconssToNewPricing().
◆ GCGdecompMoveLinkingConsToPricing()
| SCIP_RETCODE GCGdecompMoveLinkingConsToPricing | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp, | ||
| int | consindex, | ||
| int | block | ||
| ) |
move a master constraint to pricing problem
- Parameters
-
gcg GCG data structure decomp decomposition data structure consindex index of constraint to move block block of the pricing problem where to move
Definition at line 4192 of file decomp.c.
References assignConsvarsToBlock(), GCG_Decomp::constoblock, GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::nlinkingconss, GCG_Decomp::nsubscipconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPhashmapSetImage(), SCIPreallocBlockMemoryArray, and GCG_Decomp::subscipconss.
Referenced by GCGdecompTryAssignMasterconssToExistingPricing().
◆ GCGdecompTryAssignMasterconssToExistingPricing()
| SCIP_RETCODE GCGdecompTryAssignMasterconssToExistingPricing | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp, | ||
| int * | transferred | ||
| ) |
tries to assign masterconss to pricing problem
- Parameters
-
gcg GCG data structure decomp decomposition data structure transferred number of master constraints reassigned
Definition at line 4229 of file decomp.c.
References GCGdecompGetNBlocks(), GCGdecompMoveLinkingConsToPricing(), GCGdetermineConsBlock(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::nlinkingconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPfreeBlockMemoryArrayNull, and SCIPreallocBlockMemoryArray.
Referenced by GCGcreatePolishedDecomp().
◆ GCGdecompTryAssignMasterconssToNewPricing()
| SCIP_RETCODE GCGdecompTryAssignMasterconssToNewPricing | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp, | ||
| GCG_DECOMP ** | newdecomp, | ||
| int * | transferred | ||
| ) |
tries to assign masterconss to new pricing problem
- Parameters
-
gcg GCG data structure decomp decomposition data structure newdecomp new decomposition, if successful transferred number of master constraints reassigned
Definition at line 4279 of file decomp.c.
References GCG_Decomp::constoblock, FALSE, GCGdecompCreate(), GCGdetermineConsBlock(), GCGfilloutDecompFromConstoblock(), GCGgetOrigprob(), GCG_Decomp::linkingconss, GCG_Decomp::nblocks, GCG_Decomp::nlinkingconss, NULL, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetConss(), SCIPgetNConss(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapGetImage(), and SCIPhashmapSetImage().
Referenced by GCGcreatePolishedDecomp().
◆ 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
-
gcg GCG data structure decomp decomposition data structure newdecomp new decomposition, if successful
Definition at line 4337 of file decomp.c.
References GCGdecompFree(), GCGdecompGetNBlocks(), GCGdecompTryAssignMasterconssToExistingPricing(), GCGdecompTryAssignMasterconssToNewPricing(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
◆ GCGpermuteDecomp()
| SCIP_RETCODE GCGpermuteDecomp | ( | GCG * | gcg, |
| GCG_DECOMP * | decomp, | ||
| SCIP_RANDNUMGEN * | randnumgen | ||
| ) |
permutes the decomposition according to the permutation seed
- Parameters
-
gcg GCG data structure decomp decomposition data structure randnumgen random number generator
Definition at line 4384 of file decomp.c.
References b, GCGdecompCheckConsistency(), GCGdecompGetLinkingconss(), GCGdecompGetLinkingvars(), GCGdecompGetNBlocks(), GCGdecompGetNLinkingconss(), GCGdecompGetNLinkingvars(), GCGdecompGetNSubscipconss(), GCGdecompGetNSubscipvars(), GCGdecompGetSubscipconss(), GCGdecompGetSubscipvars(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPrandomPermuteArray().
Referenced by initRelaxator().