Detailed Description
C++ interface of cons_decomp.
Definition in file cons_decomp.hpp.
#include "class_partialdecomp.h"
Go to the source code of this file.
Functions | |
std::vector< gcg::PARTIALDECOMP * > * | GCGconshdlrDecompGetPartialdecs (SCIP *scip) |
gets vector of all partialdecs More... | |
gcg::PARTIALDECOMP * | DECgetPartialdecToWrite (SCIP *scip, SCIP_Bool transformed) |
gcg::PARTIALDECOMP * | GCGconshdlrDecompGetPartialdecFromID (SCIP *scip, int partialdecid) |
local method to find a partialdec for a given id or NULL if no partialdec with such id is found More... | |
SCIP_RETCODE | GCGconshdlrDecompAddPreexisitingPartialDec (SCIP *scip, gcg::PARTIALDECOMP *partialdec) |
adds a preexisting partial dec to be considered at the beginning of the detection More... | |
void | GCGconshdlrDecompDeregisterPartialdec (SCIP *scip, gcg::PARTIALDECOMP *partialdec) |
deregisters a partialdec in the conshdlr More... | |
void | GCGconshdlrDecompRegisterPartialdec (SCIP *scip, gcg::PARTIALDECOMP *partialdec) |
registers a partialdec in the conshdlr More... | |
gcg::DETPROBDATA * | GCGconshdlrDecompGetDetprobdataOrig (SCIP *scip) |
help method to access detprobdata for unpresolved problem More... | |
gcg::DETPROBDATA * | GCGconshdlrDecompGetDetprobdataPresolved (SCIP *scip) |
help method to access detprobdata for transformed problem More... | |
SCIP_RETCODE | GCGconshdlrDecompChooseCandidatesFromSelected (SCIP *scip, std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > &candidates, SCIP_Bool original, SCIP_Bool printwarnings) |
initilizes the candidates data structures with selected partialdecs More... | |
std::string | GCGconshdlrDecompGetDetectorHistoryByPartialdecId (SCIP *scip, int id) |
gets detector history of partialdec with given id More... | |
Function Documentation
◆ GCGconshdlrDecompGetPartialdecs()
std::vector<gcg::PARTIALDECOMP*>* GCGconshdlrDecompGetPartialdecs | ( | SCIP * | scip | ) |
gets vector of all partialdecs
- Returns
- finished partialdecs
- Parameters
-
scip SCIP data structure
Definition at line 5555 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by gcg::updateIdList().
◆ DECgetPartialdecToWrite()
gcg::PARTIALDECOMP* DECgetPartialdecToWrite | ( | SCIP * | scip, |
SCIP_Bool | transformed | ||
) |
Definition at line 2928 of file cons_decomp.cpp.
References GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompGetPartialdecFromID(), and getConshdlrdata().
Referenced by DECgetPartialdecToWrite(), and SCIP_DECL_READERWRITE().
◆ GCGconshdlrDecompGetPartialdecFromID()
gcg::PARTIALDECOMP* GCGconshdlrDecompGetPartialdecFromID | ( | SCIP * | scip, |
int | partialdecid | ||
) |
local method to find a partialdec for a given id or NULL if no partialdec with such id is found
- Returns
- partialdec pointer of partialdec with given id or NULL if it does not exist
- Note
- returns NULL if no partialdec by this id is known
- Parameters
-
scip SCIP data structure partialdecid partialdec id
Definition at line 317 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECgetPartialdecToWrite(), GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompCalcMaxWhiteScore(), GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), GCGconshdlrDecompCalcSetPartForWhiteAggScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGconshdlrDecompCheckConsistency(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompCreateVarmapForPartialdecId(), GCGconshdlrDecompGetDetectorHistoryByPartialdecId(), GCGconshdlrDecompGetNBlocksByPartialdecId(), GCGconshdlrDecompGetNextPartialdecID(), GCGconshdlrDecompGetNLinkingVarsByPartialdecId(), GCGconshdlrDecompGetNMasterConssByPartialdecId(), GCGconshdlrDecompGetNMasterVarsByPartialdecId(), GCGconshdlrDecompGetNOpenConssByPartialdecId(), GCGconshdlrDecompGetNOpenVarsByPartialdecId(), GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId(), GCGconshdlrDecompGetPartialdecFromID(), GCGconshdlrDecompGetScoreByPartialdecId(), GCGconshdlrDecompIsPresolvedByPartialdecId(), GCGconshdlrDecompIsSelectedByPartialdecId(), GCGconshdlrDecompSelectPartialdec(), gcg::GCGdialogInspectPartialdec(), gcg::GCGdialogSelect(), gcg::GCGdialogSelectVisualize(), gcg::GCGdialogShowMenu(), GCGWriteGpDecompMatrix(), GCGwriteGpVisualizationFormat(), GCGwriteTexReport(), and GCGwriteTexVisualization().
◆ GCGconshdlrDecompAddPreexisitingPartialDec()
SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec | ( | SCIP * | scip, |
gcg::PARTIALDECOMP * | partialdec | ||
) |
adds a preexisting partial dec to be considered at the beginning of the detection
- Note
- refines the partialdec to be consistent, adds meta data/statistics
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure partialdec partial dec to add
Definition at line 3554 of file cons_decomp.cpp.
References addPartialdec(), gcg::COMPLETE, gcg::COMPLETED_CONSTOMASTER, gcg::PARTIALDECOMP::findVarsLinkingToMaster(), gcg::PARTIALDECOMP::findVarsLinkingToStairlinking(), gcg::PARTIALDECOMP::fixConsToMaster(), getConshdlrdata(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNMastervars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::PARTIALDECOMP::getOpenconssVec(), gcg::PARTIALDECOMP::getScore(), gcg::PARTIALDECOMP::getUsergiven(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), gcg::PARTIALDECOMP::isComplete(), MAX_WHITE, gcg::PARTIAL, gcg::PARTIALDECOMP::prepare(), gcg::PARTIALDECOMP::setUsergiven(), gcg::PARTIALDECOMP::shouldCompletedByConsToMaster(), and gcg::PARTIALDECOMP::sort().
Referenced by GCGconshdlrDecompAddPreexistingDecomp(), readBLKFile(), and readDECFile().
◆ GCGconshdlrDecompDeregisterPartialdec()
void GCGconshdlrDecompDeregisterPartialdec | ( | SCIP * | scip, |
gcg::PARTIALDECOMP * | partialdec | ||
) |
deregisters a partialdec in the conshdlr
Use this function at deletion of the partialdec. The partialdec is not destroyed in this function, the conshdlr will not know that it exists.
- Parameters
-
scip SCIP data structure partialdec the partialdec
Definition at line 5095 of file cons_decomp.cpp.
References getConshdlrdata(), and gcg::PARTIALDECOMP::getID().
Referenced by gcg::PARTIALDECOMP::~PARTIALDECOMP().
◆ GCGconshdlrDecompRegisterPartialdec()
void GCGconshdlrDecompRegisterPartialdec | ( | SCIP * | scip, |
gcg::PARTIALDECOMP * | partialdec | ||
) |
registers a partialdec in the conshdlr
Use this function at initialization of the partialdec. If the partialdec already exists in the conshdlr it is ignored.
- Parameters
-
scip SCIP data structure partialdec the partialdec to register
Definition at line 5733 of file cons_decomp.cpp.
References getConshdlrdata(), and gcg::PARTIALDECOMP::getID().
Referenced by gcg::PARTIALDECOMP::PARTIALDECOMP().
◆ GCGconshdlrDecompGetDetprobdataOrig()
gcg::DETPROBDATA* GCGconshdlrDecompGetDetprobdataOrig | ( | SCIP * | scip | ) |
help method to access detprobdata for unpresolved problem
- Returns
- pointer to detprobdata in wrapper data structure
- Parameters
-
scip SCIP data structure
Definition at line 5249 of file cons_decomp.cpp.
References GCGconshdlrDecompOrigDetprobdataExists(), getConshdlrdata(), and resetDetprobdata().
Referenced by cmpGraphPair(), createPartialdecFromDecomp(), DEC_DECL_CONSCLASSIFY(), DEC_DECL_VARCLASSIFY(), GCGwriteCls(), and gcg::PARTIALDECOMP::getDetprobdata().
◆ GCGconshdlrDecompGetDetprobdataPresolved()
gcg::DETPROBDATA* GCGconshdlrDecompGetDetprobdataPresolved | ( | SCIP * | scip | ) |
help method to access detprobdata for transformed problem
- Returns
- pointer to detprobdata in wrapper data structure
- Parameters
-
scip SCIP data structure
Definition at line 5263 of file cons_decomp.cpp.
References GCGconshdlrDecompPresolvedDetprobdataExists(), getConshdlrdata(), and resetDetprobdata().
Referenced by cmpGraphPair(), createPartialdecFromDecomp(), DEC_DECL_CONSCLASSIFY(), DEC_DECL_VARCLASSIFY(), GCGwriteCls(), and gcg::PARTIALDECOMP::getDetprobdata().
◆ GCGconshdlrDecompChooseCandidatesFromSelected()
SCIP_RETCODE GCGconshdlrDecompChooseCandidatesFromSelected | ( | SCIP * | scip, |
std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > & | candidates, | ||
SCIP_Bool | original, | ||
SCIP_Bool | printwarnings | ||
) |
initilizes the candidates data structures with selected partialdecs
initializes it with all if there are no selected partialdecs, sort them according to the current scoretype
- Parameters
-
scip SCIP data structure candidates tuples of partialdecs and scores will be added to this vector (sorted w.r.t. the scores). original choose candidates for the original problem? printwarnings should warnings be printed?
- Returns
- SCIP return code
◆ GCGconshdlrDecompGetDetectorHistoryByPartialdecId()
std::string GCGconshdlrDecompGetDetectorHistoryByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets detector history of partialdec with given id
- Returns
- detector history of partialdec as string
- Parameters
-
scip SCIP data structure id id of partialdec
Definition at line 5224 of file cons_decomp.cpp.
References gcg::PARTIALDECOMP::buildDecChainString(), and GCGconshdlrDecompGetPartialdecFromID().
Referenced by GCGdialogExecExplore().