Detailed Description
constraint handler for structure detection
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 or the maximum number of detection rounds is reached.
Definition in file cons_decomp.cpp.
#include <cassert>
#include <cstddef>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <deque>
#include <iomanip>
#include <sstream>
#include <utility>
#include <regex>
#include <vector>
#include <list>
#include <scip/clock.h>
#include <scip/pub_cons.h>
#include <scip/pub_misc.h>
#include <scip/type_paramset.h>
#include <scip/scipdefplugins.h>
#include "class_partialdecomp.h"
#include "class_detprobdata.h"
#include "miscvisualization.h"
#include "wrapper_partialdecomp.h"
#include "scip_misc.h"
#include "relax_gcg.h"
#include "decomp.h"
#include "cons_decomp.hpp"
#include "struct_consclassifier.h"
#include "struct_varclassifier.h"
#include "struct_decomp.h"
Go to the source code of this file.
Data Structures | |
struct | SCIP_ConshdlrData |
struct | sort_pred |
Typedefs | |
typedef enum GCG_Random_dual_methods | GCG_RANDOM_DUAL_METHOD |
Enumerations | |
enum | GCG_Random_dual_methods { GCG_RANDOM_DUAL_NAIVE = 0, GCG_RANDOM_DUAL_EXPECTED_EQUAL = 1, GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE = 2 } |
enum | weightinggpresolvedoriginaldecomps { NO_MODIF = 0, FRACTION_OF_NNONZEROS, FRACTION_OF_NROWS, FAVOUR_PRESOLVED } |
Functions | |
static SCIP_CONSHDLRDATA * | getConshdlrdata (SCIP *scip) |
local function to get the conshdlr data of the current conshdlr More... | |
static SCIP_RETCODE | addPartialdec (SCIP *scip, PARTIALDECOMP *partialdec) |
local method to handle store a partialdec in the correct detprobdata More... | |
PARTIALDECOMP * | GCGconshdlrDecompGetPartialdecFromID (SCIP *scip, int partialdecid) |
local method to find a partialdec for a given id or NULL if no partialdec with such id is found More... | |
static SCIP_RETCODE | partialdecVecToIdArray (std::vector< PARTIALDECOMP * > &partialdecs, int **idlist, int *listlength) |
translates a vector of PARTIALDECOMP pointers into an array of their ids More... | |
static std::vector< PARTIALDECOMP * > | getSelectedPartialdecs (SCIP *scip, std::vector< PARTIALDECOMP * > &selectedpartialdecs) |
gets all selected partialdecs More... | |
static void | getFinishedPartialdecs (SCIP *scip, std::vector< PARTIALDECOMP * > &finishedpartialdecs) |
gets vector of all finished partialdecs More... | |
static SCIP_RETCODE | unselectAllPartialdecs (SCIP *scip) |
static PARTIALDEC_DETECTION_DATA * | createPartialdecDetectionData (gcg::DETPROBDATA *detprobdata, PARTIALDECOMP *partialdec) |
initializes a new detection data structure More... | |
static SCIP_RETCODE | resetDetprobdata (SCIP *scip, SCIP_Bool original) |
resets/creates the detprobdata for the given problem More... | |
static SCIP_RETCODE | deletePartialdecDetectionData (SCIP *scip, PARTIALDEC_DETECTION_DATA *data) |
delets the detection data structure More... | |
static SCIP_Retcode | detect (SCIP *scip, gcg::DETPROBDATA *detprobdata) |
constructs partialdecs using the registered detectors More... | |
static | SCIP_DECL_CONSINIT (consInitDecomp) |
initialization method of constraint handler (called after problem was transformed) More... | |
static | SCIP_DECL_CONSEXIT (consExitDecomp) |
deinitialization method of constraint handler (called before transformed problem is freed) More... | |
static | SCIP_DECL_CONSFREE (consFreeDecomp) |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) More... | |
static | SCIP_DECL_CONSENFORELAX (consEnforeDecomp) |
static | SCIP_DECL_CONSENFOLP (consEnfolpDecomp) |
static | SCIP_DECL_CONSENFOPS (consEnfopsDecomp) |
static | SCIP_DECL_CONSCHECK (consCheckDecomp) |
static | SCIP_DECL_CONSLOCK (consLockDecomp) |
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} More... | |
static SCIP_RETCODE | createPartialdecFromDecomp (SCIP *scip, DEC_DECOMP *decomp, PARTIALDECOMP **newpartialdec) |
creates a partialdec for a given decomposition More... | |
static SCIP_RETCODE | createDecompFromPartialdec (SCIP *scip, PARTIALDECOMP *partialdec, DEC_DECOMP **newdecomp) |
creates a decomposition DEC_DECOMP structure for a given partialdec More... | |
static void | sortPartialdecs (SCIP *scip) |
sorts all registered partialdecs according to score, descending More... | |
static SCIP_Real | GCGconshdlrDecompAdaptScore (SCIP *scip, SCIP_Real oldscore) |
method to adapt score for orig decomps More... | |
static void | reduceConsclasses (SCIP *scip, gcg::DETPROBDATA *detprobdata) |
adds constraint partitions with a reduced number of classes More... | |
static void | reduceVarclasses (SCIP *scip, gcg::DETPROBDATA *detprobdata) |
adds variable partitions with a reduced number of classes More... | |
static SCIP_RETCODE | setDetectionEnabled (SCIP *scip, SCIP_Bool quiet, SCIP_Bool enabled) |
sets detection/enabled setting More... | |
static SCIP_RETCODE | setDetectionDefault (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool quiet) |
resets the parameters to their default value More... | |
static SCIP_RETCODE | setDetectionAggressive (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool quiet) |
sets the parameters to aggressive values More... | |
static SCIP_RETCODE | setDetectionOff (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool quiet) |
disables detectors More... | |
static SCIP_RETCODE | setDetectionFast (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool quiet) |
sets the parameters to fast values More... | |
static int | gcd (int a, int b) |
method to calculate the greatest common divisor More... | |
static SCIP_RETCODE | setTestpricingProblemParameters (SCIP *scip, int clocktype, SCIP_Real infinity, SCIP_Real epsilon, SCIP_Real sumepsilon, SCIP_Real feastol, SCIP_Real lpfeastol, SCIP_Real dualfeastol, SCIP_Bool enableppcuts, SCIP_Real timelimit) |
sets the pricing problem parameters More... | |
static SCIP_RETCODE | calculateDualvalsOptimalOrigLP (SCIP *scip, SCIP_Bool transformed) |
method to calculate and set the optimal dual values from original lp, used for strong detection score More... | |
static SCIP_RETCODE | shuffleDualvalsRandom (SCIP *scip, SCIP_Bool transformed) |
method that shuffles randomly and set dual variable values, used for strong detection score More... | |
static SCIP_Real | getDualvalOptimalLP (SCIP *scip, int consindex, SCIP_Bool transformed) |
returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the detprobdata; if it is not calculated yet it will be calculated More... | |
static SCIP_Real | getDualvalRandom (SCIP *scip, int consindex, SCIP_Bool transformed) |
return the a random value of the dual variable of the corresponding ; if it is not calculated yet it will be calculated More... | |
static SCIP_RETCODE | createTestPricingprobConss (SCIP *scip, SCIP *subscip, PARTIALDECOMP *partialdec, int block, SCIP_HASHMAP *hashorig2pricingvar) |
creates the pricing problem constraints More... | |
static SCIP_Real | calcBlockAreaScore (SCIP *scip, PARTIALDECOMP *partialdec) |
gets an intermediate score value for the blocks of a partialdec More... | |
SCIP_RETCODE | GCGprintBlockcandidateInformation (SCIP *scip, FILE *file) |
SCIP_RETCODE | GCGprintCompleteDetectionTime (SCIP *givenscip, FILE *file) |
SCIP_RETCODE | GCGprintPartitionInformation (SCIP *scip, FILE *file) |
SCIP_RETCODE | GCGprintDecompInformation (SCIP *scip, FILE *file) |
int | DECgetNDecomps (SCIP *scip) |
DEC_CLASSIFIERDATA * | DECconsClassifierGetData (DEC_CONSCLASSIFIER *classifier) |
returns the data of the provided consclassifier More... | |
const char * | DECconsClassifierGetName (DEC_CONSCLASSIFIER *classifier) |
returns the name of the provided classifier More... | |
DEC_CLASSIFIERDATA * | DECvarClassifierGetData (DEC_VARCLASSIFIER *classifier) |
returns the data of the provided varclassifier More... | |
const char * | DECvarClassifierGetName (DEC_VARCLASSIFIER *classifier) |
returns the name of the provided classifier More... | |
char | DECdetectorGetChar (DEC_DETECTOR *detector) |
Gets the character of the detector. More... | |
DEC_DETECTORDATA * | DECdetectorGetData (DEC_DETECTOR *detector) |
returns the data of the provided detector More... | |
const char * | DECdetectorGetName (DEC_DETECTOR *detector) |
returns the name of the provided detector More... | |
SCIP_RETCODE | DECdetectStructure (SCIP *scip, SCIP_RESULT *result) |
interface method to detect the structure including presolving More... | |
DEC_CONSCLASSIFIER * | DECfindConsClassifier (SCIP *scip, const char *name) |
searches for the consclassifier with the given name and returns it or NULL if classifier is not found More... | |
DEC_VARCLASSIFIER * | DECfindVarClassifier (SCIP *scip, const char *name) |
searches for the varclassifier with the given name and returns it or NULL if classifier is not found More... | |
DEC_DETECTOR * | DECfindDetector (SCIP *scip, const char *name) |
searches for the detector with the given name and returns it or NULL if detector is not found More... | |
DEC_DECOMP * | DECgetBestDecomp (SCIP *scip, SCIP_Bool printwarnings) |
Gets the best known decomposition. More... | |
PARTIALDECOMP * | DECgetPartialdecToWrite (SCIP *scip, SCIP_Bool transformed) |
SCIP_RETCODE | DECgetPartialdecToWrite (SCIP *scip, SCIP_Bool transformed, PARTIALDECOMP_WRAPPER *partialdecwrapper) |
Gets the currently considered best partialdec. More... | |
SCIP_Real | DECgetRemainingTime (SCIP *scip) |
returns the remaining time of scip that the decomposition may use More... | |
SCIP_RETCODE | DECincludeConsClassifier (SCIP *scip, const char *name, const char *description, int priority, SCIP_Bool enabled, DEC_CLASSIFIERDATA *classifierdata, DEC_DECL_FREECONSCLASSIFIER((*freeClassifier)),) |
SCIP_RETCODE | DECincludeDetector (SCIP *scip, 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, DEC_DETECTORDATA *detectordata, DEC_DECL_FREEDETECTOR((*freeDetector)), DEC_DECL_INITDETECTOR((*initDetector)), DEC_DECL_EXITDETECTOR((*exitDetector)), DEC_DECL_PROPAGATEPARTIALDEC((*propagatePartialdecDetector)), DEC_DECL_FINISHPARTIALDEC((*finishPartialdecDetector)), DEC_DECL_POSTPROCESSPARTIALDEC((*postprocessPartialdecDetector)), DEC_DECL_SETPARAMAGGRESSIVE((*setParamAggressiveDetector)), DEC_DECL_SETPARAMDEFAULT((*setParamDefaultDetector)),) |
SCIP_RETCODE | DECincludeVarClassifier (SCIP *scip, const char *name, const char *description, int priority, SCIP_Bool enabled, DEC_CLASSIFIERDATA *classifierdata, DEC_DECL_FREEVARCLASSIFIER((*freeClassifier)),) |
void | DECprintListOfDetectors (SCIP *scip) |
writes out a list of all detectors More... | |
SCIP_RETCODE | DECwriteAllDecomps (SCIP *scip, char *directory, char *extension, SCIP_Bool original, SCIP_Bool presolved) |
write out all known decompositions More... | |
SCIP_RETCODE | DECwriteSelectedDecomps (SCIP *scip, char *directory, char *extension) |
writes all selected decompositions More... | |
int | GCGconshdlrDecompAddBasicPartialdec (SCIP *scip, SCIP_Bool presolved) |
creates and adds a basic partialdecomp (all cons/vars are assigned to master) More... | |
void | GCGconshdlrDecompAddCandidatesNBlocks (SCIP *scip, SCIP_Bool origprob, int candidate) |
adds a candidate for block number and counts how often a candidate is added More... | |
SCIP_RETCODE | GCGconshdlrDecompAddDecomp (SCIP *scip, DEC_DECOMP *decomp, SCIP_Bool select) |
adds the given decomposition structure More... | |
int | GCGconshdlrDecompAddMatrixPartialdec (SCIP *scip, SCIP_Bool presolved) |
creates a pure matrix partialdecomp (i.e. all cons/vars to one single block) More... | |
SCIP_RETCODE | GCGconshdlrDecompAddPreexistingDecomp (SCIP *scip, DEC_DECOMP *decomp) |
adds a decomp that exists before the detection is called More... | |
SCIP_RETCODE | GCGconshdlrDecompAddPreexisitingPartialDec (SCIP *scip, PARTIALDECOMP *partialdec) |
adds a preexisting partial dec to be considered at the beginning of the detection More... | |
SCIP_RETCODE | GCGconshdlrDecompAddScoreTime (SCIP *scip, SCIP_Real time) |
adds given time to total score calculation time More... | |
void | GCGconshdlrDecompAddUserCandidatesNBlocks (SCIP *scip, int candidate) |
adds a candidate for block size given by the user More... | |
SCIP_RETCODE | GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid (SCIP *scip, int partialdecid, int probnr1, int probnr2, SCIP_Bool *identical) |
checks if two pricing problems are identical based on information from detection More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcBendersScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the benders score of a partialdec More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcBorderAreaScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the border area score of a partialdec More... | |
void | GCGconshdlrDecompCalcCandidatesNBlocks (SCIP *scip, SCIP_Bool transformed) |
calculates and adds block size candidates using constraint classifications and variable classifications More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcClassicScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the classic score of a partialdec More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the maxforeseeingwhiteagg score of a partialdec More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcMaxForseeingWhiteScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the maximum foreseeing white area score of a partialdec More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcMaxWhiteScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the maximum white area score of a partialdec More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcSetPartForseeingWhiteScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the setpartitioning maximum foreseeing white area score of a partialdec More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcSetPartForWhiteAggScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the setpartfwhiteagg score of a partialdec More... | |
SCIP_RETCODE | GCGconshdlrDecompCalcStrongDecompositionScore (SCIP *scip, int partialdecid, SCIP_Real *score) |
calculates the strong decomposition score of a partialdec More... | |
SCIP_Bool | GCGconshdlrDecompCheckConsistency (SCIP *scip) |
check whether partialdecs are consistent More... | |
SCIP_RETCODE | GCGconshdlrDecompChooseCandidatesFromSelected (SCIP *scip, std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > &candidates, SCIP_Bool original, SCIP_Bool printwarnings) |
SCIP_RETCODE | GCGconshdlrDecompClassify (SCIP *scip, SCIP_Bool transformed) |
run classification of vars and cons More... | |
SCIP_RETCODE | GCGconshdlrDecompCreateVarmapForPartialdecId (SCIP *scip, SCIP_HASHMAP **hashorig2pricingvar, int partialdecid, int probnr1, int probnr2, SCIP *scip1, SCIP *scip2, SCIP_HASHMAP *varmap) |
for two identical pricing problems a corresponding varmap is created More... | |
int | GCGconshdlrDecompDecreaseNCallsCreateDecomp (SCIP *scip) |
decreases the counter for created decompositions and returns it More... | |
void | GCGconshdlrDecompDeregisterPartialdecs (SCIP *scip, SCIP_Bool original) |
deregisters partialdecs in the conshdlr More... | |
void | GCGconshdlrDecompDeregisterPartialdec (SCIP *scip, PARTIALDECOMP *partialdec) |
deregisters a partialdec in the conshdlr More... | |
void | GCGconshdlrDecompFreeDetprobdata (SCIP *scip) |
Frees Detprobdata of the original and transformed/presolved problem. More... | |
void | GCGconshdlrDecompFreeOrigOnExit (SCIP *scip, SCIP_Bool free) |
sets freeing of detection data of original problem during exit to true More... | |
int | GCGconshdlrDecompGetBlockNumberCandidate (SCIP *scip, int index) |
returns block number user candidate with given index More... | |
SCIP_Real | GCGconshdlrDecompGetCompleteDetectionTime (SCIP *scip) |
returns the total detection time More... | |
DEC_DECOMP ** | GCGconshdlrDecompGetDecomps (SCIP *scip) |
returns an array containing all decompositions More... | |
std::string | GCGconshdlrDecompGetDetectorHistoryByPartialdecId (SCIP *scip, int id) |
gets detector history of partialdec with given id More... | |
DEC_DETECTOR ** | GCGconshdlrDecompGetDetectors (SCIP *scip) |
Gets an array of all detectors. More... | |
DETPROBDATA * | GCGconshdlrDecompGetDetprobdataOrig (SCIP *scip) |
help method to access detprobdata for unpresolved problem More... | |
DETPROBDATA * | GCGconshdlrDecompGetDetprobdataPresolved (SCIP *scip) |
help method to access detprobdata for transformed problem More... | |
SCIP_RETCODE | GCGconshdlrDecompGetFinishedPartialdecsList (SCIP *scip, int **idlist, int *listlength) |
Gets a list of ids of the current partialdecs that are finished. More... | |
SCIP_RETCODE | GCGconshdlrDecompGetPartialdecsList (SCIP *scip, int **idlist, int *listlength) |
Gets a list of ids of the current partialdecs. More... | |
int | GCGconshdlrDecompGetNBlockNumberCandidates (SCIP *scip) |
returns the number of block candidates given by the user More... | |
int | GCGconshdlrDecompGetNBlocksByPartialdecId (SCIP *scip, int id) |
gets block number of partialdec with given id More... | |
int | GCGconshdlrDecompGetNDecomps (SCIP *scip) |
gets the number of decompositions (= amount of finished partialdecs) More... | |
int | GCGconshdlrDecompGetNDetectors (SCIP *scip) |
Gets the number of all detectors. More... | |
int | GCGconshdlrDecompGetNextPartialdecID (SCIP *scip) |
Gets the next partialdec id managed by cons_decomp. More... | |
int | GCGconshdlrDecompGetNFormerDetectionConssForID (SCIP *scip, int id) |
gets number of active constraints during the detection of the decomp with given id More... | |
int | GCGconshdlrDecompGetNLinkingVarsByPartialdecId (SCIP *scip, int id) |
gets number of linking variables of partialdec with given id More... | |
int | GCGconshdlrDecompGetNMasterConssByPartialdecId (SCIP *scip, int id) |
gets number of master constraints of partialdec with given id More... | |
int | GCGconshdlrDecompGetNMasterVarsByPartialdecId (SCIP *scip, int id) |
gets number of master variables of partialdec with given id More... | |
int | GCGconshdlrDecompGetNOpenConssByPartialdecId (SCIP *scip, int id) |
gets number of open constraints of partialdec with given id More... | |
int | GCGconshdlrDecompGetNOpenVarsByPartialdecId (SCIP *scip, int id) |
gets number of open variables of partialdec with given id More... | |
unsigned int | GCGconshdlrDecompGetNFinishedPartialdecsOrig (SCIP *scip) |
Gets the number of finished partialdecs available for the original problem. More... | |
unsigned int | GCGconshdlrDecompGetNFinishedPartialdecsTransformed (SCIP *scip) |
Gets the number of finished partialdecs available for the transformed problem. More... | |
unsigned int | GCGconshdlrDecompGetNOpenPartialdecsOrig (SCIP *scip) |
Gets the number of open partialdecs available for the original problem. More... | |
unsigned int | GCGconshdlrDecompGetNOpenPartialdecsTransformed (SCIP *scip) |
Gets the number of open partialdecs available for the transformed problem. More... | |
unsigned int | GCGconshdlrDecompGetNPartialdecs (SCIP *scip) |
Gets the number of all partialdecs. More... | |
unsigned int | GCGconshdlrDecompGetNPartialdecsOrig (SCIP *scip) |
Gets the number of partialdecs available for the original problem. More... | |
unsigned int | GCGconshdlrDecompGetNPartialdecsTransformed (SCIP *scip) |
Gets the number of partialdecs available for the transformed problem. More... | |
int | GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId (SCIP *scip, int id) |
gets number of stairlinking variables of partialdec with given id More... | |
std::vector< PARTIALDECOMP * > * | GCGconshdlrDecompGetPartialdecs (SCIP *scip) |
gets vector of all partialdecs More... | |
SCIP_RETCODE | GCGconshdlrDecompGetPartialdecFromID (SCIP *scip, int partialdecid, PARTIALDECOMP_WRAPPER *pwr) |
Gets wrapped PARTIALDECOMP with given id. More... | |
float | GCGconshdlrDecompGetScoreByPartialdecId (SCIP *scip, int id) |
gets score of partialdec with given id More... | |
SCIP_Real | GCGconshdlrDecompGetScoreTotalTime (SCIP *scip) |
gets total score computation time More... | |
SCORETYPE | GCGconshdlrDecompGetScoretype (SCIP *scip) |
Gets the currently selected scoretype. More... | |
SCIP_RETCODE | GCGconshdlrDecompGetSelectedPartialdecs (SCIP *scip, int **idlist, int *listlength) |
Gets a list of ids of all currently selected partialdecs. More... | |
int | GCGconshdlrDecompIncreaseNCallsCreateDecomp (SCIP *scip) |
counts up the counter for created decompositions and returns it More... | |
SCIP_Bool | GCGconshdlrDecompIsPresolvedByPartialdecId (SCIP *scip, int id) |
gets whether partialdec with given id is presolved More... | |
SCIP_Bool | GCGconshdlrDecompIsSelectedByPartialdecId (SCIP *scip, int id) |
gets whether partialdec with given id is selected More... | |
SCIP_Bool | GCGconshdlrDecompOrigDetprobdataExists (SCIP *scip) |
returns whether or not a detprobdata structure for the original problem exists More... | |
SCIP_Bool | GCGconshdlrDecompOrigPartialdecExists (SCIP *scip) |
returns whether or not an original decompositions exists in the data structures More... | |
SCIP_Bool | GCGconshdlrDecompPresolvedDetprobdataExists (SCIP *scip) |
returns whether or not a detprobdata structure for the presolved problem exists More... | |
SCIP_RETCODE | GCGconshdlrDecompPrintDetectorStatistics (SCIP *scip, FILE *file) |
display statistics about detectors More... | |
void | GCGconshdlrDecompRegisterPartialdec (SCIP *scip, PARTIALDECOMP *partialdec) |
registers a partialdec in the conshdlr More... | |
SCIP_RETCODE | GCGconshdlrDecompSelectPartialdec (SCIP *scip, int partialdecid, SCIP_Bool select) |
selects/unselects a partialdecomp More... | |
SCIP_RETCODE | GCGconshdlrDecompSetDetection (SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet) |
sets detector parameters values More... | |
void | GCGconshdlrDecompSetScoretype (SCIP *scip, SCORETYPE sctype) |
Sets the currently used scoretype. More... | |
SCIP_RETCODE | GCGconshdlrDecompTranslateNBestOrigPartialdecs (SCIP *scip, int n, SCIP_Bool completeGreedily) |
translates n best unpresolved partialdec to a complete presolved one More... | |
SCIP_RETCODE | GCGconshdlrDecompTranslateOrigPartialdecs (SCIP *scip) |
translates unpresolved partialdec to a complete presolved one More... | |
SCIP_Bool | GCGdetectionTookPlace (SCIP *scip, SCIP_Bool original) |
SCIP_RETCODE | SCIPconshdlrDecompRepairConsNames (SCIP *scip) |
SCIP_RETCODE | SCIPincludeConshdlrDecomp (SCIP *scip) |
creates the constraint handler for decomp and includes it in SCIP More... | |
Macro Definition Documentation
◆ CONSHDLR_NAME
#define CONSHDLR_NAME "decomp" |
name of constraint handler
Definition at line 78 of file cons_decomp.cpp.
◆ CONSHDLR_DESC
#define CONSHDLR_DESC "constraint handler for structure detection" |
description of constraint handler
Definition at line 79 of file cons_decomp.cpp.
◆ CONSHDLR_ENFOPRIORITY
#define CONSHDLR_ENFOPRIORITY 0 |
priority of the constraint handler for constraint enforcing
Definition at line 80 of file cons_decomp.cpp.
◆ CONSHDLR_CHECKPRIORITY
#define CONSHDLR_CHECKPRIORITY 0 |
priority of the constraint handler for checking feasibility
Definition at line 81 of file cons_decomp.cpp.
◆ CONSHDLR_EAGERFREQ
#define CONSHDLR_EAGERFREQ -1 |
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only
Definition at line 82 of file cons_decomp.cpp.
◆ CONSHDLR_NEEDSCONS
#define CONSHDLR_NEEDSCONS FALSE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 84 of file cons_decomp.cpp.
◆ DEFAULT_ENABLED
#define DEFAULT_ENABLED TRUE |
indicates whether detection is enabled
Definition at line 86 of file cons_decomp.cpp.
◆ DEFAULT_DUALVALRANDOMMETHOD
#define DEFAULT_DUALVALRANDOMMETHOD 1 |
default value for method to dual initialization of dual values for strong decomposition: 1) naive, 2) expected equal, 3) expected overestimation
Definition at line 88 of file cons_decomp.cpp.
◆ DEFAULT_COEFFACTORORIGVSRANDOM
#define DEFAULT_COEFFACTORORIGVSRANDOM 0.5 |
default value for convex coefficient for orig dual val (1-this coef is factor for random dual value)
Definition at line 89 of file cons_decomp.cpp.
◆ DEFAULT_BLOCKNUMBERCANDSMEDIANVARSPERCONS
#define DEFAULT_BLOCKNUMBERCANDSMEDIANVARSPERCONS FALSE |
should for block number candidates calculation the medianvarspercons calculation be considered
Definition at line 91 of file cons_decomp.cpp.
◆ DEFAULT_MAXDETECTIONROUNDS
#define DEFAULT_MAXDETECTIONROUNDS 1 |
maximal number of detection rounds
Definition at line 93 of file cons_decomp.cpp.
◆ DEFAULT_MAXDETECTIONTIME
#define DEFAULT_MAXDETECTIONTIME 600 |
maximum detection time in seconds
Definition at line 94 of file cons_decomp.cpp.
◆ DEFAULT_POSTPROCESS
#define DEFAULT_POSTPROCESS TRUE |
indicates whether to postprocess full decompositions
Definition at line 95 of file cons_decomp.cpp.
◆ DEFAULT_MAXNCLASSESLARGEPROBS
#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
Definition at line 96 of file cons_decomp.cpp.
◆ DEFAULT_MAXNCLASSES
#define DEFAULT_MAXNCLASSES 9 |
maximum number of classes allowed for detectors, partitions with more classes are reduced to the maximum number of classes
Definition at line 97 of file cons_decomp.cpp.
◆ DEFAULT_MAXNCLASSESFORNBLOCKCANDIDATES
#define DEFAULT_MAXNCLASSESFORNBLOCKCANDIDATES 18 |
maximum number of classes a partition can have to be used for voting nblockcandidates
Definition at line 98 of file cons_decomp.cpp.
◆ DEFAULT_ENABLEORIGDETECTION
#define DEFAULT_ENABLEORIGDETECTION TRUE |
indicates whether to start detection for the original problem
Definition at line 99 of file cons_decomp.cpp.
◆ DEFAULT_ALLOWPARTITIONDUPLICATES
#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
Definition at line 103 of file cons_decomp.cpp.
◆ DEFAULT_CLASSIFY
#define DEFAULT_CLASSIFY TRUE |
indicates whether classification is enabled
Definition at line 104 of file cons_decomp.cpp.
◆ DEFAULT_ENABLEORIGCLASSIFICATION
#define DEFAULT_ENABLEORIGCLASSIFICATION TRUE |
indicates whether to start detection for the original problem
Definition at line 105 of file cons_decomp.cpp.
◆ DEFAULT_AGGREGATIONLIMITNCONSSPERBLOCK
#define DEFAULT_AGGREGATIONLIMITNCONSSPERBLOCK 300 |
if this limit on the number of constraints of a block is exceeded the aggregation information for this block is not calculated
Definition at line 107 of file cons_decomp.cpp.
◆ DEFAULT_AGGREGATIONLIMITNVARSPERBLOCK
#define DEFAULT_AGGREGATIONLIMITNVARSPERBLOCK 300 |
if this limit on the number of variables of a block is exceeded the aggregation information for this block is not calculated
Definition at line 108 of file cons_decomp.cpp.
◆ DEFAULT_BENDERSONLYCONTSUBPR
#define DEFAULT_BENDERSONLYCONTSUBPR FALSE |
indicates whether only decomposition with only continuous variables in the subproblems should be searched
Definition at line 110 of file cons_decomp.cpp.
◆ DEFAULT_BENDERSONLYBINMASTER
#define DEFAULT_BENDERSONLYBINMASTER FALSE |
indicates whether only decomposition with only binary variables in the master should be searched
Definition at line 111 of file cons_decomp.cpp.
◆ DEFAULT_LEVENSHTEIN_MAXMATRIXHALFPERIMETER
#define DEFAULT_LEVENSHTEIN_MAXMATRIXHALFPERIMETER 10000 |
deactivate levenshtein constraint classifier if nrows + ncols exceeds this value for emphasis default
Definition at line 113 of file cons_decomp.cpp.
◆ AGGRESSIVE_LEVENSHTEIN_MAXMATRIXHALFPERIMETER
#define AGGRESSIVE_LEVENSHTEIN_MAXMATRIXHALFPERIMETER 80000 |
deactivate levenshtein constraint classifier if nrows + ncols exceeds this value for emphasis aggressive
Definition at line 114 of file cons_decomp.cpp.
◆ FAST_LEVENSHTEIN_MAXMATRIXHALFPERIMETER
#define FAST_LEVENSHTEIN_MAXMATRIXHALFPERIMETER 2000 |
deactivate levenshtein constraint classifier if nrows + ncols exceeds this value for emphasis fast
Definition at line 115 of file cons_decomp.cpp.
◆ DEFAULT_DETECTBENDERS
#define DEFAULT_DETECTBENDERS FALSE |
indicates whether benders detection mode is enabled
Definition at line 117 of file cons_decomp.cpp.
◆ DEFAULT_RANDPARTIALDEC
#define DEFAULT_RANDPARTIALDEC 23 |
initial random partialdec
Definition at line 119 of file cons_decomp.cpp.
◆ DEFAULT_STRONGTIMELIMIT
#define DEFAULT_STRONGTIMELIMIT 30. |
timelimit for strong decompotition score calculation per partialdec
Definition at line 122 of file cons_decomp.cpp.
◆ DEFAULT_SCORECOEF_FASTBENEFICIAL
#define DEFAULT_SCORECOEF_FASTBENEFICIAL 1. |
coefficient for fast & beneficial in strong decomposition score computation
Definition at line 124 of file cons_decomp.cpp.
◆ DEFAULT_SCORECOEF_MEDIUMBENEFICIAL
#define DEFAULT_SCORECOEF_MEDIUMBENEFICIAL 0.75 |
coefficient for not fast but beneficial in strong decomposition score computation
Definition at line 125 of file cons_decomp.cpp.
◆ DEFAULT_SCORECOEF_FASTNOTBENEFICIAL
#define DEFAULT_SCORECOEF_FASTNOTBENEFICIAL 0.3 |
coefficient for fast & not beneficial in strong decomposition score computation
Definition at line 126 of file cons_decomp.cpp.
◆ DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL
#define DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL 0.1 |
coefficient for not & not beneficial in strong decomposition score computation
Definition at line 127 of file cons_decomp.cpp.
Typedef Documentation
◆ GCG_RANDOM_DUAL_METHOD
typedef enum GCG_Random_dual_methods GCG_RANDOM_DUAL_METHOD |
Definition at line 226 of file cons_decomp.cpp.
Enumeration Type Documentation
◆ GCG_Random_dual_methods
Enumerator | |
---|---|
GCG_RANDOM_DUAL_NAIVE | |
GCG_RANDOM_DUAL_EXPECTED_EQUAL | |
GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE |
Definition at line 220 of file cons_decomp.cpp.
◆ weightinggpresolvedoriginaldecomps
parameter how to modify scores when comparing decompositions for original and presolved problem (which might differ in size)
Definition at line 231 of file cons_decomp.cpp.
Function Documentation
◆ getConshdlrdata()
|
static |
local function to get the conshdlr data of the current conshdlr
- Returns
- the conshdlrdata iff it exists, else NULL
- Note
- returns NULL iff conshdlr or its data does not exist
- Parameters
-
scip SCIP data structure
Definition at line 263 of file cons_decomp.cpp.
References CONSHDLR_NAME.
Referenced by addPartialdec(), calculateDualvalsOptimalOrigLP(), DECdetectStructure(), DECgetBestDecomp(), DECgetPartialdecToWrite(), DECincludeConsClassifier(), DECincludeDetector(), DECincludeVarClassifier(), DECprintListOfDetectors(), DECwriteAllDecomps(), DECwriteSelectedDecomps(), detect(), GCGconshdlrDecompAdaptScore(), GCGconshdlrDecompAddCandidatesNBlocks(), GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompAddUserCandidatesNBlocks(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGconshdlrDecompCheckConsistency(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompClassify(), GCGconshdlrDecompDecreaseNCallsCreateDecomp(), GCGconshdlrDecompDeregisterPartialdec(), GCGconshdlrDecompDeregisterPartialdecs(), GCGconshdlrDecompFreeDetprobdata(), GCGconshdlrDecompFreeOrigOnExit(), GCGconshdlrDecompGetBlockNumberCandidate(), GCGconshdlrDecompGetCompleteDetectionTime(), GCGconshdlrDecompGetDecomps(), GCGconshdlrDecompGetDetectors(), GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompGetDetprobdataPresolved(), GCGconshdlrDecompGetNBlockNumberCandidates(), GCGconshdlrDecompGetNDecomps(), GCGconshdlrDecompGetNDetectors(), GCGconshdlrDecompGetNextPartialdecID(), GCGconshdlrDecompGetNFinishedPartialdecsOrig(), GCGconshdlrDecompGetNFinishedPartialdecsTransformed(), GCGconshdlrDecompGetNFormerDetectionConssForID(), GCGconshdlrDecompGetNOpenPartialdecsOrig(), GCGconshdlrDecompGetNOpenPartialdecsTransformed(), GCGconshdlrDecompGetNPartialdecs(), GCGconshdlrDecompGetNPartialdecsOrig(), GCGconshdlrDecompGetNPartialdecsTransformed(), GCGconshdlrDecompGetPartialdecFromID(), GCGconshdlrDecompGetPartialdecs(), GCGconshdlrDecompGetPartialdecsList(), GCGconshdlrDecompGetScoreTotalTime(), GCGconshdlrDecompGetScoretype(), GCGconshdlrDecompIncreaseNCallsCreateDecomp(), GCGconshdlrDecompOrigDetprobdataExists(), GCGconshdlrDecompOrigPartialdecExists(), GCGconshdlrDecompPresolvedDetprobdataExists(), GCGconshdlrDecompPrintDetectorStatistics(), GCGconshdlrDecompRegisterPartialdec(), GCGconshdlrDecompSetDetection(), GCGconshdlrDecompSetScoretype(), GCGconshdlrDecompTranslateNBestOrigPartialdecs(), GCGconshdlrDecompTranslateOrigPartialdecs(), GCGdetectionTookPlace(), GCGprintBlockcandidateInformation(), GCGprintPartitionInformation(), getDualvalOptimalLP(), getDualvalRandom(), getFinishedPartialdecs(), getSelectedPartialdecs(), reduceConsclasses(), reduceVarclasses(), resetDetprobdata(), SCIPconshdlrDecompRepairConsNames(), shuffleDualvalsRandom(), sortPartialdecs(), and unselectAllPartialdecs().
◆ addPartialdec()
|
static |
local method to handle store a partialdec in the correct detprobdata
- Returns
- SCIP status
- Parameters
-
scip SCIP data structure partialdec partialdec pointer
Definition at line 287 of file cons_decomp.cpp.
References getConshdlrdata(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), and gcg::PARTIALDECOMP::isComplete().
Referenced by GCGconshdlrDecompAddBasicPartialdec(), GCGconshdlrDecompAddDecomp(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompTranslateNBestOrigPartialdecs(), and GCGconshdlrDecompTranslateOrigPartialdecs().
◆ GCGconshdlrDecompGetPartialdecFromID() [1/2]
PARTIALDECOMP* GCGconshdlrDecompGetPartialdecFromID | ( | SCIP * | scip, |
int | partialdecid | ||
) |
local method to find a partialdec for a given id or NULL if no partialdec with such id is found
- Returns
- partialdec pointer of partialdec with given id or NULL if it does not exist
- Note
- returns NULL if no partialdec by this id is known
- Parameters
-
scip SCIP data structure partialdecid partialdec id
Definition at line 317 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECgetPartialdecToWrite(), GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompCalcMaxWhiteScore(), GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), GCGconshdlrDecompCalcSetPartForWhiteAggScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGconshdlrDecompCheckConsistency(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompCreateVarmapForPartialdecId(), GCGconshdlrDecompGetDetectorHistoryByPartialdecId(), GCGconshdlrDecompGetNBlocksByPartialdecId(), GCGconshdlrDecompGetNextPartialdecID(), GCGconshdlrDecompGetNLinkingVarsByPartialdecId(), GCGconshdlrDecompGetNMasterConssByPartialdecId(), GCGconshdlrDecompGetNMasterVarsByPartialdecId(), GCGconshdlrDecompGetNOpenConssByPartialdecId(), GCGconshdlrDecompGetNOpenVarsByPartialdecId(), GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId(), GCGconshdlrDecompGetPartialdecFromID(), GCGconshdlrDecompGetScoreByPartialdecId(), GCGconshdlrDecompIsPresolvedByPartialdecId(), GCGconshdlrDecompIsSelectedByPartialdecId(), GCGconshdlrDecompSelectPartialdec(), gcg::GCGdialogInspectPartialdec(), gcg::GCGdialogSelect(), gcg::GCGdialogSelectVisualize(), gcg::GCGdialogShowMenu(), GCGWriteGpDecompMatrix(), GCGwriteGpVisualizationFormat(), GCGwriteTexReport(), and GCGwriteTexVisualization().
◆ partialdecVecToIdArray()
|
static |
translates a vector of PARTIALDECOMP pointers into an array of their ids
- Returns
- SCIP return code
- Parameters
-
partialdecs vector of partialdecs (input) idlist array of ids (output) listlength length of id array (output)
Definition at line 338 of file cons_decomp.cpp.
Referenced by GCGconshdlrDecompGetFinishedPartialdecsList(), and GCGconshdlrDecompGetPartialdecsList().
◆ getSelectedPartialdecs()
|
static |
gets all selected partialdecs
- Returns
- vector of all selected partialdecs
- Parameters
-
scip SCIP data structure selectedpartialdecs vector of partialdecs (input)
Definition at line 358 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECwriteSelectedDecomps(), GCGconshdlrDecompChooseCandidatesFromSelected(), and GCGconshdlrDecompGetSelectedPartialdecs().
◆ getFinishedPartialdecs()
|
static |
gets vector of all finished partialdecs
- Parameters
-
scip SCIP data structure finishedpartialdecs will contain finished partialdecs
Definition at line 381 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECwriteAllDecomps(), GCGconshdlrDecompGetFinishedPartialdecsList(), and GCGprintDecompInformation().
◆ unselectAllPartialdecs()
|
static |
method to unselect all decompositions, called in consexit, and when the partialdeclist is updated (especially if new (partial ones) are added )
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure
Definition at line 403 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by SCIP_DECL_CONSEXIT().
◆ createPartialdecDetectionData()
|
static |
initializes a new detection data structure
- Returns
- new detection data structure
- Parameters
-
detprobdata detprobdata to point to partialdec partialdec to pass to detector
Definition at line 425 of file cons_decomp.cpp.
References Partialdec_Detection_Data::detprobdata, Partialdec_Detection_Data::nnewpartialdecs, and Partialdec_Detection_Data::workonpartialdec.
Referenced by detect().
◆ resetDetprobdata()
|
static |
resets/creates the detprobdata for the given problem
- Returns
- scip return code
- Parameters
-
scip SCIP data structure original whether to do this for the original problem
Definition at line 444 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECdetectStructure(), GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompGetDetprobdataPresolved(), GCGconshdlrDecompTranslateNBestOrigPartialdecs(), and GCGconshdlrDecompTranslateOrigPartialdecs().
◆ deletePartialdecDetectionData()
|
static |
delets the detection data structure
frees all relevant data within the construct before deleting the main structure
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure data data to delete
Definition at line 481 of file cons_decomp.cpp.
References Partialdec_Detection_Data::newpartialdecs, Partialdec_Detection_Data::nnewpartialdecs, and Partialdec_Detection_Data::workonpartialdec.
Referenced by detect().
◆ detect()
|
static |
constructs partialdecs using the registered detectors
Takes the current partialdecs in the detprobdata as root, propagates, finishes and postprocesses in rounds.
- Returns
- user has to free partialdecs
- Parameters
-
scip SCIP data structure detprobdata detprobdata for problem the detection should be performed on
Definition at line 503 of file cons_decomp.cpp.
References gcg::PARTIALDECOMP::addDecChangesFromAncestor(), gcg::DETPROBDATA::addPartialdecToAncestor(), gcg::DETPROBDATA::addPartialdecToFinished(), gcg::DETPROBDATA::addPartialdecToOpen(), createPartialdecDetectionData(), DECdetectorGetName(), DEC_Detector::dectime, gcg::PARTIALDECOMP::deleteEmptyBlocks(), deletePartialdecDetectionData(), Partialdec_Detection_Data::detectiontime, DEC_Detector::enabled, DEC_Detector::enabledFinishing, DEC_Detector::enabledPostprocessing, getConshdlrdata(), gcg::PARTIALDECOMP::getDetectorchain(), gcg::DETPROBDATA::getFinishedPartialdecs(), gcg::DETPROBDATA::getNFinishedPartialdecs(), gcg::DETPROBDATA::getOpenPartialdecs(), gcg::PARTIALDECOMP::isComplete(), gcg::PARTIALDECOMP::isPropagatedBy(), Partialdec_Detection_Data::newpartialdecs, Partialdec_Detection_Data::nnewpartialdecs, gcg::DETPROBDATA::postprocessingtime, gcg::PARTIALDECOMP::prepare(), gcg::PARTIALDECOMP::setDetectorFinished(), gcg::PARTIALDECOMP::setDetectorPropagated(), gcg::PARTIALDECOMP::setFinishedByFinisher(), and DEC_Detector::usefulRecall.
Referenced by DECdetectStructure().
◆ SCIP_DECL_CONSINIT()
|
static |
initialization method of constraint handler (called after problem was transformed)
Definition at line 738 of file cons_decomp.cpp.
References DEC_Detector::dectime, and DEC_Detector::name.
◆ SCIP_DECL_CONSEXIT()
|
static |
deinitialization method of constraint handler (called before transformed problem is freed)
Definition at line 771 of file cons_decomp.cpp.
References DECdecompFree(), GCGconshdlrDecompFreeDetprobdata(), DEC_Detector::name, and unselectAllPartialdecs().
◆ SCIP_DECL_CONSFREE()
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 824 of file cons_decomp.cpp.
References DEC_Detector::description, DEC_VarClassifier::name, DEC_ConsClassifier::name, and DEC_Detector::name.
◆ SCIP_DECL_CONSENFORELAX()
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 908 of file cons_decomp.cpp.
◆ SCIP_DECL_CONSENFOLP()
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 917 of file cons_decomp.cpp.
◆ SCIP_DECL_CONSENFOPS()
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 926 of file cons_decomp.cpp.
◆ SCIP_DECL_CONSCHECK()
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 935 of file cons_decomp.cpp.
◆ SCIP_DECL_CONSLOCK()
|
static |
variable rounding lock method of constraint handler
Definition at line 945 of file cons_decomp.cpp.
◆ findGenericConsname()
|
static |
finds a non duplicate constraint name of the form c_{a} with minimal natural number {a}
- Returns
- id of constraint
- Parameters
-
scip SCIP data structure startcount natural number, lowest candidate number to test consname char pointer to store the new non-duplicate name namelength max length of the name
Definition at line 956 of file cons_decomp.cpp.
Referenced by SCIPconshdlrDecompRepairConsNames().
◆ createPartialdecFromDecomp()
|
static |
creates a partialdec for a given decomposition
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure decomp decomposition the partialdec is created for newpartialdec the new partialdec created from the decomp
Definition at line 994 of file cons_decomp.cpp.
References gcg::PARTIALDECOMP::addClockTime(), gcg::PARTIALDECOMP::addNNewBlocks(), gcg::PARTIALDECOMP::addPctConssFromFree(), gcg::PARTIALDECOMP::addPctConssToBlock(), gcg::PARTIALDECOMP::addPctConssToBorder(), gcg::PARTIALDECOMP::addPctVarsFromFree(), gcg::PARTIALDECOMP::addPctVarsToBlock(), gcg::PARTIALDECOMP::addPctVarsToBorder(), gcg::PARTIALDECOMP::calcStairlinkingVars(), DECdecompCheckConsistency(), DECdecompGetConstoblock(), DECdecompGetDetectorChain(), DECdecompGetDetectorChainSize(), DECdecompGetDetectorClockTimes(), DECdecompGetDetectorPctConssFromOpen(), DECdecompGetDetectorPctConssToBlock(), DECdecompGetDetectorPctConssToBorder(), DECdecompGetDetectorPctVarsFromOpen(), DECdecompGetDetectorPctVarsToBlock(), DECdecompGetDetectorPctVarsToBorder(), DECdecompGetLinkingconss(), DECdecompGetNBlocks(), DECdecompGetNLinkingconss(), DECdecompGetNNewBlocks(), DECdecompGetNStairlinkingvars(), DECdecompGetStairlinkingvars(), DECdecompGetVartoblock(), gcg::PARTIALDECOMP::fixConsToBlock(), gcg::PARTIALDECOMP::fixConsToMaster(), gcg::PARTIALDECOMP::fixVarToBlock(), gcg::PARTIALDECOMP::fixVarToLinking(), gcg::PARTIALDECOMP::fixVarToMaster(), gcg::PARTIALDECOMP::fixVarToStairlinking(), GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompGetDetprobdataPresolved(), gcg::DETPROBDATA::getCons(), gcg::DETPROBDATA::getIndexForCons(), gcg::DETPROBDATA::getIndexForVar(), gcg::PARTIALDECOMP::getNBlocks(), gcg::DETPROBDATA::getNConss(), gcg::DETPROBDATA::getNVars(), gcg::DETPROBDATA::getVar(), gcg::PARTIALDECOMP::isComplete(), gcg::PARTIALDECOMP::isVarStairlinkingvar(), gcg::PARTIALDECOMP::prepare(), DecDecomp::presolved, gcg::PARTIALDECOMP::setDetectorPropagated(), gcg::PARTIALDECOMP::setNBlocks(), and gcg::PARTIALDECOMP::sort().
Referenced by GCGconshdlrDecompAddDecomp(), and GCGconshdlrDecompAddPreexistingDecomp().
◆ createDecompFromPartialdec()
|
static |
creates a decomposition DEC_DECOMP structure for a given partialdec
- Returns
- scip return code
- Parameters
-
scip SCIP data structure partialdec partialdec the decomposition is created for newdecomp the new decomp created from the partialdec
Definition at line 1108 of file cons_decomp.cpp.
References gcg::PARTIALDECOMP::buildDecChainString(), gcg::PARTIALDECOMP::checkConsistency(), DEC_DECTYPE_ARROWHEAD, DEC_DECTYPE_BORDERED, DEC_DECTYPE_DIAGONAL, DEC_DECTYPE_STAIRCASE, DEC_DECTYPE_UNKNOWN, DECdecompAddRemainingConss(), DECdecompCheckConsistency(), DECdecompCreate(), DECdecompGetNLinkingconss(), DECdecompGetNLinkingvars(), DECdecompSetConsindex(), DECdecompSetConstoblock(), DECdecompSetDetector(), DECdecompSetDetectorChain(), DECdecompSetDetectorChainString(), DECdecompSetDetectorClockTimes(), DECdecompSetDetectorPctConssFromOpen(), DECdecompSetDetectorPctConssToBlock(), DECdecompSetDetectorPctConssToBorder(), DECdecompSetDetectorPctVarsFromOpen(), DECdecompSetDetectorPctVarsToBlock(), DECdecompSetDetectorPctVarsToBorder(), DECdecompSetLinkingconss(), DECdecompSetLinkingvars(), DECdecompSetNBlocks(), DECdecompSetNNewBlocks(), DECdecompSetPartialdecID(), DECdecompSetPresolved(), DECdecompSetStairlinkingvars(), DECdecompSetSubscipconss(), DECdecompSetSubscipvars(), DECdecompSetType(), DECdecompSetVarindex(), DECdecompSetVartoblock(), DECsetMaxWhiteScore(), GCGisConsGCGCons(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::PARTIALDECOMP::getDetectorchain(), gcg::PARTIALDECOMP::getDetectorClockTimes(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::PARTIALDECOMP::getID(), gcg::PARTIALDECOMP::getLinkingvars(), gcg::PARTIALDECOMP::getMasterconss(), gcg::PARTIALDECOMP::getMastervars(), gcg::PARTIALDECOMP::getMaxWhiteScore(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNDetectors(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNMastervars(), gcg::PARTIALDECOMP::getNNewBlocksVector(), gcg::PARTIALDECOMP::getNStairlinkingvars(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::DETPROBDATA::getOrigVarsFixedZero(), gcg::PARTIALDECOMP::getPctConssFromFreeVector(), gcg::PARTIALDECOMP::getPctConssToBlockVector(), gcg::PARTIALDECOMP::getPctConssToBorderVector(), gcg::PARTIALDECOMP::getPctVarsFromFreeVector(), gcg::PARTIALDECOMP::getPctVarsToBlockVector(), gcg::PARTIALDECOMP::getPctVarsToBorderVector(), gcg::DETPROBDATA::getRelevantConss(), gcg::DETPROBDATA::getRelevantVars(), gcg::PARTIALDECOMP::getStairlinkingvars(), gcg::PARTIALDECOMP::getVarsForBlock(), and gcg::PARTIALDECOMP::isAssignedToOrigProb().
Referenced by DECgetBestDecomp(), and GCGconshdlrDecompGetDecomps().
◆ sortPartialdecs()
|
static |
sorts all registered partialdecs according to score, descending
- Parameters
-
scip SCIP data structure
Definition at line 1524 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by GCGconshdlrDecompGetDecomps().
◆ GCGconshdlrDecompAdaptScore()
|
static |
method to adapt score for orig decomps
- Returns
- new score
- Parameters
-
scip SCIP data structure oldscore current score (to be updated)
Definition at line 1541 of file cons_decomp.cpp.
References FAVOUR_PRESOLVED, FRACTION_OF_NNONZEROS, FRACTION_OF_NROWS, and getConshdlrdata().
◆ reduceConsclasses()
|
static |
adds constraint partitions with a reduced number of classes
- Parameters
-
scip SCIP data structure detprobdata classification is for problem to which these data correspond
Definition at line 1581 of file cons_decomp.cpp.
References gcg::DETPROBDATA::addConsPartition(), getConshdlrdata(), gcg::DETPROBDATA::getConsPartition(), gcg::IndexPartition::getName(), gcg::DETPROBDATA::getNConsPartitions(), gcg::DETPROBDATA::getNConss(), gcg::DETPROBDATA::getNVars(), and gcg::ConsPartition::reduceClasses().
Referenced by GCGconshdlrDecompClassify().
◆ reduceVarclasses()
|
static |
adds variable partitions with a reduced number of classes
- Parameters
-
scip SCIP data structure detprobdata classification is for problem to which these data correspond
Definition at line 1611 of file cons_decomp.cpp.
References gcg::DETPROBDATA::addVarPartition(), getConshdlrdata(), gcg::IndexPartition::getName(), gcg::DETPROBDATA::getNConss(), gcg::DETPROBDATA::getNVarPartitions(), gcg::DETPROBDATA::getNVars(), gcg::DETPROBDATA::getVarPartition(), and gcg::VarPartition::reduceClasses().
Referenced by GCGconshdlrDecompClassify().
◆ setDetectionEnabled()
|
static |
sets detection/enabled setting
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure quiet should the parameter be set quietly (no output) enabled should the detection be enabled
Definition at line 1642 of file cons_decomp.cpp.
Referenced by setDetectionAggressive(), setDetectionDefault(), setDetectionFast(), and setDetectionOff().
◆ setDetectionDefault()
|
static |
resets the parameters to their default value
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure conshdlrdata constraint handler data structure quiet should the parameter be set quiet (no output)
Definition at line 1660 of file cons_decomp.cpp.
References DEFAULT_LEVENSHTEIN_MAXMATRIXHALFPERIMETER, and setDetectionEnabled().
Referenced by GCGconshdlrDecompSetDetection().
◆ setDetectionAggressive()
|
static |
sets the parameters to aggressive values
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure conshdlrdata constraint handler data structure quiet should the parameter be set quiet (no output)
Definition at line 1721 of file cons_decomp.cpp.
References AGGRESSIVE_LEVENSHTEIN_MAXMATRIXHALFPERIMETER, and setDetectionEnabled().
Referenced by GCGconshdlrDecompSetDetection().
◆ setDetectionOff()
|
static |
disables detectors
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure conshdlrdata constraint handler data structure quiet should the parameter be set quiet (no output)
Definition at line 1782 of file cons_decomp.cpp.
References setDetectionEnabled().
Referenced by GCGconshdlrDecompSetDetection().
◆ setDetectionFast()
|
static |
sets the parameters to fast values
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure conshdlrdata constraint handler data structure quiet should the parameter be set quiet (no output)
Definition at line 1838 of file cons_decomp.cpp.
References FAST_LEVENSHTEIN_MAXMATRIXHALFPERIMETER, and setDetectionEnabled().
Referenced by GCGconshdlrDecompSetDetection().
◆ gcd()
|
static |
method to calculate the greatest common divisor
- Returns
- greatest common divisor
- Parameters
-
a first value b second value
Definition at line 1901 of file cons_decomp.cpp.
Referenced by GCGconshdlrDecompCalcCandidatesNBlocks().
◆ setTestpricingProblemParameters()
|
static |
sets the pricing problem parameters
- Returns
- scip return code
- Parameters
-
scip SCIP data structure of the pricing problem clocktype clocktype to use in the pricing problem infinity values larger than this are considered infinity in the pricing problem epsilon absolute values smaller than this are considered zero in the pricing problem sumepsilon absolute values of sums smaller than this are considered zero in the pricing problem feastol feasibility tolerance for constraints in the pricing problem lpfeastol primal feasibility tolerance of LP solver in the pricing problem dualfeastol feasibility tolerance for reduced costs in LP solution in the pricing problem enableppcuts should ppcuts be stored for sepa_basis timelimit limit of time
Definition at line 1914 of file cons_decomp.cpp.
Referenced by GCGconshdlrDecompCalcStrongDecompositionScore().
◆ calculateDualvalsOptimalOrigLP()
|
static |
method to calculate and set the optimal dual values from original lp, used for strong detection score
- Returns
- scip return code
- Parameters
-
scip SCIP data structure transformed whether the problem is transormed yet
Definition at line 2014 of file cons_decomp.cpp.
References GCGconsGetDualsol(), gcg::DETPROBDATA::getCons(), and getConshdlrdata().
Referenced by getDualvalOptimalLP().
◆ shuffleDualvalsRandom()
|
static |
method that shuffles randomly and set dual variable values, used for strong detection score
- Returns
- scip return code
- Parameters
-
scip SCIP data structure transformed whether the problem is tranformed yet
Definition at line 2129 of file cons_decomp.cpp.
References DEFAULT_RANDPARTIALDEC, GCG_RANDOM_DUAL_EXPECTED_EQUAL, GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE, GCG_RANDOM_DUAL_NAIVE, GCGconsGetLhs(), GCGconsGetNVars(), GCGconsGetRhs(), GCGconsGetVals(), gcg::DETPROBDATA::getCons(), getConshdlrdata(), and gcg::DETPROBDATA::getVar().
Referenced by getDualvalRandom().
◆ getDualvalOptimalLP()
|
static |
returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the detprobdata; if it is not calculated yet it will be calculated
- Returns
- the value of the optimal lp relaxation dual value of the given constraint rid correspondoning problem of the detprobdata
- Parameters
-
scip SCIP data structure consindex consindex index of constraint the value is asked for transformed is the problem transformed yet
Definition at line 2292 of file cons_decomp.cpp.
References calculateDualvalsOptimalOrigLP(), and getConshdlrdata().
Referenced by GCGconshdlrDecompCalcStrongDecompositionScore().
◆ getDualvalRandom()
|
static |
return the a random value of the dual variable of the corresponding ; if it is not calculated yet it will be calculated
- Returns
- the a random value of the dual variable of the corresponding
- Parameters
-
scip SCIP data structure consindex consindex index of constraint the value is asked for transformed is the problem transformed yet
Definition at line 2313 of file cons_decomp.cpp.
References getConshdlrdata(), and shuffleDualvalsRandom().
Referenced by GCGconshdlrDecompCalcStrongDecompositionScore().
◆ createTestPricingprobConss()
|
static |
creates the pricing problem constraints
- Returns
- scip return code
- Parameters
-
scip SCIP data structure subscip the relaxator data data structure partialdec partialdec corresponding to the decomposition to test block which pricing problem hashorig2pricingvar hashmap mapping original to corresponding pricing variables
Definition at line 2333 of file cons_decomp.cpp.
References GCGconsGetNVars(), GCGconsGetVars(), gcg::DETPROBDATA::getCons(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::DETPROBDATA::getNConss(), and gcg::PARTIALDECOMP::getNConssForBlock().
Referenced by GCGconshdlrDecompCalcStrongDecompositionScore().
◆ calcBlockAreaScore()
|
static |
gets an intermediate score value for the blocks of a partialdec
Used by several score calculations, computed as (1 - fraction of block area to complete area)
- Returns
- intermediate score value
- Parameters
-
scip SCIP data structure partialdec compute for this partialdec
Definition at line 2414 of file cons_decomp.cpp.
References GCGconshdlrDecompAddScoreTime(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNVars(), and gcg::PARTIALDECOMP::getNVarsForBlock().
Referenced by GCGconshdlrDecompCalcBendersScore(), and GCGconshdlrDecompCalcMaxWhiteScore().
◆ GCGprintBlockcandidateInformation()
SCIP_RETCODE GCGprintBlockcandidateInformation | ( | SCIP * | scip, |
FILE * | file | ||
) |
Definition at line 2447 of file cons_decomp.cpp.
References getConshdlrdata(), and gcg::DETPROBDATA::printBlockcandidateInformation().
Referenced by GCGprintCompleteDetectionStatistics(), and SCIP_DECL_DIALOGEXEC().
◆ GCGprintCompleteDetectionTime()
SCIP_RETCODE GCGprintCompleteDetectionTime | ( | SCIP * | givenscip, |
FILE * | file | ||
) |
Definition at line 2468 of file cons_decomp.cpp.
References GCGconshdlrDecompGetCompleteDetectionTime().
Referenced by GCGprintCompleteDetectionStatistics().
◆ GCGprintPartitionInformation()
SCIP_RETCODE GCGprintPartitionInformation | ( | SCIP * | scip, |
FILE * | file | ||
) |
Definition at line 2481 of file cons_decomp.cpp.
References getConshdlrdata(), and gcg::DETPROBDATA::printPartitionInformation().
Referenced by GCGprintCompleteDetectionStatistics().
◆ GCGprintDecompInformation()
SCIP_RETCODE GCGprintDecompInformation | ( | SCIP * | scip, |
FILE * | file | ||
) |
Definition at line 2499 of file cons_decomp.cpp.
References CLASSIC, DECdetectorGetName(), GCGconshdlrDecompCheckConsistency(), gcg::PARTIALDECOMP::getDetectorchain(), getFinishedPartialdecs(), gcg::PARTIALDECOMP::getMaxWhiteScore(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNMastervars(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::PARTIALDECOMP::getScore(), gcg::PARTIALDECOMP::hasSetppccardMaster(), MAX_FORESSEEING_WHITE, and gcg::PARTIALDECOMP::printPartitionInformation().
Referenced by GCGprintCompleteDetectionStatistics().
◆ DECgetNDecomps()
int DECgetNDecomps | ( | SCIP * | scip | ) |
gets the number of existing decompositions
- Returns
- number of decompositions
Definition at line 2554 of file cons_decomp.cpp.
References GCGconshdlrDecompGetNDecomps().
◆ DECconsClassifierGetData()
DEC_CLASSIFIERDATA* DECconsClassifierGetData | ( | DEC_CONSCLASSIFIER * | classifier | ) |
returns the data of the provided consclassifier
- Returns
- data of the provided consclassifier
Definition at line 2562 of file cons_decomp.cpp.
References DEC_ConsClassifier::clsdata.
Referenced by DEC_DECL_CONSCLASSIFY(), DEC_DECL_FREECONSCLASSIFIER(), DECconsClassifierGamsdomainAddEntry(), and DECconsClassifierGamssymbolAddEntry().
◆ DECconsClassifierGetName()
const char* DECconsClassifierGetName | ( | DEC_CONSCLASSIFIER * | classifier | ) |
returns the name of the provided classifier
- Returns
- name of the given classifier
Definition at line 2571 of file cons_decomp.cpp.
References DEC_ConsClassifier::name.
Referenced by DEC_DECL_FREECONSCLASSIFIER().
◆ DECvarClassifierGetData()
DEC_CLASSIFIERDATA* DECvarClassifierGetData | ( | DEC_VARCLASSIFIER * | classifier | ) |
returns the data of the provided varclassifier
- Returns
- data of the provided varclassifier
Definition at line 2580 of file cons_decomp.cpp.
References DEC_VarClassifier::clsdata.
Referenced by DEC_DECL_FREEVARCLASSIFIER(), DEC_DECL_VARCLASSIFY(), DECvarClassifierGamsdomainAddEntry(), and DECvarClassifierGamssymbolAddEntry().
◆ DECvarClassifierGetName()
const char* DECvarClassifierGetName | ( | DEC_VARCLASSIFIER * | classifier | ) |
returns the name of the provided classifier
- Returns
- name of the given classifier
Definition at line 2589 of file cons_decomp.cpp.
References DEC_VarClassifier::name.
Referenced by DEC_DECL_FREEVARCLASSIFIER().
◆ DECdetectorGetChar()
char DECdetectorGetChar | ( | DEC_DETECTOR * | detector | ) |
Gets the character of the detector.
- Returns
- detector character
Definition at line 2598 of file cons_decomp.cpp.
References DEC_Detector::decchar.
Referenced by gcg::PARTIALDECOMP::buildDecChainString(), and gcg::GCGdialogShowLegend().
◆ DECdetectorGetData()
DEC_DETECTORDATA* DECdetectorGetData | ( | DEC_DETECTOR * | detector | ) |
returns the data of the provided detector
- Returns
- data of the provided detector
Definition at line 2609 of file cons_decomp.cpp.
References DEC_Detector::decdata.
Referenced by DEC_DECL_EXITDETECTOR(), DEC_DECL_FINISHPARTIALDEC(), DEC_DECL_FREEDETECTOR(), DEC_DECL_INITDETECTOR(), and DEC_DECL_PROPAGATEPARTIALDEC().
◆ DECdetectorGetName()
const char* DECdetectorGetName | ( | DEC_DETECTOR * | detector | ) |
returns the name of the provided detector
- Returns
- name of the given detector
Definition at line 2618 of file cons_decomp.cpp.
References DEC_Detector::name.
Referenced by DEC_DECL_EXITDETECTOR(), DEC_DECL_FREEDETECTOR(), DEC_DECL_INITDETECTOR(), DEC_DECL_SETPARAMAGGRESSIVE(), DEC_DECL_SETPARAMDEFAULT(), DEC_DECL_SETPARAMFAST(), detect(), gcg::PARTIALDECOMP::displayInfo(), gcg::GCGdialogShowLegend(), GCGprintDecompInformation(), writePartialdec(), and writeTexPartialdecStatistics().
◆ DECdetectStructure()
SCIP_RETCODE DECdetectStructure | ( | SCIP * | scip, |
SCIP_RESULT * | result | ||
) |
interface method to detect the structure including presolving
- Returns
- SCIP return code
Definition at line 2627 of file cons_decomp.cpp.
References DEC_DECMODE_ORIGINAL, detect(), GCGconshdlrDecompCalcCandidatesNBlocks(), GCGconshdlrDecompClassify(), GCGconshdlrDecompGetCompleteDetectionTime(), GCGgetDecompositionMode(), getConshdlrdata(), and resetDetprobdata().
Referenced by GCGdetect(), and GCGsolve().
◆ DECfindConsClassifier()
DEC_CONSCLASSIFIER* DECfindConsClassifier | ( | SCIP * | scip, |
const char * | name | ||
) |
searches for the consclassifier with the given name and returns it or NULL if classifier is not found
- Returns
- consclassifier pointer or NULL if consclassifier with given name is not found
Definition at line 2806 of file cons_decomp.cpp.
References CONSHDLR_NAME, and DEC_ConsClassifier::name.
Referenced by DEC_DECL_CONSCLASSIFY().
◆ DECfindVarClassifier()
DEC_VARCLASSIFIER* DECfindVarClassifier | ( | SCIP * | scip, |
const char * | name | ||
) |
searches for the varclassifier with the given name and returns it or NULL if classifier is not found
- Returns
- varclassifier pointer or NULL if varclassifier with given name is not found
Definition at line 2837 of file cons_decomp.cpp.
References CONSHDLR_NAME, and DEC_VarClassifier::name.
Referenced by DEC_DECL_VARCLASSIFY().
◆ DECfindDetector()
DEC_DETECTOR* DECfindDetector | ( | SCIP * | scip, |
const char * | name | ||
) |
searches for the detector with the given name and returns it or NULL if detector is not found
- Returns
- detector pointer or NULL if detector with given name is not found
Definition at line 2868 of file cons_decomp.cpp.
References CONSHDLR_NAME, and DEC_Detector::name.
Referenced by DECincludeDetector().
◆ DECgetBestDecomp()
DEC_DECOMP* DECgetBestDecomp | ( | SCIP * | scip, |
SCIP_Bool | printwarnings | ||
) |
Gets the best known decomposition.
- Note
- caller has to free returned DEC_DECOMP
- Returns
- the decomposition if available and NULL otherwise
Definition at line 2898 of file cons_decomp.cpp.
References createDecompFromPartialdec(), GCGconshdlrDecompChooseCandidatesFromSelected(), getConshdlrdata(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), and gcg::PARTIALDECOMP::isComplete().
Referenced by GCGsolve(), GCGwriteDecompositionData(), initRelaxator(), SCIP_DECL_DIALOGEXEC(), and writeREFFile().
◆ DECgetPartialdecToWrite() [1/2]
PARTIALDECOMP* DECgetPartialdecToWrite | ( | SCIP * | scip, |
SCIP_Bool | transformed | ||
) |
Definition at line 2928 of file cons_decomp.cpp.
References GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompGetPartialdecFromID(), and getConshdlrdata().
Referenced by DECgetPartialdecToWrite(), and SCIP_DECL_READERWRITE().
◆ DECgetPartialdecToWrite() [2/2]
SCIP_RETCODE DECgetPartialdecToWrite | ( | SCIP * | scip, |
SCIP_Bool | transformed, | ||
PARTIALDECOMP_WRAPPER * | partialdecwrapper | ||
) |
Gets the currently considered best partialdec.
If there is a partialdec marked to be returned (e.g. by /DECwriteAllDecomps), it is written. Else, the currently "best" decomp is returned.
- Returns
- partialdec to write if one can be found, or partialdecwrapper->partialdec = NULL otherwise
Definition at line 2967 of file cons_decomp.cpp.
References DECgetPartialdecToWrite(), and Partialdecomp_Wrapper::partialdec.
◆ DECgetRemainingTime()
SCIP_Real DECgetRemainingTime | ( | SCIP * | scip | ) |
returns the remaining time of scip that the decomposition may use
- Returns
- remaining time that the decompositon may use
Definition at line 2979 of file cons_decomp.cpp.
Referenced by callMetis().
◆ DECincludeConsClassifier()
SCIP_RETCODE DECincludeConsClassifier | ( | SCIP * | scip, |
const char * | name, | ||
const char * | description, | ||
int | priority, | ||
SCIP_Bool | enabled, | ||
DEC_CLASSIFIERDATA * | classifierdata, | ||
DEC_DECL_FREECONSCLASSIFIER((*freeClassifier)) | |||
) |
Definition at line 2992 of file cons_decomp.cpp.
References DEC_ConsClassifier::clsdata, DEC_ConsClassifier::description, DEC_ConsClassifier::enabled, getConshdlrdata(), DEC_ConsClassifier::name, and DEC_ConsClassifier::priority.
Referenced by SCIPincludeConsClassifierConsnameLevenshtein(), SCIPincludeConsClassifierForConsnamesDigitFreeIdentical(), SCIPincludeConsClassifierGamsdomain(), SCIPincludeConsClassifierGamssymbol(), SCIPincludeConsClassifierMiplibConstypes(), SCIPincludeConsClassifierNNonzeros(), and SCIPincludeConsClassifierScipConstypes().
◆ DECincludeDetector()
SCIP_RETCODE DECincludeDetector | ( | SCIP * | scip, |
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, | ||
DEC_DETECTORDATA * | detectordata, | ||
DEC_DECL_FREEDETECTOR((*freeDetector)) | , | ||
DEC_DECL_INITDETECTOR((*initDetector)) | , | ||
DEC_DECL_EXITDETECTOR((*exitDetector)) | , | ||
DEC_DECL_PROPAGATEPARTIALDEC((*propagatePartialdecDetector)) | , | ||
DEC_DECL_FINISHPARTIALDEC((*finishPartialdecDetector)) | , | ||
DEC_DECL_POSTPROCESSPARTIALDEC((*postprocessPartialdecDetector)) | , | ||
DEC_DECL_SETPARAMAGGRESSIVE((*setParamAggressiveDetector)) | , | ||
DEC_DECL_SETPARAMDEFAULT((*setParamDefaultDetector)) | |||
) |
Definition at line 3041 of file cons_decomp.cpp.
References DEC_Detector::decchar, DEC_Detector::decdata, DECfindDetector(), DEC_Detector::dectime, DEC_Detector::description, DEC_Detector::enabled, DEC_Detector::enabledFinishing, DEC_Detector::enabledPostprocessing, DEC_Detector::freqCallRound, DEC_Detector::freqCallRoundOriginal, getConshdlrdata(), DEC_Detector::maxCallRound, DEC_Detector::maxCallRoundOriginal, DEC_Detector::minCallRound, DEC_Detector::minCallRoundOriginal, DEC_Detector::name, DEC_Detector::ncompletedecomps, DEC_Detector::ndecomps, DEC_Detector::overruleemphasis, DEC_Detector::priority, DEC_Detector::skip, and DEC_Detector::usefulRecall.
Referenced by SCIPincludeDetectorCompgreedily(), SCIPincludeDetectorConnected_noNewLinkingVars(), SCIPincludeDetectorConnectedbase(), SCIPincludeDetectorConsclass(), SCIPincludeDetectorConstype(), SCIPincludeDetectorDBSCAN(), SCIPincludeDetectorDensemasterconss(), SCIPincludeDetectorGeneralmastersetcover(), SCIPincludeDetectorGeneralmastersetpack(), SCIPincludeDetectorGeneralmastersetpart(), SCIPincludeDetectorHcgpartition(), SCIPincludeDetectorHrcgpartition(), SCIPincludeDetectorHrgpartition(), SCIPincludeDetectorIsomorphism(), SCIPincludeDetectorMastersetcover(), SCIPincludeDetectorMastersetpack(), SCIPincludeDetectorMastersetpart(), SCIPincludeDetectorMST(), SCIPincludeDetectorNeighborhoodmaster(), SCIPincludeDetectorPostprocess(), SCIPincludeDetectorStaircaseLsp(), SCIPincludeDetectorStairheur(), and SCIPincludeDetectorVarclass().
◆ DECincludeVarClassifier()
SCIP_RETCODE DECincludeVarClassifier | ( | SCIP * | scip, |
const char * | name, | ||
const char * | description, | ||
int | priority, | ||
SCIP_Bool | enabled, | ||
DEC_CLASSIFIERDATA * | classifierdata, | ||
DEC_DECL_FREEVARCLASSIFIER((*freeClassifier)) | |||
) |
Definition at line 3222 of file cons_decomp.cpp.
References DEC_VarClassifier::clsdata, DEC_VarClassifier::description, DEC_VarClassifier::enabled, getConshdlrdata(), DEC_VarClassifier::name, and DEC_VarClassifier::priority.
Referenced by SCIPincludeVarClassifierGamsdomain(), SCIPincludeVarClassifierGamssymbol(), SCIPincludeVarClassifierObjValues(), SCIPincludeVarClassifierObjValueSigns(), and SCIPincludeVarClassifierScipVartypes().
◆ DECprintListOfDetectors()
void DECprintListOfDetectors | ( | SCIP * | scip | ) |
writes out a list of all detectors
Definition at line 3271 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by SCIP_DECL_DIALOGEXEC().
◆ DECwriteAllDecomps()
SCIP_RETCODE DECwriteAllDecomps | ( | SCIP * | scip, |
char * | directory, | ||
char * | extension, | ||
SCIP_Bool | original, | ||
SCIP_Bool | presolved | ||
) |
write out all known decompositions
- Returns
- SCIP return code
Definition at line 3297 of file cons_decomp.cpp.
References GCGgetVisualizationFilename(), getConshdlrdata(), getFinishedPartialdecs(), and gcg::PARTIALDECOMP::isAssignedToOrigProb().
Referenced by writeAllDecompositions().
◆ DECwriteSelectedDecomps()
SCIP_RETCODE DECwriteSelectedDecomps | ( | SCIP * | scip, |
char * | directory, | ||
char * | extension | ||
) |
writes all selected decompositions
- Returns
- scip return code
Definition at line 3367 of file cons_decomp.cpp.
References GCGgetVisualizationFilename(), getConshdlrdata(), and getSelectedPartialdecs().
Referenced by writeSelectedDecompositions().
◆ GCGconshdlrDecompAddBasicPartialdec()
int GCGconshdlrDecompAddBasicPartialdec | ( | SCIP * | scip, |
SCIP_Bool | presolved | ||
) |
creates and adds a basic partialdecomp (all cons/vars are assigned to master)
- Returns
- id of partialdec
Definition at line 3421 of file cons_decomp.cpp.
References addPartialdec(), gcg::PARTIALDECOMP::assignOpenConssToMaster(), gcg::PARTIALDECOMP::getID(), gcg::PARTIALDECOMP::prepare(), and gcg::PARTIALDECOMP::setNBlocks().
Referenced by initRelaxator().
◆ GCGconshdlrDecompAddCandidatesNBlocks()
void GCGconshdlrDecompAddCandidatesNBlocks | ( | SCIP * | scip, |
SCIP_Bool | origprob, | ||
int | candidate | ||
) |
adds a candidate for block number and counts how often a candidate is added
Definition at line 3435 of file cons_decomp.cpp.
References gcg::DETPROBDATA::candidatesNBlocks, and getConshdlrdata().
Referenced by GCGconshdlrDecompCalcCandidatesNBlocks(), and reorderPermutations().
◆ GCGconshdlrDecompAddDecomp()
SCIP_RETCODE GCGconshdlrDecompAddDecomp | ( | SCIP * | scip, |
DEC_DECOMP * | decomp, | ||
SCIP_Bool | select | ||
) |
adds the given decomposition structure
- Returns
- scip return code
Definition at line 3468 of file cons_decomp.cpp.
References addPartialdec(), createPartialdecFromDecomp(), DecDecomp::presolved, and gcg::PARTIALDECOMP::setSelected().
◆ GCGconshdlrDecompAddMatrixPartialdec()
int GCGconshdlrDecompAddMatrixPartialdec | ( | SCIP * | scip, |
SCIP_Bool | presolved | ||
) |
creates a pure matrix partialdecomp (i.e. all cons/vars to one single block)
matrix is added to list of all partialdecs
- Returns
- id of matrix partialdec
Definition at line 3490 of file cons_decomp.cpp.
References gcg::DETPROBDATA::addPartialdecToFinishedUnchecked(), gcg::PARTIALDECOMP::fixConsToBlock(), gcg::PARTIALDECOMP::fixVarToBlock(), GCGconshdlrDecompOrigDetprobdataExists(), GCGconshdlrDecompPresolvedDetprobdataExists(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), gcg::DETPROBDATA::getNConss(), gcg::DETPROBDATA::getNVars(), resetDetprobdata(), gcg::PARTIALDECOMP::setNBlocks(), and gcg::PARTIALDECOMP::sort().
Referenced by DECgetPartialdecToWrite(), and GCGWriteGpDecompMatrix().
◆ GCGconshdlrDecompAddPreexistingDecomp()
SCIP_RETCODE GCGconshdlrDecompAddPreexistingDecomp | ( | SCIP * | scip, |
DEC_DECOMP * | decomp | ||
) |
adds a decomp that exists before the detection is called
- Note
- this method should only be called if there is no partialdec for this decomposition
- Returns
- scip return code
Definition at line 3534 of file cons_decomp.cpp.
References createPartialdecFromDecomp(), GCGconshdlrDecompAddPreexisitingPartialDec(), and DecDecomp::presolved.
Referenced by SCIPreadRef().
◆ GCGconshdlrDecompAddPreexisitingPartialDec()
SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec | ( | SCIP * | scip, |
gcg::PARTIALDECOMP * | partialdec | ||
) |
adds a preexisting partial dec to be considered at the beginning of the detection
- Note
- refines the partialdec to be consistent, adds meta data/statistics
- Returns
- SCIP return code
Definition at line 3554 of file cons_decomp.cpp.
References addPartialdec(), gcg::COMPLETE, gcg::COMPLETED_CONSTOMASTER, gcg::PARTIALDECOMP::findVarsLinkingToMaster(), gcg::PARTIALDECOMP::findVarsLinkingToStairlinking(), gcg::PARTIALDECOMP::fixConsToMaster(), getConshdlrdata(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNMastervars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::PARTIALDECOMP::getOpenconssVec(), gcg::PARTIALDECOMP::getScore(), gcg::PARTIALDECOMP::getUsergiven(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), gcg::PARTIALDECOMP::isComplete(), MAX_WHITE, gcg::PARTIAL, gcg::PARTIALDECOMP::prepare(), gcg::PARTIALDECOMP::setUsergiven(), gcg::PARTIALDECOMP::shouldCompletedByConsToMaster(), and gcg::PARTIALDECOMP::sort().
Referenced by GCGconshdlrDecompAddPreexistingDecomp(), readBLKFile(), and readDECFile().
◆ GCGconshdlrDecompAddScoreTime()
SCIP_RETCODE GCGconshdlrDecompAddScoreTime | ( | SCIP * | scip, |
SCIP_Real | time | ||
) |
adds given time to total score calculation time
- Returns
- scip return code
Definition at line 3641 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by calcBlockAreaScore(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompCalcMaxWhiteScore(), GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), GCGconshdlrDecompCalcSetPartForWhiteAggScore(), and GCGconshdlrDecompCalcStrongDecompositionScore().
◆ GCGconshdlrDecompAddUserCandidatesNBlocks()
void GCGconshdlrDecompAddUserCandidatesNBlocks | ( | SCIP * | scip, |
int | candidate | ||
) |
adds a candidate for block size given by the user
Definition at line 3652 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by SCIP_DECL_DIALOGEXEC().
◆ GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid()
SCIP_RETCODE GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid | ( | SCIP * | scip, |
int | partialdecid, | ||
int | probnr1, | ||
int | probnr2, | ||
SCIP_Bool * | identical | ||
) |
checks if two pricing problems are identical based on information from detection
- Returns
- scip return code
Definition at line 3673 of file cons_decomp.cpp.
References gcg::PARTIALDECOMP::aggInfoCalculated(), gcg::PARTIALDECOMP::calcAggregationInformation(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getRepForBlock(), and gcg::PARTIALDECOMP::isComplete().
Referenced by pricingprobsAreIdenticalFromDetectionInfo().
◆ GCGconshdlrDecompCalcBendersScore()
SCIP_RETCODE GCGconshdlrDecompCalcBendersScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the benders score of a partialdec
in detail: bendersscore = max ( 0., 1 - ( 1 - blockareascore + (1 - borderareascore - bendersareascore ) ) ) with blockareascore = blockarea / totalarea borderareascore = borderarea / totalarea bendersareascore = bendersarea /totalarea with bendersarea = A + B - PENALTY with A = nmasterconshittingonlyblockvars * nblockvarshittngNOmasterconss B = nlinkingvarshittingonlyblockconss * nblockconsshittingonlyblockvars PENALTY = \(\sum_{b=1}^(\text{nblocks}) \sum_{\text{blockvars }bv\text{ of block }b\text{ hitting a master constraint}} \sum_{\text{all blocks }b2 != b} \text{nblockcons}(b2)\)
- Note
- experimental feature
- Returns
- scip return code
Definition at line 3705 of file cons_decomp.cpp.
References calcBlockAreaScore(), GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getBorderAreaScore(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::DETPROBDATA::getConssForVar(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::PARTIALDECOMP::getLinkingvars(), gcg::PARTIALDECOMP::getMasterconss(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::DETPROBDATA::getNConssForVar(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNVars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::DETPROBDATA::getNVarsForCons(), gcg::PARTIALDECOMP::getVarsForBlock(), gcg::DETPROBDATA::getVarsForCons(), gcg::PARTIALDECOMP::isConsMastercons(), gcg::PARTIALDECOMP::isConsOpencons(), gcg::PARTIALDECOMP::isVarLinkingvar(), gcg::PARTIALDECOMP::isVarMastervar(), gcg::PARTIALDECOMP::isVarOpenvar(), and gcg::PARTIALDECOMP::setBendersScore().
Referenced by gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCalcBorderAreaScore()
SCIP_RETCODE GCGconshdlrDecompCalcBorderAreaScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the border area score of a partialdec
1 - fraction of border area to complete area
- Returns
- scip return code
Definition at line 3849 of file cons_decomp.cpp.
References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVars(), and gcg::PARTIALDECOMP::setBorderAreaScore().
Referenced by GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcMaxWhiteScore(), and gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCalcCandidatesNBlocks()
void GCGconshdlrDecompCalcCandidatesNBlocks | ( | SCIP * | scip, |
SCIP_Bool | transformed | ||
) |
calculates and adds block size candidates using constraint classifications and variable classifications
Definition at line 3882 of file cons_decomp.cpp.
References gcg::DETPROBDATA::conspartitioncollection, gcd(), GCGconshdlrDecompAddCandidatesNBlocks(), getConshdlrdata(), gcg::DETPROBDATA::getNConss(), gcg::DETPROBDATA::getNVars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::DETPROBDATA::isAssignedToOrigProb(), gcg::DETPROBDATA::nblockscandidatescalctime, partition(), and gcg::DETPROBDATA::varpartitioncollection.
Referenced by DECdetectStructure(), and GCGwriteCls().
◆ GCGconshdlrDecompCalcClassicScore()
SCIP_RETCODE GCGconshdlrDecompCalcClassicScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the classic score of a partialdec
- Returns
- scip return code
Definition at line 4005 of file cons_decomp.cpp.
References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNMastervars(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::DETPROBDATA::getVarsForCons(), gcg::PARTIALDECOMP::isVarBlockvarOfBlock(), gcg::PARTIALDECOMP::isVarLinkingvar(), gcg::PARTIALDECOMP::isVarMastervar(), gcg::PARTIALDECOMP::isVarStairlinkingvar(), and gcg::PARTIALDECOMP::setClassicScore().
Referenced by gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore()
SCIP_RETCODE GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the maxforeseeingwhiteagg score of a partialdec
maximum foreseeing white area score with respect to aggregatable blocks (i.e. maximize fraction of white area score considering problem with copied linking variables and corresponding master constraints; white area is nonblock and nonborder area, stairlinking variables count as linking)
- Returns
- scip return code
Definition at line 4180 of file cons_decomp.cpp.
References gcg::PARTIALDECOMP::calcAggregationInformation(), GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getBlocksForRep(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::PARTIALDECOMP::getLinkingvars(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNReps(), gcg::PARTIALDECOMP::getNStairlinkingvars(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVars(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::DETPROBDATA::getVal(), and gcg::PARTIALDECOMP::setMaxForWhiteAggScore().
Referenced by GCGconshdlrDecompCalcSetPartForWhiteAggScore(), and gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCalcMaxForseeingWhiteScore()
SCIP_RETCODE GCGconshdlrDecompCalcMaxForseeingWhiteScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the maximum foreseeing white area score of a partialdec
maximum foreseeing white area score (i.e. maximize fraction of white area score considering problem with copied linking variables and corresponding master constraints; white area is nonblock and nonborder area, stairlinking variables count as linking)
- Returns
- scip return code
Definition at line 4280 of file cons_decomp.cpp.
References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getConssForBlock(), gcg::DETPROBDATA::getConssForVar(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::PARTIALDECOMP::getLinkingvars(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::DETPROBDATA::getNConssForVar(), gcg::PARTIALDECOMP::getNLinkingvars(), gcg::PARTIALDECOMP::getNMasterconss(), gcg::PARTIALDECOMP::getNStairlinkingvars(), gcg::PARTIALDECOMP::getNTotalStairlinkingvars(), gcg::PARTIALDECOMP::getNVars(), and gcg::PARTIALDECOMP::getNVarsForBlock().
Referenced by GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), and gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCalcMaxWhiteScore()
SCIP_RETCODE GCGconshdlrDecompCalcMaxWhiteScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the maximum white area score of a partialdec
score corresponding to the max white measure according to aggregated blocks
- Returns
- scip return code
Definition at line 4397 of file cons_decomp.cpp.
References calcBlockAreaScore(), GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getBorderAreaScore(), and gcg::PARTIALDECOMP::setMaxWhiteScore().
Referenced by gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCalcSetPartForseeingWhiteScore()
SCIP_RETCODE GCGconshdlrDecompCalcSetPartForseeingWhiteScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the setpartitioning maximum foreseeing white area score of a partialdec
setpartitioning maximum foreseeing white area score (i.e. convex combination of maximum foreseeing white area score and a boolean score rewarding a master containing only setppc and cardinality constraints)
- Returns
- scip return code
Definition at line 4437 of file cons_decomp.cpp.
References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getMaxForWhiteScore(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::hasSetppccardMaster(), gcg::PARTIALDECOMP::isTrivial(), and gcg::PARTIALDECOMP::setSetPartForWhiteScore().
Referenced by gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCalcSetPartForWhiteAggScore()
SCIP_RETCODE GCGconshdlrDecompCalcSetPartForWhiteAggScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the setpartfwhiteagg score of a partialdec
setpartitioning maximum foreseeing white area score with respect to aggregateable (i.e. convex combination of maximum foreseeing white area score and a boolean score rewarding a master containing only setppc and cardinality constraints)
- Returns
- scip return code
Definition at line 4480 of file cons_decomp.cpp.
References GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getMaxForWhiteAggScore(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::hasSetppccardMaster(), gcg::PARTIALDECOMP::isTrivial(), and gcg::PARTIALDECOMP::setSetPartForWhiteAggScore().
Referenced by gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCalcStrongDecompositionScore()
SCIP_RETCODE GCGconshdlrDecompCalcStrongDecompositionScore | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Real * | score | ||
) |
calculates the strong decomposition score of a partialdec
- Returns
- scip return code
Definition at line 4523 of file cons_decomp.cpp.
References createTestPricingprobConss(), DEFAULT_SCORECOEF_FASTBENEFICIAL, DEFAULT_SCORECOEF_FASTNOTBENEFICIAL, DEFAULT_SCORECOEF_MEDIUMBENEFICIAL, DEFAULT_SCORECOEF_MEDIUMNOTBENEFICIAL, GCGconshdlrDecompAddScoreTime(), GCGconshdlrDecompGetPartialdecFromID(), getConshdlrdata(), gcg::DETPROBDATA::getConssForVar(), gcg::PARTIALDECOMP::getDetprobdata(), getDualvalOptimalLP(), getDualvalRandom(), gcg::PARTIALDECOMP::getNBlocks(), gcg::PARTIALDECOMP::getNConssForBlock(), gcg::DETPROBDATA::getNConssForVar(), gcg::PARTIALDECOMP::getNVarsForBlock(), gcg::DETPROBDATA::getVal(), gcg::DETPROBDATA::getVar(), gcg::PARTIALDECOMP::getVarsForBlock(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), gcg::PARTIALDECOMP::isConsMastercons(), gcg::PARTIALDECOMP::setStrongDecompScore(), and setTestpricingProblemParameters().
Referenced by gcg::PARTIALDECOMP::getScore().
◆ GCGconshdlrDecompCheckConsistency()
SCIP_Bool GCGconshdlrDecompCheckConsistency | ( | SCIP * | scip | ) |
check whether partialdecs are consistent
Checks whether 1) the predecessors of all finished partialdecs in both detprobdatas can be found 2) selected list is synchron with selected information in partialdecs 3) selected exists is synchronized with selected list
- Returns
- true if partialdec information is consistent
Definition at line 4766 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), gcg::PARTIALDECOMP::getAncestorID(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), and gcg::PARTIALDECOMP::getNAncestors().
Referenced by GCGconshdlrDecompChooseCandidatesFromSelected(), GCGprintDecompInformation(), and GCGsolve().
◆ GCGconshdlrDecompChooseCandidatesFromSelected()
SCIP_RETCODE GCGconshdlrDecompChooseCandidatesFromSelected | ( | SCIP * | scip, |
std::vector< std::pair< gcg::PARTIALDECOMP *, SCIP_Real > > & | candidates, | ||
SCIP_Bool | original, | ||
SCIP_Bool | printwarnings | ||
) |
Definition at line 4816 of file cons_decomp.cpp.
References GCGconshdlrDecompCheckConsistency(), GCGconshdlrDecompGetPartialdecFromID(), GCGconshdlrDecompGetScoretype(), getConshdlrdata(), gcg::PARTIALDECOMP::getID(), gcg::PARTIALDECOMP::getScore(), getSelectedPartialdecs(), gcg::PARTIALDECOMP::getTranslatedpartialdecid(), gcg::PARTIALDECOMP::isAssignedToOrigProb(), and gcg::PARTIALDECOMP::isComplete().
Referenced by DECgetBestDecomp(), DECgetPartialdecToWrite(), and GCGconshdlrDecompTranslateNBestOrigPartialdecs().
◆ GCGconshdlrDecompClassify()
SCIP_RETCODE GCGconshdlrDecompClassify | ( | SCIP * | scip, |
SCIP_Bool | transformed | ||
) |
run classification of vars and cons
- Returns
- scip return code
Definition at line 4898 of file cons_decomp.cpp.
References gcg::DETPROBDATA::classificationtime, getConshdlrdata(), DEC_ConsClassifier::name, DEC_VarClassifier::name, reduceConsclasses(), and reduceVarclasses().
Referenced by DECdetectStructure(), and GCGwriteCls().
◆ GCGconshdlrDecompCreateVarmapForPartialdecId()
SCIP_RETCODE GCGconshdlrDecompCreateVarmapForPartialdecId | ( | SCIP * | scip, |
SCIP_HASHMAP ** | hashorig2pricingvar, | ||
int | partialdecid, | ||
int | probnr1, | ||
int | probnr2, | ||
SCIP * | scip1, | ||
SCIP * | scip2, | ||
SCIP_HASHMAP * | varmap | ||
) |
for two identical pricing problems a corresponding varmap is created
- Parameters
-
scip scip data structure hashorig2pricingvar mapping from orig to pricingvar partialdecid id of the partial decompostion for which the pricing problems are checked for identity probnr1 index of first block probnr2 index of second block scip1 subscip of first block scip2 subscip of second block varmap mapping from orig to pricingvar
- Returns
- scip return code
Definition at line 4960 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), GCGpricingVarGetOriginalVar(), gcg::PARTIALDECOMP::getBlocksForRep(), gcg::PARTIALDECOMP::getDetprobdata(), gcg::DETPROBDATA::getIndexForVar(), gcg::PARTIALDECOMP::getRepForBlock(), gcg::PARTIALDECOMP::getRepVarmap(), gcg::DETPROBDATA::getVar(), gcg::PARTIALDECOMP::getVarProbindexForBlock(), gcg::PARTIALDECOMP::getVarsForBlock(), and gcg::PARTIALDECOMP::isComplete().
Referenced by pricingprobsAreIdenticalFromDetectionInfo().
◆ GCGconshdlrDecompDecreaseNCallsCreateDecomp()
int GCGconshdlrDecompDecreaseNCallsCreateDecomp | ( | SCIP * | scip | ) |
decreases the counter for created decompositions and returns it
- Returns
- number of created decompositions that was recently decreased
Definition at line 5063 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECdecompFree().
◆ GCGconshdlrDecompDeregisterPartialdecs()
void GCGconshdlrDecompDeregisterPartialdecs | ( | SCIP * | scip, |
SCIP_Bool | original | ||
) |
deregisters partialdecs in the conshdlr
Use this function for deletion of ALL the partialdecs.
Definition at line 5076 of file cons_decomp.cpp.
References getConshdlrdata(), and gcg::PARTIALDECOMP::isAssignedToOrigProb().
Referenced by gcg::DETPROBDATA::~DETPROBDATA().
◆ GCGconshdlrDecompDeregisterPartialdec()
void GCGconshdlrDecompDeregisterPartialdec | ( | SCIP * | scip, |
gcg::PARTIALDECOMP * | partialdec | ||
) |
deregisters a partialdec in the conshdlr
Use this function at deletion of the partialdec. The partialdec is not destroyed in this function, the conshdlr will not know that it exists.
Definition at line 5095 of file cons_decomp.cpp.
References getConshdlrdata(), and gcg::PARTIALDECOMP::getID().
Referenced by gcg::PARTIALDECOMP::~PARTIALDECOMP().
◆ GCGconshdlrDecompFreeDetprobdata()
void GCGconshdlrDecompFreeDetprobdata | ( | SCIP * | scip | ) |
Frees Detprobdata of the original and transformed/presolved problem.
- Note
- Does not free Detprobdata of the original problem if GCGconshdlrDecompFreeOrigOnExit is set to false.
Definition at line 5131 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by SCIP_DECL_CONSEXIT().
◆ GCGconshdlrDecompFreeOrigOnExit()
void GCGconshdlrDecompFreeOrigOnExit | ( | SCIP * | scip, |
SCIP_Bool | free | ||
) |
sets freeing of detection data of original problem during exit to true
used before calling SCIPfreeTransform(), set to true to revoke presolving (e.g. if unpresolved decomposition is used, and transformation is not successful)
Definition at line 5152 of file cons_decomp.cpp.
References getConshdlrdata().
◆ GCGconshdlrDecompGetBlockNumberCandidate()
int GCGconshdlrDecompGetBlockNumberCandidate | ( | SCIP * | scip, |
int | index | ||
) |
returns block number user candidate with given index
- Parameters
-
scip SCIP data structure index index of block number user candidate that should be returned
- Returns
- block number user candidate with given index
Definition at line 5164 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by gcg::DETPROBDATA::getSortedCandidatesNBlocks().
◆ GCGconshdlrDecompGetCompleteDetectionTime()
SCIP_Real GCGconshdlrDecompGetCompleteDetectionTime | ( | SCIP * | scip | ) |
returns the total detection time
- Parameters
-
scip SCIP data structure
- Returns
- total detection time
Definition at line 5177 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECdetectStructure(), and GCGprintCompleteDetectionTime().
◆ GCGconshdlrDecompGetDecomps()
DEC_DECOMP** GCGconshdlrDecompGetDecomps | ( | SCIP * | scip | ) |
returns an array containing all decompositions
Updates the decomp decomposition structure by converting all finished partialdecs into decompositions and replacing the old list in the conshdlr.
- Returns
- decomposition array
Definition at line 5192 of file cons_decomp.cpp.
References createDecompFromPartialdec(), DECdecompFree(), GCGconshdlrDecompGetNDecomps(), getConshdlrdata(), and sortPartialdecs().
◆ GCGconshdlrDecompGetDetectorHistoryByPartialdecId()
std::string GCGconshdlrDecompGetDetectorHistoryByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets detector history of partialdec with given id
- Returns
- detector history of partialdec as string
Definition at line 5224 of file cons_decomp.cpp.
References gcg::PARTIALDECOMP::buildDecChainString(), and GCGconshdlrDecompGetPartialdecFromID().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetDetectors()
DEC_DETECTOR** GCGconshdlrDecompGetDetectors | ( | SCIP * | scip | ) |
Gets an array of all detectors.
- Returns
- array of detectors
Definition at line 5238 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by gcg::GCGdialogShowLegend().
◆ GCGconshdlrDecompGetDetprobdataOrig()
DETPROBDATA* GCGconshdlrDecompGetDetprobdataOrig | ( | SCIP * | scip | ) |
help method to access detprobdata for unpresolved problem
- Returns
- pointer to detprobdata in wrapper data structure
Definition at line 5249 of file cons_decomp.cpp.
References GCGconshdlrDecompOrigDetprobdataExists(), getConshdlrdata(), and resetDetprobdata().
Referenced by cmpGraphPair(), createPartialdecFromDecomp(), DEC_DECL_CONSCLASSIFY(), DEC_DECL_VARCLASSIFY(), GCGwriteCls(), and gcg::PARTIALDECOMP::getDetprobdata().
◆ GCGconshdlrDecompGetDetprobdataPresolved()
DETPROBDATA* GCGconshdlrDecompGetDetprobdataPresolved | ( | SCIP * | scip | ) |
help method to access detprobdata for transformed problem
- Returns
- pointer to detprobdata in wrapper data structure
Definition at line 5263 of file cons_decomp.cpp.
References GCGconshdlrDecompPresolvedDetprobdataExists(), getConshdlrdata(), and resetDetprobdata().
Referenced by cmpGraphPair(), createPartialdecFromDecomp(), DEC_DECL_CONSCLASSIFY(), DEC_DECL_VARCLASSIFY(), GCGwriteCls(), and gcg::PARTIALDECOMP::getDetprobdata().
◆ GCGconshdlrDecompGetFinishedPartialdecsList()
SCIP_RETCODE GCGconshdlrDecompGetFinishedPartialdecsList | ( | SCIP * | scip, |
int ** | idlist, | ||
int * | listlength | ||
) |
Gets a list of ids of the current partialdecs that are finished.
- Note
- recommendation: when in doubt plan for as many ids as partialdecs
- See also
- GCGconshdlrDecompGetNPartialdecs
- Returns
- scip return code
Definition at line 5277 of file cons_decomp.cpp.
References getFinishedPartialdecs(), and partialdecVecToIdArray().
Referenced by reportAllDecompositions().
◆ GCGconshdlrDecompGetPartialdecsList()
SCIP_RETCODE GCGconshdlrDecompGetPartialdecsList | ( | SCIP * | scip, |
int ** | idlist, | ||
int * | listlength | ||
) |
Gets a list of ids of the current partialdecs.
- Note
- recommendation: when in doubt plan for as many ids as partialdecs
- See also
- GCGconshdlrDecompGetNPartialdecs
- Returns
- scip return code
Definition at line 5291 of file cons_decomp.cpp.
References getConshdlrdata(), and partialdecVecToIdArray().
◆ GCGconshdlrDecompGetNBlockNumberCandidates()
int GCGconshdlrDecompGetNBlockNumberCandidates | ( | SCIP * | scip | ) |
returns the number of block candidates given by the user
- Returns
- number of block candidates given by the user
Definition at line 5305 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by gcg::DETPROBDATA::getSortedCandidatesNBlocks().
◆ GCGconshdlrDecompGetNBlocksByPartialdecId()
int GCGconshdlrDecompGetNBlocksByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets block number of partialdec with given id
- Returns
- block number of partialdec
Definition at line 5316 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNBlocks().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetNDecomps()
int GCGconshdlrDecompGetNDecomps | ( | SCIP * | scip | ) |
gets the number of decompositions (= amount of finished partialdecs)
- Returns
- number of decompositions
Definition at line 5327 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECgetNDecomps(), GCGconshdlrDecompGetDecomps(), reportAllDecompositions(), writeAllDecompositions(), writeSelectedDecompositions(), and writeTexTitlepage().
◆ GCGconshdlrDecompGetNDetectors()
int GCGconshdlrDecompGetNDetectors | ( | SCIP * | scip | ) |
Gets the number of all detectors.
- Returns
- number of detectors
Definition at line 5348 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by gcg::GCGdialogShowLegend().
◆ GCGconshdlrDecompGetNextPartialdecID()
int GCGconshdlrDecompGetNextPartialdecID | ( | SCIP * | scip | ) |
Gets the next partialdec id managed by cons_decomp.
- Returns
- the next partialdec id managed by cons_decomp
Definition at line 5359 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and getConshdlrdata().
Referenced by gcg::PARTIALDECOMP::PARTIALDECOMP().
◆ GCGconshdlrDecompGetNFormerDetectionConssForID()
int GCGconshdlrDecompGetNFormerDetectionConssForID | ( | SCIP * | scip, |
int | id | ||
) |
gets number of active constraints during the detection of the decomp with given id
Gets the number of constraints that were active while detecting the decomposition originating from the partialdec with the given id, this method is used to decide if the problem has changed since detection, if so the aggregation information needs to be recalculated
- Note
- if the partialdec is not complete the function returns -1
- Returns
- number of constraints that were active while detecting the decomposition
Definition at line 5374 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by checkIdenticalBlocks().
◆ GCGconshdlrDecompGetNLinkingVarsByPartialdecId()
int GCGconshdlrDecompGetNLinkingVarsByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets number of linking variables of partialdec with given id
- Returns
- number of linking variables of partialdec
Definition at line 5394 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNLinkingvars().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetNMasterConssByPartialdecId()
int GCGconshdlrDecompGetNMasterConssByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets number of master constraints of partialdec with given id
- Returns
- number of master constraints of partialdec
Definition at line 5405 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNMasterconss().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetNMasterVarsByPartialdecId()
int GCGconshdlrDecompGetNMasterVarsByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets number of master variables of partialdec with given id
- Returns
- number of master variables of partialdec
Definition at line 5416 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNMastervars().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetNOpenConssByPartialdecId()
int GCGconshdlrDecompGetNOpenConssByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets number of open constraints of partialdec with given id
- Returns
- total number of open constraints of partialdec
Definition at line 5427 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNOpenconss().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetNOpenVarsByPartialdecId()
int GCGconshdlrDecompGetNOpenVarsByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets number of open variables of partialdec with given id
- Returns
- total number of open variables of partialdec
Definition at line 5438 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNOpenvars().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetNFinishedPartialdecsOrig()
unsigned int GCGconshdlrDecompGetNFinishedPartialdecsOrig | ( | SCIP * | scip | ) |
Gets the number of finished partialdecs available for the original problem.
- Returns
- number of partialdecs
Definition at line 5449 of file cons_decomp.cpp.
References getConshdlrdata().
◆ GCGconshdlrDecompGetNFinishedPartialdecsTransformed()
unsigned int GCGconshdlrDecompGetNFinishedPartialdecsTransformed | ( | SCIP * | scip | ) |
Gets the number of finished partialdecs available for the transformed problem.
- Returns
- number of partialdecs
Definition at line 5463 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by GCGsolve().
◆ GCGconshdlrDecompGetNOpenPartialdecsOrig()
unsigned int GCGconshdlrDecompGetNOpenPartialdecsOrig | ( | SCIP * | scip | ) |
Gets the number of open partialdecs available for the original problem.
- Returns
- number of partialdecs
Definition at line 5477 of file cons_decomp.cpp.
References getConshdlrdata().
◆ GCGconshdlrDecompGetNOpenPartialdecsTransformed()
unsigned int GCGconshdlrDecompGetNOpenPartialdecsTransformed | ( | SCIP * | scip | ) |
Gets the number of open partialdecs available for the transformed problem.
- Returns
- number of partialdecs
Definition at line 5491 of file cons_decomp.cpp.
References getConshdlrdata().
◆ GCGconshdlrDecompGetNPartialdecs()
unsigned int GCGconshdlrDecompGetNPartialdecs | ( | SCIP * | scip | ) |
Gets the number of all partialdecs.
- Returns
- number of Partialdecs
Definition at line 5505 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by gcg::GCGdialogSetNEntires(), gcg::updateIdList(), and writeTexTitlepage().
◆ GCGconshdlrDecompGetNPartialdecsOrig()
unsigned int GCGconshdlrDecompGetNPartialdecsOrig | ( | SCIP * | scip | ) |
Gets the number of partialdecs available for the original problem.
- Returns
- number of partialdecs
Definition at line 5516 of file cons_decomp.cpp.
References getConshdlrdata().
◆ GCGconshdlrDecompGetNPartialdecsTransformed()
unsigned int GCGconshdlrDecompGetNPartialdecsTransformed | ( | SCIP * | scip | ) |
Gets the number of partialdecs available for the transformed problem.
- Returns
- number of partialdecs
Definition at line 5530 of file cons_decomp.cpp.
References getConshdlrdata().
◆ GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId()
int GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets number of stairlinking variables of partialdec with given id
- Returns
- total number of stairlinking variables of partialdec
Definition at line 5544 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::getNTotalStairlinkingvars().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetPartialdecs()
std::vector<PARTIALDECOMP*>* GCGconshdlrDecompGetPartialdecs | ( | SCIP * | scip | ) |
gets vector of all partialdecs
- Returns
- finished partialdecs
- Parameters
-
scip SCIP data structure
Definition at line 5555 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by gcg::updateIdList().
◆ GCGconshdlrDecompGetPartialdecFromID() [2/2]
SCIP_RETCODE GCGconshdlrDecompGetPartialdecFromID | ( | SCIP * | scip, |
int | partialdecid, | ||
PARTIALDECOMP_WRAPPER * | pwr | ||
) |
Gets wrapped PARTIALDECOMP with given id.
- Returns
- SCIP return code
Definition at line 5566 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and Partialdecomp_Wrapper::partialdec.
◆ GCGconshdlrDecompGetScoreByPartialdecId()
float GCGconshdlrDecompGetScoreByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets score of partialdec with given id
- Returns
- score in respect to current score type
Definition at line 5581 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), GCGconshdlrDecompGetScoretype(), and gcg::PARTIALDECOMP::getScore().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompGetScoreTotalTime()
SCIP_Real GCGconshdlrDecompGetScoreTotalTime | ( | SCIP * | scip | ) |
gets total score computation time
- Returns
- total score computation time
Definition at line 5592 of file cons_decomp.cpp.
References getConshdlrdata().
◆ GCGconshdlrDecompGetScoretype()
SCORETYPE GCGconshdlrDecompGetScoretype | ( | SCIP * | scip | ) |
Gets the currently selected scoretype.
- Returns
- the currently selected scoretype
Definition at line 5601 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompGetScoreByPartialdecId(), gcg::GCGdialogShowLegend(), gcg::GCGdialogShowMenu(), gcg::GCGdialogSortBy(), GCGwriteTexReport(), gcg::DETPROBDATA::sortFinishedForScore(), writeTexPartialdecStatistics(), and writeTexTitlepage().
◆ GCGconshdlrDecompGetSelectedPartialdecs()
SCIP_RETCODE GCGconshdlrDecompGetSelectedPartialdecs | ( | SCIP * | scip, |
int ** | idlist, | ||
int * | listlength | ||
) |
Gets a list of ids of all currently selected partialdecs.
- Returns
- list of partialdecs
Definition at line 5612 of file cons_decomp.cpp.
References getSelectedPartialdecs().
◆ GCGconshdlrDecompIncreaseNCallsCreateDecomp()
int GCGconshdlrDecompIncreaseNCallsCreateDecomp | ( | SCIP * | scip | ) |
counts up the counter for created decompositions and returns it
- Returns
- number of created decompositions that was recently increased
Definition at line 5634 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by DECdecompCreate().
◆ GCGconshdlrDecompIsPresolvedByPartialdecId()
SCIP_Bool GCGconshdlrDecompIsPresolvedByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets whether partialdec with given id is presolved
- Returns
- true iff partialdec is presolved
Definition at line 5647 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::isAssignedToOrigProb().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompIsSelectedByPartialdecId()
SCIP_Bool GCGconshdlrDecompIsSelectedByPartialdecId | ( | SCIP * | scip, |
int | id | ||
) |
gets whether partialdec with given id is selected
- Returns
- true iff partialdec is selected
Definition at line 5658 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::isSelected().
Referenced by GCGdialogExecExplore().
◆ GCGconshdlrDecompOrigDetprobdataExists()
SCIP_Bool GCGconshdlrDecompOrigDetprobdataExists | ( | SCIP * | scip | ) |
returns whether or not a detprobdata structure for the original problem exists
- Returns
- true iff an original detprobdata exists
Definition at line 5669 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by GCGconshdlrDecompAddMatrixPartialdec(), and GCGconshdlrDecompGetDetprobdataOrig().
◆ GCGconshdlrDecompOrigPartialdecExists()
SCIP_Bool GCGconshdlrDecompOrigPartialdecExists | ( | SCIP * | scip | ) |
returns whether or not an original decompositions exists in the data structures
- Returns
- true iff an origial decomposition exist
Definition at line 5683 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by GCGsolve().
◆ GCGconshdlrDecompPresolvedDetprobdataExists()
SCIP_Bool GCGconshdlrDecompPresolvedDetprobdataExists | ( | SCIP * | scip | ) |
returns whether or not a detprobdata structure for the presolved problem exists
- Returns
- true iff a presolved detprobdata exists
Definition at line 5697 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by GCGconshdlrDecompAddMatrixPartialdec(), and GCGconshdlrDecompGetDetprobdataPresolved().
◆ GCGconshdlrDecompPrintDetectorStatistics()
SCIP_RETCODE GCGconshdlrDecompPrintDetectorStatistics | ( | SCIP * | scip, |
FILE * | file | ||
) |
display statistics about detectors
- Returns
- SCIP return code
Definition at line 5711 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by GCGprintStatistics().
◆ GCGconshdlrDecompRegisterPartialdec()
void GCGconshdlrDecompRegisterPartialdec | ( | SCIP * | scip, |
gcg::PARTIALDECOMP * | partialdec | ||
) |
registers a partialdec in the conshdlr
Use this function at initialization of the partialdec. If the partialdec already exists in the conshdlr it is ignored.
Definition at line 5733 of file cons_decomp.cpp.
References getConshdlrdata(), and gcg::PARTIALDECOMP::getID().
Referenced by gcg::PARTIALDECOMP::PARTIALDECOMP().
◆ GCGconshdlrDecompSelectPartialdec()
SCIP_RETCODE GCGconshdlrDecompSelectPartialdec | ( | SCIP * | scip, |
int | partialdecid, | ||
SCIP_Bool | select | ||
) |
selects/unselects a partialdecomp
- Returns
- SCIP return code
- Parameters
-
scip SCIP data structure partialdecid id of partialdecomp select select/unselect
Definition at line 5749 of file cons_decomp.cpp.
References GCGconshdlrDecompGetPartialdecFromID(), and gcg::PARTIALDECOMP::setSelected().
Referenced by initRelaxator().
◆ GCGconshdlrDecompSetDetection()
SCIP_RETCODE GCGconshdlrDecompSetDetection | ( | SCIP * | scip, |
SCIP_PARAMSETTING | paramsetting, | ||
SCIP_Bool | quiet | ||
) |
sets detector parameters values
sets detector parameters values to
- SCIP_PARAMSETTING_DEFAULT which are the default values of all detector parameters
- SCIP_PARAMSETTING_FAST such that the time spend for detection is decreased
- SCIP_PARAMSETTING_AGGRESSIVE such that the detectors produce more decompositions
- SCIP_PARAMSETTING_OFF which turns off all detection
- Returns
- SCIP return code
Definition at line 5764 of file cons_decomp.cpp.
References getConshdlrdata(), setDetectionAggressive(), setDetectionDefault(), setDetectionFast(), and setDetectionOff().
Referenced by SCIP_DECL_DIALOGEXEC().
◆ GCGconshdlrDecompSetScoretype()
void GCGconshdlrDecompSetScoretype | ( | SCIP * | scip, |
SCORETYPE | sctype | ||
) |
Sets the currently used scoretype.
Definition at line 5796 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by gcg::GCGdialogChangeScore().
◆ GCGconshdlrDecompTranslateNBestOrigPartialdecs()
SCIP_RETCODE GCGconshdlrDecompTranslateNBestOrigPartialdecs | ( | SCIP * | scip, |
int | n, | ||
SCIP_Bool | completeGreedily | ||
) |
translates n best unpresolved partialdec to a complete presolved one
- Parameters
-
scip SCIP data structure n number of partialdecs that should be translated completeGreedily whether or not to complete the decomposition greedily
- Returns
- SCIP return code
Definition at line 5808 of file cons_decomp.cpp.
References addPartialdec(), gcg::PARTIALDECOMP::completeGreedily(), GCGconshdlrDecompChooseCandidatesFromSelected(), getConshdlrdata(), gcg::PARTIALDECOMP::isComplete(), and resetDetprobdata().
◆ GCGconshdlrDecompTranslateOrigPartialdecs()
SCIP_RETCODE GCGconshdlrDecompTranslateOrigPartialdecs | ( | SCIP * | scip | ) |
translates unpresolved partialdec to a complete presolved one
- Parameters
-
scip SCIP data structure
- Returns
- SCIP return code
Definition at line 5858 of file cons_decomp.cpp.
References addPartialdec(), getConshdlrdata(), and resetDetprobdata().
Referenced by GCGpresolve().
◆ GCGdetectionTookPlace()
SCIP_Bool GCGdetectionTookPlace | ( | SCIP * | scip, |
SCIP_Bool | original | ||
) |
Gets whether the detection already took place
- Returns
- true if detection took place, false otherwise
Definition at line 5897 of file cons_decomp.cpp.
References getConshdlrdata().
Referenced by GCGdetect(), GCGprintCompleteDetectionStatistics(), and GCGsolve().
◆ SCIPconshdlrDecompRepairConsNames()
SCIP_RETCODE SCIPconshdlrDecompRepairConsNames | ( | SCIP * | scip | ) |
method to eliminate duplicate constraint names and name unnamed constraints
- Returns
- SCIP return code
Definition at line 5909 of file cons_decomp.cpp.
References findGenericConsname(), and getConshdlrdata().
Referenced by GCGtransformProb().
◆ SCIPincludeConshdlrDecomp()
SCIP_RETCODE SCIPincludeConshdlrDecomp | ( | SCIP * | scip | ) |
creates the constraint handler for decomp and includes it in SCIP
- Returns
- scip return code
Definition at line 5969 of file cons_decomp.cpp.
References CONSHDLR_CHECKPRIORITY, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, DEFAULT_AGGREGATIONLIMITNCONSSPERBLOCK, DEFAULT_AGGREGATIONLIMITNVARSPERBLOCK, DEFAULT_ALLOWPARTITIONDUPLICATES, DEFAULT_BENDERSONLYBINMASTER, DEFAULT_BENDERSONLYCONTSUBPR, DEFAULT_BLOCKNUMBERCANDSMEDIANVARSPERCONS, DEFAULT_CLASSIFY, DEFAULT_COEFFACTORORIGVSRANDOM, DEFAULT_DETECTBENDERS, DEFAULT_DUALVALRANDOMMETHOD, DEFAULT_ENABLED, DEFAULT_ENABLEORIGCLASSIFICATION, DEFAULT_ENABLEORIGDETECTION, DEFAULT_MAXDETECTIONROUNDS, DEFAULT_MAXDETECTIONTIME, DEFAULT_MAXNCLASSES, DEFAULT_MAXNCLASSESFORNBLOCKCANDIDATES, DEFAULT_MAXNCLASSESLARGEPROBS, DEFAULT_POSTPROCESS, DEFAULT_STRONGTIMELIMIT, NO_MODIF, and SETPART_FWHITE.
Referenced by SCIPincludeGcgPlugins().