Detailed Description
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)
Definition in file dec_neighborhoodmaster.cpp.
#include "gcg/dec_neighborhoodmaster.h"#include "gcg/cons_decomp.h"#include "gcg/class_partialdecomp.h"#include "gcg/class_detprobdata.h"#include "gcg/gcg.h"#include "scip/cons_setppc.h"#include "scip/scip.h"#include "gcg/scip_misc.h"#include "scip/clock.h"#include <sstream>#include <iostream>#include <algorithm>Go to the source code of this file.
Data Structures | |
| struct | GCG_DetectorData |
| struct | sort_pred |
Macros | |
| #define | DEC_NAME "neighborhoodmaster" |
| #define | DEC_DESC "detector neighborhoodmaster" |
| #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 */ |
| #define | DEC_MAXCALLROUND 0 /** last round the detector gets called */ |
| #define | DEC_MINCALLROUND 0 /** first round the detector gets called */ |
| #define | DEC_FREQCALLROUNDORIGINAL 1 /** frequency the detector gets called in detection loop while detecting the original problem */ |
| #define | DEC_MAXCALLROUNDORIGINAL INT_MAX /** last round the detector gets called while detecting the original problem */ |
| #define | DEC_MINCALLROUNDORIGINAL 0 /** first round the detector gets called while detecting the original problem */ |
| #define | DEC_PRIORITY 0 |
| #define | DEC_DECCHAR 'n' |
| #define | DEC_ENABLED TRUE |
| #define | DEC_ENABLEDFINISHING FALSE |
| #define | DEC_ENABLEDPOSTPROCESSING FALSE |
| #define | DEC_SKIP FALSE |
| #define | DEC_USEFULRECALL FALSE |
| #define | DEFAULT_MAXRATIO 0.2 |
| #define | exitNeighborhoodmaster NULL |
| #define | initNeighborhoodmaster NULL |
| #define | finishPartialdecNeighborhoodmaster NULL |
| #define | detectorPostprocessPartialdecNeighborhoodmaster NULL |
Functions | |
| GCG_DECL_FREEDETECTOR (freeNeighborhoodmaster) | |
| static | GCG_DECL_PROPAGATEPARTIALDEC (propagatePartialdecNeighborhoodmaster) |
| static | GCG_DECL_SETPARAMAGGRESSIVE (setParamAggressiveNeighborhoodmaster) |
| static | GCG_DECL_SETPARAMDEFAULT (setParamDefaultNeighborhoodmaster) |
| static | GCG_DECL_SETPARAMFAST (setParamFastNeighborhoodmaster) |
| SCIP_RETCODE | GCGincludeDetectorNeighborhoodmaster (GCG *gcg) |
Macro Definition Documentation
◆ DEC_NAME
| #define DEC_NAME "neighborhoodmaster" |
This 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 name of detector
Definition at line 57 of file dec_neighborhoodmaster.cpp.
◆ DEC_DESC
| #define DEC_DESC "detector neighborhoodmaster" |
description of detector
Definition at line 58 of file dec_neighborhoodmaster.cpp.
◆ DEC_FREQCALLROUND
| #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 */ |
Definition at line 59 of file dec_neighborhoodmaster.cpp.
◆ DEC_MAXCALLROUND
| #define DEC_MAXCALLROUND 0 /** last round the detector gets called */ |
Definition at line 60 of file dec_neighborhoodmaster.cpp.
◆ DEC_MINCALLROUND
| #define DEC_MINCALLROUND 0 /** first round the detector gets called */ |
Definition at line 61 of file dec_neighborhoodmaster.cpp.
◆ DEC_FREQCALLROUNDORIGINAL
| #define DEC_FREQCALLROUNDORIGINAL 1 /** frequency the detector gets called in detection loop while detecting the original problem */ |
Definition at line 62 of file dec_neighborhoodmaster.cpp.
◆ DEC_MAXCALLROUNDORIGINAL
| #define DEC_MAXCALLROUNDORIGINAL INT_MAX /** last round the detector gets called while detecting the original problem */ |
Definition at line 63 of file dec_neighborhoodmaster.cpp.
◆ DEC_MINCALLROUNDORIGINAL
| #define DEC_MINCALLROUNDORIGINAL 0 /** first round the detector gets called while detecting the original problem */ |
Definition at line 64 of file dec_neighborhoodmaster.cpp.
◆ DEC_PRIORITY
| #define DEC_PRIORITY 0 |
priority of the constraint handler for separation
Definition at line 65 of file dec_neighborhoodmaster.cpp.
◆ DEC_DECCHAR
| #define DEC_DECCHAR 'n' |
display character of detector
Definition at line 66 of file dec_neighborhoodmaster.cpp.
◆ DEC_ENABLED
| #define DEC_ENABLED TRUE |
should the detection be enabled
Definition at line 67 of file dec_neighborhoodmaster.cpp.
◆ DEC_ENABLEDFINISHING
| #define DEC_ENABLEDFINISHING FALSE |
should the detection be enabled
Definition at line 68 of file dec_neighborhoodmaster.cpp.
◆ DEC_ENABLEDPOSTPROCESSING
| #define DEC_ENABLEDPOSTPROCESSING FALSE |
should the postprocessing be enabled
Definition at line 69 of file dec_neighborhoodmaster.cpp.
◆ DEC_SKIP
| #define DEC_SKIP FALSE |
should detector be skipped if other detectors found decompositions
Definition at line 70 of file dec_neighborhoodmaster.cpp.
◆ DEC_USEFULRECALL
| #define DEC_USEFULRECALL FALSE |
is it useful to call this detector on a descendant of the propagated partialdec
Definition at line 71 of file dec_neighborhoodmaster.cpp.
◆ DEFAULT_MAXRATIO
| #define DEFAULT_MAXRATIO 0.2 |
Definition at line 73 of file dec_neighborhoodmaster.cpp.
Referenced by GCGincludeDetectorNeighborhoodmaster().
◆ exitNeighborhoodmaster
| #define exitNeighborhoodmaster NULL |
destructor of detector to free detector data (called before the solving process begins)
Definition at line 119 of file dec_neighborhoodmaster.cpp.
Referenced by GCGincludeDetectorNeighborhoodmaster().
◆ initNeighborhoodmaster
| #define initNeighborhoodmaster NULL |
detection initialization function of detector (called before solving is about to begin)
Definition at line 122 of file dec_neighborhoodmaster.cpp.
Referenced by GCGincludeDetectorNeighborhoodmaster().
◆ finishPartialdecNeighborhoodmaster
| #define finishPartialdecNeighborhoodmaster NULL |
Definition at line 124 of file dec_neighborhoodmaster.cpp.
Referenced by GCGincludeDetectorNeighborhoodmaster().
◆ detectorPostprocessPartialdecNeighborhoodmaster
| #define detectorPostprocessPartialdecNeighborhoodmaster NULL |
Definition at line 201 of file dec_neighborhoodmaster.cpp.
Referenced by GCGincludeDetectorNeighborhoodmaster().
Function Documentation
◆ GCG_DECL_FREEDETECTOR()
| GCG_DECL_FREEDETECTOR | ( | freeNeighborhoodmaster | ) |
destructor of detector to free user data (called when GCG is exiting)
Definition at line 102 of file dec_neighborhoodmaster.cpp.
References assert(), DEC_NAME, GCG_DECL_FREEDETECTOR, GCGdetectorGetData(), GCGdetectorGetName(), GCGgetOrigprob(), and SCIPfreeMemory().
◆ GCG_DECL_PROPAGATEPARTIALDEC()
|
static |
fix open conss that have a) type of the current subset or b) decomp info ONLY_MASTER as master conss
Definition at line 126 of file dec_neighborhoodmaster.cpp.
References gcg::PARTIALDECOMP::addClockTime(), gcg::PARTIALDECOMP::addDetectorChainInfo(), gcg::DETPROBDATA::createConssAdjacency(), gcg::PARTIALDECOMP::fixConsToMaster(), GCG_DECL_PROPAGATEPARTIALDEC, GCGdetectorGetData(), GCGgetOrigprob(), gcg::DETPROBDATA::getNConssForCons(), gcg::PARTIALDECOMP::getNOpenconss(), gcg::PARTIALDECOMP::getOpenconss(), i, gcg::DETPROBDATA::isConssAdjInitialized(), GCG_DetectorData::maxratio, origprob, result, SCIP_CALL(), and gcg::PARTIALDECOMP::sort().
◆ GCG_DECL_SETPARAMAGGRESSIVE()
|
static |
Definition at line 204 of file dec_neighborhoodmaster.cpp.
References GCG_DECL_SETPARAMAGGRESSIVE, GCGdetectorGetName(), GCGgetOrigprob(), origprob, and SCIP_CALL().
◆ GCG_DECL_SETPARAMDEFAULT()
|
static |
Definition at line 221 of file dec_neighborhoodmaster.cpp.
References DEC_ENABLED, DEC_ENABLEDFINISHING, GCG_DECL_SETPARAMDEFAULT, GCGdetectorGetName(), GCGgetOrigprob(), origprob, and SCIP_CALL().
◆ GCG_DECL_SETPARAMFAST()
|
static |
Definition at line 237 of file dec_neighborhoodmaster.cpp.
References GCG_DECL_SETPARAMFAST, GCGdetectorGetName(), GCGgetOrigprob(), origprob, and SCIP_CALL().
◆ GCGincludeDetectorNeighborhoodmaster()
| SCIP_RETCODE GCGincludeDetectorNeighborhoodmaster | ( | GCG * | gcg | ) |
creates the handler for neighborhoodmaster detector and includes it in SCIP
creates the handler for neighborhoodmasterconss detector and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 259 of file dec_neighborhoodmaster.cpp.
References assert(), DEC_DECCHAR, DEC_DESC, DEC_ENABLED, DEC_ENABLEDFINISHING, DEC_ENABLEDPOSTPROCESSING, DEC_FREQCALLROUND, DEC_FREQCALLROUNDORIGINAL, DEC_MAXCALLROUND, DEC_MAXCALLROUNDORIGINAL, DEC_MINCALLROUND, DEC_MINCALLROUNDORIGINAL, DEC_NAME, DEC_PRIORITY, DEC_SKIP, DEC_USEFULRECALL, DEFAULT_MAXRATIO, detectorPostprocessPartialdecNeighborhoodmaster, exitNeighborhoodmaster, finishPartialdecNeighborhoodmaster, GCGgetOrigprob(), GCGincludeDetector(), GCGincludeDetectorNeighborhoodmaster(), initNeighborhoodmaster, GCG_DetectorData::maxratio, origprob, and SCIP_CALL().
Referenced by GCGincludeDetectorNeighborhoodmaster(), and GCGincludeGcgPlugins().