cons_decomp.cpp
Go to the documentation of this file.
39 * This constraint handler will run all registered structure detectors in a loop. They will find partial decompositions in a loop iteration until the decompositions are full
44/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
82#define CONSHDLR_DESC "constraint handler for structure detection" /**< description of constraint handler */
83#define CONSHDLR_ENFOPRIORITY 0 /**< priority of the constraint handler for constraint enforcing */
84#define CONSHDLR_CHECKPRIORITY 0 /**< priority of the constraint handler for checking feasibility */
85#define CONSHDLR_EAGERFREQ -1 /**< frequency for using all instead of only the useful constraints in separation,
87#define CONSHDLR_NEEDSCONS FALSE /**< should the constraint handler be skipped, if no constraints are available? */
91#define DEFAULT_BLOCKNUMBERCANDSMEDIANVARSPERCONS FALSE /**< should for block number candidates calculation the medianvarspercons calculation be considered */
96#define DEFAULT_MAXNCLASSESLARGEPROBS 5 /**< maximum number of classes allowed for large (nvars+nconss > 50000) MIPs for detectors, partitions with more classes are reduced to the maximum number of classes */
97#define DEFAULT_MAXNCLASSES 9 /**< maximum number of classes allowed for detectors, partitions with more classes are reduced to the maximum number of classes */
98#define DEFAULT_MAXNCLASSESFORNBLOCKCANDIDATES 18 /**< maximum number of classes a partition can have to be used for voting nblockcandidates */
99#define DEFAULT_ENABLEORIGDETECTION TRUE /**< indicates whether to start detection for the original problem */
103#define DEFAULT_ALLOWPARTITIONDUPLICATES FALSE /**< if false each new (conss- and vars-) partitions is checked for being a duplicate of an existing one, if so it is not added and NBOT statistically recognized*/
105#define DEFAULT_ENABLEORIGCLASSIFICATION TRUE /**< indicates whether to start detection for the original problem */
107#define DEFAULT_BENDERSONLYCONTSUBPR FALSE /**< indicates whether only decomposition with only continuous variables in the subproblems should be searched*/
108#define DEFAULT_BENDERSONLYBINMASTER FALSE /**< indicates whether only decomposition with only binary variables in the master should be searched */
110#define DEFAULT_LEVENSHTEIN_MAXMATRIXHALFPERIMETER 10000 /**< deactivate levenshtein constraint classifier if nrows + ncols exceeds this value for emphasis default */
111#define AGGRESSIVE_LEVENSHTEIN_MAXMATRIXHALFPERIMETER 80000 /**< deactivate levenshtein constraint classifier if nrows + ncols exceeds this value for emphasis aggressive */
112#define FAST_LEVENSHTEIN_MAXMATRIXHALFPERIMETER 2000 /**< deactivate levenshtein constraint classifier if nrows + ncols exceeds this value for emphasis fast */
129 std::unordered_map<int, PARTIALDECOMP*>* partialdecsbyid; /**< list of all existing partialdecs */
130 int partialdeccounter; /**< counts the number of created partialdecs, used to determine next partialdec id
145 GCG_DETECTOR** propagatingdetectors; /**< array of detectors able to propagate partial decompositions */
146 int npropagatingdetectors; /**< number of detectors able to propagate partial decompositions (size of propagatingdetectors) */
147 GCG_DETECTOR** finishingdetectors; /**< array of detectors able to finish partial decompositions */
148 int nfinishingdetectors; /**< number of detectors able to finish partial decompositions (size of finishingdetectors) */
149 GCG_DETECTOR** postprocessingdetectors; /**< array of detectors able to postprocess decompositions */
150 int npostprocessingdetectors; /**< number of detectors able to postprocess decompositions (size of postprocessingdetectors) */
154 SCIP_Bool hasrunoriginal; /**< flag to indicate whether we have already detected (original problem) */
159 SCIP_Bool blocknumbercandsmedianvarspercons; /**< should for block number candidates calculation the medianvarspercons calculation be considered */
160 int maxnclassesfornblockcandidates; /**< maximum number of classes a partition can have to be used for voting nblockcandidates */
161 int maxnclassesperpartition; /**< maximum number of classes allowed for detectors, partition with more classes are reduced to the maximum number of classes */
162 int maxnclassesperpartitionforlargeprobs; /**< maximum number of classes allowed for large (nvars+nconss > 50000) MIPs for detectors, partition with more classes are reduced to the maximum number of classes */
163 int weightinggpresolvedoriginaldecomps; /**< weighing method for comparing presolved and original decompositions (see corresponding enum) */
166 SCIP_Bool allowpartitionduplicates; /**< indicates whether partition duplicates are allowed (for statistical reasons) */
167 SCIP_Bool enableorigdetection; /**< indicates whether to start detection for the original problem */
168 SCIP_Bool enableorigclassification; /**< indicates whether to start constraint classification for the original problem */
170 SCIP_Bool bendersonlycontsubpr; /**< indicates whether only decomposition with only continuous variables in the subproblems should be searched*/
171 SCIP_Bool bendersonlybinmaster; /**< indicates whether only decomposition with only binary variables in the master should be searched */
174 int ncallscreatedecomp; /**< debugging method for counting the number of calls of created decompositions */
176 gcg::DETPROBDATA* detprobdatapres; /**< detprobdata containing data for the presolved transformed problem */
185 PARTIALDECOMP* partialdectowrite; /**< pointer enabling the use of SCIPs writeProb/writeTransProb function for writing partial decompositions*/
188 std::vector<int>* userblocknrcandidates; /**< vector to store block number candidates that were given by user */
189 SCIP_Bool freeorig; /**< help bool to notify a nonfinal free transform (needed if presolving is revoked, e.g. if orig decomposition is used, and transformation is not successful) */
193/** parameter how to modify scores when comparing decompositions for original and presolved problem
197 FRACTION_OF_NNONZEROS, /**< scores are weighted according to ratio of number nonzeros, the more the worse */
198 FRACTION_OF_NROWS, /**< scores are weighted according to ratio of number rows, the more the worse */
199 FAVOUR_PRESOLVED /**< decompositions for presolved problems are always favoured over decompositions of original problem */
200};
205 bool operator()(const std::pair<PARTIALDECOMP*, SCIP_Real> &left, const std::pair<PARTIALDECOMP*, SCIP_Real> &right) {
275 SCIPverbMessage(GCGgetOrigprob(gcg), SCIP_VERBLEVEL_FULL, NULL, "Decomposition to add is already known to gcg!\n");
361 * method to unselect all decompositions, called in consexit, and when the partialdeclist is updated
420 // for the orig detprobdata, reset only the current partialdecs as the rest will stay the same in any case
470 gcg::DETPROBDATA* detprobdata /**< detprobdata for problem the detection should be performed on */
517 PARTIALDEC_DETECTION_DATA* partialdecdetdata = createPartialdecDetectionData(detprobdata, partialdec);
570 PARTIALDEC_DETECTION_DATA *finishingdata = createPartialdecDetectionData(detprobdata, partialdecomp);
571 SCIP_CALL( finishingdetector->finishPartialdec(gcg, finishingdetector, finishingdata, &result) );
612 PARTIALDEC_DETECTION_DATA* partialdecdetdata = createPartialdecDetectionData(detprobdata, postpartialdec);
614 SCIPverbMessage(origprob, SCIP_VERBLEVEL_FULL, NULL, "call finisher for detector %s \n", GCGdetectorGetName( postdetector ) );
617 SCIP_CALL( postdetector->postprocessPartialdec(gcg, postdetector, partialdecdetdata, &result ) );
642 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, "POSTPROCESSING of decompositions. Added %d new decomps. \n", numpostprocessed);
735/** @brief deinitialization method of constraint handler (called before transformed problem is freed) */
788/** @brief destructor of constraint handler to free constraint handler data (called when SCIP is exiting) */
945 * @brief finds a non duplicate constraint name of the form c_{a} with minimal natural number {a}
960 /* terminates since there are only finitely many constraints and i (for c_i) increases every iteration */
991 DETPROBDATA* detprobdata = decomp->presolved ? GCGconshdlrDecompGetDetprobdataPresolved(gcg) : GCGconshdlrDecompGetDetprobdataOrig(gcg);
1011 nblock = (int) (size_t) SCIPhashmapGetImage(constoblock, (void*) (size_t) detprobdata->getCons(c));
1133 std::vector<SCIP_Bool> isblockdeleted = std::vector<SCIP_Bool>(partialdec->getNBlocks(), FALSE);
1186 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "All blocks have been deleted since only deleted constraints are contained, no reformulation is done.\n");
1195 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, &nsubscipconss, partialdec->getNBlocks() - ndeletedblocks) );
1196 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, &subscipconss, partialdec->getNBlocks() - ndeletedblocks) );
1219 SCIP_CALL_ABORT( SCIPhashmapInsert(constoblock, scipcons, (void*) (size_t)(partialdec->getNBlocks() + 1 - ndeletedblocks)) );
1236 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, &subscipconss[b-ndeletedblocksbefore[b]], partialdec->getNConssForBlock(b)) );
1254 SCIPdebugMessage("Set cons %s to block %d + 1 - %d in cons to block\n", SCIPconsGetName(scipcons), b, ndeletedblocksbefore[b] );
1255 SCIP_CALL_ABORT( SCIPhashmapInsert(constoblock, scipcons, (void*) (size_t)(b + 1 - ndeletedblocksbefore[b])) );
1270 SCIP_CALL_ABORT( SCIPhashmapInsert(constoblock, scipcons, (void*) (size_t)(partialdec->getNBlocks() + 1 - ndeletedblocks)) );
1283 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, &nsubscipvars, partialdec->getNBlocks() - ndeletedblocks) );
1284 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, &subscipvars, partialdec->getNBlocks() - ndeletedblocks) );
1285 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, &nstairlinkingvars, partialdec->getNBlocks() - ndeletedblocks) );
1286 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, &stairlinkingvars, partialdec->getNBlocks() -ndeletedblocks) );
1288 SCIP_CALL_ABORT( SCIPhashmapCreate(&vartoblock, SCIPblkmem(scip), partialdec->getNVars() + (int) origfixedtozerovars.size()) );
1289 SCIP_CALL_ABORT( SCIPhashmapCreate(&varindex, SCIPblkmem(scip), partialdec->getNVars() + (int) origfixedtozerovars.size()) );
1292 nlinkingvars = partialdec->getNLinkingvars() + partialdec->getNMastervars() + partialdec->getNTotalStairlinkingvars() + nmastervarsfromdeleted + (int) origfixedtozerovars.size();
1306 SCIPdebugMessage( "Set var %s to block %d + 2 - %d in var to block\n", SCIPvarGetName(scipvar), partialdec->getNBlocks(), ndeletedblocks );
1307 SCIP_CALL_ABORT( SCIPhashmapInsert(vartoblock, scipvar, (void*) (size_t)(partialdec->getNBlocks() + 2 - ndeletedblocks)) );
1317 SCIP_CALL_ABORT( SCIPhashmapInsert(vartoblock, scipvar, (void*) (size_t)(partialdec->getNBlocks() + 1 - ndeletedblocks)) );
1328 SCIP_CALL_ABORT( SCIPhashmapInsert(vartoblock, var, (void*) (size_t)(partialdec->getNBlocks() + 1 - ndeletedblocks)) );
1338 linkingvars[partialdec->getNMastervars() + partialdec->getNLinkingvars() + nmastervarsfromdeleted + v] = var;
1339 SCIP_CALL_ABORT( SCIPhashmapInsert(vartoblock, var, (void*) (size_t)(partialdec->getNBlocks() + 1 - ndeletedblocks)) );
1351 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, & subscipvars[b -ndeletedblocksbefore[b]], partialdec->getNVarsForBlock(b)) );
1356 SCIP_CALL_ABORT( SCIPallocBufferArray(scip, & stairlinkingvars[b-ndeletedblocksbefore[b]], partialdec->getNStairlinkingvars(b)) );
1370 SCIPdebugMessage("Set var %s to block %d + 1 - %d in var to block\n", SCIPvarGetName(scipvar), b, ndeletedblocksbefore[b] );
1371 assert( !SCIPhashmapExists(vartoblock, scipvar) || SCIPhashmapGetImage(vartoblock, scipvar) == (void*) (size_t)(b + 1 - ndeletedblocksbefore[b]) );
1372 SCIP_CALL_ABORT( SCIPhashmapInsert(vartoblock, scipvar, (void*) (size_t)(b + 1 - ndeletedblocksbefore[b])) );
1384 linkingvars[partialdec->getNLinkingvars() + partialdec->getNMastervars() + nmastervarsfromdeleted + counterstairlinkingvars] = scipvar;
1385 SCIP_CALL_ABORT( SCIPhashmapInsert(vartoblock, scipvar, (void*) (size_t)(partialdec->getNBlocks() + 2 - ndeletedblocks)) );
1398 SCIP_CALL_ABORT( SCIPhashmapInsert(vartoblock, scipvar, (void*) (size_t)(partialdec->getNBlocks() + 1 - ndeletedblocks)) );
1406 GCGdecompSetLinkingvars(gcg, *newdecomp, linkingvars, nlinkingvars, (int) origfixedtozerovars.size(), partialdec->getNMastervars() + nmastervarsfromdeleted);
1447 GCGdecompSetDetectorChain(gcg, (*newdecomp), partialdec->getDetectorchain().data(), (int) partialdec->getDetectorchain().size());
1458 GCGdecompSetDetectorPctVarsToBorder(gcg, *newdecomp, partialdec->getPctVarsToBorderVector().data());
1459 GCGdecompSetDetectorPctVarsToBlock(gcg, *newdecomp, partialdec->getPctVarsToBlockVector().data());
1460 GCGdecompSetDetectorPctVarsFromOpen(gcg, *newdecomp, partialdec->getPctVarsFromFreeVector().data());
1461 GCGdecompSetDetectorPctConssToBorder(gcg, *newdecomp, partialdec->getPctConssToBorderVector().data());
1462 GCGdecompSetDetectorPctConssToBlock(gcg, *newdecomp, partialdec->getPctConssToBlockVector().data());
1463 GCGdecompSetDetectorPctConssFromOpen(gcg, *newdecomp, partialdec->getPctConssFromFreeVector().data());
1471 if( newnlinkingvars == partialdec->getNTotalStairlinkingvars() && newnlinkingconss == 0 && newnlinkingvars > 0 )
1520 std::sort(conshdlrdata->partialdecs->begin(), conshdlrdata->partialdecs->end(), [&](PARTIALDECOMP* a, PARTIALDECOMP* b) {return (a->getScore(GCGgetCurrentScore(gcg)) > b->getScore(GCGgetCurrentScore(gcg))); });
1540 SCIP_CALL(SCIPgetIntParam(scip, "detection/origprob/advanced/weightinggpresolvedoriginaldecomps", &method) );
1547 score *= (SCIP_Real) conshdlrdata->detprobdataorig->getNNonzeros() / conshdlrdata->detprobdatapres->getNNonzeros();
1555 score *= (SCIP_Real) conshdlrdata->detprobdataorig->getNConss() / conshdlrdata->detprobdatapres->getNConss();
1571 gcg::DETPROBDATA* detprobdata /**< classification is for problem to which these data correspond */
1586 ConsPartition* newpartition = detprobdata->getConsPartition(partitionid)->reduceClasses(maxnclasses);
1590 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, " Added reduced version of conspartition %s with %d different constraint classes \n",
1602 gcg::DETPROBDATA* detprobdata /**< classification is for problem to which these data correspond */
1617 VarPartition* newpartition = detprobdata->getVarPartition(partitionid)->reduceClasses(maxnclasses);
1621 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, " Added reduced version of varpartition %s with %d different variable classes\n",
1666 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/nnonzeros/enabled", TRUE) );
1667 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/scipconstype/enabled", TRUE) );
1668 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/miplibconstype/enabled", TRUE) );
1669 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamenonumbers/enabled", TRUE) );
1671 if( SCIPgetStage(scip) >= SCIP_STAGE_PROBLEM && SCIPgetNVars(scip) + SCIPgetNConss(scip) < DEFAULT_LEVENSHTEIN_MAXMATRIXHALFPERIMETER )
1672 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamelevenshtein/enabled", TRUE) );
1674 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamelevenshtein/enabled", FALSE) );
1689 conshdlrdata->detectors[i]->setParamDefault(conshdlrdata->gcg, conshdlrdata->detectors[i], &result);
1695 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "%s = %s\n", paramname, paramval == TRUE ? "TRUE" : "FALSE");
1700 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "%s = %s\n", paramname, paramval == TRUE ? "TRUE" : "FALSE");
1731 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/nnonzeros/enabled", TRUE) );
1732 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/scipconstype/enabled", TRUE) );
1733 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/miplibconstype/enabled", TRUE) );
1734 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamenonumbers/enabled", TRUE) );
1736 if( SCIPgetStage(scip) >= SCIP_STAGE_PROBLEM && SCIPgetNVars(scip) + SCIPgetNConss(scip) < AGGRESSIVE_LEVENSHTEIN_MAXMATRIXHALFPERIMETER)
1737 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamelevenshtein/enabled", TRUE) );
1739 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamelevenshtein/enabled", FALSE) );
1747 conshdlrdata->detectors[i]->setParamAggressive(conshdlrdata->gcg, conshdlrdata->detectors[i], &result);
1757 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "%s = %s\n", paramname, paramval == TRUE ? "TRUE" : "FALSE");
1762 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "%s = %s\n", paramname, paramval == TRUE ? "TRUE" : "FALSE");
1790 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "detection/detectors/%s/enabled", conshdlrdata->detectors[i]->name);
1802 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "detection/detectors/%s/finishingenabled", conshdlrdata->detectors[i]->name);
1814 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "detection/detectors/%s/postprocessingenabled", conshdlrdata->detectors[i]->name);
1850 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/nnonzeros/enabled", TRUE) );
1851 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/scipconstype/enabled", TRUE) );
1852 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/miplibconstype/enabled", TRUE) );
1853 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamenonumbers/enabled", TRUE) );
1855 if( SCIPgetStage(scip) >= SCIP_STAGE_PROBLEM && SCIPgetNVars(scip) + SCIPgetNConss(scip) < FAST_LEVENSHTEIN_MAXMATRIXHALFPERIMETER )
1856 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamelevenshtein/enabled", TRUE) );
1858 SCIP_CALL(SCIPsetBoolParam(scip, "detection/classification/consclassifier/consnamelevenshtein/enabled", FALSE) );
1869 conshdlrdata->detectors[i]->setParamFast(conshdlrdata->gcg, conshdlrdata->detectors[i], &result);
1878 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "%s = %s\n", paramname, paramval == TRUE ? "TRUE" : "FALSE");
1883 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "%s = %s\n", paramname, paramval == TRUE ? "TRUE" : "FALSE");
1956 detprobdata = (conshdlrdata->detprobdatapres == NULL ? conshdlrdata->detprobdataorig : conshdlrdata->detprobdatapres );
1959 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), NULL, "No block number candidates are calculated yet, consider detecting first.. \n" );
1975 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%f \n", (SCIP_Real) GCGconshdlrDecompGetCompleteDetectionTime(gcg) );
1991 detprobdata = (conshdlrdata->detprobdatapres == NULL ? conshdlrdata->detprobdataorig : conshdlrdata->detprobdatapres );
2027 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%d\n", (*partialdeciter)->getNBlocks());
2031 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%d\n", partialdec->getNConssForBlock(block));
2032 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%d\n", partialdec->getNVarsForBlock(block));
2037 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%d\n", partialdec->getNTotalStairlinkingvars());
2039 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%f\n", partialdec->getScore(GCGconshdlrDecompFindScore(gcg, "classic")));
2040 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%f\n", partialdec->getScore(GCGconshdlrDecompFindScore(gcg, "max foreseeing white")));
2041 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%d\n", partialdec->hasSetppccardMaster());
2042 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%d\n", (int) partialdec->getDetectorchain( ).size());
2148 SCIPdebugMessage("is stage < transformed ? %s -> do %s transformProb() ", (SCIPgetStage(origprob) < SCIP_STAGE_TRANSFORMED ? "yes" : "no"), (SCIPgetStage(origprob) < SCIP_STAGE_TRANSFORMED ? "" : "not") );
2170 SCIPverbMessage(origprob, SCIP_VERBLEVEL_NORMAL, NULL, "start finding decompositions for original problem!\n");
2175 SCIPverbMessage(origprob, SCIP_VERBLEVEL_NORMAL, NULL, "finished finding decompositions for original problem!\n");
2182 std::vector<gcg::PARTIALDECOMP*> partialdecsorig(0); /* partialdecs that were found for the orig problem */
2196 if( SCIPgetStage(origprob) == SCIP_STAGE_INIT || SCIPgetNVars(origprob) == 0 || SCIPgetNConss(origprob) == 0 )
2198 SCIPverbMessage(origprob, SCIP_VERBLEVEL_DIALOG, NULL, "No problem exists, cannot detect structure!\n");
2220 conshdlrdata->detprobdatapres->addCandidatesNBlocksNVotes(candidatesNBlock.first, candidatesNBlock.second);
2252 if( conshdlrdata->detprobdatapres != NULL && conshdlrdata->detprobdatapres->getNFinishedPartialdecs() > 0 )
2255 if( conshdlrdata->detprobdataorig != NULL && conshdlrdata->detprobdataorig->getNFinishedPartialdecs() > 0 )
2258 SCIPdebugMessage("Detection took %fs\n", SCIPgetClockTime( origprob, conshdlrdata->detectorclock));
2260 if( conshdlrdata->detprobdatapres != NULL && SCIPgetVerbLevel(origprob) >= SCIP_VERBLEVEL_FULL )
2264 SCIPverbMessage(origprob, SCIP_VERBLEVEL_HIGH, NULL, "Detection Time: %.2f\n", GCGconshdlrDecompGetCompleteDetectionTime(gcg));
2522 SCIP_ALLOC( BMSduplicateMemoryArray(&classifier->description, description, strlen(description)+1) );
2533 (void) SCIPsnprintf(setstr, SCIP_MAXSTRLEN, "detection/classification/consclassifier/%s/enabled", name);
2534 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "flag to indicate whether constraint classifier for <%s> is enabled", description);
2535 SCIP_CALL( SCIPaddBoolParam(origprob, setstr, descstr, &(classifier->enabled), FALSE, enabled, NULL, NULL) );
2537 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->consclassifiers, (size_t)conshdlrdata->nconsclassifiers+1) );
2538 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->consclassifierpriorities,(size_t) conshdlrdata->nconsclassifiers+1) );
2605 SCIP_ALLOC( BMSduplicateMemoryArray(&detector->description, description, strlen(description)+1) );
2641 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "flag to indicate whether detector <%s> is enabled", name);
2642 SCIP_CALL( SCIPaddBoolParam(origprob, setstr, descstr, &(detector->enabled), FALSE, enabled, NULL, NULL) );
2645 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "flag to indicate whether detector <%s> is enabled for finishing of incomplete decompositions", name);
2646 SCIP_CALL( SCIPaddBoolParam(origprob, setstr, descstr, &(detector->enabledFinishing), FALSE, enabledFinishing, NULL, NULL) );
2648 (void) SCIPsnprintf(setstr, SCIP_MAXSTRLEN, "detection/detectors/%s/postprocessingenabled", name);
2649 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "flag to indicate whether detector <%s> is enabled for postprocessing of finished decompositions", name);
2650 SCIP_CALL( SCIPaddBoolParam(origprob, setstr, descstr, &(detector->enabledPostprocessing), FALSE, enabledPostprocessing, NULL, NULL) );
2653 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "flag to indicate whether detector <%s> should be skipped if others found decompositions", name);
2654 SCIP_CALL( SCIPaddBoolParam(origprob, setstr, descstr, &(detector->skip), FALSE, skip, NULL, NULL) );
2657 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "flag to indicate whether detector <%s> should be called on descendants of the current partialdec", name);
2658 SCIP_CALL( SCIPaddBoolParam(origprob, setstr, descstr, &(detector->usefulRecall), FALSE, usefulRecall, NULL, NULL) );
2661 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "flag to indicate whether emphasis settings for detector <%s> should be overruled by normal settings", name);
2662 SCIP_CALL( SCIPaddBoolParam(origprob, setstr, descstr, &(detector->overruleemphasis), FALSE, FALSE, NULL, NULL) );
2665 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "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 <%s>", name);
2666 SCIP_CALL( SCIPaddIntParam(origprob, setstr, descstr, &(detector->freqCallRound), FALSE, freqCallRound, 0, INT_MAX, NULL, NULL) );
2669 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "maximum round the detector gets called in detection loop <%s>", name);
2670 SCIP_CALL( SCIPaddIntParam(origprob, setstr, descstr, &(detector->maxCallRound), FALSE, maxCallRound, 0, INT_MAX, NULL, NULL) );
2673 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "minimum round the detector gets called in detection loop <%s>", name);
2674 SCIP_CALL( SCIPaddIntParam(origprob, setstr, descstr, &(detector->minCallRound), FALSE, minCallRound, 0, INT_MAX, NULL, NULL) );
2677 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "frequency 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 <%s>", name);
2678 SCIP_CALL( SCIPaddIntParam(origprob, setstr, descstr, &(detector->freqCallRoundOriginal), FALSE, freqCallRoundOriginal, 0, INT_MAX, NULL, NULL) );
2681 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "maximum round the detector gets called in detection loop <%s>", name);
2682 SCIP_CALL( SCIPaddIntParam(origprob, setstr, descstr, &(detector->maxCallRoundOriginal), FALSE, maxCallRoundOriginal, 0, INT_MAX, NULL, NULL) );
2685 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "minimum round the detector gets called in detection loop <%s>", name);
2686 SCIP_CALL( SCIPaddIntParam(origprob, setstr, descstr, &(detector->minCallRoundOriginal), FALSE, minCallRoundOriginal, 0, INT_MAX, NULL, NULL) );
2690 SCIP_CALL( SCIPaddIntParam(origprob, setstr, descstr, &(detector->priority), FALSE, priority, INT_MIN, INT_MAX, NULL, NULL) );
2692 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->detectors, (size_t)conshdlrdata->ndetectors+1) );
2693 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->priorities,(size_t) conshdlrdata->ndetectors+1) );
2699 // TODO ref replace propagatePartialdec by more appropriate name once partialdecs are introduced
2703 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->propagatingdetectors, (size_t)conshdlrdata->npropagatingdetectors+1) );
2712 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->finishingdetectors, (size_t)conshdlrdata->nfinishingdetectors+1) );
2717 // TODO ref replace postprocessPartialdec by more appropriate name once partialdecs are introduced
2721 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->postprocessingdetectors, (size_t)conshdlrdata->npostprocessingdetectors+1) );
2759 SCIP_ALLOC( BMSduplicateMemoryArray(&classifier->description, description, strlen(description)+1) );
2770 (void) SCIPsnprintf(setstr, SCIP_MAXSTRLEN, "detection/classification/varclassifier/%s/enabled", name);
2771 (void) SCIPsnprintf(descstr, SCIP_MAXSTRLEN, "flag to indicate whether variable classifier for <%s> is enabled", description);
2772 SCIP_CALL( SCIPaddBoolParam(origprob, setstr, descstr, &(classifier->enabled), FALSE, enabled, NULL, NULL) );
2774 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->varclassifiers, (size_t)conshdlrdata->nvarclassifiers+1) );
2775 SCIP_CALL( SCIPreallocMemoryArray(origprob, &conshdlrdata->varclassifierpriorities,(size_t) conshdlrdata->nvarclassifiers+1) );
2850 SCIP_ALLOC( BMSduplicateMemoryArray(&score->description, description, strlen(description)+1) );
2856 SCIP_CALL( SCIPreallocMemoryArray(scip, &conshdlrdata->scores, (size_t)conshdlrdata->nscores+1) );
2917 if( presolved && conshdlrdata->detprobdatapres != NULL && conshdlrdata->detprobdatapres->getNFinishedPartialdecs() == 0 )
3061 SCIPverbMessage(GCGgetOrigprob(gcg), SCIP_VERBLEVEL_FULL, NULL, "added block number candidate: %d \n", candidate );
3189 if( partialdec->getUsergiven() == USERGIVEN::COMPLETE || partialdec->getUsergiven() == USERGIVEN::COMPLETED_CONSTOMASTER )
3204 std::vector<PARTIALDECOMP*> newpartialdecs = conshdlrdata->detprobdatapres->translatePartialdecs(conshdlrdata->detprobdataorig, partialdectotranslate, nmaxpresolrounds == 0);
3235 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, " added %s decomp for %s problem with %d blocks and %d masterconss, %d linkingvars, "
3238 partialdec->getNLinkingvars(), partialdec->getNMastervars(), (partialdec->isComplete() ? " " : " at best "),
3282 SCIPverbMessage(scip, SCIP_VERBLEVEL_DIALOG, NULL, "added user block number candidate: %d \n", candidate );
3311 SCIPverbMessage(scip, SCIP_VERBLEVEL_FULL, NULL, " block %d and block %d are represented by %d and %d hence they are identical=%d.\n", probnr1, probnr2,
3326 gcg::DETPROBDATA* detprobdata = (transformed ? conshdlrdata->detprobdatapres : conshdlrdata->detprobdataorig );
3327 /* strategy: for every subset of constraint classes and variable classes calculate gcd (greatest common divisors)
3352 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, " the current consclass distribution includes %d classes but only %d are allowed for GCGconshdlrDecompCalcCandidatesNBlocks()\n", partition->getNClasses(), maximumnclasses );
3357 std::vector<std::vector<int>> subsetsOfConstypes = partition->getAllSubsets(true, true, true );
3363 GCGconshdlrDecompAddCandidatesNBlocks(gcg, detprobdata->isAssignedToOrigProb(), nConssOfClasses[i]);
3374 greatestCD = gcd( nConssOfClasses[subsetsOfConstypes[subset][0]], nConssOfClasses[subsetsOfConstypes[subset][1]] );
3391 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, " the current varclass distribution includes %d classes but only %d are allowed for GCGconshdlrDecompCalcCandidatesNBlocks()\n", partition->getNClasses(), maximumnclasses );
3396 std::vector<std::vector<int>> subsetsOfVartypes = partition->getAllSubsets(true, true, true, true );
3402 GCGconshdlrDecompAddCandidatesNBlocks(gcg, detprobdata->isAssignedToOrigProb(), nVarsOfClasse);
3452 /* check whether the predecessors of all finished partialdecs in both detprobdatas can be found */
3464 SCIPwarningMessage(scip, "Warning: presolved partialdec %d has an ancestor (id: %d) that is not found! \n", partialdec->getID(), id );
3482 SCIPwarningMessage(scip, "Warning: orig partialdec %d has an ancestor (id: %d) that is not found! \n", partialdec->getID(), id );
3507 SCIPerrorMessage("Decomp constraint handler is not included, cannot manage decompositions!\n");
3511 if( (!original && conshdlrdata->detprobdatapres == NULL) || (original && conshdlrdata->detprobdataorig == NULL) )
3525 SCIPverbMessage(scip, SCIP_VERBLEVEL_FULL, NULL, "currently no decomposition is selected, hence every known decomposition is considered: \n");
3534 SCIPverbMessage(scip, SCIP_VERBLEVEL_FULL, NULL, "number of considered decompositions: %ld \n", selectedpartialdecs.size() );
3546 partialdec = GCGconshdlrDecompGetPartialdecFromID(gcg, partialdec->getTranslatedpartialdecid());
3552 SCIPwarningMessage(scip, "A selected decomposition (id=%d) of the orig. problem is ignored since its translation is incomplete.\n", partialdec->getID());
3565 SCIPwarningMessage(scip, "A selected decomposition (id=%d) is ignored since it is incomplete.\n", partialdec->getID());
3603 (void) SCIPsnprintf(setting, SCIP_MAXSTRLEN, "detection/classification/consclassifier/%s/enabled", classifier->name);
3618 (void) SCIPsnprintf(setting, SCIP_MAXSTRLEN, "detection/classification/varclassifier/%s/enabled", classifier->name);
3701 SCIPwarningMessage(scip, "blockid1 should be the representative (hence has id=0 in reptoblocksarray but in fact has %d) \n", repid1);
3888 SCIP_CALL_ABORT( SCIPallocBlockMemoryArray(scip, &conshdlrdata->decomps, GCGconshdlrDecompGetNDecomps(gcg) ) );
4132 /* partialdec is not found hence we should not trust the isomorph information from detection */
4276 return partialdec->getDetprobdata()->getVar(partialdec->getVarsForBlock(block)[blockvarindex]);
4543 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "Detector statistics: time #decompositions #complete decompositions\n");
4576 if( conshdlrdata->partialdecsbyid->find(partialdec->getID()) == conshdlrdata->partialdecsbyid->end())
4650 if( conshdlrdata->detprobdataorig->getNOpenPartialdecs() == 0 && conshdlrdata->detprobdataorig->getNFinishedPartialdecs() == 0 )
4664 std::vector<PARTIALDECOMP *> partialdecstranslated = conshdlrdata->detprobdatapres->translatePartialdecs(
4702 if( conshdlrdata->detprobdataorig->getNOpenPartialdecs() == 0 && conshdlrdata->detprobdataorig->getNFinishedPartialdecs() == 0 )
4708 std::vector<PARTIALDECOMP*> partialdecstranslated = conshdlrdata->detprobdatapres->translatePartialdecs(conshdlrdata->detprobdataorig, nmaxpresolrounds == 0);
4761 if( SCIPconsGetName(cons) == NULL || strcmp(SCIPconsGetName(cons), "") == 0 || consnamemap[SCIPconsGetName(cons)] )
4866 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/enabled", "Enables detection", &conshdlrdata->enabled, FALSE, DEFAULT_ENABLED, NULL, NULL) );
4868 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/postprocess", "Enables postprocessing of complete decompositions",
4879 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/origprob/enabled", "Enables detection for the original problem",
4883 "Weighting method when comparing decompositions for presolved and orig problem", &conshdlrdata->weightinggpresolvedoriginaldecomps, TRUE,
4886 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/benders/onlycontsubpr", "If enabled only decomposition with only continiuous variables in the subproblems are searched",
4889 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/benders/onlybinmaster", "If enabled only decomposition with only binary variables in the master are searched",
4892 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/benders/enabled", "Enables benders detection",
4896 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/classification/enabled", "Enables classification", &conshdlrdata->classify, FALSE, DEFAULT_CLASSIFY, NULL, NULL) );
4898 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/classification/allowduplicates", "If enabled partition duplicates are allowed (for statistical reasons)",
4899 &conshdlrdata->allowpartitionduplicates, FALSE, DEFAULT_ALLOWPARTITIONDUPLICATES, NULL, NULL) );
4901 SCIP_CALL( SCIPaddBoolParam(origprob, "detection/origprob/classificationenabled", "Enables classification for the original problem",
4902 &conshdlrdata->enableorigclassification, FALSE, DEFAULT_ENABLEORIGCLASSIFICATION, NULL, NULL) );
4908 SCIP_CALL( SCIPaddIntParam(origprob, "detection/classification/maxnclassesperpartitionforlargeprobs",
4909 "Maximum number of classes per partition for large problems (nconss + nvars >= 50000)", &conshdlrdata->maxnclassesperpartitionforlargeprobs, FALSE,
4914 "Maximum number of classes a partition can use for voting nblockcandidates", &conshdlrdata->maxnclassesfornblockcandidates, FALSE,
static SCIP_RETCODE partition(SCIP *scip, SCIP_VAR **J, int *Jsize, SCIP_Longint *priority, SCIP_VAR **F, int Fsize, SCIP_VAR **origvar, SCIP_Real *median)
Definition: branch_generic.c:910
SCIP_VAR * a
SCIP_VAR ** b
class storing partialdecs and the problem matrix
class storing (potentially incomplete) decompositions
Definition: class_conspartition.h:60
GCG_EXPORT ConsPartition * reduceClasses(int maxNumberOfClasses)
Definition: class_conspartition.cpp:168
Definition: class_detprobdata.h:110
GCG_EXPORT void addPartialdecToAncestor(PARTIALDECOMP *partialdec)
adds a partialdec to ancestor partialdecs
Definition: class_detprobdata.cpp:586
GCG_EXPORT bool addPartialdecToOpen(PARTIALDECOMP *partialdec)
adds a partialdec to current partialdecs (data structure for partialdecs that are goin to processed i...
Definition: class_detprobdata.cpp:594
GCG_EXPORT ConsPartition * getConsPartition(int partitionIndex)
returns pointer to a constraint partition
Definition: class_detprobdata.cpp:736
GCG_EXPORT int getIndexForCons(SCIP_CONS *cons)
returns the constraint index related to a SCIP constraint
Definition: class_detprobdata.cpp:792
GCG_EXPORT int getNConss()
returns the number of variables considered in the detprobdata
Definition: class_detprobdata.cpp:850
GCG_EXPORT std::vector< SCIP_VAR * > getOrigVarsFixedZero()
returns pointers to all orig vars that are fixed to zero
Definition: class_detprobdata.cpp:916
GCG_EXPORT int getNVarsForCons(int consIndex)
returns the number of variables for a given constraint
Definition: class_detprobdata.cpp:908
GCG_EXPORT PARTIALDECOMP * getFinishedPartialdec(int partialdecindex)
returns a partialdec from finished partialdec data structure
Definition: class_detprobdata.cpp:776
GCG_EXPORT int getNNonzeros()
returns the number of nonzero entries in the coefficient matrix
Definition: class_detprobdata.cpp:890
GCG_EXPORT int getNVars()
return the number of variables considered in the detprobdata
Definition: class_detprobdata.cpp:902
SCIP_Real nblockscandidatescalctime
Definition: class_detprobdata.h:152
GCG_EXPORT void freeTemporaryData()
frees temporary data that is only needed during the detection process
Definition: class_detprobdata.cpp:720
GCG_EXPORT void addVarPartition(VarPartition *partition)
adds a variable partition if it is no duplicate of an existing variable partition
Definition: class_detprobdata.cpp:637
GCG_EXPORT void addPartialdecToFinishedUnchecked(PARTIALDECOMP *partialdec)
adds a partialdec to finished partialdecs without checking for duplicates, dev has to check this on h...
Definition: class_detprobdata.cpp:628
GCG_EXPORT int getNPartialdecs()
Definition: class_detprobdata.cpp:884
GCG_EXPORT SCIP_VAR * getVar(int varIndex)
returns SCIP variable related to a variable index
Definition: class_detprobdata.cpp:1015
GCG_EXPORT void printBlockcandidateInformation(FILE *file)
output method for json file writer to write block candidate information
Definition: class_detprobdata.cpp:1194
GCG_EXPORT std::vector< SCIP_CONS * > getRelevantConss()
returns pointers to all constraints that are not marked as deleted or obsolete
Definition: class_detprobdata.cpp:922
GCG_EXPORT VarPartition * getVarPartition(int partitionIndex)
returns pointer to a variable partition with given index
Definition: class_detprobdata.cpp:999
GCG_EXPORT std::vector< PARTIALDECOMP * > & getFinishedPartialdecs()
gets all finished partialdecs
Definition: class_detprobdata.cpp:786
std::vector< std::pair< int, int > > candidatesNBlocks
Definition: class_detprobdata.h:146
GCG_EXPORT bool addPartialdecToFinished(PARTIALDECOMP *partialdec)
adds a partialdec to finished partialdecs
Definition: class_detprobdata.cpp:611
GCG_EXPORT int getNFinishedPartialdecs()
Definition: class_detprobdata.cpp:878
GCG_EXPORT int getNOpenPartialdecs()
returns size of current (open) partialdec data structure
Definition: class_detprobdata.cpp:872
GCG_EXPORT int getIndexForVar(SCIP_VAR *var)
returns the variable index related to a SCIP variable
Definition: class_detprobdata.cpp:829
GCG_EXPORT void sortFinishedForScore()
sorts partialdecs in finished partialdecs data structure according to the current scoretype
Definition: class_detprobdata.cpp:1270
GCG_EXPORT void printPartitionInformation(FILE *file)
output method for json file writer to write partition candidate information
Definition: class_detprobdata.cpp:1212
GCG_EXPORT std::vector< PARTIALDECOMP * > translatePartialdecs(DETPROBDATA *otherdata, std::vector< PARTIALDECOMP * > otherpartialdecs, SCIP_Bool translateSymmetry)
translates partialdecs if the index structure of the problem has changed, e.g. due to presolving
Definition: class_detprobdata.cpp:1280
GCG_EXPORT void addCandidatesNBlocksNVotes(int candidate, int nvotes)
adds a candidate for block number and counts how often a candidate is added
Definition: class_detprobdata.cpp:527
GCG_EXPORT int getNVarPartitions()
returns number of different variable partitions
Definition: class_detprobdata.cpp:896
GCG_EXPORT int getNConsPartitions()
returns number of different constraint partitions
Definition: class_detprobdata.cpp:844
std::vector< ConsPartition * > conspartitioncollection
Definition: class_detprobdata.h:148
std::vector< VarPartition * > varpartitioncollection
Definition: class_detprobdata.h:149
GCG_EXPORT void addConsPartition(ConsPartition *partition)
adds a constraint partition if it is no duplicate of an existing constraint partition
Definition: class_detprobdata.cpp:553
GCG_EXPORT std::vector< PARTIALDECOMP * > & getOpenPartialdecs()
determines all partialdecs from current (open) partialdec data structure
Definition: class_detprobdata.cpp:770
GCG_EXPORT std::vector< SCIP_VAR * > getRelevantVars()
returns pointers to all problem vars that are not fixed to 0
Definition: class_detprobdata.cpp:928
GCG_EXPORT SCIP_CONS * getCons(int consIndex)
returns the SCIP constraint related to a constraint index
Definition: class_detprobdata.cpp:746
GCG_EXPORT SCIP_Bool isAssignedToOrigProb()
returns true if the matrix structure corresponds to the presolved problem
Definition: class_detprobdata.cpp:1155
GCG_EXPORT void clearCurrentPartialdecs()
clears current partialdec data structure
Definition: class_detprobdata.cpp:677
GCG_EXPORT const char * getName()
Definition: class_indexpartition.cpp:234
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsToBorderVector()
Gets fraction of variables assigned to the border for detectors in detectorchain.
Definition: class_partialdecomp.cpp:4580
GCG_EXPORT int getNMasterconss()
Gets size of the vector containing master conss.
Definition: class_partialdecomp.cpp:4481
GCG_EXPORT SCIP_Bool shouldCompletedByConsToMaster()
Checks whether this partialdec is a userpartialdec that should be completed.
Definition: class_partialdecomp.cpp:5801
GCG_EXPORT std::vector< GCG_DETECTOR * > & getDetectorchain()
returns detector chain as vector of detector pointers
Definition: class_partialdecomp.cpp:3977
GCG_EXPORT void fixVarToStairlinking(int var, int firstblock)
adds a variable to the stairlinking variables
Definition: class_partialdecomp.cpp:5611
GCG_EXPORT int getNEquivalenceClasses()
Gets the number of blockrepresentatives.
Definition: class_partialdecomp.cpp:4515
GCG_EXPORT std::vector< int > & getStairlinkingvars(int block)
Gets vector containing stairlinking vars,.
Definition: class_partialdecomp.cpp:4747
GCG_EXPORT SCIP_Real getScore(GCG_SCORE *score)
returns the score of the partialdec
Definition: class_partialdecomp.cpp:4347
GCG_EXPORT int getAncestorID(int ancestorindex)
gets partialdec id of given ancestor id
Definition: class_partialdecomp.cpp:3853
GCG_EXPORT bool checkConsistency()
Checks whether the assignments in the partialdec are consistent.
Definition: class_partialdecomp.cpp:1722
GCG_EXPORT void setSelected(bool selected)
set the selection status of this partialdecs
Definition: class_partialdecomp.cpp:5395
GCG_EXPORT int getNStairlinkingvars(int block)
Gets size of the vector containing stairlinking vars.
Definition: class_partialdecomp.cpp:4521
GCG_EXPORT std::vector< SCIP_Real > & getPctConssToBlockVector()
Gets fraction of constraints assigned to a block for detectors in detectorchain.
Definition: class_partialdecomp.cpp:4677
GCG_EXPORT USERGIVEN getUsergiven()
Gets the USERGIVEN status of this partialdecs.
Definition: class_partialdecomp.cpp:4408
GCG_EXPORT void setNBlocks(int nblocks)
sets number of blocks, only increasing number allowed
Definition: class_partialdecomp.cpp:5350
GCG_EXPORT std::vector< SCIP_Real > & getDetectorClockTimes()
returns a vector of the clock times that each detector needed that was involved in this partialdec
Definition: class_partialdecomp.cpp:3931
GCG_EXPORT void fixConsToBlock(int cons, int block)
adds a constraint to a block
Definition: class_partialdecomp.cpp:5220
GCG_EXPORT int getNOpenvars()
Gets size of vector containing variables not assigned yet.
Definition: class_partialdecomp.cpp:4509
GCG_EXPORT int getVarProbindexForBlock(int varid, int block)
Gets the index of a variable in the vector returned by PARTIALDECOMP::getVarsForBlock.
Definition: class_partialdecomp.cpp:4780
GCG_EXPORT std::vector< int > & getMasterconss()
Gets array containing all master conss indices.
Definition: class_partialdecomp.cpp:4286
GCG_EXPORT void addPctVarsToBorder(SCIP_Real pct)
adds percentage of variables assigned to border
Definition: class_partialdecomp.cpp:549
GCG_EXPORT int getNDetectors()
Gets the number of detectors the partialdec is propagated by.
Definition: class_partialdecomp.cpp:4447
GCG_EXPORT void completeGreedily()
assigns all open constraints and open variables
Definition: class_partialdecomp.cpp:2537
GCG_EXPORT std::vector< int > & getConssForBlock(int block)
returns array containing constraints assigned to a block
Definition: class_partialdecomp.cpp:3968
GCG_EXPORT const std::vector< int > & getBlocksForEqClass(int eqclass)
get a vector of block ids that are contained in the equivalence class eqclass
Definition: class_partialdecomp.cpp:3868
GCG_EXPORT void buildDecChainString(char *buffer)
creates a detector chain short string for this partialdec, is built from detector chain
Definition: class_partialdecomp.cpp:5842
GCG_EXPORT DETPROBDATA * getDetprobdata()
Gets the corresponding detprobdata.
Definition: class_partialdecomp.cpp:4725
GCG_EXPORT bool isComplete()
Gets whether this partialdec is complete, i.e. it has no more open constraints and variables.
Definition: class_partialdecomp.cpp:4796
GCG_EXPORT void setFinishedByFinisher(bool finished)
sets whether this partialdec was finished by a finishing detector
Definition: class_partialdecomp.cpp:5334
GCG_EXPORT void addPctVarsFromFree(SCIP_Real pct)
adds percentage of closed variables
Definition: class_partialdecomp.cpp:533
GCG_EXPORT int getNOpenconss()
Gets size of vector containing constraints not assigned yet.
Definition: class_partialdecomp.cpp:4503
GCG_EXPORT void calcAggregationInformation(bool ignoreDetectionLimits)
computes if aggregation of sub problems is possible
Definition: class_partialdecomp.cpp:1270
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 setDetectorFinished(GCG_DETECTOR *detector)
sets detector that finished the partialdec
Definition: class_partialdecomp.cpp:5317
GCG_EXPORT void fixVarToLinking(int var)
adds a variable to the linking variables
Definition: class_partialdecomp.cpp:5502
GCG_EXPORT bool aggInfoCalculated()
Checks if the aggregation information was already calculated.
Definition: class_partialdecomp.cpp:5902
GCG_EXPORT std::vector< int > & getLinkingvars()
returns array containing all linking vars indices
Definition: class_partialdecomp.cpp:4261
GCG_EXPORT void fixVarToMaster(int var)
adds a variable to the master variables
Definition: class_partialdecomp.cpp:5566
GCG_EXPORT void addPctConssToBorder(SCIP_Real pct)
adds percentage of constraints assigned to border
Definition: class_partialdecomp.cpp:525
GCG_EXPORT void assignOpenConssToMaster()
assigns open conss to master
Definition: class_partialdecomp.cpp:847
GCG_EXPORT int getEqClassForBlock(int blockid)
Gets index of the representative block for a block, this might be blockid itself.
Definition: class_partialdecomp.cpp:4707
GCG_EXPORT SCIP_Bool hasSetppccardMaster()
checks if all master constraints set partitioning, set packing, set cover, or cardinality constraints
Definition: class_partialdecomp.cpp:3415
GCG_EXPORT bool isAssignedToOrigProb()
Gets whether the partialdec is from the original problem.
Definition: class_partialdecomp.cpp:4835
GCG_EXPORT void setDetectorPropagated(GCG_DETECTOR *detector)
sets partialdec to be propagated by a detector
Definition: class_partialdecomp.cpp:5308
GCG_EXPORT void addPctConssToBlock(SCIP_Real pct)
adds percentage of constraints assigned to blocks
Definition: class_partialdecomp.cpp:517
GCG_EXPORT std::vector< int > & getMastervars()
Gets array containing all master vars indices.
Definition: class_partialdecomp.cpp:4292
GCG_EXPORT void setUsergiven(USERGIVEN usergiven)
sets whether this partialdec is user given
Definition: class_partialdecomp.cpp:5411
GCG_EXPORT std::vector< SCIP_Real > & getPctConssToBorderVector()
Gets fraction of constraints assigned to the border for detectors in detectorchain.
Definition: class_partialdecomp.cpp:4653
GCG_EXPORT int getNLinkingvars()
Gets size of the vector containing linking vars.
Definition: class_partialdecomp.cpp:4459
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsFromFreeVector()
Gets fraction of variables that are not longer open for detectors in detectorchain.
Definition: class_partialdecomp.cpp:4629
GCG_EXPORT void deleteEmptyBlocks(bool variables)
deletes empty blocks and sets nblocks accordingly
Definition: class_partialdecomp.cpp:3019
GCG_EXPORT SCIP_Real getMaxWhiteScore()
gets the maximum white area score
Definition: class_partialdecomp.cpp:5874
GCG_EXPORT std::vector< int > & getRepVarmap(int eqclass, int eqclassblock)
Returns a vector that maps probvar indices of a block contained in an equivalence class to the probva...
Definition: class_partialdecomp.cpp:4715
GCG_EXPORT void addNNewBlocks(int nnewblocks)
adds how many new blocks were introduced
Definition: class_partialdecomp.cpp:501
GCG_EXPORT int getNAncestors()
Gets number of ancestor partialdecs.
Definition: class_partialdecomp.cpp:4414
GCG_EXPORT std::vector< SCIP_Real > & getPctConssFromFreeVector()
Gets fraction of constraints that are not longer open for detectors in detectorchain.
Definition: class_partialdecomp.cpp:4701
GCG_EXPORT int getReprBlockForEqClass(int eqclass)
get the representative block of the given equivalence class
Definition: class_partialdecomp.cpp:3875
GCG_EXPORT void considerImplicits()
: assigns every open cons/var
Definition: class_partialdecomp.cpp:2806
GCG_EXPORT int getNTotalStairlinkingvars()
Gets total number of stairlinking vars.
Definition: class_partialdecomp.cpp:4493
GCG_EXPORT int getNMastervars()
Gets size of the vector containing master vars.
Definition: class_partialdecomp.cpp:4487
GCG_EXPORT int getNConssForBlock(int block)
Gets size of the vector containing conss assigned to a block.
Definition: class_partialdecomp.cpp:4432
GCG_EXPORT void addDecChangesFromAncestor(PARTIALDECOMP *ancestor)
adds the statistical differences to an ancestor
Definition: class_partialdecomp.cpp:461
GCG_EXPORT void addPctConssFromFree(SCIP_Real pct)
adds percentage of closed constraints
Definition: class_partialdecomp.cpp:509
GCG_EXPORT int getID()
returns the unique id of the partialdec
Definition: class_partialdecomp.cpp:4255
GCG_EXPORT void addClockTime(SCIP_Real clocktime)
adds detection time of one detector
Definition: class_partialdecomp.cpp:453
GCG_EXPORT int getTranslatedpartialdecid() const
Definition: class_partialdecomp.cpp:5907
GCG_EXPORT std::vector< int > & getOpenconss()
Gets vector containing constraints not assigned yet.
Definition: class_partialdecomp.cpp:4558
GCG_EXPORT void reorderBlocksForStairlinkingVars()
reorders blocks for making a maximum number of linking vars stairlinking
Definition: class_partialdecomp.cpp:1459
GCG_EXPORT void printPartitionInformation(FILE *file)
prints partition information as described in
Definition: class_partialdecomp.cpp:5094
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsToBlockVector()
returns fraction of variables assigned to a block for detectors in detectorchain
Definition: class_partialdecomp.cpp:4604
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
GCG_EXPORT bool isVarStairlinkingvar(int var)
Checks whether the var is a stairlinking var.
Definition: class_partialdecomp.cpp:5057
GCG_EXPORT std::vector< int > getNNewBlocksVector()
gets number of blocks the detectors in the detectorchain added
Definition: class_partialdecomp.cpp:4475
GCG_EXPORT std::vector< int > & getVarsForBlock(int block)
Gets array containing vars of a block.
Definition: class_partialdecomp.cpp:4771
GCG_EXPORT void addPctVarsToBlock(SCIP_Real pct)
adds percentage of variables assigned to blocks
Definition: class_partialdecomp.cpp:541
GCG_EXPORT bool isPropagatedBy(GCG_DETECTOR *detector)
Gets whether this partialdec was propagated by specified detector.
Definition: class_partialdecomp.cpp:4963
GCG_EXPORT void fixVarToBlock(int var, int block)
adds a variable to the linking variables
Definition: class_partialdecomp.cpp:5457
Definition: class_varpartition.h:61
GCG_EXPORT VarPartition * reduceClasses(int maxNumberOfClasses)
Definition: class_varpartition.cpp:175
void GCGconshdlrDecompDeregisterPartialdecs(GCG *gcg, SCIP_Bool original)
deregisters partialdecs in the conshdlr
Definition: cons_decomp.cpp:3755
std::vector< PARTIALDECOMP * > * GCGconshdlrDecompGetPartialdecs(GCG *gcg)
gets vector of all partialdecs
Definition: cons_decomp.cpp:4397
SCIP_RETCODE GCGconshdlrDecompCreateVarmapForPartialdec(SCIP *scip, SCIP_HASHMAP **hashorig2pricingvar, PARTIALDECOMP_C *partialdecomp, int probnr1, int probnr2, SCIP *scip1, SCIP *scip2, SCIP_HASHMAP *varmap)
Definition: cons_decomp.cpp:3639
SCIP_RETCODE GCGconshdlrDecompTranslateNBestOrigPartialdecs(GCG *gcg, int n, SCIP_Bool completeGreedily, SCIP_Bool translateSymmetry)
translates n best unpresolved partialdec to a complete presolved one
Definition: cons_decomp.cpp:4629
SCIP_Bool GCGconshdlrDecompPartialdecAggregationInformationCalculated(PARTIALDECOMP_C *partialdecomp)
returns whether aggregation information has been calculated for a partialdec
Definition: cons_decomp.cpp:4137
int GCGconshdlrDecompPartialdecGetReprBlockForEqClass(PARTIALDECOMP_C *partialdecomp, int eqclass)
gets the representative block of a equivalence class of partialdec
Definition: cons_decomp.cpp:4168
int GCGconshdlrDecompPartialdecGetNMasterVars(PARTIALDECOMP_C *partialdecomp)
gets number of master variables of partialdec
Definition: cons_decomp.cpp:4235
static int findGenericConsname(SCIP *scip, int startcount, char *consname, int namelength)
finds a non duplicate constraint name of the form c_{a} with minimal natural number {a}
Definition: cons_decomp.cpp:949
static SCIP_RETCODE setDetectionDefault(GCG *gcg, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool quiet)
resets the parameters to their default value
Definition: cons_decomp.cpp:1651
static PARTIALDEC_DETECTION_DATA * createPartialdecDetectionData(gcg::DETPROBDATA *detprobdata, PARTIALDECOMP *partialdec)
initializes a new detection data structure
Definition: cons_decomp.cpp:389
void GCGconshdlrDecompAddCandidatesNBlocks(GCG *gcg, SCIP_Bool origprob, int candidate)
adds a candidate for block number and counts how often a candidate is added
Definition: cons_decomp.cpp:3035
static SCIP_DECL_CONSENFORELAX(consEnforeDecomp)
Definition: cons_decomp.cpp:901
static SCIP_RETCODE setDetectionOff(GCG *gcg, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool quiet)
disables detectors
Definition: cons_decomp.cpp:1776
SCIP_Real GCGconshdlrDecompGetCompleteDetectionTime(GCG *gcg)
returns the total detection time
Definition: cons_decomp.cpp:3856
int GCGconshdlrDecompGetNBlockNumberCandidates(GCG *gcg)
returns the number of block candidates given by the user
Definition: cons_decomp.cpp:4018
void GCGconshdlrDecompFreeOrigOnExit(GCG *gcg, SCIP_Bool free)
sets freeing of detection data of original problem during exit to true
Definition: cons_decomp.cpp:3831
static void reduceConsclasses(GCG *gcg, gcg::DETPROBDATA *detprobdata)
adds constraint partitions with a reduced number of classes
Definition: cons_decomp.cpp:1569
#define FAST_LEVENSHTEIN_MAXMATRIXHALFPERIMETER
Definition: cons_decomp.cpp:112
GCG_CONSCLASSIFIER * GCGfindConsClassifier(GCG *gcg, const char *name)
searches for the consclassifier with the given name and returns it or NULL if classifier is not found
Definition: cons_decomp.cpp:2279
const char * GCGdetectorGetName(GCG_DETECTOR *detector)
returns the name of the provided detector
Definition: cons_decomp.cpp:2084
GCG_VARCLASSIFIER * GCGfindVarClassifier(GCG *gcg, const char *name)
searches for the varclassifier with the given name and returns it or NULL if classifier is not found
Definition: cons_decomp.cpp:2305
static SCIP_RETCODE createPartialdecFromDecomp(GCG *gcg, GCG_DECOMP *decomp, PARTIALDECOMP **newpartialdec)
creates a partialdec for a given decomposition
Definition: cons_decomp.cpp:981
std::string GCGconshdlrDecompPartialdecGetDetectorHistory(PARTIALDECOMP_C *partialdecomp)
Definition: cons_decomp.cpp:3904
static SCIP_CONSHDLRDATA * getConshdlrdata(GCG *gcg)
local function to get the conshdlr data of the current conshdlr
Definition: cons_decomp.cpp:227
GCG_SCORE ** GCGconshdlrDecompGetScores(GCG *gcg)
Gets an array of all scores.
Definition: cons_decomp.cpp:3928
SCIP_Bool GCGconshdlrDecompCheckConsistency(GCG *gcg)
check whether partialdecs are consistent
Definition: cons_decomp.cpp:3443
SCIP_Real GCGconshdlrDecompAdaptScore(GCG *gcg, SCIP_Real oldscore)
method to adapt score for orig decomps
Definition: cons_decomp.cpp:1528
int GCGconshdlrDecompGetNDetectors(GCG *gcg)
Gets the number of all detectors.
Definition: cons_decomp.cpp:4061
int GCGconshdlrDecompGetNVarClassifiers(GCG *gcg)
Gets the number of all variable classifiers.
Definition: cons_decomp.cpp:4081
const int * GCGconshdlrDecompPartialdecGetBlocksForEqClass(PARTIALDECOMP_C *partialdecomp, int eqclass)
gets the blocks of a equivalence class of partialdec
Definition: cons_decomp.cpp:4179
SCIP_RETCODE GCGconshdlrDecompClassify(GCG *gcg, SCIP_Bool transformed)
run classification of vars and cons
Definition: cons_decomp.cpp:3576
SCIP_RETCODE GCGwriteAllDecomps(GCG *gcg, char *directory, char *extension, SCIP_Bool original, SCIP_Bool presolved)
write out all known decompositions
Definition: cons_decomp.cpp:2893
int GCGconshdlrDecompDecreaseNCallsCreateDecomp(GCG *gcg)
decreases the counter for created decompositions and returns it
Definition: cons_decomp.cpp:3742
SCIP_RETCODE GCGconshdlrDecompTranslateOrigPartialdecs(GCG *gcg)
translates unpresolved partialdec to a complete presolved one
Definition: cons_decomp.cpp:4680
static void getFinishedPartialdecs(GCG *gcg, std::vector< PARTIALDECOMP * > &finishedpartialdecs)
gets vector of all finished partialdecs
Definition: cons_decomp.cpp:345
void GCGconshdlrDecompCalcCandidatesNBlocks(GCG *gcg, SCIP_Bool transformed)
calculates and adds block size candidates using constraint classifications and variable classificatio...
Definition: cons_decomp.cpp:3319
static SCIP_RETCODE setDetectionFast(GCG *gcg, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool quiet)
sets the parameters to fast values
Definition: cons_decomp.cpp:1833
static SCIP_DECL_CONSFREE(consFreeDecomp)
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition: cons_decomp.cpp:790
SCIP_RETCODE GCGconshdlrDecompAddPreexistingDecomp(GCG *gcg, GCG_DECOMP *decomp)
adds a decomp that exists before the detection is called
Definition: cons_decomp.cpp:3112
int GCGconshdlrDecompPartialdecGetNEquivalenceClasses(PARTIALDECOMP_C *partialdecomp)
gets number of equivalence classes of partialdec
Definition: cons_decomp.cpp:4158
static SCIP_RETCODE resetDetprobdata(GCG *gcg, SCIP_Bool original)
resets/creates the detprobdata for the given problem
Definition: cons_decomp.cpp:408
SCIP_RETCODE GCGconshdlrDecompArePricingprobsIdenticalForPartialdec(SCIP *scip, PARTIALDECOMP_C *partialdecomp, int probnr1, int probnr2, SCIP_Bool *identical)
Definition: cons_decomp.cpp:3286
SCIP_Real GCGgetRemainingTime(GCG *gcg)
returns the remaining time of scip that the decomposition may use
Definition: cons_decomp.cpp:2480
const int * GCGconshdlrDecompPartialdecGetRepVarMap(PARTIALDECOMP_C *partialdecomp, int eqclass, int eqclassblock)
Returns a vector that maps probvar indices of a block contained in an equivalence class to the probva...
Definition: cons_decomp.cpp:4201
SCIP_Bool GCGconshdlrDecompPresolvedDetprobdataExists(GCG *gcg)
returns whether or not a detprobdata structure for the presolved problem exists
Definition: cons_decomp.cpp:4519
int GCGconshdlrDecompPartialdecGetNVarsForBlock(PARTIALDECOMP_C *partialdecomp, int block)
gets the number of variables of a block
Definition: cons_decomp.cpp:4280
unsigned int GCGconshdlrDecompGetNFinishedPartialdecsOrig(GCG *gcg)
Gets the number of finished partialdecs available for the original problem.
Definition: cons_decomp.cpp:4291
GCG_SCORE * GCGconshdlrDecompFindScoreByShortname(GCG *gcg, const char *shortname)
searches for the score with the given shortname and returns it or NULL if score is not found
Definition: cons_decomp.cpp:2385
SCIP_Real GCGconshdlrDecompGetScoreTotalTime(GCG *gcg)
gets total score computation time
Definition: cons_decomp.cpp:3254
SCIP_RETCODE GCGconshdlrDecompSetDetection(GCG *gcg, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
sets detector parameters values
Definition: cons_decomp.cpp:4598
SCIP_RETCODE GCGwriteSelectedDecomps(GCG *gcg, char *directory, char *extension)
writes all selected decompositions
Definition: cons_decomp.cpp:2964
int GCGconshdlrDecompPartialdecGetNMasterConss(PARTIALDECOMP_C *partialdecomp)
gets number of master constraints of partialdec
Definition: cons_decomp.cpp:4224
GCG_VARCLASSIFIER ** GCGconshdlrDecompGetVarClassifiers(GCG *gcg)
gets an array of all variable classifier
Definition: cons_decomp.cpp:3951
static SCIP_RETCODE setDetectionEnabled(GCG *gcg, SCIP_Bool quiet, SCIP_Bool enabled)
sets detection/enabled setting
Definition: cons_decomp.cpp:1632
#define DEFAULT_LEVENSHTEIN_MAXMATRIXHALFPERIMETER
Definition: cons_decomp.cpp:110
static SCIP_RETCODE deletePartialdecDetectionData(SCIP *scip, PARTIALDEC_DETECTION_DATA *data)
delets the detection data structure
Definition: cons_decomp.cpp:446
int GCGconshdlrDecompPartialdecGetNOpenConss(PARTIALDECOMP_C *partialdecomp)
gets number of open constraints of partialdec
Definition: cons_decomp.cpp:4246
#define DEFAULT_MAXNCLASSESFORNBLOCKCANDIDATES
Definition: cons_decomp.cpp:98
SCIP_Bool GCGconshdlrDecompIsSelected(PARTIALDECOMP_C *partialdecomp)
Definition: cons_decomp.cpp:4480
SCIP_VAR * GCGconshdlrDecompPartialdecGetOrigVarForBlock(PARTIALDECOMP_C *partialdecomp, int block, int blockvarindex)
returns the original variable for a block and index
Definition: cons_decomp.cpp:4268
int GCGconshdlrDecompGetNextPartialdecID(GCG *gcg)
Gets the next partialdec id managed by cons_decomp.
Definition: cons_decomp.cpp:4102
GCG_DETECTORDATA * GCGdetectorGetData(GCG_DETECTOR *detector)
returns the data of the provided detector
Definition: cons_decomp.cpp:2075
void GCGconshdlrDecompRegisterPartialdec(GCG *gcg, PARTIALDECOMP *partialdec)
registers a partialdec in the conshdlr
Definition: cons_decomp.cpp:4568
void GCGconshdlrDecompFreeDetprobdata(GCG *gcg)
Frees Detprobdata of the original and transformed/presolved problem.
Definition: cons_decomp.cpp:3810
void GCGconshdlrDecompDeregisterPartialdec(GCG *gcg, PARTIALDECOMP *partialdec)
deregisters a partialdec in the conshdlr
Definition: cons_decomp.cpp:3774
GCG_SCORE * GCGgetCurrentScore(GCG *gcg)
Gets the currently enabled score.
Definition: cons_decomp.cpp:2796
static void sortPartialdecs(GCG *gcg)
sorts all registered partialdecs according to score, descending
Definition: cons_decomp.cpp:1513
void GCGconshdlrDecompAddUserCandidatesNBlocks(GCG *gcg, int candidate)
adds a candidate for block size given by the user
Definition: cons_decomp.cpp:3264
GCG_CONSCLASSIFIER ** GCGconshdlrDecompGetConsClassifiers(GCG *gcg)
gets an array of all constraint classifier
Definition: cons_decomp.cpp:3940
SCIP_RETCODE GCGconshdlrDecompSelectPartialdec(PARTIALDECOMP_C *partialdecomp, SCIP_Bool select)
selects/unselects a partialdecomp
Definition: cons_decomp.cpp:4584
static SCIP_RETCODE unselectAllPartialdecs(GCG *gcg)
Definition: cons_decomp.cpp:367
SCIP_Bool GCGconshdlrDecompIsPresolved(PARTIALDECOMP_C *partialdecomp)
Definition: cons_decomp.cpp:4469
DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved(GCG *gcg)
help method to access detprobdata for transformed problem
Definition: cons_decomp.cpp:3976
SCIP_RETCODE GCGconshdlrDecompGetFinishedPartialdecsList(GCG *gcg, int **idlist, int *listlength)
Gets a list of ids of the current partialdecs that are finished.
Definition: cons_decomp.cpp:3990
int GCGconshdlrDecompGetNConsClassifiers(GCG *gcg)
Gets the number of all constraint classifiers.
Definition: cons_decomp.cpp:4071
unsigned int GCGconshdlrDecompGetNOpenPartialdecsTransformed(GCG *gcg)
Gets the number of open partialdecs available for the transformed problem.
Definition: cons_decomp.cpp:4333
int GCGconshdlrDecompAddMatrixPartialdec(GCG *gcg, SCIP_Bool presolved)
creates a pure matrix partialdecomp (i.e. all cons/vars to one single block)
Definition: cons_decomp.cpp:3068
static std::vector< PARTIALDECOMP * > getSelectedPartialdecs(GCG *gcg, std::vector< PARTIALDECOMP * > &selectedpartialdecs)
gets all selected partialdecs
Definition: cons_decomp.cpp:322
SCIP_RETCODE GCGconshdlrDecompAddBasicPartialdec(GCG *gcg, SCIP_Bool presolved, PARTIALDECOMP_C **partialdecomp)
creates and adds a basic partialdecomp (all cons/vars are assigned to master)
Definition: cons_decomp.cpp:3019
static SCIP_DECL_CONSEXIT(consExitDecomp)
deinitialization method of constraint handler (called before transformed problem is freed)
Definition: cons_decomp.cpp:737
SCIP_Real GCGconshdlrDecompPartialdecGetScore(PARTIALDECOMP_C *partialdecomp)
Definition: cons_decomp.cpp:4423
unsigned int GCGconshdlrDecompGetNPartialdecsTransformed(GCG *gcg)
Gets the number of partialdecs available for the transformed problem.
Definition: cons_decomp.cpp:4372
static SCIP_RETCODE addPartialdec(GCG *gcg, PARTIALDECOMP *partialdec)
local method to handle store a partialdec in the correct detprobdata
Definition: cons_decomp.cpp:251
SCIP_RETCODE GCGincludeVarClassifier(GCG *gcg, const char *name, const char *description, int priority, SCIP_Bool enabled, GCG_CLASSIFIERDATA *classifierdata, GCG_DECL_FREEVARCLASSIFIER((*freeClassifier)),)
Definition: cons_decomp.cpp:2730
SCIP_Bool GCGdetectionTookPlace(GCG *gcg, SCIP_Bool original)
Definition: cons_decomp.cpp:4722
SCIP_Bool GCGconshdlrDecompOrigDetprobdataExists(GCG *gcg)
returns whether or not a detprobdata structure for the original problem exists
Definition: cons_decomp.cpp:4491
static SCIP_Retcode detect(GCG *gcg, gcg::DETPROBDATA *detprobdata)
constructs partialdecs using the registered detectors
Definition: cons_decomp.cpp:468
DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig(GCG *gcg)
help method to access detprobdata for unpresolved problem
Definition: cons_decomp.cpp:3962
SCIP_RETCODE GCGconshdlrDecompGetPartialdecsList(GCG *gcg, int **idlist, int *listlength)
Gets a list of ids of the current partialdecs.
Definition: cons_decomp.cpp:4004
GCG_DETECTOR * GCGfindDetector(GCG *gcg, const char *name)
searches for the detector with the given name and returns it or NULL if detector is not found
Definition: cons_decomp.cpp:2331
SCIP_RETCODE GCGincludeConshdlrDecomp(GCG *gcg)
creates the constraint handler for decomp and includes it in SCIP
Definition: cons_decomp.cpp:4795
int GCGconshdlrDecompPartialdecGetNBlocks(PARTIALDECOMP_C *partialdecomp)
gets block number of partialdec
Definition: cons_decomp.cpp:4029
static SCIP_RETCODE setDetectionAggressive(GCG *gcg, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool quiet)
sets the parameters to aggressive values
Definition: cons_decomp.cpp:1714
SCIP_RETCODE GCGdetectStructure(GCG *gcg, SCIP_RESULT *result)
interface method to detect the structure including presolving
Definition: cons_decomp.cpp:2093
SCIP_RETCODE GCGconshdlrDecompPrintDetectorStatistics(GCG *gcg, FILE *file)
display statistics about detectors
Definition: cons_decomp.cpp:4533
SCIP_RETCODE GCGconshdlrDecompChooseCandidatesFromSelected(GCG *gcg, std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > &candidates, SCIP_Bool original, SCIP_Bool printwarnings)
Definition: cons_decomp.cpp:3493
#define DEFAULT_ENABLEORIGCLASSIFICATION
Definition: cons_decomp.cpp:105
int GCGconshdlrDecompGetNFormerDetectionConssForID(GCG *gcg, int id)
gets number of active constraints during the detection of the decomp with given id
Definition: cons_decomp.cpp:4117
#define AGGRESSIVE_LEVENSHTEIN_MAXMATRIXHALFPERIMETER
Definition: cons_decomp.cpp:111
char * GCGgetCurrentScoreShortname(GCG *gcg)
Gets the shortname of the currently enabled score.
Definition: cons_decomp.cpp:2783
char GCGdetectorGetChar(GCG_DETECTOR *detector)
Gets the character of the detector.
Definition: cons_decomp.cpp:2064
int GCGconshdlrDecompPartialdecGetNBlocksForEqClass(PARTIALDECOMP_C *partialdecomp, int eqclass)
gets the number of blocks of a equivalence class of partialdec
Definition: cons_decomp.cpp:4190
static SCIP_DECL_CONSINIT(consInitDecomp)
initialization method of constraint handler (called after problem was transformed)
Definition: cons_decomp.cpp:704
GCG_DECOMP ** GCGconshdlrDecompGetDecomps(GCG *gcg)
returns an array containing all decompositions
Definition: cons_decomp.cpp:3871
unsigned int GCGconshdlrDecompGetNPartialdecsOrig(GCG *gcg)
Gets the number of partialdecs available for the original problem.
Definition: cons_decomp.cpp:4358
SCIP_RETCODE SCIPconshdlrDecompRepairConsNames(GCG *gcg)
Definition: cons_decomp.cpp:4734
int GCGconshdlrDecompGetNScores(GCG *gcg)
Gets the number of all scores.
Definition: cons_decomp.cpp:4091
SCIP_RETCODE GCGconshdlrDecompIncludeScore(GCG *gcg, const char *name, const char *shortname, const char *description, GCG_SCOREDATA *scoredata, GCG_DECL_SCOREFREE((*scorefree)),)
Definition: cons_decomp.cpp:2822
int GCGconshdlrDecompPartialdecGetNOpenVars(PARTIALDECOMP_C *partialdecomp)
gets number of open variables of partialdec
Definition: cons_decomp.cpp:4257
PARTIALDECOMP * GCGgetPartialdecToWrite(GCG *gcg, SCIP_Bool transformed)
Definition: cons_decomp.cpp:2441
void GCGprintListOfDetectors(GCG *gcg)
writes out a list of all detectors
Definition: cons_decomp.cpp:2864
int GCGconshdlrDecompGetNDecomps(GCG *gcg)
gets the number of decompositions (= amount of finished partialdecs)
Definition: cons_decomp.cpp:4040
unsigned int GCGconshdlrDecompGetNFinishedPartialdecsTransformed(GCG *gcg)
Gets the number of finished partialdecs available for the transformed problem.
Definition: cons_decomp.cpp:4305
int GCGconshdlrDecompIncreaseNCallsCreateDecomp(GCG *gcg)
counts up the counter for created decompositions and returns it
Definition: cons_decomp.cpp:4456
SCIP_CLOCK * GCGconshdlrDecompGetScoreClock(GCG *gcg)
gets the clock tracking the score computation time
Definition: cons_decomp.cpp:3245
int GCGconshdlrDecompPartialdecGetNLinkingVars(PARTIALDECOMP_C *partialdecomp)
gets number of linking variables of partialdec
Definition: cons_decomp.cpp:4213
static SCIP_RETCODE partialdecVecToIdArray(std::vector< PARTIALDECOMP * > &partialdecs, int **idlist, int *listlength)
translates a vector of PARTIALDECOMP pointers into an array of their ids
Definition: cons_decomp.cpp:302
GCG_DECOMP * GCGgetBestDecomp(GCG *gcg, SCIP_Bool printwarnings)
Gets the best known decomposition.
Definition: cons_decomp.cpp:2413
static SCIP_RETCODE createDecompFromPartialdec(GCG *gcg, PARTIALDECOMP *partialdec, GCG_DECOMP **newdecomp)
creates a decomposition GCG_DECOMP structure for a given partialdec
Definition: cons_decomp.cpp:1096
SCIP_Bool GCGconshdlrDecompOrigPartialdecExists(GCG *gcg)
returns whether or not an original decompositions exists in the data structures
Definition: cons_decomp.cpp:4505
#define DEFAULT_ALLOWPARTITIONDUPLICATES
Definition: cons_decomp.cpp:103
unsigned int GCGconshdlrDecompGetNOpenPartialdecsOrig(GCG *gcg)
Gets the number of open partialdecs available for the original problem.
Definition: cons_decomp.cpp:4319
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
SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec(GCG *gcg, PARTIALDECOMP *partialdec)
adds a preexisting partial dec to be considered at the beginning of the detection
Definition: cons_decomp.cpp:3133
GCG_DETECTOR ** GCGconshdlrDecompGetDetectors(GCG *gcg)
Gets an array of all detectors.
Definition: cons_decomp.cpp:3917
#define DEFAULT_BLOCKNUMBERCANDSMEDIANVARSPERCONS
Definition: cons_decomp.cpp:91
unsigned int GCGconshdlrDecompGetNPartialdecs(GCG *gcg)
Gets the number of all partialdecs.
Definition: cons_decomp.cpp:4347
GCG_SCORE * GCGconshdlrDecompFindScore(GCG *gcg, const char *name)
searches for the score with the given name and returns it or NULL if score is not found
Definition: cons_decomp.cpp:2357
int GCGconshdlrDecompPartialdecGetNStairlinkingVars(PARTIALDECOMP_C *partialdecomp)
gets number of stairlinking variables of partialdec
Definition: cons_decomp.cpp:4386
SCIP_RETCODE GCGconshdlrDecompPrintScoreStatistics(GCG *gcg, FILE *file)
display statistics about scores
Definition: cons_decomp.cpp:4555
void GCGconshdlrDecompPartialdecCalcAggregationInformation(PARTIALDECOMP_C *partialdecomp, SCIP_Bool ignoreDetectionLimits)
calculates aggregation information for a partialdec
Definition: cons_decomp.cpp:4147
static void reduceVarclasses(GCG *gcg, gcg::DETPROBDATA *detprobdata)
adds variable partitions with a reduced number of classes
Definition: cons_decomp.cpp:1600
static int gcd(int a, int b)
method to calculate the greatest common divisor
Definition: cons_decomp.cpp:1897
SCIP_RETCODE GCGconshdlrDecompGetSelectedPartialdecs(GCG *gcg, int **idlist, int *listlength)
Gets a list of ids of all currently selected partialdecs.
Definition: cons_decomp.cpp:4434
SCIP_RETCODE GCGincludeConsClassifier(GCG *gcg, const char *name, const char *description, int priority, SCIP_Bool enabled, GCG_CLASSIFIERDATA *classifierdata, GCG_DECL_FREECONSCLASSIFIER((*freeClassifier)),)
Definition: cons_decomp.cpp:2494
int GCGconshdlrDecompGetBlockNumberCandidate(GCG *gcg, int index)
returns block number user candidate with given index
Definition: cons_decomp.cpp:3843
PARTIALDECOMP * GCGconshdlrDecompGetPartialdecFromID(GCG *gcg, int partialdecid)
local method to find a partialdec for a given id or NULL if no partialdec with such id is found
Definition: cons_decomp.cpp:281
constraint handler for structure detection
C++ interface of cons_decomp.
GCG_DECL_PROPAGATEPARTIALDEC(detectorPropagatePartialdecIsomorph)
Definition: dec_isomorph.cpp:1205
GCG_DECL_FREEDETECTOR(freeNeighborhoodmaster)
Definition: dec_neighborhoodmaster.cpp:102
GCG_EXPORT SCIP_RETCODE GCGdecompSetDetectorChainString(GCG *gcg, GCG_DECOMP *decomp, const char *detectorchainstring)
Definition: decomp.c:1730
void GCGdecompSetConsindex(GCG_DECOMP *decomp, SCIP_HASHMAP *consindex)
Definition: decomp.c:1273
SCIP_Real * GCGdecompGetDetectorClockTimes(GCG_DECOMP *decomp)
Definition: decomp.c:1721
GCG_EXPORT SCIP_Real * GCGdecompGetDetectorPctConssToBlock(GCG_DECOMP *decomp)
Definition: decomp.c:1886
void GCGdecompSetPresolved(GCG_DECOMP *decomp, SCIP_Bool presolved)
Definition: decomp.c:724
void GCGdecompSetMaxWhiteScore(GCG *gcg, GCG_DECOMP *decdecomp, SCIP_Real maxwhitescore)
Definition: decomp.c:3296
GCG_DETECTOR ** GCGdecompGetDetectorChain(GCG_DECOMP *decomp)
Definition: decomp.c:1626
void GCGdecompSetDetector(GCG_DECOMP *decomp, GCG_DETECTOR *detector)
Definition: decomp.c:1605
SCIP_VAR *** GCGdecompGetStairlinkingvars(GCG_DECOMP *decomp)
Definition: decomp.c:1173
SCIP_RETCODE GCGdecompCheckConsistency(GCG *gcg, GCG_DECOMP *decdecomp)
Definition: decomp.c:2297
void GCGdecompSetVarindex(GCG_DECOMP *decomp, SCIP_HASHMAP *varindex)
Definition: decomp.c:1253
SCIP_HASHMAP * GCGdecompGetConstoblock(GCG_DECOMP *decomp)
Definition: decomp.c:1243
SCIP_Real * GCGdecompGetDetectorPctConssToBorder(GCG_DECOMP *decomp)
Definition: decomp.c:1816
SCIP_RETCODE GCGdecompSetType(GCG_DECOMP *decomp, GCG_DECTYPE type)
Definition: decomp.c:659
SCIP_RETCODE GCGdecompAddRemainingConss(GCG *gcg, GCG_DECOMP *decdecomp)
Definition: decomp.c:2206
SCIP_RETCODE GCGdecompCreate(GCG *gcg, GCG_DECOMP **decdecomp)
Definition: decomp.c:480
SCIP_RETCODE GCGdecompSetSubscipvars(GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR ***subscipvars, int *nsubscipvars)
Definition: decomp.c:767
SCIP_Real * GCGdecompGetDetectorPctVarsFromOpen(GCG_DECOMP *decomp)
Definition: decomp.c:1924
SCIP_CONS ** GCGdecompGetLinkingconss(GCG_DECOMP *decomp)
Definition: decomp.c:985
void GCGdecompSetNNewBlocks(GCG *gcg, GCG_DECOMP *decomp, int *nNewBlocks)
Definition: decomp.c:1970
SCIP_RETCODE GCGdecompSetLinkingvars(GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR **linkingvars, int nlinkingvars, int nfixedlinkingvars, int nmastervars)
Definition: decomp.c:1007
void GCGdecompSetVartoblock(GCG_DECOMP *decomp, SCIP_HASHMAP *vartoblock)
Definition: decomp.c:1209
void GCGdecompSetPartialdecID(GCG_DECOMP *decomp, int id)
Definition: decomp.c:1673
SCIP_RETCODE GCGdecompSetStairlinkingvars(GCG *gcg, GCG_DECOMP *decomp, SCIP_VAR ***stairlinkingvars, int *nstairlinkingvars)
Definition: decomp.c:1101
void GCGdecompSetDetectorPctVarsToBorder(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsToBorder)
Definition: decomp.c:1754
SCIP_HASHMAP * GCGdecompGetVartoblock(GCG_DECOMP *decomp)
Definition: decomp.c:1221
void GCGdecompSetNBlocks(GCG_DECOMP *decomp, int nblocks)
Definition: decomp.c:745
void GCGdecompSetDetectorPctConssFromOpen(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssFromOpen)
Definition: decomp.c:1932
SCIP_RETCODE GCGdecompSetSubscipconss(GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS ***subscipconss, int *nsubscipconss)
Definition: decomp.c:857
SCIP_RETCODE GCGdecompSetLinkingconss(GCG *gcg, GCG_DECOMP *decomp, SCIP_CONS **linkingconss, int nlinkingconss)
Definition: decomp.c:942
void GCGdecompSetDetectorPctVarsFromOpen(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsFromOpen)
Definition: decomp.c:1895
void GCGdecompSetDetectorPctVarsToBlock(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctVarsToBlock)
Definition: decomp.c:1824
void GCGdecompSetDetectorClockTimes(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *detectorClockTimes)
Definition: decomp.c:1694
SCIP_Real * GCGdecompGetDetectorPctVarsToBlock(GCG_DECOMP *decomp)
Definition: decomp.c:1850
void GCGdecompSetDetectorPctConssToBlock(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssToBlock)
Definition: decomp.c:1858
void GCGdecompSetDetectorPctConssToBorder(GCG *gcg, GCG_DECOMP *decomp, SCIP_Real *pctConssToBorder)
Definition: decomp.c:1788
SCIP_Real * GCGdecompGetDetectorPctConssFromOpen(GCG_DECOMP *decomp)
Definition: decomp.c:1962
int * GCGdecompGetNStairlinkingvars(GCG_DECOMP *decomp)
Definition: decomp.c:1182
SCIP_RETCODE GCGdecompSetDetectorChain(GCG *gcg, GCG_DECOMP *decomp, GCG_DETECTOR **detectors, int ndetectors)
Definition: decomp.c:1635
int GCGdecompGetDetectorChainSize(GCG_DECOMP *decomp)
Definition: decomp.c:1663
void GCGdecompSetConstoblock(GCG_DECOMP *decomp, SCIP_HASHMAP *constoblock)
Definition: decomp.c:1231
GCG_EXPORT SCIP_Real * GCGdecompGetDetectorPctVarsToBorder(GCG_DECOMP *decomp)
Definition: decomp.c:1780
private methods for working with decomp structures
#define SCIP_MAXSTRLEN
#define SCIP_Bool
#define SCIP_CALL_QUIET(x)
#define MIN(x, y)
#define SCIP_ALLOC(x)
#define SCIP_Real
#define SCIP_CALL_ABORT(x)
#define SCIP_CALL(x)
#define TRUE
#define FALSE
SCIP_VAR * GCGpricingVarGetOriginalVar(SCIP_VAR *var)
Definition: gcgvar.c:590
SCIP_RETCODE GCGprintPartitionInformation(GCG *gcg, FILE *file)
Definition: cons_decomp.cpp:1982
SCIP_RETCODE GCGprintBlockcandidateInformation(GCG *gcg, FILE *file)
Definition: cons_decomp.cpp:1946
SCIP_RETCODE GCGprintCompleteDetectionTime(GCG *gcg, FILE *file)
Definition: cons_decomp.cpp:1968
SCIP_RETCODE GCGprintDecompInformation(GCG *gcg, FILE *file)
Definition: cons_decomp.cpp:2000
GCG_EXPORT GCG_DECMODE GCGgetDecompositionMode(GCG *gcg)
Definition: relax_gcg.c:5294
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
int SCIPgetNOrigConss(SCIP *scip)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNOrigVars(SCIP *scip)
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
SCIP_CONS * SCIPfindCons(SCIP *scip, const char *name)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_VERBLEVEL SCIPgetVerbLevel(SCIP *scip)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddStringParam(SCIP *scip, const char *name, const char *desc, char **valueptr, SCIP_Bool isadvanced, const char *defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPresetParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetStringParam(SCIP *scip, const char *name, const char *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 SCIPgetIntParam(SCIP *scip, const char *name, int *value)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPchgConsName(SCIP *scip, SCIP_CONS *cons, const char *name)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
SCIP_Bool SCIPconsIsObsolete(SCIP_CONS *cons)
#define SCIPfreeMemoryArrayNull(scip, ptr)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPreallocMemoryArray(scip, ptr, newnum)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeMemoryArray(scip, ptr)
#define SCIPfreeMemory(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
SCIP_RETCODE SCIPcreateClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_RETCODE SCIPresetClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstopClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_RETCODE SCIPfreeClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_Real SCIPgetClockTime(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
#define NULL
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSfreeMemoryArray(ptr)
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
void GCGgetVisualizationFilename(GCG *gcg, PARTIALDECOMP *partialdec, const char *extension, char *filename)
Definition: miscvisualization.cpp:61
miscellaneous methods for visualizations
Definition: class_conspartition.cpp:44
struct gcg::subset subset
char * SCIPparamGetString(SCIP_PARAM *param)
#define SCIPerrorMessage
#define SCIPdebugMessage
GCG relaxator.
various SCIP helper methods
Definition: struct_consclassifier.h:44
Definition: struct_decomp.h:53
Definition: dec_compgreedily.cpp:75
Definition: struct_detector.h:47
Definition: score_bender.cpp:52
Definition: struct_score.h:49
Definition: struct_varclassifier.h:44
Definition: struct_gcg.h:55
interface data structure for the detector calling methods
Definition: class_detprobdata.h:746
gcg::PARTIALDECOMP ** newpartialdecs
Definition: class_detprobdata.h:749
gcg::PARTIALDECOMP * workonpartialdec
Definition: class_detprobdata.h:748
gcg::DETPROBDATA * detprobdata
Definition: class_detprobdata.h:747
Definition: cons_decomp.cpp:124
PARTIALDECOMP * partialdectowrite
Definition: cons_decomp.cpp:185
SCIP_Bool bendersonlycontsubpr
Definition: cons_decomp.cpp:170
SCIP_Bool enableorigclassification
Definition: cons_decomp.cpp:168
SCIP_CLOCK * completedetectionclock
Definition: cons_decomp.cpp:153
int maxnclassesperpartition
Definition: cons_decomp.cpp:161
SCIP_Bool bendersonlybinmaster
Definition: cons_decomp.cpp:171
std::vector< int > * userblocknrcandidates
Definition: cons_decomp.cpp:188
int maxnclassesperpartitionforlargeprobs
Definition: cons_decomp.cpp:162
GCG_CONSCLASSIFIER ** consclassifiers
Definition: cons_decomp.cpp:135
GCG_DETECTOR ** postprocessingdetectors
Definition: cons_decomp.cpp:149
int weightinggpresolvedoriginaldecomps
Definition: cons_decomp.cpp:163
int * consclassifierpriorities
Definition: cons_decomp.cpp:137
int maxnclassesfornblockcandidates
Definition: cons_decomp.cpp:160
std::unordered_map< int, PARTIALDECOMP * > * partialdecsbyid
Definition: cons_decomp.cpp:129
SCIP_Bool blocknumbercandsmedianvarspercons
Definition: cons_decomp.cpp:159
SCIP_Bool consnamesalreadyrepaired
Definition: cons_decomp.cpp:187
SCIP_Bool allowpartitionduplicates
Definition: cons_decomp.cpp:166
int * varclassifierpriorities
Definition: cons_decomp.cpp:140
std::vector< PARTIALDECOMP * > * partialdecs
Definition: cons_decomp.cpp:128
GCG_DETECTOR ** propagatingdetectors
Definition: cons_decomp.cpp:145
int npostprocessingdetectors
Definition: cons_decomp.cpp:150
GCG_DETECTOR ** finishingdetectors
Definition: cons_decomp.cpp:147
data structures for constraint classifiers
structure information for decomposition information in GCG projects
data structures for score
data structures for variable classifiers
Definition: class_indexpartition.cpp:47
Definition: graphalgorithms.h:47
bool operator()(const std::pair< PARTIALDECOMP *, SCIP_Real > &left, const std::pair< PARTIALDECOMP *, SCIP_Real > &right)
Definition: cons_decomp.cpp:205
#define GCG_DECL_FREECONSCLASSIFIER(x)
Definition: type_consclassifier.h:52
struct Partialdec_Detection_Data PARTIALDEC_DETECTION_DATA
Definition: type_detector.h:53
#define GCG_DECL_POSTPROCESSPARTIALDEC(x)
Definition: type_detector.h:135
SCIP_VERBLEVEL_DIALOG
SCIP_VERBLEVEL_HIGH
SCIP_VERBLEVEL_NORMAL
SCIP_VERBLEVEL_FULL
SCIP_PARAMSETTING_OFF
SCIP_PARAMSETTING_AGGRESSIVE
SCIP_PARAMSETTING_DEFAULT
SCIP_PARAMSETTING_FAST
enum SCIP_ParamSetting SCIP_PARAMSETTING
SCIP_Result
SCIP_DIDNOTRUN
SCIP_FEASIBLE
SCIP_DIDNOTFIND
SCIP_SUCCESS
enum SCIP_Result SCIP_RESULT
SCIP_Retcode
SCIP_INVALIDDATA
SCIP_OKAY
SCIP_ERROR
enum SCIP_Retcode SCIP_RETCODE
SCIP_STAGE_PROBLEM
SCIP_STAGE_TRANSFORMED
SCIP_STAGE_INIT
SCIP_STAGE_PRESOLVED