dec_postprocess.cpp
Go to the documentation of this file.
31 * @brief checks if there are master constraints that can be assigned to one block (without any other changes)
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
53#define DEC_FREQCALLROUND 1 /**< frequency the detector gets called in detection loop ,ie it is called in round r if and only if minCallRound <= r <= maxCallRound AND (r - minCallRound) mod freqCallRound == 0 */
57#define DEC_FREQCALLROUNDORIGINAL 1 /**< frequency the detector gets called in detection loop while detecting the original problem */
58#define DEC_MAXCALLROUNDORIGINAL INT_MAX /**< last round the detector gets called while detecting the original problem */
59#define DEC_MINCALLROUNDORIGINAL 0 /**< first round the detector gets called while detecting the original problem */
65#define DEC_USEFULRECALL FALSE /**< is it useful to call this detector on a descendant of the propagated partialdec */
236 partialdecdetectiondata->newpartialdecs[0]->addClockTime(SCIPgetClockTime(origprob, temporaryClock));
261 (void) SCIPsnprintf(setstr, SCIP_MAXSTRLEN, "detection/detectors/%s/postprocessingenabled", name);
283 (void) SCIPsnprintf(setstr, SCIP_MAXSTRLEN, "detection/detectors/%s/postprocessingenabled", name);
304 (void) SCIPsnprintf(setstr, SCIP_MAXSTRLEN, "detection/detectors/%s/postprocessingenabled", name);
334 SCIP_CALL( GCGincludeDetector(gcg, DEC_NAME, DEC_DECCHAR, DEC_DESC, DEC_FREQCALLROUND, DEC_MAXCALLROUND, DEC_MINCALLROUND, DEC_FREQCALLROUNDORIGINAL, DEC_MAXCALLROUNDORIGINAL, DEC_MINCALLROUNDORIGINAL, DEC_PRIORITY, DEC_ENABLED, DEC_ENABLEDFINISHING, DEC_ENABLEDPOSTPROCESSING, DEC_SKIP, DEC_USEFULRECALL, detectordata, freePostprocess,
336 postprocessPartialdecPostprocess, setParamAggressivePostprocess, setParamDefaultPostprocess, setParamFastPostprocess) );
340 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/detectors/postprocess/useconssadj", "should the constraint adjacency be used", &detectordata->useconssadj, FALSE, DEFAULT_USECONSSADJ, NULL, NULL) );
SCIP_VAR ** b
class storing partialdecs and the problem matrix
class storing (potentially incomplete) decompositions
Definition: class_detprobdata.h:110
GCG_EXPORT int getNVarsForCons(int consIndex)
returns the number of variables for a given constraint
Definition: class_detprobdata.cpp:908
GCG_EXPORT void createConssAdjacency()
create the constraint adjacency datastructure that is used (if created) for some methods to faster ac...
Definition: class_detprobdata.cpp:689
GCG_EXPORT SCIP_Bool isConssAdjInitialized()
determines whether or not the constraint-constraint adjacency data structure is initilized
Definition: class_detprobdata.cpp:1045
GCG_EXPORT std::vector< int > & getVarsForCons(int consIndex)
returns the variable indices of the coefficient matrix for a constraint
Definition: class_detprobdata.cpp:1023
GCG_EXPORT int getNMasterconss()
Gets size of the vector containing master conss.
Definition: class_partialdecomp.cpp:4481
GCG_EXPORT bool isConsMastercons(int cons)
Gets whether the cons is a master cons.
Definition: class_partialdecomp.cpp:4817
GCG_EXPORT bool checkConsistency()
Checks whether the assignments in the partialdec are consistent.
Definition: class_partialdecomp.cpp:1722
GCG_EXPORT std::vector< int > & getMasterconss()
Gets array containing all master conss indices.
Definition: class_partialdecomp.cpp:4286
GCG_EXPORT void removeMastercons(int consid)
removes the given cons from master
Definition: class_partialdecomp.cpp:2784
GCG_EXPORT bool isVarMastervar(int var)
Checks whether the var is a master var.
Definition: class_partialdecomp.cpp:5009
GCG_EXPORT int getNVarsForBlock(int block)
Gets size of the vector containing vars assigned to a block.
Definition: class_partialdecomp.cpp:4537
GCG_EXPORT void setConsToBlock(int consToBlock, int block)
adds a constraint to a block, does not delete this cons from list of open conss
Definition: class_partialdecomp.cpp:5205
GCG_EXPORT bool sort()
sorts the vars and conss data structures by their indices
Definition: class_partialdecomp.cpp:5807
GCG_EXPORT bool isVarStairlinkingvar(int var)
Checks whether the var is a stairlinking var.
Definition: class_partialdecomp.cpp:5057
GCG_EXPORT std::vector< int > & getVarsForBlock(int block)
Gets array containing vars of a block.
Definition: class_partialdecomp.cpp:4771
const char * GCGdetectorGetName(GCG_DETECTOR *detector)
returns the name of the provided detector
Definition: cons_decomp.cpp:2084
GCG_DETECTORDATA * GCGdetectorGetData(GCG_DETECTOR *detector)
returns the data of the provided detector
Definition: cons_decomp.cpp:2075
SCIP_RETCODE GCGincludeDetector(GCG *gcg, 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, GCG_DETECTORDATA *detectordata, GCG_DECL_FREEDETECTOR((*freeDetector)), GCG_DECL_INITDETECTOR((*initDetector)), GCG_DECL_EXITDETECTOR((*exitDetector)), GCG_DECL_PROPAGATEPARTIALDEC((*propagatePartialdecDetector)), GCG_DECL_FINISHPARTIALDEC((*finishPartialdecDetector)), GCG_DECL_POSTPROCESSPARTIALDEC((*postprocessPartialdecDetector)), GCG_DECL_SETPARAMAGGRESSIVE((*setParamAggressiveDetector)), GCG_DECL_SETPARAMDEFAULT((*setParamDefaultDetector)),)
Definition: cons_decomp.cpp:2547
constraint handler for structure detection
SCIP_RETCODE GCGincludeDetectorPostprocess(GCG *gcg)
Definition: dec_postprocess.cpp:319
static GCG_DECL_POSTPROCESSPARTIALDEC(postprocessPartialdecPostprocess)
Definition: dec_postprocess.cpp:122
#define propagatePartialdecPostprocess
Definition: dec_postprocess.cpp:118
static GCG_DECL_FREEDETECTOR(freePostprocess)
Definition: dec_postprocess.cpp:94
static GCG_DECL_SETPARAMDEFAULT(setParamDefaultPostprocess)
Definition: dec_postprocess.cpp:271
static GCG_DECL_SETPARAMFAST(setParamFastPostprocess)
Definition: dec_postprocess.cpp:292
static GCG_DECL_SETPARAMAGGRESSIVE(setParamAggressivePostprocess)
Definition: dec_postprocess.cpp:249
postprocess detector
#define SCIP_MAXSTRLEN
#define SCIP_Bool
#define SCIP_CALL_ABORT(x)
#define SCIP_CALL(x)
#define TRUE
#define FALSE
GCG interface methods.
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
#define SCIPallocMemoryArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeMemory(scip, ptr)
SCIP_RETCODE SCIPcreateClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_RETCODE SCIPstopClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPfreeClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_Real SCIPgetClockTime(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
int SCIPsnprintf(char *t, int len, const char *s,...)
#define NULL
Definition: class_conspartition.cpp:44
various SCIP helper methods
Definition: dec_compgreedily.cpp:75
Definition: struct_gcg.h:55
SCIP_DIDNOTFIND
SCIP_SUCCESS
SCIP_OKAY
enum SCIP_Retcode SCIP_RETCODE