Loading...
Searching...
No Matches
dec_neighborhoodmaster.cpp
Go to the documentation of this file.
31 * @brief detector neighborhoodmaster (This detector calculates cons-cons adjacency (if not already done), sorts constraints according size of neighborhood. Searching two consecutive constraints with largest size difference (according neighborhood size) in sorted constraints. All constraints having a larger neighborhood than the second one are assigned to the master)
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
53This detector calculates cons-cons adjacency (if not already done), and sorts constraints according size of neighborhood. Searching two consecutive constraints with largest size difference (according neighborhood size) in sorted constraints. All constraints having a larger neighborhood than the second one are assigned to the master
59#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 */
62#define DEC_FREQCALLROUNDORIGINAL 1 /** frequency the detector gets called in detection loop while detecting the original problem */
63#define DEC_MAXCALLROUNDORIGINAL INT_MAX /** last round the detector gets called while detecting the original problem */
64#define DEC_MINCALLROUNDORIGINAL 0 /** first round the detector gets called while detecting the original problem */
71#define DEC_USEFULRECALL FALSE /**< is it useful to call this detector on a descendant of the propagated partialdec */
151 /** fix open conss that have a) type of the current subset or b) decomp info ONLY_MASTER as master conss */
156 neighborhoodsize.emplace_back(std::pair<int,int>(detprobdata->getNConssForCons(opencons), opencons));
188 partialdecdetectiondata->newpartialdecs[0]->addClockTime(SCIPgetClockTime(origprob, temporaryClock));
192 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, "dec_neighborhoodmaster found %d new partialdec \n", partialdecdetectiondata->nnewpartialdecs );
274 DEC_MINCALLROUND, DEC_FREQCALLROUNDORIGINAL, DEC_MAXCALLROUNDORIGINAL, DEC_MINCALLROUNDORIGINAL, DEC_PRIORITY,
277 exitNeighborhoodmaster, propagatePartialdecNeighborhoodmaster, finishPartialdecNeighborhoodmaster,
class storing partialdecs and the problem matrix
class storing (potentially incomplete) decompositions
Definition class_detprobdata.h:110
GCG_EXPORT int getNConssForCons(int consIndex)
returns the number of constraints for a given constraint
Definition class_detprobdata.cpp:856
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 void addDetectorChainInfo(const char *decinfo)
add information about the detector chain
Definition class_partialdecomp.cpp:482
GCG_EXPORT int getNOpenconss()
Gets size of vector containing constraints not assigned yet.
Definition class_partialdecomp.cpp:4503
GCG_EXPORT void addClockTime(SCIP_Real clocktime)
adds detection time of one detector
Definition class_partialdecomp.cpp:453
GCG_EXPORT std::vector< int > & getOpenconss()
Gets vector containing constraints not assigned yet.
Definition class_partialdecomp.cpp:4558
GCG_EXPORT std::vector< int >::const_iterator fixConsToMaster(std::vector< int >::const_iterator itr)
fixes a constraint to the master constraints
Definition class_partialdecomp.cpp:5264
GCG_EXPORT bool sort()
sorts the vars and conss data structures by their indices
Definition class_partialdecomp.cpp:5807
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)),)
includes one detector
Definition cons_decomp.cpp:2547
constraint handler for structure detection
#define finishPartialdecNeighborhoodmaster
Definition dec_neighborhoodmaster.cpp:124
#define detectorPostprocessPartialdecNeighborhoodmaster
Definition dec_neighborhoodmaster.cpp:201
SCIP_RETCODE GCGincludeDetectorNeighborhoodmaster(GCG *gcg)
Definition dec_neighborhoodmaster.cpp:259
neighborhoodmaster detector
#define SCIP_MAXSTRLEN
#define SCIP_Real
#define SCIP_CALL_ABORT(x)
#define TRUE
#define FALSE
GCG interface methods.
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, 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)
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,...)
SCIPfreeMemory(GCGgetOrigprob(gcg), &divingdata)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
#define NULL
Definition class_conspartition.cpp:44
various SCIP helper methods
Definition dec_compgreedily.cpp:75
Definition cons_decomp.cpp:204
bool operator()(const std::pair< int, int > &left, const std::pair< int, int > &right)
Definition dec_neighborhoodmaster.cpp:90
struct SCIP_Clock SCIP_CLOCK
SCIP_VERBLEVEL_HIGH
SCIP_DIDNOTFIND
SCIP_SUCCESS
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP