Scippy

GCG

Branch-and-Price & Column Generation for Everyone

cons_decomp.h File Reference

Detailed Description

constraint handler for structure detection

Author
Martin Bergner
Michael Bastubbe
Hanna Franzen

This constraint handler manages the structure detection process. It will run all registered structure detectors in an iterative refinement scheme. Afterwards some post-processing detectors might be called.

Definition in file cons_decomp.h.

#include "scip/scip.h"
#include "type_detector.h"
#include "type_varclassifier.h"
#include "type_consclassifier.h"
#include "type_scoretype.h"

Go to the source code of this file.

Typedefs

typedef struct Partialdecomp_Wrapper PARTIALDECOMP_WRAPPER
 

Functions

DEC_CLASSIFIERDATADECconsClassifierGetData (DEC_CONSCLASSIFIER *classifier)
 returns the data of the provided consclassifier More...
 
const char * DECconsClassifierGetName (DEC_CONSCLASSIFIER *classifier)
 returns the name of the provided classifier More...
 
DEC_CLASSIFIERDATADECvarClassifierGetData (DEC_VARCLASSIFIER *classifier)
 returns the data of the provided varclassifier More...
 
const char * DECvarClassifierGetName (DEC_VARCLASSIFIER *classifier)
 returns the name of the provided classifier More...
 
char DECdetectorGetChar (DEC_DETECTOR *detector)
 Gets the character of the detector. More...
 
DEC_DETECTORDATADECdetectorGetData (DEC_DETECTOR *detector)
 returns the data of the provided detector More...
 
const char * DECdetectorGetName (DEC_DETECTOR *detector)
 returns the name of the provided detector More...
 
SCIP_RETCODE DECdetectStructure (SCIP *scip, SCIP_RESULT *result)
 interface method to detect the structure including presolving More...
 
DEC_CONSCLASSIFIERDECfindConsClassifier (SCIP *scip, const char *name)
 searches for the consclassifier with the given name and returns it or NULL if classifier is not found More...
 
DEC_VARCLASSIFIERDECfindVarClassifier (SCIP *scip, const char *name)
 searches for the varclassifier with the given name and returns it or NULL if classifier is not found More...
 
DEC_DETECTORDECfindDetector (SCIP *scip, const char *name)
 searches for the detector with the given name and returns it or NULL if detector is not found More...
 
DEC_DECOMPDECgetBestDecomp (SCIP *scip, SCIP_Bool printwarnings)
 Gets the best known decomposition. More...
 
SCIP_RETCODE DECgetPartialdecToWrite (SCIP *scip, SCIP_Bool transformed, PARTIALDECOMP_WRAPPER *partialdecwrapper)
 Gets the currently considered best partialdec. More...
 
SCIP_Real DECgetRemainingTime (SCIP *scip)
 returns the remaining time of scip that the decomposition may use More...
 
SCIP_RETCODE DECincludeConsClassifier (SCIP *scip, const char *name, const char *description, int priority, SCIP_Bool enabled, DEC_CLASSIFIERDATA *classifierdata, DEC_DECL_FREECONSCLASSIFIER((*freeClassifier)), DEC_DECL_CONSCLASSIFY((*classify)))
 includes one constraint classifier More...
 
SCIP_RETCODE DECincludeDetector (SCIP *scip, const char *name, const char decchar, const char *description, int freqCallRound, int maxCallRound, int minCallRound, int freqCallRoundOriginal, int maxCallRoundOriginal, int minCallRoundOriginal, int priority, SCIP_Bool enabled, SCIP_Bool enabledFinishing, SCIP_Bool enabledPostprocessing, SCIP_Bool skip, SCIP_Bool usefulRecall, DEC_DETECTORDATA *detectordata, DEC_DECL_FREEDETECTOR((*freeDetector)), DEC_DECL_INITDETECTOR((*initDetector)), DEC_DECL_EXITDETECTOR((*exitDetector)), DEC_DECL_PROPAGATEPARTIALDEC((*propagatePartialdecDetector)), DEC_DECL_FINISHPARTIALDEC((*finishPartialdecDetector)), DEC_DECL_POSTPROCESSPARTIALDEC((*postprocessPartialdecDetector)), DEC_DECL_SETPARAMAGGRESSIVE((*setParamAggressiveDetector)), DEC_DECL_SETPARAMDEFAULT((*setParamDefaultDetector)), DEC_DECL_SETPARAMFAST((*setParamFastDetector)))
 includes one detector More...
 
SCIP_RETCODE DECincludeVarClassifier (SCIP *scip, const char *name, const char *description, int priority, SCIP_Bool enabled, DEC_CLASSIFIERDATA *classifierdata, DEC_DECL_FREEVARCLASSIFIER((*freeClassifier)), DEC_DECL_VARCLASSIFY((*classify)))
 includes one variable classifier More...
 
void DECprintListOfDetectors (SCIP *scip)
 writes out a list of all detectors More...
 
SCIP_RETCODE DECwriteAllDecomps (SCIP *scip, char *directory, char *extension, SCIP_Bool original, SCIP_Bool presolved)
 write out all known decompositions More...
 
SCIP_RETCODE DECwriteSelectedDecomps (SCIP *scip, char *directory, char *extension)
 writes all selected decompositions More...
 
void GCGconshdlrDecompAddCandidatesNBlocks (SCIP *scip, SCIP_Bool origprob, int candidate)
 adds a candidate for block number and counts how often a candidate is added More...
 
SCIP_RETCODE GCGconshdlrDecompAddDecomp (SCIP *scip, DEC_DECOMP *decomp, SCIP_Bool select)
 adds the given decomposition structure More...
 
int GCGconshdlrDecompAddBasicPartialdec (SCIP *scip, SCIP_Bool presolved)
 creates and adds a basic partialdecomp (all cons/vars are assigned to master) More...
 
int GCGconshdlrDecompAddMatrixPartialdec (SCIP *scip, SCIP_Bool presolved)
 creates a pure matrix partialdecomp (i.e. all cons/vars to one single block) More...
 
SCIP_RETCODE GCGconshdlrDecompAddPreexistingDecomp (SCIP *scip, DEC_DECOMP *decomp)
 adds a decomp that exists before the detection is called More...
 
SCIP_RETCODE GCGconshdlrDecompAddScoreTime (SCIP *scip, SCIP_Real time)
 adds given time to total score calculation time More...
 
void GCGconshdlrDecompAddUserCandidatesNBlocks (SCIP *scip, int candidate)
 adds a candidate for block size given by the user More...
 
SCIP_RETCODE GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid (SCIP *scip, int partialdecid, int probnr1, int probnr2, SCIP_Bool *identical)
 checks if two pricing problems are identical based on information from detection More...
 
SCIP_RETCODE GCGconshdlrDecompCalcBendersScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the benders score of a partialdec More...
 
SCIP_RETCODE GCGconshdlrDecompCalcBorderAreaScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the border area score of a partialdec More...
 
void GCGconshdlrDecompCalcCandidatesNBlocks (SCIP *scip, SCIP_Bool transformed)
 calculates and adds block size candidates using constraint classifications and variable classifications More...
 
SCIP_RETCODE GCGconshdlrDecompCalcClassicScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the classic score of a partialdec More...
 
SCIP_RETCODE GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the maxforeseeingwhiteagg score of a partialdec More...
 
SCIP_RETCODE GCGconshdlrDecompCalcMaxForseeingWhiteScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the maximum foreseeing white area score of a partialdec More...
 
SCIP_RETCODE GCGconshdlrDecompCalcMaxWhiteScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the maximum white area score of a partialdec More...
 
SCIP_RETCODE GCGconshdlrDecompCalcSetPartForseeingWhiteScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the setpartitioning maximum foreseeing white area score of a partialdec More...
 
SCIP_RETCODE GCGconshdlrDecompCalcSetPartForWhiteAggScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the setpartfwhiteagg score of a partialdec More...
 
SCIP_RETCODE GCGconshdlrDecompCalcStrongDecompositionScore (SCIP *scip, int partialdecid, SCIP_Real *score)
 calculates the strong decomposition score of a partialdec More...
 
SCIP_Bool GCGconshdlrDecompCheckConsistency (SCIP *scip)
 check whether partialdecs are consistent More...
 
SCIP_RETCODE GCGconshdlrDecompClassify (SCIP *scip, SCIP_Bool transformed)
 run classification of vars and cons More...
 
SCIP_RETCODE GCGconshdlrDecompCreateVarmapForPartialdecId (SCIP *scip, SCIP_HASHMAP **hashorig2pricingvar, int partialdecid, int probnr1, int probnr2, SCIP *scip1, SCIP *scip2, SCIP_HASHMAP *varmap)
 for two identical pricing problems a corresponding varmap is created More...
 
int GCGconshdlrDecompDecreaseNCallsCreateDecomp (SCIP *scip)
 decreases the counter for created decompositions and returns it More...
 
void GCGconshdlrDecompDeregisterPartialdecs (SCIP *scip, SCIP_Bool original)
 deregisters partialdecs in the conshdlr More...
 
void GCGconshdlrDecompFreeDetprobdata (SCIP *scip)
 Frees Detprobdata of the original and transformed/presolved problem. More...
 
void GCGconshdlrDecompFreeOrigOnExit (SCIP *scip, SCIP_Bool free)
 sets freeing of detection data of original problem during exit to true More...
 
int GCGconshdlrDecompGetBlockNumberCandidate (SCIP *scip, int index)
 returns block number user candidate with given index More...
 
SCIP_Real GCGconshdlrDecompGetCompleteDetectionTime (SCIP *scip)
 returns the total detection time More...
 
DEC_DECOMP ** GCGconshdlrDecompGetDecomps (SCIP *scip)
 returns an array containing all decompositions More...
 
DEC_DETECTOR ** GCGconshdlrDecompGetDetectors (SCIP *scip)
 Gets an array of all detectors. More...
 
SCIP_RETCODE GCGconshdlrDecompGetFinishedPartialdecsList (SCIP *scip, int **idlist, int *listlength)
 Gets a list of ids of the current partialdecs that are finished. More...
 
SCIP_RETCODE GCGconshdlrDecompGetPartialdecsList (SCIP *scip, int **idlist, int *listlength)
 Gets a list of ids of the current partialdecs. More...
 
int GCGconshdlrDecompGetNBlockNumberCandidates (SCIP *scip)
 returns the number of block candidates given by the user More...
 
int GCGconshdlrDecompGetNBlocksByPartialdecId (SCIP *scip, int id)
 gets block number of partialdec with given id More...
 
int GCGconshdlrDecompGetNDecomps (SCIP *scip)
 gets the number of decompositions (= amount of finished partialdecs) More...
 
int GCGconshdlrDecompGetNDetectors (SCIP *scip)
 Gets the number of all detectors. More...
 
int GCGconshdlrDecompGetNextPartialdecID (SCIP *scip)
 Gets the next partialdec id managed by cons_decomp. More...
 
int GCGconshdlrDecompGetNFormerDetectionConssForID (SCIP *scip, int id)
 gets number of active constraints during the detection of the decomp with given id More...
 
int GCGconshdlrDecompGetNLinkingVarsByPartialdecId (SCIP *scip, int id)
 gets number of linking variables of partialdec with given id More...
 
int GCGconshdlrDecompGetNMasterConssByPartialdecId (SCIP *scip, int id)
 gets number of master constraints of partialdec with given id More...
 
int GCGconshdlrDecompGetNMasterVarsByPartialdecId (SCIP *scip, int id)
 gets number of master variables of partialdec with given id More...
 
int GCGconshdlrDecompGetNOpenConssByPartialdecId (SCIP *scip, int id)
 gets number of open constraints of partialdec with given id More...
 
int GCGconshdlrDecompGetNOpenVarsByPartialdecId (SCIP *scip, int id)
 gets number of open variables of partialdec with given id More...
 
unsigned int GCGconshdlrDecompGetNFinishedPartialdecsOrig (SCIP *scip)
 Gets the number of finished partialdecs available for the original problem. More...
 
unsigned int GCGconshdlrDecompGetNFinishedPartialdecsTransformed (SCIP *scip)
 Gets the number of finished partialdecs available for the transformed problem. More...
 
unsigned int GCGconshdlrDecompGetNOpenPartialdecsOrig (SCIP *scip)
 Gets the number of open partialdecs available for the original problem. More...
 
unsigned int GCGconshdlrDecompGetNOpenPartialdecsTransformed (SCIP *scip)
 Gets the number of open partialdecs available for the transformed problem. More...
 
unsigned int GCGconshdlrDecompGetNPartialdecs (SCIP *scip)
 Gets the number of all partialdecs. More...
 
unsigned int GCGconshdlrDecompGetNPartialdecsOrig (SCIP *scip)
 Gets the number of partialdecs available for the original problem. More...
 
unsigned int GCGconshdlrDecompGetNPartialdecsTransformed (SCIP *scip)
 Gets the number of partialdecs available for the transformed problem. More...
 
int GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId (SCIP *scip, int id)
 gets number of stairlinking variables of partialdec with given id More...
 
SCIP_RETCODE GCGconshdlrDecompGetPartialdecFromID (SCIP *scip, int partialdecid, PARTIALDECOMP_WRAPPER *pwr)
 Gets wrapped PARTIALDECOMP with given id. More...
 
float GCGconshdlrDecompGetScoreByPartialdecId (SCIP *scip, int id)
 gets score of partialdec with given id More...
 
SCIP_Real GCGconshdlrDecompGetScoreTotalTime (SCIP *scip)
 gets total score computation time More...
 
SCORETYPE GCGconshdlrDecompGetScoretype (SCIP *scip)
 Gets the currently selected scoretype. More...
 
SCIP_RETCODE GCGconshdlrDecompGetSelectedPartialdecs (SCIP *scip, int **idlist, int *listlength)
 Gets a list of ids of all currently selected partialdecs. More...
 
int GCGconshdlrDecompIncreaseNCallsCreateDecomp (SCIP *scip)
 counts up the counter for created decompositions and returns it More...
 
SCIP_Bool GCGconshdlrDecompIsPresolvedByPartialdecId (SCIP *scip, int id)
 gets whether partialdec with given id is presolved More...
 
SCIP_Bool GCGconshdlrDecompIsSelectedByPartialdecId (SCIP *scip, int id)
 gets whether partialdec with given id is selected More...
 
SCIP_Bool GCGconshdlrDecompOrigDetprobdataExists (SCIP *scip)
 returns whether or not a detprobdata structure for the original problem exists More...
 
SCIP_Bool GCGconshdlrDecompOrigPartialdecExists (SCIP *scip)
 returns whether or not an original decompositions exists in the data structures More...
 
SCIP_Bool GCGconshdlrDecompPresolvedDetprobdataExists (SCIP *scip)
 returns whether or not a detprobdata structure for the presolved problem exists More...
 
SCIP_RETCODE GCGconshdlrDecompPrintDetectorStatistics (SCIP *scip, FILE *file)
 display statistics about detectors More...
 
SCIP_RETCODE GCGconshdlrDecompSelectPartialdec (SCIP *scip, int partialdecid, SCIP_Bool select)
 selects/unselects a partialdecomp More...
 
SCIP_RETCODE GCGconshdlrDecompSetDetection (SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
 sets detector parameters values More...
 
void GCGconshdlrDecompSetScoretype (SCIP *scip, SCORETYPE sctype)
 Sets the currently used scoretype. More...
 
SCIP_RETCODE GCGconshdlrDecompTranslateNBestOrigPartialdecs (SCIP *scip, int n, SCIP_Bool completeGreedily)
 translates n best unpresolved partialdec to a complete presolved one More...
 
SCIP_RETCODE GCGconshdlrDecompTranslateOrigPartialdecs (SCIP *scip)
 translates unpresolved partialdec to a complete presolved one More...
 
SCIP_Bool GCGdetectionTookPlace (SCIP *scip, SCIP_Bool original)
 
SCIP_RETCODE SCIPconshdlrDecompRepairConsNames (SCIP *scip)
 
SCIP_RETCODE SCIPincludeConshdlrDecomp (SCIP *scip)
 creates the constraint handler for decomp and includes it in SCIP More...
 

Typedef Documentation

◆ PARTIALDECOMP_WRAPPER

Definition at line 58 of file cons_decomp.h.

Function Documentation

◆ DECconsClassifierGetData()

DEC_CLASSIFIERDATA* DECconsClassifierGetData ( DEC_CONSCLASSIFIER classifier)

returns the data of the provided consclassifier

Returns
data of the provided consclassifier
Parameters
classifierClassifier data structure

Definition at line 2562 of file cons_decomp.cpp.

References DEC_ConsClassifier::clsdata.

Referenced by DEC_DECL_CONSCLASSIFY(), DEC_DECL_FREECONSCLASSIFIER(), DECconsClassifierGamsdomainAddEntry(), and DECconsClassifierGamssymbolAddEntry().

◆ DECconsClassifierGetName()

const char* DECconsClassifierGetName ( DEC_CONSCLASSIFIER classifier)

returns the name of the provided classifier

Returns
name of the given classifier
Parameters
classifierclassifier data structure

Definition at line 2571 of file cons_decomp.cpp.

References DEC_ConsClassifier::name.

Referenced by DEC_DECL_FREECONSCLASSIFIER().

◆ DECvarClassifierGetData()

DEC_CLASSIFIERDATA* DECvarClassifierGetData ( DEC_VARCLASSIFIER classifier)

returns the data of the provided varclassifier

Returns
data of the provided varclassifier
Parameters
classifierClassifier data structure

Definition at line 2580 of file cons_decomp.cpp.

References DEC_VarClassifier::clsdata.

Referenced by DEC_DECL_FREEVARCLASSIFIER(), DEC_DECL_VARCLASSIFY(), DECvarClassifierGamsdomainAddEntry(), and DECvarClassifierGamssymbolAddEntry().

◆ DECvarClassifierGetName()

const char* DECvarClassifierGetName ( DEC_VARCLASSIFIER classifier)

returns the name of the provided classifier

Returns
name of the given classifier
Parameters
classifierclassifier data structure

Definition at line 2589 of file cons_decomp.cpp.

References DEC_VarClassifier::name.

Referenced by DEC_DECL_FREEVARCLASSIFIER().

◆ DECdetectorGetChar()

char DECdetectorGetChar ( DEC_DETECTOR detector)

Gets the character of the detector.

Returns
detector character
Parameters
detectorpointer to detector

Definition at line 2598 of file cons_decomp.cpp.

References DEC_Detector::decchar.

Referenced by gcg::PARTIALDECOMP::buildDecChainString(), and gcg::GCGdialogShowLegend().

◆ DECdetectorGetData()

DEC_DETECTORDATA* DECdetectorGetData ( DEC_DETECTOR detector)

returns the data of the provided detector

Returns
data of the provided detector
Parameters
detectorDetector data structure

Definition at line 2609 of file cons_decomp.cpp.

References DEC_Detector::decdata.

Referenced by DEC_DECL_EXITDETECTOR(), DEC_DECL_FINISHPARTIALDEC(), DEC_DECL_FREEDETECTOR(), DEC_DECL_INITDETECTOR(), and DEC_DECL_PROPAGATEPARTIALDEC().

◆ DECdetectorGetName()

const char* DECdetectorGetName ( DEC_DETECTOR detector)

◆ DECdetectStructure()

SCIP_RETCODE DECdetectStructure ( SCIP *  scip,
SCIP_RESULT *  result 
)

interface method to detect the structure including presolving

Returns
SCIP return code
Parameters
scipSCIP data structure
resultResult pointer to indicate whether some structure was found

Definition at line 2627 of file cons_decomp.cpp.

References DEC_DECMODE_ORIGINAL, detect(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGconshdlrDecompClassify(), GCGconshdlrDecompGetCompleteDetectionTime(), GCGgetDecompositionMode(), getConshdlrdata(), and resetDetprobdata().

Referenced by GCGdetect(), and GCGsolve().

◆ DECfindConsClassifier()

DEC_CONSCLASSIFIER* DECfindConsClassifier ( SCIP *  scip,
const char *  name 
)

searches for the consclassifier with the given name and returns it or NULL if classifier is not found

Returns
consclassifier pointer or NULL if consclassifier with given name is not found
Parameters
scipSCIP data structure
namethe name of the searched consclassifier

Definition at line 2806 of file cons_decomp.cpp.

References CONSHDLR_NAME, and DEC_ConsClassifier::name.

Referenced by DEC_DECL_CONSCLASSIFY().

◆ DECfindVarClassifier()

DEC_VARCLASSIFIER* DECfindVarClassifier ( SCIP *  scip,
const char *  name 
)

searches for the varclassifier with the given name and returns it or NULL if classifier is not found

Returns
varclassifier pointer or NULL if varclassifier with given name is not found
Parameters
scipSCIP data structure
namethe name of the searched varclassifier

Definition at line 2837 of file cons_decomp.cpp.

References CONSHDLR_NAME, and DEC_VarClassifier::name.

Referenced by DEC_DECL_VARCLASSIFY().

◆ DECfindDetector()

DEC_DETECTOR* DECfindDetector ( SCIP *  scip,
const char *  name 
)

searches for the detector with the given name and returns it or NULL if detector is not found

Returns
detector pointer or NULL if detector with given name is not found
Parameters
scipSCIP data structure
namethe name of the searched detector

Definition at line 2868 of file cons_decomp.cpp.

References CONSHDLR_NAME, and DEC_Detector::name.

Referenced by DECincludeDetector().

◆ DECgetBestDecomp()

DEC_DECOMP* DECgetBestDecomp ( SCIP *  scip,
SCIP_Bool  printwarnings 
)

Gets the best known decomposition.

Note
caller has to free returned DEC_DECOMP
Returns
the decomposition if available and NULL otherwise
Parameters
scipSCIP data structure
printwarningsshould warnings pre printed

Definition at line 2898 of file cons_decomp.cpp.

References createDecompFromPartialdec(), GCGconshdlrDecompChooseCandidatesFromSelected(), getConshdlrdata(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), and gcg::PARTIALDECOMP::isComplete().

Referenced by GCGsolve(), GCGwriteDecompositionData(), initRelaxator(), SCIP_DECL_DIALOGEXEC(), and writeREFFile().

◆ DECgetPartialdecToWrite()

SCIP_RETCODE DECgetPartialdecToWrite ( SCIP *  scip,
SCIP_Bool  transformed,
PARTIALDECOMP_WRAPPER partialdecwrapper 
)

Gets the currently considered best partialdec.

If there is a partialdec marked to be returned (e.g. by /DECwriteAllDecomps), it is written. Else, the currently "best" decomp is returned.

Returns
partialdec to write if one can be found, or partialdecwrapper->partialdec = NULL otherwise
Parameters
scipSCIP data structure
transformedis the problem transformed yet
partialdecwrapperpartialdec wrapper to output

Definition at line 2967 of file cons_decomp.cpp.

References DECgetPartialdecToWrite(), and Partialdecomp_Wrapper::partialdec.

◆ DECgetRemainingTime()

SCIP_Real DECgetRemainingTime ( SCIP *  scip)

returns the remaining time of scip that the decomposition may use

Returns
remaining time that the decompositon may use
Parameters
scipSCIP data structure

Definition at line 2979 of file cons_decomp.cpp.

Referenced by callMetis().

◆ DECincludeConsClassifier()

SCIP_RETCODE DECincludeConsClassifier ( SCIP *  scip,
const char *  name,
const char *  description,
int  priority,
SCIP_Bool  enabled,
DEC_CLASSIFIERDATA classifierdata,
DEC_DECL_FREECONSCLASSIFIER((*freeClassifier))  ,
DEC_DECL_CONSCLASSIFY((*classify))   
)

includes one constraint classifier

Returns
scip return code
Parameters
scipscip data structure
namename of the classifier
descriptiondescribing main idea of this classifier
prioritypriority of the classifier
enabledwhether the classifier should be enabled by default
classifierdataclassifierdata the associated classifier data (or NULL)

◆ DECincludeDetector()

SCIP_RETCODE DECincludeDetector ( SCIP *  scip,
const char *  name,
const char  decchar,
const char *  description,
int  freqCallRound,
int  maxCallRound,
int  minCallRound,
int  freqCallRoundOriginal,
int  maxCallRoundOriginal,
int  minCallRoundOriginal,
int  priority,
SCIP_Bool  enabled,
SCIP_Bool  enabledFinishing,
SCIP_Bool  enabledPostprocessing,
SCIP_Bool  skip,
SCIP_Bool  usefulRecall,
DEC_DETECTORDATA detectordata,
DEC_DECL_FREEDETECTOR((*freeDetector))  ,
DEC_DECL_INITDETECTOR((*initDetector))  ,
DEC_DECL_EXITDETECTOR((*exitDetector))  ,
DEC_DECL_PROPAGATEPARTIALDEC((*propagatePartialdecDetector))  ,
DEC_DECL_FINISHPARTIALDEC((*finishPartialdecDetector))  ,
DEC_DECL_POSTPROCESSPARTIALDEC((*postprocessPartialdecDetector))  ,
DEC_DECL_SETPARAMAGGRESSIVE((*setParamAggressiveDetector))  ,
DEC_DECL_SETPARAMDEFAULT((*setParamDefaultDetector))  ,
DEC_DECL_SETPARAMFAST((*setParamFastDetector))   
)

includes one detector

Returns
scip return code
Parameters
scipscip data structure
namename of the detector
deccharchar that is used in detector chain history for this detector
descriptiondescribing main idea of this detector
freqCallRoundfrequency the detector gets called in detection loop, i.e. it is called in round r if and only if minCallRound <= r <= maxCallRound AND (r - minCallRound) mod freqCallRound == 0
maxCallRoundlast detection round the detector gets called
minCallRoundfirst round the detector gets called (offset in detection loop)
freqCallRoundOriginalfrequency the detector gets called in detection loop while detecting of the original problem
maxCallRoundOriginallast round the detector gets called while detecting of the original problem
minCallRoundOriginalfirst round the detector gets called (offset in detection loop) while detecting of the original problem
prioritypriority of the detector
enabledwhether the detector should be enabled by default
enabledFinishingwhether the finishing should be enabled
enabledPostprocessingwhether the postprocessing should be enabled
skipwhether the detector should be skipped if others found structure
usefulRecallis it useful to call this detector on a descendant of the propagated partialdec
detectordatathe associated detector data (or NULL)

◆ DECincludeVarClassifier()

SCIP_RETCODE DECincludeVarClassifier ( SCIP *  scip,
const char *  name,
const char *  description,
int  priority,
SCIP_Bool  enabled,
DEC_CLASSIFIERDATA classifierdata,
DEC_DECL_FREEVARCLASSIFIER((*freeClassifier))  ,
DEC_DECL_VARCLASSIFY((*classify))   
)

includes one variable classifier

Returns
scip return code
Parameters
scipscip data structure
namename of the classifier
descriptiondescription of the classifier
prioritypriority how early classifier is invoked
enabledwhether the classifier should be enabled by default
classifierdataclassifierdata the associated classifier data (or NULL)

◆ DECprintListOfDetectors()

void DECprintListOfDetectors ( SCIP *  scip)

writes out a list of all detectors

Parameters
scipSCIP data structure

Definition at line 3271 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ DECwriteAllDecomps()

SCIP_RETCODE DECwriteAllDecomps ( SCIP *  scip,
char *  directory,
char *  extension,
SCIP_Bool  original,
SCIP_Bool  presolved 
)

write out all known decompositions

Returns
SCIP return code
Parameters
scipSCIP data structure
directorydirectory for decompositions
extensionthe file extension for the export
originalshould decomps for original problem be written
presolvedshould decomps for preoslved problem be written

Definition at line 3297 of file cons_decomp.cpp.

References GCGgetVisualizationFilename(), getConshdlrdata(), getFinishedPartialdecs(), and gcg::PARTIALDECOMP::isAssignedToOrigProb().

Referenced by writeAllDecompositions().

◆ DECwriteSelectedDecomps()

SCIP_RETCODE DECwriteSelectedDecomps ( SCIP *  scip,
char *  directory,
char *  extension 
)

writes all selected decompositions

Returns
scip return code
Parameters
scipSCIP data structure
directorydirectory for decompositions
extensionextension for decompositions

Definition at line 3367 of file cons_decomp.cpp.

References GCGgetVisualizationFilename(), getConshdlrdata(), and getSelectedPartialdecs().

Referenced by writeSelectedDecompositions().

◆ GCGconshdlrDecompAddCandidatesNBlocks()

void GCGconshdlrDecompAddCandidatesNBlocks ( SCIP *  scip,
SCIP_Bool  origprob,
int  candidate 
)

adds a candidate for block number and counts how often a candidate is added

Parameters
scipSCIP data structure
origprobwhich DETPROBDATA that should be modified
candidateproposed amount of blocks

Definition at line 3435 of file cons_decomp.cpp.

References gcg::DETPROBDATA::candidatesNBlocks, and getConshdlrdata().

Referenced by GCGconshdlrDecompCalcCandidatesNBlocks(), and reorderPermutations().

◆ GCGconshdlrDecompAddDecomp()

SCIP_RETCODE GCGconshdlrDecompAddDecomp ( SCIP *  scip,
DEC_DECOMP decomp,
SCIP_Bool  select 
)

adds the given decomposition structure

Returns
scip return code
Parameters
scipSCIP data structure
decompDEC_DECOMP data structure
selectselect the decomposition as candidate

Definition at line 3468 of file cons_decomp.cpp.

References addPartialdec(), createPartialdecFromDecomp(), DecDecomp::presolved, and gcg::PARTIALDECOMP::setSelected().

◆ GCGconshdlrDecompAddBasicPartialdec()

int GCGconshdlrDecompAddBasicPartialdec ( SCIP *  scip,
SCIP_Bool  presolved 
)

creates and adds a basic partialdecomp (all cons/vars are assigned to master)

Returns
id of partialdec
Parameters
scipSCIP data structure
presolvedcreate basic partialdecomp for presolved if true, otherwise for original

Definition at line 3421 of file cons_decomp.cpp.

References addPartialdec(), gcg::PARTIALDECOMP::assignOpenConssToMaster(), gcg::PARTIALDECOMP::getID(), gcg::PARTIALDECOMP::prepare(), and gcg::PARTIALDECOMP::setNBlocks().

Referenced by initRelaxator().

◆ GCGconshdlrDecompAddMatrixPartialdec()

int GCGconshdlrDecompAddMatrixPartialdec ( SCIP *  scip,
SCIP_Bool  presolved 
)

creates a pure matrix partialdecomp (i.e. all cons/vars to one single block)

matrix is added to list of all partialdecs

Returns
id of matrix partialdec
Parameters
scipSCIP data structure
presolvedcreate matrix for presolved if true, otherwise for original

Definition at line 3490 of file cons_decomp.cpp.

References gcg::DETPROBDATA::addPartialdecToFinishedUnchecked(), gcg::PARTIALDECOMP::fixConsToBlock(), gcg::PARTIALDECOMP::fixVarToBlock(), GCGconshdlrDecompOrigDetprobdataExists(), GCGconshdlrDecompPresolvedDetprobdataExists(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), gcg::DETPROBDATA::getNConss(), gcg::DETPROBDATA::getNVars(), resetDetprobdata(), gcg::PARTIALDECOMP::setNBlocks(), and gcg::PARTIALDECOMP::sort().

Referenced by DECgetPartialdecToWrite(), and GCGWriteGpDecompMatrix().

◆ GCGconshdlrDecompAddPreexistingDecomp()

SCIP_RETCODE GCGconshdlrDecompAddPreexistingDecomp ( SCIP *  scip,
DEC_DECOMP decomp 
)

adds a decomp that exists before the detection is called

Note
this method should only be called if there is no partialdec for this decomposition
Returns
scip return code
Parameters
scipSCIP data structure
decompdecomposition data structure

Definition at line 3534 of file cons_decomp.cpp.

References createPartialdecFromDecomp(), GCGconshdlrDecompAddPreexisitingPartialDec(), and DecDecomp::presolved.

Referenced by SCIPreadRef().

◆ GCGconshdlrDecompAddScoreTime()

◆ GCGconshdlrDecompAddUserCandidatesNBlocks()

void GCGconshdlrDecompAddUserCandidatesNBlocks ( SCIP *  scip,
int  candidate 
)

adds a candidate for block size given by the user

Parameters
scipSCIP data structure
candidatecandidate for block size

Definition at line 3652 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid()

SCIP_RETCODE GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid ( SCIP *  scip,
int  partialdecid,
int  probnr1,
int  probnr2,
SCIP_Bool *  identical 
)

checks if two pricing problems are identical based on information from detection

Returns
scip return code
Parameters
scipscip scip data structure
partialdecidpartialdecid id of the partial decompostion for which the pricing problems are checked for identity
probnr1index of first block to check
probnr2index of second block to check
identicalbool pointer to score the result of the check

Definition at line 3673 of file cons_decomp.cpp.

References gcg::PARTIALDECOMP::aggInfoCalculated(), gcg::PARTIALDECOMP::calcAggregationInformation(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getRepForBlock(), and gcg::PARTIALDECOMP::isComplete().

Referenced by pricingprobsAreIdenticalFromDetectionInfo().

◆ GCGconshdlrDecompCalcBendersScore()

SCIP_RETCODE GCGconshdlrDecompCalcBendersScore ( SCIP *  scip,
int  partialdecid,
SCIP_Real *  score 
)

calculates the benders score of a partialdec

in detail: bendersscore = max ( 0., 1 - ( 1 - blockareascore + (1 - borderareascore - bendersareascore ) ) ) with blockareascore = blockarea / totalarea borderareascore = borderarea / totalarea bendersareascore = bendersarea /totalarea with bendersarea = A + B - PENALTY with A = nmasterconshittingonlyblockvars * nblockvarshittngNOmasterconss B = nlinkingvarshittingonlyblockconss * nblockconsshittingonlyblockvars PENALTY = \(\sum_{b=1}^(\text{nblocks}) \sum_{\text{blockvars }bv\text{ of block }b\text{ hitting a master constraint}} \sum_{\text{all blocks }b2 != b} \text{nblockcons}(b2)\)

Note
experimental feature
Returns
scip return code
Parameters
scipSCIP data structure
partialdecidid of partialdec the score is calculated for
scorescore pointer to store the calculated score

Definition at line 3705 of file cons_decomp.cpp.

References calcBlockAreaScore(), GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getBorderAreaScore(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::DETPROBDATA::getConssForVar(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::PARTIALDECOMP::getLinkingvars(), gcg::PARTIALDECOMP::getMasterconss(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::DETPROBDATA::getNConssForVar(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNVars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::DETPROBDATA::getNVarsForCons(), gcg::PARTIALDECOMP::getVarsForBlock(), gcg::DETPROBDATA::getVarsForCons(), gcg::PARTIALDECOMP::isConsMastercons(), gcg::PARTIALDECOMP::isConsOpencons(), gcg::PARTIALDECOMP::isVarLinkingvar(), gcg::PARTIALDECOMP::isVarMastervar(), gcg::PARTIALDECOMP::isVarOpenvar(), and gcg::PARTIALDECOMP::setBendersScore().

Referenced by gcg::PARTIALDECOMP::getScore().

◆ GCGconshdlrDecompCalcBorderAreaScore()

SCIP_RETCODE GCGconshdlrDecompCalcBorderAreaScore ( SCIP *  scip,
int  partialdecid,
SCIP_Real *  score 
)

calculates the border area score of a partialdec

1 - fraction of border area to complete area

Returns
scip return code
Parameters
scipSCIP data structure
partialdecidid of partialdec the score is calculated for
scorescore pointer to store the calculated score

Definition at line 3849 of file cons_decomp.cpp.

References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVars(), and gcg::PARTIALDECOMP::setBorderAreaScore().

Referenced by GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcMaxWhiteScore(), and gcg::PARTIALDECOMP::getScore().

◆ GCGconshdlrDecompCalcCandidatesNBlocks()

void GCGconshdlrDecompCalcCandidatesNBlocks ( SCIP *  scip,
SCIP_Bool  transformed 
)

calculates and adds block size candidates using constraint classifications and variable classifications

Parameters
scipSCIP data structure
transformedwhether to find the candidates for the transformed problem, otherwise the original

Definition at line 3882 of file cons_decomp.cpp.

References gcg::DETPROBDATA::conspartitioncollection, gcd(), GCGconshdlrDecompAddCandidatesNBlocks(), getConshdlrdata(), gcg::DETPROBDATA::getNConss(), gcg::DETPROBDATA::getNVars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::DETPROBDATA::isAssignedToOrigProb(), gcg::DETPROBDATA::nblockscandidatescalctime, partition(), and gcg::DETPROBDATA::varpartitioncollection.

Referenced by DECdetectStructure(), and GCGwriteCls().

◆ GCGconshdlrDecompCalcClassicScore()

◆ GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore()

SCIP_RETCODE GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore ( SCIP *  scip,
int  partialdecid,
SCIP_Real *  score 
)

calculates the maxforeseeingwhiteagg score of a partialdec

maximum foreseeing white area score with respect to aggregatable blocks (i.e. maximize fraction of white area score considering problem with copied linking variables and corresponding master constraints; white area is nonblock and nonborder area, stairlinking variables count as linking)

Returns
scip return code
Parameters
scipSCIP data structure
partialdecidid of partialdec the score is calculated for
scorescore pointer to store the calculated score

Definition at line 4180 of file cons_decomp.cpp.

References gcg::PARTIALDECOMP::calcAggregationInformation(), GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getBlocksForRep(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::PARTIALDECOMP::getLinkingvars(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNReps(), gcg::PARTIALDECOMP::getNStairlinkingvars(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::DETPROBDATA::getVal(), and gcg::PARTIALDECOMP::setMaxForWhiteAggScore().

Referenced by GCGconshdlrDecompCalcSetPartForWhiteAggScore(), and gcg::PARTIALDECOMP::getScore().

◆ GCGconshdlrDecompCalcMaxForseeingWhiteScore()

SCIP_RETCODE GCGconshdlrDecompCalcMaxForseeingWhiteScore ( SCIP *  scip,
int  partialdecid,
SCIP_Real *  score 
)

calculates the maximum foreseeing white area score of a partialdec

maximum foreseeing white area score (i.e. maximize fraction of white area score considering problem with copied linking variables and corresponding master constraints; white area is nonblock and nonborder area, stairlinking variables count as linking)

Returns
scip return code
Parameters
scipSCIP data structure
partialdecidid of partialdec the score is calculated for
scorescore pointer to store the calculated score

Definition at line 4280 of file cons_decomp.cpp.

References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::DETPROBDATA::getConssForVar(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::PARTIALDECOMP::getLinkingvars(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::DETPROBDATA::getNConssForVar(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNStairlinkingvars(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVars(), and gcg::PARTIALDECOMP::getNVarsForBlock().

Referenced by GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), and gcg::PARTIALDECOMP::getScore().

◆ GCGconshdlrDecompCalcMaxWhiteScore()

SCIP_RETCODE GCGconshdlrDecompCalcMaxWhiteScore ( SCIP *  scip,
int  partialdecid,
SCIP_Real *  score 
)

calculates the maximum white area score of a partialdec

score corresponding to the max white measure according to aggregated blocks

Returns
scip return code
Parameters
scipSCIP data structure
partialdecidid of partialdec the score is calculated for
scorescore pointer to store the calculated score

Definition at line 4397 of file cons_decomp.cpp.

References calcBlockAreaScore(), GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getBorderAreaScore(), and gcg::PARTIALDECOMP::setMaxWhiteScore().

Referenced by gcg::PARTIALDECOMP::getScore().

◆ GCGconshdlrDecompCalcSetPartForseeingWhiteScore()

SCIP_RETCODE GCGconshdlrDecompCalcSetPartForseeingWhiteScore ( SCIP *  scip,
int  partialdecid,
SCIP_Real *  score 
)

calculates the setpartitioning maximum foreseeing white area score of a partialdec

setpartitioning maximum foreseeing white area score (i.e. convex combination of maximum foreseeing white area score and a boolean score rewarding a master containing only setppc and cardinality constraints)

Returns
scip return code
Parameters
scipSCIP data structure
partialdecidid of partialdec the score is calculated for
scorescore pointer to store the calculated score

Definition at line 4437 of file cons_decomp.cpp.

References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getMaxForWhiteScore(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::hasSetppccardMaster(), gcg::PARTIALDECOMP::isTrivial(), and gcg::PARTIALDECOMP::setSetPartForWhiteScore().

Referenced by gcg::PARTIALDECOMP::getScore().

◆ GCGconshdlrDecompCalcSetPartForWhiteAggScore()

SCIP_RETCODE GCGconshdlrDecompCalcSetPartForWhiteAggScore ( SCIP *  scip,
int  partialdecid,
SCIP_Real *  score 
)

calculates the setpartfwhiteagg score of a partialdec

setpartitioning maximum foreseeing white area score with respect to aggregateable (i.e. convex combination of maximum foreseeing white area score and a boolean score rewarding a master containing only setppc and cardinality constraints)

Returns
scip return code
Parameters
scipSCIP data structure
partialdecidid of partialdec the score is calculated for
scorescore pointer to store the calculated score

Definition at line 4480 of file cons_decomp.cpp.

References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getMaxForWhiteAggScore(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::hasSetppccardMaster(), gcg::PARTIALDECOMP::isTrivial(), and gcg::PARTIALDECOMP::setSetPartForWhiteAggScore().

Referenced by gcg::PARTIALDECOMP::getScore().

◆ GCGconshdlrDecompCalcStrongDecompositionScore()

◆ GCGconshdlrDecompCheckConsistency()

SCIP_Bool GCGconshdlrDecompCheckConsistency ( SCIP *  scip)

check whether partialdecs are consistent

Checks whether 1) the predecessors of all finished partialdecs in both detprobdatas can be found 2) selected list is synchron with selected information in partialdecs 3) selected exists is synchronized with selected list

Returns
true if partialdec information is consistent
Parameters
scipSCIP data structure *

Definition at line 4766 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getAncestorID(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), and gcg::PARTIALDECOMP::getNAncestors().

Referenced by GCGconshdlrDecompChooseCandidatesFromSelected(), GCGprintDecompInformation(), and GCGsolve().

◆ GCGconshdlrDecompClassify()

SCIP_RETCODE GCGconshdlrDecompClassify ( SCIP *  scip,
SCIP_Bool  transformed 
)

run classification of vars and cons

Returns
scip return code
Parameters
scipSCIP data structure
transformedwhether to classify the transformed problem, otherwise the original

Definition at line 4898 of file cons_decomp.cpp.

References gcg::DETPROBDATA::classificationtime, getConshdlrdata(), DEC_ConsClassifier::name, DEC_VarClassifier::name, reduceConsclasses(), and reduceVarclasses().

Referenced by DECdetectStructure(), and GCGwriteCls().

◆ GCGconshdlrDecompCreateVarmapForPartialdecId()

SCIP_RETCODE GCGconshdlrDecompCreateVarmapForPartialdecId ( SCIP *  scip,
SCIP_HASHMAP **  hashorig2pricingvar,
int  partialdecid,
int  probnr1,
int  probnr2,
SCIP *  scip1,
SCIP *  scip2,
SCIP_HASHMAP *  varmap 
)

for two identical pricing problems a corresponding varmap is created

Parameters
scipscip data structure
hashorig2pricingvarmapping from orig to pricingvar
partialdecidid of the partial decompostion for which the pricing problems are checked for identity
probnr1index of first block
probnr2index of second block
scip1subscip of first block
scip2subscip of second block
varmapmapping from orig to pricingvar
Returns
scip return code

Definition at line 4960 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), GCGpricingVarGetOriginalVar(), gcg::PARTIALDECOMP::getBlocksForRep(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::DETPROBDATA::getIndexForVar(), gcg::PARTIALDECOMP::getRepForBlock(), gcg::PARTIALDECOMP::getRepVarmap(), gcg::DETPROBDATA::getVar(), gcg::PARTIALDECOMP::getVarProbindexForBlock(), gcg::PARTIALDECOMP::getVarsForBlock(), and gcg::PARTIALDECOMP::isComplete().

Referenced by pricingprobsAreIdenticalFromDetectionInfo().

◆ GCGconshdlrDecompDecreaseNCallsCreateDecomp()

int GCGconshdlrDecompDecreaseNCallsCreateDecomp ( SCIP *  scip)

decreases the counter for created decompositions and returns it

Returns
number of created decompositions that was recently decreased
Parameters
scipSCIP data structure *

Definition at line 5063 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by DECdecompFree().

◆ GCGconshdlrDecompDeregisterPartialdecs()

void GCGconshdlrDecompDeregisterPartialdecs ( SCIP *  scip,
SCIP_Bool  original 
)

deregisters partialdecs in the conshdlr

Use this function for deletion of ALL the partialdecs.

Parameters
scipSCIP data structure
originaliff TRUE the status with respect to the original problem is returned

Definition at line 5076 of file cons_decomp.cpp.

References getConshdlrdata(), and gcg::PARTIALDECOMP::isAssignedToOrigProb().

Referenced by gcg::DETPROBDATA::~DETPROBDATA().

◆ GCGconshdlrDecompFreeDetprobdata()

void GCGconshdlrDecompFreeDetprobdata ( SCIP *  scip)

Frees Detprobdata of the original and transformed/presolved problem.

Note
Does not free Detprobdata of the original problem if GCGconshdlrDecompFreeOrigOnExit is set to false.
Parameters
scipSCIP data structure

Definition at line 5131 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by SCIP_DECL_CONSEXIT().

◆ GCGconshdlrDecompFreeOrigOnExit()

void GCGconshdlrDecompFreeOrigOnExit ( SCIP *  scip,
SCIP_Bool  free 
)

sets freeing of detection data of original problem during exit to true

used before calling SCIPfreeTransform(), set to true to revoke presolving (e.g. if unpresolved decomposition is used, and transformation is not successful)

Parameters
scipSCIP data structure
freewhether to free orig data

Definition at line 5152 of file cons_decomp.cpp.

References getConshdlrdata().

◆ GCGconshdlrDecompGetBlockNumberCandidate()

int GCGconshdlrDecompGetBlockNumberCandidate ( SCIP *  scip,
int  index 
)

returns block number user candidate with given index

Parameters
scipSCIP data structure
indexindex of block number user candidate that should be returned
Returns
block number user candidate with given index

Definition at line 5164 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by gcg::DETPROBDATA::getSortedCandidatesNBlocks().

◆ GCGconshdlrDecompGetCompleteDetectionTime()

SCIP_Real GCGconshdlrDecompGetCompleteDetectionTime ( SCIP *  scip)

returns the total detection time

Parameters
scipSCIP data structure
Returns
total detection time

Definition at line 5177 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by DECdetectStructure(), and GCGprintCompleteDetectionTime().

◆ GCGconshdlrDecompGetDecomps()

DEC_DECOMP** GCGconshdlrDecompGetDecomps ( SCIP *  scip)

returns an array containing all decompositions

Updates the decomp decomposition structure by converting all finished partialdecs into decompositions and replacing the old list in the conshdlr.

Returns
decomposition array
Parameters
scipSCIP data structure

Definition at line 5192 of file cons_decomp.cpp.

References createDecompFromPartialdec(), DECdecompFree(), GCGconshdlrDecompGetNDecomps(), getConshdlrdata(), and sortPartialdecs().

◆ GCGconshdlrDecompGetDetectors()

DEC_DETECTOR** GCGconshdlrDecompGetDetectors ( SCIP *  scip)

Gets an array of all detectors.

Returns
array of detectors
Parameters
scipSCIP data structure

Definition at line 5238 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by gcg::GCGdialogShowLegend().

◆ GCGconshdlrDecompGetFinishedPartialdecsList()

SCIP_RETCODE GCGconshdlrDecompGetFinishedPartialdecsList ( SCIP *  scip,
int **  idlist,
int *  listlength 
)

Gets a list of ids of the current partialdecs that are finished.

Note
recommendation: when in doubt plan for as many ids as partialdecs
See also
GCGconshdlrDecompGetNPartialdecs
Returns
scip return code
Parameters
scipSCIP data structure
idlistid list to output to
listlengthlength of output list

Definition at line 5277 of file cons_decomp.cpp.

References getFinishedPartialdecs(), and partialdecVecToIdArray().

Referenced by reportAllDecompositions().

◆ GCGconshdlrDecompGetPartialdecsList()

SCIP_RETCODE GCGconshdlrDecompGetPartialdecsList ( SCIP *  scip,
int **  idlist,
int *  listlength 
)

Gets a list of ids of the current partialdecs.

Note
recommendation: when in doubt plan for as many ids as partialdecs
See also
GCGconshdlrDecompGetNPartialdecs
Returns
scip return code
Parameters
scipSCIP data structure
idlistid list to output to
listlengthlength of output list

Definition at line 5291 of file cons_decomp.cpp.

References getConshdlrdata(), and partialdecVecToIdArray().

◆ GCGconshdlrDecompGetNBlockNumberCandidates()

int GCGconshdlrDecompGetNBlockNumberCandidates ( SCIP *  scip)

returns the number of block candidates given by the user

Returns
number of block candidates given by the user
Parameters
scipSCIP data structure

Definition at line 5305 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by gcg::DETPROBDATA::getSortedCandidatesNBlocks().

◆ GCGconshdlrDecompGetNBlocksByPartialdecId()

int GCGconshdlrDecompGetNBlocksByPartialdecId ( SCIP *  scip,
int  id 
)

gets block number of partialdec with given id

Returns
block number of partialdec
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5316 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNBlocks().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompGetNDecomps()

int GCGconshdlrDecompGetNDecomps ( SCIP *  scip)

gets the number of decompositions (= amount of finished partialdecs)

Returns
number of decompositions
Parameters
scipSCIP data structure

Definition at line 5327 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by DECgetNDecomps(), GCGconshdlrDecompGetDecomps(), reportAllDecompositions(), writeAllDecompositions(), writeSelectedDecompositions(), and writeTexTitlepage().

◆ GCGconshdlrDecompGetNDetectors()

int GCGconshdlrDecompGetNDetectors ( SCIP *  scip)

Gets the number of all detectors.

Returns
number of detectors
Parameters
scipSCIP data structure

Definition at line 5348 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by gcg::GCGdialogShowLegend().

◆ GCGconshdlrDecompGetNextPartialdecID()

int GCGconshdlrDecompGetNextPartialdecID ( SCIP *  scip)

Gets the next partialdec id managed by cons_decomp.

Returns
the next partialdec id managed by cons_decomp
Parameters
scipSCIP data structure *

Definition at line 5359 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and getConshdlrdata().

Referenced by gcg::PARTIALDECOMP::PARTIALDECOMP().

◆ GCGconshdlrDecompGetNFormerDetectionConssForID()

int GCGconshdlrDecompGetNFormerDetectionConssForID ( SCIP *  scip,
int  id 
)

gets number of active constraints during the detection of the decomp with given id

Gets the number of constraints that were active while detecting the decomposition originating from the partialdec with the given id, this method is used to decide if the problem has changed since detection, if so the aggregation information needs to be recalculated

Note
if the partialdec is not complete the function returns -1
Returns
number of constraints that were active while detecting the decomposition
Parameters
scipSCIP data structure
idid of the partialdec the information is asked for

Definition at line 5374 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by checkIdenticalBlocks().

◆ GCGconshdlrDecompGetNLinkingVarsByPartialdecId()

int GCGconshdlrDecompGetNLinkingVarsByPartialdecId ( SCIP *  scip,
int  id 
)

gets number of linking variables of partialdec with given id

Returns
number of linking variables of partialdec
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5394 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNLinkingvars().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompGetNMasterConssByPartialdecId()

int GCGconshdlrDecompGetNMasterConssByPartialdecId ( SCIP *  scip,
int  id 
)

gets number of master constraints of partialdec with given id

Returns
number of master constraints of partialdec
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5405 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNMasterconss().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompGetNMasterVarsByPartialdecId()

int GCGconshdlrDecompGetNMasterVarsByPartialdecId ( SCIP *  scip,
int  id 
)

gets number of master variables of partialdec with given id

Returns
number of master variables of partialdec
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5416 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNMastervars().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompGetNOpenConssByPartialdecId()

int GCGconshdlrDecompGetNOpenConssByPartialdecId ( SCIP *  scip,
int  id 
)

gets number of open constraints of partialdec with given id

Returns
total number of open constraints of partialdec
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5427 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNOpenconss().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompGetNOpenVarsByPartialdecId()

int GCGconshdlrDecompGetNOpenVarsByPartialdecId ( SCIP *  scip,
int  id 
)

gets number of open variables of partialdec with given id

Returns
total number of open variables of partialdec
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5438 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNOpenvars().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompGetNFinishedPartialdecsOrig()

unsigned int GCGconshdlrDecompGetNFinishedPartialdecsOrig ( SCIP *  scip)

Gets the number of finished partialdecs available for the original problem.

Returns
number of partialdecs
Parameters
scipSCIP data structure

Definition at line 5449 of file cons_decomp.cpp.

References getConshdlrdata().

◆ GCGconshdlrDecompGetNFinishedPartialdecsTransformed()

unsigned int GCGconshdlrDecompGetNFinishedPartialdecsTransformed ( SCIP *  scip)

Gets the number of finished partialdecs available for the transformed problem.

Returns
number of partialdecs
Parameters
scipSCIP data structure

Definition at line 5463 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by GCGsolve().

◆ GCGconshdlrDecompGetNOpenPartialdecsOrig()

unsigned int GCGconshdlrDecompGetNOpenPartialdecsOrig ( SCIP *  scip)

Gets the number of open partialdecs available for the original problem.

Returns
number of partialdecs
Parameters
scipSCIP data structure

Definition at line 5477 of file cons_decomp.cpp.

References getConshdlrdata().

◆ GCGconshdlrDecompGetNOpenPartialdecsTransformed()

unsigned int GCGconshdlrDecompGetNOpenPartialdecsTransformed ( SCIP *  scip)

Gets the number of open partialdecs available for the transformed problem.

Returns
number of partialdecs
Parameters
scipSCIP data structure

Definition at line 5491 of file cons_decomp.cpp.

References getConshdlrdata().

◆ GCGconshdlrDecompGetNPartialdecs()

unsigned int GCGconshdlrDecompGetNPartialdecs ( SCIP *  scip)

Gets the number of all partialdecs.

Returns
number of Partialdecs
Parameters
scipSCIP data structure

Definition at line 5505 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by gcg::GCGdialogSetNEntires(), gcg::updateIdList(), and writeTexTitlepage().

◆ GCGconshdlrDecompGetNPartialdecsOrig()

unsigned int GCGconshdlrDecompGetNPartialdecsOrig ( SCIP *  scip)

Gets the number of partialdecs available for the original problem.

Returns
number of partialdecs
Parameters
scipSCIP data structure

Definition at line 5516 of file cons_decomp.cpp.

References getConshdlrdata().

◆ GCGconshdlrDecompGetNPartialdecsTransformed()

unsigned int GCGconshdlrDecompGetNPartialdecsTransformed ( SCIP *  scip)

Gets the number of partialdecs available for the transformed problem.

Returns
number of partialdecs
Parameters
scipSCIP data structure

Definition at line 5530 of file cons_decomp.cpp.

References getConshdlrdata().

◆ GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId()

int GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId ( SCIP *  scip,
int  id 
)

gets number of stairlinking variables of partialdec with given id

Returns
total number of stairlinking variables of partialdec
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5544 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNTotalStairlinkingvars().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompGetPartialdecFromID()

SCIP_RETCODE GCGconshdlrDecompGetPartialdecFromID ( SCIP *  scip,
int  partialdecid,
PARTIALDECOMP_WRAPPER pwr 
)

Gets wrapped PARTIALDECOMP with given id.

Returns
SCIP return code
Parameters
scipSCIP data structure
partialdecidid of PARTIALDECOMP
pwrwrapper for output PARTIALDECOMP

Definition at line 5566 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and Partialdecomp_Wrapper::partialdec.

◆ GCGconshdlrDecompGetScoreByPartialdecId()

float GCGconshdlrDecompGetScoreByPartialdecId ( SCIP *  scip,
int  id 
)

gets score of partialdec with given id

Returns
score in respect to current score type
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5581 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), GCGconshdlrDecompGetScoretype(), and gcg::PARTIALDECOMP::getScore().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompGetScoreTotalTime()

SCIP_Real GCGconshdlrDecompGetScoreTotalTime ( SCIP *  scip)

gets total score computation time

Returns
total score computation time
Parameters
scipSCIP data structure

Definition at line 5592 of file cons_decomp.cpp.

References getConshdlrdata().

◆ GCGconshdlrDecompGetScoretype()

SCORETYPE GCGconshdlrDecompGetScoretype ( SCIP *  scip)

◆ GCGconshdlrDecompGetSelectedPartialdecs()

SCIP_RETCODE GCGconshdlrDecompGetSelectedPartialdecs ( SCIP *  scip,
int **  idlist,
int *  listlength 
)

Gets a list of ids of all currently selected partialdecs.

Returns
list of partialdecs
Parameters
scipSCIP data structure
idlistid list to output to
listlengthlength of output list

Definition at line 5612 of file cons_decomp.cpp.

References getSelectedPartialdecs().

◆ GCGconshdlrDecompIncreaseNCallsCreateDecomp()

int GCGconshdlrDecompIncreaseNCallsCreateDecomp ( SCIP *  scip)

counts up the counter for created decompositions and returns it

Returns
number of created decompositions that was recently increased
Parameters
scipSCIP data structure *

Definition at line 5634 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by DECdecompCreate().

◆ GCGconshdlrDecompIsPresolvedByPartialdecId()

SCIP_Bool GCGconshdlrDecompIsPresolvedByPartialdecId ( SCIP *  scip,
int  id 
)

gets whether partialdec with given id is presolved

Returns
true iff partialdec is presolved
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5647 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::isAssignedToOrigProb().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompIsSelectedByPartialdecId()

SCIP_Bool GCGconshdlrDecompIsSelectedByPartialdecId ( SCIP *  scip,
int  id 
)

gets whether partialdec with given id is selected

Returns
true iff partialdec is selected
Parameters
scipSCIP data structure
idid of partialdec

Definition at line 5658 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::isSelected().

Referenced by GCGdialogExecExplore().

◆ GCGconshdlrDecompOrigDetprobdataExists()

SCIP_Bool GCGconshdlrDecompOrigDetprobdataExists ( SCIP *  scip)

returns whether or not a detprobdata structure for the original problem exists

Returns
true iff an original detprobdata exists
Parameters
scipSCIP data structure

Definition at line 5669 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by GCGconshdlrDecompAddMatrixPartialdec(), and GCGconshdlrDecompGetDetprobdataOrig().

◆ GCGconshdlrDecompOrigPartialdecExists()

SCIP_Bool GCGconshdlrDecompOrigPartialdecExists ( SCIP *  scip)

returns whether or not an original decompositions exists in the data structures

Returns
true iff an origial decomposition exist
Parameters
scipSCIP data structure

Definition at line 5683 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by GCGsolve().

◆ GCGconshdlrDecompPresolvedDetprobdataExists()

SCIP_Bool GCGconshdlrDecompPresolvedDetprobdataExists ( SCIP *  scip)

returns whether or not a detprobdata structure for the presolved problem exists

Returns
true iff a presolved detprobdata exists
Parameters
scipSCIP data structure

Definition at line 5697 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by GCGconshdlrDecompAddMatrixPartialdec(), and GCGconshdlrDecompGetDetprobdataPresolved().

◆ GCGconshdlrDecompPrintDetectorStatistics()

SCIP_RETCODE GCGconshdlrDecompPrintDetectorStatistics ( SCIP *  scip,
FILE *  file 
)

display statistics about detectors

Returns
SCIP return code
Parameters
scipSCIP data structure
fileoutput file or NULL for standard output

Definition at line 5711 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by GCGprintStatistics().

◆ GCGconshdlrDecompSelectPartialdec()

SCIP_RETCODE GCGconshdlrDecompSelectPartialdec ( SCIP *  scip,
int  partialdecid,
SCIP_Bool  select 
)

selects/unselects a partialdecomp

Returns
SCIP return code
Parameters
scipSCIP data structure
partialdecidid of partialdecomp
selectselect/unselect

Definition at line 5749 of file cons_decomp.cpp.

References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::setSelected().

Referenced by initRelaxator().

◆ GCGconshdlrDecompSetDetection()

SCIP_RETCODE GCGconshdlrDecompSetDetection ( SCIP *  scip,
SCIP_PARAMSETTING  paramsetting,
SCIP_Bool  quiet 
)

sets detector parameters values

sets detector parameters values to

  • SCIP_PARAMSETTING_DEFAULT which are the default values of all detector parameters
  • SCIP_PARAMSETTING_FAST such that the time spend for detection is decreased
  • SCIP_PARAMSETTING_AGGRESSIVE such that the detectors produce more decompositions
  • SCIP_PARAMSETTING_OFF which turns off all detection
Returns
SCIP return code
Parameters
scipSCIP data structure
paramsettingparameter settings
quietshould the parameter be set quiet (no output)

Definition at line 5764 of file cons_decomp.cpp.

References getConshdlrdata(), setDetectionAggressive(), setDetectionDefault(), setDetectionFast(), and setDetectionOff().

Referenced by SCIP_DECL_DIALOGEXEC().

◆ GCGconshdlrDecompSetScoretype()

void GCGconshdlrDecompSetScoretype ( SCIP *  scip,
SCORETYPE  sctype 
)

Sets the currently used scoretype.

Parameters
scipSCIP data structure
sctypenew scoretype

Definition at line 5796 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by gcg::GCGdialogChangeScore().

◆ GCGconshdlrDecompTranslateNBestOrigPartialdecs()

SCIP_RETCODE GCGconshdlrDecompTranslateNBestOrigPartialdecs ( SCIP *  scip,
int  n,
SCIP_Bool  completeGreedily 
)

translates n best unpresolved partialdec to a complete presolved one

Parameters
scipSCIP data structure
nnumber of partialdecs that should be translated
completeGreedilywhether or not to complete the decomposition greedily
Returns
SCIP return code

Definition at line 5808 of file cons_decomp.cpp.

References addPartialdec(), gcg::PARTIALDECOMP::completeGreedily(), GCGconshdlrDecompChooseCandidatesFromSelected(), getConshdlrdata(), gcg::PARTIALDECOMP::isComplete(), and resetDetprobdata().

◆ GCGconshdlrDecompTranslateOrigPartialdecs()

SCIP_RETCODE GCGconshdlrDecompTranslateOrigPartialdecs ( SCIP *  scip)

translates unpresolved partialdec to a complete presolved one

Parameters
scipSCIP data structure
Returns
SCIP return code

Definition at line 5858 of file cons_decomp.cpp.

References addPartialdec(), getConshdlrdata(), and resetDetprobdata().

Referenced by GCGpresolve().

◆ GCGdetectionTookPlace()

SCIP_Bool GCGdetectionTookPlace ( SCIP *  scip,
SCIP_Bool  original 
)

Gets whether the detection already took place

Returns
true if detection took place, false otherwise
Parameters
scipSCIP data structure
originaliff TRUE the status with respect to the original problem is returned

Definition at line 5897 of file cons_decomp.cpp.

References getConshdlrdata().

Referenced by GCGdetect(), GCGprintCompleteDetectionStatistics(), and GCGsolve().

◆ SCIPconshdlrDecompRepairConsNames()

SCIP_RETCODE SCIPconshdlrDecompRepairConsNames ( SCIP *  scip)

method to eliminate duplicate constraint names and name unnamed constraints

Returns
SCIP return code
Parameters
scipSCIP data structure

Definition at line 5909 of file cons_decomp.cpp.

References findGenericConsname(), and getConshdlrdata().

Referenced by GCGtransformProb().

◆ SCIPincludeConshdlrDecomp()