gcg::Seeedpool Class Reference

Detailed Description

class to manage the detection process and data for one coefficient matrix of a MIP, usually there is one seeedpool for the original and one seeedpool for the transformed problem

Definition at line 110 of file class_seeedpool.h.

#include <class_seeedpool.h>

Public Member Functions

 Seeedpool (SCIP *scip, const char *conshdlrName, SCIP_Bool transformed, SCIP_Bool benders)
 constructor More...
 
 ~Seeedpool ()
 
SCIP_RETCODE calcClassifierAndNBlockCandidates (SCIP *givenScip)
 creates constraint and variable classifiers, and deduces block number candidates More...
 
void createConssAdjacency ()
 create the constraint adjacency datastructure that is used (if created) for some methods to faster access the constarints that have variables in common More...
 
std::vector< SeeedPtrfindSeeeds ()
 constructs seeeds using the registered detectors More...
 
void sortFinishedForScore ()
 sorts seeeds in finished seeeds data structure according to the scoretype that is currently used More...
 
std::vector< SeeedPtrfinishIncompleteSeeeds (std::vector< SeeedPtr > incompleteseeeds)
 method to complete a set of incomplete seeeds with the help of all included detectors that implement a finishing method More...
 
void findDecompositions ()
 calls findSeeeds method and sort the finished decompositions by score More...
 
gcg::SeeedfindFinishedSeeedByID (int seeedid)
 returns seeed with the corresponding id or NULL if it is not found in this seeedpool More...
 
void addSeeedToAncestor (SeeedPtr seeed)
 adds a seeed to ancestor seeeds More...
 
void addSeeedToCurr (SeeedPtr seeed)
 adds a seeed to current seeeds (data structure for seeeds that are goin to processed in the propagation rounds) More...
 
void addSeeedToFinished (SeeedPtr seeed, SCIP_Bool *success)
 adds a seeed to finished seeeds More...
 
void addSeeedToFinishedUnchecked (SeeedPtr seeed)
 adds a seeed to finished seeeds without checking for duplicates, dev has to check this on his own More...
 
void addSeeedToIncomplete (SeeedPtr seeed, SCIP_Bool *success)
 adds a seeed to incomplete seeeds More...
 
SCIP_Bool isSeeedDuplicateofIncomplete (SeeedPtr seeed)
 check if seeed is a duplicate of an existing incomplete seeed More...
 
SCIP_Bool isSeeedDuplicateofFinished (SeeedPtr seeed)
 check if seeed is a duplicate of an existing finished seeed More...
 
SCIP_RETCODE calcStrongDecompositionScore (SeeedPtr seeed, SCIP_Real *score)
 calculates the strong decomposition score of a seeed More...
 
SCIP_Bool areThereContinuousVars ()
 checks if there are continouos variables More...
 
void clearAncestorSeeeds ()
 clears ancestor seeed data structure, More...
 
void clearCurrentSeeeds ()
 clears current seeed data structure More...
 
void clearFinishedSeeeds ()
 clears finished seeed data structure More...
 
void clearIncompleteSeeeds ()
 clears incomplete seeed data structure More...
 
SeeedPtr getAncestorSeeed (int seeedindex)
 returns a seeed from ancestor seeed data structure with given index More...
 
SeeedPtr getCurrentSeeed (int seeedindex)
 
SeeedPtr getFinishedSeeed (int seeedindex)
 returns a seeed from finished seeed data structure More...
 
SeeedPtr getIncompleteSeeed (int seeedindex)
 returns a seeed from incomplete seeed data structure More...
 
int getNAncestorSeeeds ()
 returns size of ancestor seeed data structure More...
 
int getNCurrentSeeeds ()
 returns size of current (open) seeed data structure More...
 
int getNFinishedSeeeds ()
 
int getNIncompleteSeeeds ()
 
int getNTotalConss ()
 
long getNTotalNonzeros ()
 returns the number of nonzero entries in the coefficient matrix More...
 
bool hasDuplicate (SeeedPtr seeed)
 returns true if the given seeed is a duplicate of a seeed that is already contained in finished seeeds or current seeeds data structure More...
 
SCIP_Bool isForBenders ()
 returns whether or not this seeedpool is for detectiong decompositions for benders More...
 
void translateSeeedData (Seeedpool *otherpool, std::vector< Seeed * > otherseeeds, std::vector< Seeed * > &newseeeds, std::vector< ConsClassifier * > otherconsclassifiers, std::vector< ConsClassifier * > &newconsclassifiers, std::vector< VarClassifier * > othervarclassifiers, std::vector< VarClassifier * > &newvarclassifiers)
 translates seeeds and classifiers if the index structure of the problem has changed, e.g. due to presolving More...
 
void translateSeeeds (Seeedpool *otherpool, std::vector< Seeed * > otherseeeds, std::vector< Seeed * > &newseeeds)
 translates seeeds if the index structure of the problem has changed, e.g. due to presolving More...
 
void populate (std::vector< SeeedPtr > seeeds)
 registers seeeds, e.g. done with translated seeeds from the original problem More...
 
SCIP_RETCODE prepareSeeed (SeeedPtr seeed)
 registers a seeed for a seeedpool, sets it up by and calculates its hash value More...
 
void sortAllRelevantSeeeds ()
 sorts seeeds in allrelevantseeeds data structure by ascending id More...
 
bool isConsCardinalityCons (int consindexd)
 returns whether a constraint is a cardinality constraint, i.e. of the ){i} x_i == b More...
 
bool isConsSetppc (int consindexd)
 is cons with specified index partitioning packing, or covering constraint? More...
 
bool isConsSetpp (int consindexd)
 is cons with specified indec partitioning, or packing covering constraint? More...
 
const int * getVarsForCons (int consIndex)
 returns the variable indices of the coefficient matrix for a constraint More...
 
const SCIP_Real * getValsForCons (int consIndex)
 returns the nonzero coefficients of the coefficient matrix for a constraint More...
 
const int * getConssForVar (int varIndex)
 returns the constraint indices of the coefficient matrix for a variable More...
 
SCIP_Real getDualvalOptimalLP (int consindex)
 returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the seeedpool; if it is not calculated yet it will be calculated More...
 
SCIP_Real getDualvalRandom (int consindex)
 return the a random value of the dual variable of the corresponding ; if it is not calculated yet it will be calculated More...
 
int getNVarsForCons (int consIndex)
 returns the number of variables for a given constraint More...
 
int getNConssForVar (int varIndex)
 
const int * getConssForCons (int consIndex)
 
int getNConssForCons (int consIndex)
 returns the number of constraints for a given constraint More...
 
SCIP_VAR * getVarForIndex (int varIndex)
 returns SCIP variable related to a variable index More...
 
SCIP_CONS * getConsForIndex (int consIndex)
 returns the SCIP constraint related to a constraint index More...
 
DEC_DETECTORgetDetectorForIndex (int detectorIndex)
 returns the detector related to a detector index More...
 
DEC_DETECTORgetFinishingDetectorForIndex (int detectorIndex)
 returns the detector related to a finishing detector index More...
 
DEC_DETECTORgetPostprocessingDetectorForIndex (int detectorIndex)
 returns the detector related to a finishing detector index More...
 
SCIP_Real getVal (int row, int col)
 returns a coefficient from the coefficient matrix More...
 
int getIndexForVar (SCIP_VAR *var)
 returns the variable index related to a SCIP variable More...
 
int getIndexForCons (SCIP_CONS *cons)
 returns the constraint index related to a SCIP constraint More...
 
int getIndexForDetector (DEC_DETECTOR *detector)
 the detector index related to a detector More...
 
int getIndexForFinishingDetector (DEC_DETECTOR *detector)
 returns the finishing detector index related to a detector More...
 
int getIndexForPostprocessingDetector (DEC_DETECTOR *detector)
 returns the postprocessing detector index related to a detector More...
 
int getNewIdForSeeed ()
 returns a new unique id for a new seeed More...
 
int getNDetectors ()
 returns the number of propagating detectors used in the seeedpool More...
 
int getNNonzeros ()
 returns the number of nonzero entries in the coefficient matrix More...
 
int getNFinishingDetectors ()
 returns the number of finishing detectors used in the seeedpool More...
 
int getNPostprocessingDetectors ()
 returns the number of postprocessing detectors used in the seeedpool More...
 
int getNVars ()
 return the number of variables considered in the seeedpool More...
 
int getNConss ()
 returns the number of variables considered in the seeedpool More...
 
SCIP * getScip ()
 returns the corresponding scip data structure More...
 
SCIP_CONS * getScipCons (int consid)
 returns scip cons for corresponing id More...
 
SCIP_VAR * getScipVar (int varid)
 returns scip var for corresponding id More...
 
std::vector< int > getSortedCandidatesNBlocks ()
 returns the candidates for number of blocks added by the user followed by the found ones sorted in descending order by how often a candidate was proposed ) More...
 
std::vector< std::pair< int, int > > getSortedCandidatesNBlocksFull ()
 returns (candidate-nvotes) pair for candidates for number of blocks added by the user followed by the found ones sorted in descending order by how often a candidate was proposed, candidates are first ) More...
 
void addCandidatesNBlocks (int candidate)
 adds and counts how often added a candidate for block size and More...
 
void addCandidatesNBlocksNVotes (int candidate, int nvotes)
 adds a candidate for block size and counts how often a candidate is added More...
 
void addUserCandidatesNBlocks (int candidate)
 adds a candidate for block size given by the user More...
 
int getNUserCandidatesNBlocks ()
 returns number of user-given block size candidates More...
 
void calcCandidatesNBlocks ()
 calculates and adds block size candidates using constraint classifications and variable classifications More...
 
void addConsClassifier (ConsClassifier *classifier)
 adds a constraint classifier if it is no duplicate of an existing constraint classifier More...
 
ConsClassifiercreateConsClassifierForSCIPConstypes ()
 returns a new constraint classifier where all constraints with identical SCIP constype are assigned to the same class More...
 
ConsClassifiercreateConsClassifierForMiplibConstypes ()
 returns a new constraint classifier where all constraints with identical Miplib constype are assigned to the same class More...
 
ConsClassifiercreateConsClassifierForConsnamesDigitFreeIdentical ()
 returns a new constraint classifier where all constraints with identical consname (ignoring digits) are assigned to the same class More...
 
ConsClassifiercreateConsClassifierForConsnamesLevenshteinDistanceConnectivity (int connectivity)
 returns a new constraint classifier where all constraints whose consnames do not a have levenshtein distance to each other higher than a given connectivity are assigned to the same class More...
 
ConsClassifiercreateConsClassifierForNNonzeros ()
 
ConsClassifiergetConsClassifier (int classifierIndex)
 returns pointer to a constraint classifier More...
 
int * getConsClassifierArray (int classifierIndex)
 returns the assignment of constraints to classes of a classifier as integer array More...
 
int getNConsClassifiers ()
 returns number of different constraint classifiers More...
 
void reduceConsclasses ()
 adds constraint classifiers with a reduced number of classes More...
 
void addVarClassifier (VarClassifier *classifier)
 adds a variable classifier if it is no duplicate of an existing variable classifier More...
 
VarClassifiercreateVarClassifierForObjValues ()
 returns a new variable classifier where all variables with identical objective function value are assigned to the same class More...
 
VarClassifiercreateVarClassifierForObjValueSigns ()
 returns a new variable classifier where all variables are assigned to class zero, positive or negative according to their objective function value sign all class zero variables are assumed to be only master variables (set via DECOMPINFO) More...
 
VarClassifiercreateVarClassifierForSCIPVartypes ()
 returns a new variable classifier where all variables with identical SCIP vartype are assigned to the same class More...
 
int getNVarClassifiers ()
 returns number of different variable classifiers More...
 
VarClassifiergetVarClassifier (int classifierIndex)
 returns pointer to a variable classifier with given index More...
 
int * getVarClassifierArray (int classifierIndex)
 returns the assignment of variables to classes of a classifier as integer array More...
 
void reduceVarclasses ()
 adds variable classifiers with a reduced number of classes this is done by greedliy merge two smallest classes into one new until limit from settings is requested More...
 
std::vector< SeeedPtrremoveSomeOneblockDecomps (std::vector< SeeedPtr > givenseeeds)
 returns a vector of seeeds such that all seeeds of given a vector of seeeds having only one block are removed except for the two seeeds with the lowest numbers of masterconss More...
 
SCIP_RETCODE createDecompFromSeeed (SeeedPtr seeed, DEC_DECOMP **newdecomp)
 creates a decomposition DEC_DECOMP structure for a given seeed More...
 
SCIP_RETCODE createSeeedFromDecomp (DEC_DECOMP *decomp, SeeedPtr *newseeed)
 
SCIP_Bool getTransformedInfo ()
 returns true if the matrix structure corresponds to the transformed problem More...
 
SCIP_RETCODE printBlockcandidateInformation (SCIP *scip, FILE *file)
 output method for json file writer to write block candidate information More...
 
SCIP_RETCODE printClassifierInformation (SCIP *scip, FILE *file)
 output method for json file writer to write classifier candidate information More...
 

Public Attributes

std::vector< ConsClassifier * > consclassescollection
 
std::vector< VarClassifier * > varclassescollection
 
SCIP_Real classificationtime
 
SCIP_Real nblockscandidatescalctime
 
SCIP_Real postprocessingtime
 
SCIP_Real scorecalculatingtime
 
SCIP_Real translatingtime
 

Constructor & Destructor Documentation

gcg::Seeedpool::Seeedpool ( SCIP *  givenScip,
const char *  conshdlrName,
SCIP_Bool  _transformed,
SCIP_Bool  _benders 
)

constructor

Parameters
scipSCIP data structure
conshdlrNamename of the conshandler maintaining the seeedpool, should be "decomp"
transformedtrue if the seeedpool is created for the presolved version of the problem
benderstrue if the seeedpool is created for for detecting benders decompositionsconstructor

constructor

set detection data

set up enabled detectors and store them

set up enabled finishing detectors

set up enabled postprocessing detectors

initilize matrix datastructures

assign an index to every cons and var : are all constraints/variables relevant? (probvars etc)

from here on nVars and nConss represents the relevant numbers

assumption: now every relevant constraint and variable has its index and is stored in the corresponding unordered_map

find constraint <-> variable relationships and store them in both directions

Parameters
givenScipSCIP data structure
conshdlrNamename of the conshandler maintaining the seeedpool
_transformedtrue if the seeedpool is created for the presolved version of the problem
_benderstrue if the seeedpool is created for for detecting benders decompositions

Definition at line 832 of file class_seeedpool.cpp.

References addSeeedToAncestor(), addSeeedToCurr(), addUserCandidatesNBlocks(), gcg::consGetRelevantRepr(), gcg::Seeed::considerImplicits(), createConssAdjacency(), GCGconsGetNVars(), GCGconsGetVals(), GCGconsGetVars(), getNConss(), gcg::Seeed::initOnlyBinMaster(), SCIPconshdlrDecompGetBlockNumberCandidate(), SCIPconshdlrDecompGetDetectors(), SCIPconshdlrDecompGetNBlockNumberCandidates(), SCIPconshdlrDecompGetNDetectors(), SCIPconshdlrDecompGetNextSeeedID(), gcg::varGetRelevantRepr(), and gcg::varIsFixedToZero().

gcg::Seeedpool::~Seeedpool ( )

destructor

Definition at line 1102 of file class_seeedpool.cpp.

References consclassescollection, getConsForIndex(), and varclassescollection.

Member Function Documentation

void gcg::Seeedpool::addCandidatesNBlocks ( int  candidate)

adds and counts how often added a candidate for block size and

Parameters
candidatenumber of candidate

adds a candidate for block number and counts how often a candidate is added

Parameters
candidatecandidate for block size

Definition at line 3504 of file class_seeedpool.cpp.

Referenced by calcCandidatesNBlocks(), and reorderPermutations().

void gcg::Seeedpool::addCandidatesNBlocksNVotes ( int  candidate,
int  nvotes 
)

adds a candidate for block size and counts how often a candidate is added

Parameters
candidatecandidate for block size
nvotesnumber of votes this candidates will get

adds a candidate for block number and counts how often a candidate is added

Parameters
candidatecandidate for block size
nvotesnumber of votes this candidates will get

Definition at line 3529 of file class_seeedpool.cpp.

void gcg::Seeedpool::addConsClassifier ( ConsClassifier givenClassifier)

adds a constraint classifier if it is no duplicate of an existing constraint classifier

Parameters
classifierpointer to consclassifier to be added

adds a constraint classifier if it is no duplicate of an existing classifier

check whether there already exists an equivalent consclassifier

Parameters
givenClassifierconsclassifier to be added

Definition at line 3702 of file class_seeedpool.cpp.

References gcg::IndexClassifier::classifierIsDuplicateOfClassifier(), consclassescollection, and gcg::IndexClassifier::getName().

Referenced by calcClassifierAndNBlockCandidates(), and reduceConsclasses().

void gcg::Seeedpool::addSeeedToAncestor ( SeeedPtr  seeed)

adds a seeed to ancestor seeeds

Parameters
seeedtaht is added to the ancesotr seeeds

adds a seeed to ancestor seeeds

Definition at line 1989 of file class_seeedpool.cpp.

Referenced by findSeeeds(), SCIPconshdlrDecompAddLegacymodeDecompositions(), and Seeedpool().

void gcg::Seeedpool::addSeeedToCurr ( SeeedPtr  seeed)

adds a seeed to current seeeds (data structure for seeeds that are goin to processed in the propagation rounds)

Parameters
seeedpointer of seeed to be added

adds a seeed to current seeeds

Definition at line 1998 of file class_seeedpool.cpp.

References gcg::seeedIsNoDuplicateOfSeeeds().

Referenced by Seeedpool().

void gcg::Seeedpool::addSeeedToFinished ( SeeedPtr  seeed,
SCIP_Bool *  success 
)

adds a seeed to finished seeeds

Parameters
seeedpointer of seeed that is going to be added to the finished seeeds (data structure to carry finished decompositions)
successpointer that is set to TRUE iff the the seeeds was successfully added (i.e. it is no duplicate of a known seeed)
See also
addSeeedToFinishedUnchecked()

adds a seeed to finished seeeds

Definition at line 2008 of file class_seeedpool.cpp.

References gcg::seeedIsNoDuplicateOfSeeeds().

Referenced by findSeeeds(), SCIPconshdlrDecompAddLegacymodeDecompositions(), SCIPconshdlrDecompExecToolbox(), SCIPconshdlrDecompExecToolboxCreate(), and SCIPconshdlrDecompExecToolboxModify().

void gcg::Seeedpool::addSeeedToFinishedUnchecked ( SeeedPtr  seeed)

adds a seeed to finished seeeds without checking for duplicates, dev has to check this on his own

Parameters
seeedpointer of seeed that is going to be added unchecked to the finished seeeds (data structure to carry finished decompositions)
See also
addSeeedToFinished()

adds a seeed to finished seeeds withou checking for duplicates, dev has to check this on his own

Definition at line 2027 of file class_seeedpool.cpp.

Referenced by findSeeeds(), and GCGprintMiplibConnectedInformation().

void gcg::Seeedpool::addSeeedToIncomplete ( SeeedPtr  seeed,
SCIP_Bool *  success 
)

adds a seeed to incomplete seeeds

Parameters
seeedto be added
successset in method to TRUE iff the seeeds was added successfully (i.e. it is no duplicate of the existing seeeds)

adds a seeed to incomplete seeeds

Definition at line 2038 of file class_seeedpool.cpp.

References gcg::seeedIsNoDuplicateOfSeeeds().

Referenced by SCIPconshdlrDecompExecToolbox(), SCIPconshdlrDecompExecToolboxCreate(), and SCIPconshdlrDecompExecToolboxModify().

void gcg::Seeedpool::addUserCandidatesNBlocks ( int  candidate)

adds a candidate for block size given by the user

Parameters
candidateuser candidate for block size

adds a candidate for block size given by the user

Parameters
candidatecandidate for block size

Definition at line 3557 of file class_seeedpool.cpp.

Referenced by Seeedpool().

void gcg::Seeedpool::addVarClassifier ( VarClassifier givenClassifier)

adds a variable classifier if it is no duplicate of an existing variable classifier

Parameters
classifiervarclassifier to be added

adds a variable classifier if it is no duplicate of an existing variable classifier

check whether there already exists an equivalent varclassifier

Definition at line 4563 of file class_seeedpool.cpp.

References gcg::IndexClassifier::classifierIsDuplicateOfClassifier(), gcg::IndexClassifier::getName(), and varclassescollection.

Referenced by calcClassifierAndNBlockCandidates(), and reduceVarclasses().

SCIP_Bool gcg::Seeedpool::areThereContinuousVars ( )

checks if there are continouos variables

Returns
TRUE iff there are continouos variables

Definition at line 2066 of file class_seeedpool.cpp.

References getNVars(), and getVarForIndex().

void gcg::Seeedpool::calcCandidatesNBlocks ( )

calculates and adds block size candidates using constraint classifications and variable classifications

calculates and adds block size candidates using constraint classifications and variable classifications

used for nvars / medianofnvars per conss

firstly, iterate over all consclassifiers

check if there are too many classes in this distribution and skip it if so

get necessary data of current classifier

start with the cardinalities of the consclasses as candidates

continue with gcd of all cardinalities in this subset

secondly, iterate over all varclassifiers

check if there are too many classes in this distribution and skip it if so

get necessary data of current classifier

start with the cardinalities of the varclasses as candidates

continue with gcd of all cardinalities in this subset

block number candidate could be nvars / median of nvarsinconss

Definition at line 3584 of file class_seeedpool.cpp.

References addCandidatesNBlocks(), consclassescollection, gcg::gcd(), getNConss(), getNVars(), getNVarsForCons(), and varclassescollection.

Referenced by calcClassifierAndNBlockCandidates().

SCIP_RETCODE gcg::Seeedpool::calcClassifierAndNBlockCandidates ( SCIP *  givenScip)

creates constraint and variable classifiers, and deduces block number candidates

Parameters
givenScipSCIP data structure
Returns
scip return code

creates constraint and variable classifiers, and deduces block number candidates

Parameters
givenScipSCIP data structure

Definition at line 1158 of file class_seeedpool.cpp.

References addConsClassifier(), addVarClassifier(), calcCandidatesNBlocks(), classificationtime, createConsClassifierForConsnamesDigitFreeIdentical(), createConsClassifierForConsnamesLevenshteinDistanceConnectivity(), createConsClassifierForMiplibConstypes(), createConsClassifierForNNonzeros(), createConsClassifierForSCIPConstypes(), createVarClassifierForObjValues(), createVarClassifierForObjValueSigns(), createVarClassifierForSCIPVartypes(), nblockscandidatescalctime, reduceConsclasses(), and reduceVarclasses().

Referenced by GCGwriteCls().

SCIP_RETCODE gcg::Seeedpool::calcStrongDecompositionScore ( SeeedPtr  seeed,
SCIP_Real *  score 
)

calculates the strong decomposition score of a seeed

Parameters
seeedpointer of seeed the score is calculated for
scorepointer to store the calculated score
Returns
scip return codecalculates the strong decomposition score of a seeed

calculates the strong decomposition score of a seeed

introduce scip parameters

use and introduce scip parameter limit (for a pricing problem to be considered fractional solvable) of difference optimal value of LP-Relaxation and optimal value of artificial pricing problem

SCIP_Real gaplimitsolved;

use and introduce scip parameter weighted limit (for a pricing problem to be considered fractional solvable) difference optimal value of LP-Relaxation and optimal value of artificial pricing problem

SCIP_Real gaplimitbeneficial;

SCIP_Real scorecoef_fastlittlebenefical;

SCIP_Real scorecoef_mediumlittlebenefical;

gaplimitsolved = 0.; gaplimitbeneficial = 0.3;

not used yes

build subscip

copy variables

calculate obj val from shuffled

round variable objective coeffs to decrease numerical troubles

copy constraints

set parameter for subscip

solve subscip

SCIPfreeRandom(scip, &randnumgen );

get coefficient

free stuff

SCIPfreeRandom(scip, &randnumgen );

consider coefficients

Definition at line 2080 of file class_seeedpool.cpp.

References gcg::createTestPricingprobConss(), getConssForVar(), getDualvalOptimalLP(), getDualvalRandom(), gcg::Seeed::getNBlocks(), gcg::Seeed::getNConssForBlock(), getNConssForVar(), getNVars(), gcg::Seeed::getNVarsForBlock(), getVal(), getVarForIndex(), gcg::Seeed::getVarsForBlock(), gcg::Seeed::isConsMastercons(), and gcg::setTestpricingProblemParameters().

Referenced by SCIPconshdlrDecompSelectCalcStrongDecompositionScore().

void gcg::Seeedpool::clearAncestorSeeeds ( )

clears ancestor seeed data structure,

Note
does not free the seeeds themselves

clears ancestor seeed data structure

Definition at line 2363 of file class_seeedpool.cpp.

void gcg::Seeedpool::clearCurrentSeeeds ( )

clears current seeed data structure

Note
does not free the seeeds themselves

clears current seeed data structure

Definition at line 2369 of file class_seeedpool.cpp.

void gcg::Seeedpool::clearFinishedSeeeds ( )

clears finished seeed data structure

Note
does not free the seeeds themselves

clears finished seeed data structure

Definition at line 2375 of file class_seeedpool.cpp.

void gcg::Seeedpool::clearIncompleteSeeeds ( )

clears incomplete seeed data structure

Note
does not free the seeeds themselves

clears incomplete seeed data structure

Definition at line 2381 of file class_seeedpool.cpp.

ConsClassifier * gcg::Seeedpool::createConsClassifierForConsnamesDigitFreeIdentical ( )

returns a new constraint classifier where all constraints with identical consname (ignoring digits) are assigned to the same class

Returns
new constraint classifer according to consname (ignoring digits)

returns a new constraint classifier where all constraints with identical consname (ignoring digits) are assigned to the same class

firstly, remove all digits from the consnames

check if string belongs to an existing name class

if not, create a new class

secondly, use these information to create a ConsClassifier

set all class names and descriptions

copy the constraint assignment information found in first step

Definition at line 4274 of file class_seeedpool.cpp.

References gcg::ConsClassifier::assignConsToClass(), getConsForIndex(), gcg::IndexClassifier::getName(), gcg::IndexClassifier::getNClasses(), gcg::ConsClassifier::getNConss(), getNConss(), gcg::removeDigits(), gcg::IndexClassifier::setClassDescription(), and gcg::IndexClassifier::setClassName().

Referenced by calcClassifierAndNBlockCandidates().

ConsClassifier * gcg::Seeedpool::createConsClassifierForConsnamesLevenshteinDistanceConnectivity ( int  connectivity)

returns a new constraint classifier where all constraints whose consnames do not a have levenshtein distance to each other higher than a given connectivity are assigned to the same class

Parameters
connectivityminimum levenshtein distance for two consnames to be incident
Returns
new constraint classifier according to levenshtein distance of consnames

returns a new constraint classifier where all constraints whose consnames do not a have levenshtein distance to each other higher than a given connectivity are assigned to the same class

if number of conss exceeds this number, skip calculating such a classifier

read consnames

calculate levenshtein distances pairwise

repeat doing breadth first search until every constraint is assigned to a class

consider all constraints which are connected to the current constraint by means of levenshtein distance

create a new class with found constraints in ConsClassifier

assign constraint indices to classes

Parameters
connectivitygiven connectivity

Definition at line 4344 of file class_seeedpool.cpp.

References gcg::ConsClassifier::addClass(), gcg::ConsClassifier::assignConsToClass(), gcg::BOTH, gcg::calcLevenshteinDistance(), getConsForIndex(), gcg::ConsClassifier::getNConss(), and getNConss().

Referenced by calcClassifierAndNBlockCandidates().

ConsClassifier * gcg::Seeedpool::createConsClassifierForMiplibConstypes ( )

returns a new constraint classifier where all constraints with identical Miplib constype are assigned to the same class

Returns
a new constraint classifier according to miplib 2010 constype

returns a new constraint classifier where all constraints with identical SCIP constype are assigned to the same class

firstly, assign all constraints to classindices

set class names and descriptions of every class

Definition at line 3836 of file class_seeedpool.cpp.

References GCGconsGetLhs(), GCGconsGetNVars(), GCGconsGetRhs(), GCGconsGetVals(), GCGconsGetVars(), getConsForIndex(), getNConss(), gcg::isFiniteNonnegativeIntegral(), gcg::isRangedRow(), SCIP_CONSTYPE_AGGREGATION, SCIP_CONSTYPE_BINPACKING, SCIP_CONSTYPE_CARDINALITY, SCIP_CONSTYPE_EMPTY, SCIP_CONSTYPE_EQKNAPSACK, SCIP_CONSTYPE_FREE, SCIP_CONSTYPE_GENERAL, SCIP_CONSTYPE_INTKNAPSACK, SCIP_CONSTYPE_INVKNAPSACK, SCIP_CONSTYPE_KNAPSACK, SCIP_CONSTYPE_MIXEDBINARY, SCIP_CONSTYPE_SETCOVERING, SCIP_CONSTYPE_SETPACKING, SCIP_CONSTYPE_SETPARTITION, SCIP_CONSTYPE_SINGLETON, and SCIP_CONSTYPE_VARBOUND.

Referenced by calcClassifierAndNBlockCandidates().

ConsClassifier * gcg::Seeedpool::createConsClassifierForNNonzeros ( )

returns a new constraint classifier where all constraints with identical number of nonzero coefficients are assigned to the same class

Returns
a new constraint classifier where all constraints with identical number of nonzero coefficients are assigned to the same class

returns a new constraint classifier where all constraints with identical number of nonzero coefficients are assigned to the same class

firstly, assign all constraints to classindices

check if number of nonzeros belongs to an existing class index

if not, create a new class index

secondly, use these information to create a ConsClassifier

set class names and descriptions of every class

copy the constraint assignment information found in first step

Definition at line 4451 of file class_seeedpool.cpp.

References gcg::ConsClassifier::assignConsToClass(), gcg::IndexClassifier::getName(), gcg::IndexClassifier::getNClasses(), gcg::ConsClassifier::getNConss(), getNConss(), getNVarsForCons(), gcg::IndexClassifier::setClassDescription(), and gcg::IndexClassifier::setClassName().

Referenced by calcClassifierAndNBlockCandidates().

ConsClassifier * gcg::Seeedpool::createConsClassifierForSCIPConstypes ( )

returns a new constraint classifier where all constraints with identical SCIP constype are assigned to the same class

Returns
pointer to constraint classifier

returns a new constraint classifier where all constraints with identical SCIP constype are assigned to the same class

firstly, assign all constraints to classindices

check whether the constraint's constype is new

if it is new, create a new classindex

secondly, use these information to create a ConsClassifier

set class names and descriptions of every class

copy the constraint assignment information found in first step

Definition at line 3736 of file class_seeedpool.cpp.

References GCGconsGetType(), getConsForIndex(), getNConss(), knapsack, linear, logicor, nconsTypeItems, setcovering, setpacking, setpartitioning, sos1, sos2, unknown, and varbound.

Referenced by calcClassifierAndNBlockCandidates().

void gcg::Seeedpool::createConssAdjacency ( )

create the constraint adjacency datastructure that is used (if created) for some methods to faster access the constarints that have variables in common

find constraint <-> constraint relationships and store them in both directions

Definition at line 1239 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignSmallestComponentsButOneConssAdjacency(), and Seeedpool().

SCIP_RETCODE gcg::Seeedpool::createDecompFromSeeed ( SeeedPtr  seeed,
DEC_DECOMP **  newdecomp 
)

creates a decomposition DEC_DECOMP structure for a given seeed

Parameters
seeedseeed the decomposition is created for
newdecompthe new decomp created from the seeed
Returns
scip return code

creates a decomposition for a given seeed

store deletion information of included vars

set nblocks

set constraints

now: set variables

set linkingvars

free stuff

free vars stuff

free constraints

set detectorchain

set statistical detector chain data

set detector chain info string

set dectype

there might be some remaining constraints assert( DECdecompCheckConsistency( scip, ( * newdecomp ) ) ); hence we do not check this here

Parameters
newdecompseeed the decomposition is created for the new decomp created from the seeed

Definition at line 5066 of file class_seeedpool.cpp.

References gcg::Seeed::buildDecChainString(), gcg::Seeed::checkConsistency(), gcg::COMPLETE, gcg::COMPLETED_CONSTOMASTER, DEC_DECTYPE_ARROWHEAD, DEC_DECTYPE_BORDERED, DEC_DECTYPE_DIAGONAL, DEC_DECTYPE_STAIRCASE, DEC_DECTYPE_UNKNOWN, DECdecompAddRemainingConss(), DECdecompCheckConsistency(), DECdecompCreate(), DECdecompGetNLinkingvars(), DECdecompSetConsindex(), DECdecompSetConstoblock(), DECdecompSetDetectorChainString(), DECdecompSetDetectorClockTimes(), DECdecompSetDetectorPctConssFromOpen(), DECdecompSetDetectorPctConssToBlock(), DECdecompSetDetectorPctConssToBorder(), DECdecompSetDetectorPctVarsFromOpen(), DECdecompSetDetectorPctVarsToBlock(), DECdecompSetDetectorPctVarsToBorder(), DECdecompSetLinkingconss(), DECdecompSetLinkingvars(), DECdecompSetNBlocks(), DECdecompSetNNewBlocks(), DECdecompSetSeeedID(), DECdecompSetStairlinkingvars(), DECdecompSetSubscipconss(), DECdecompSetSubscipvars(), DECdecompSetVarindex(), DECdecompSetVartoblock(), DECsetMaxWhiteScore(), gcg::Seeed::getConssForBlock(), gcg::Seeed::getDetectorchain(), gcg::Seeed::getDetectorChainString(), gcg::Seeed::getDetectorClockTimes(), gcg::Seeed::getFinishedByFinisher(), gcg::Seeed::getID(), gcg::Seeed::getLinkingvars(), gcg::Seeed::getMasterconss(), gcg::Seeed::getMastervars(), gcg::Seeed::getMaxWhiteScore(), gcg::Seeed::getNBlocks(), gcg::Seeed::getNConss(), gcg::Seeed::getNConssForBlock(), gcg::Seeed::getNDetectors(), gcg::Seeed::getNLinkingvars(), gcg::Seeed::getNMasterconss(), gcg::Seeed::getNMastervars(), gcg::Seeed::getNNewBlocksVector(), gcg::Seeed::getNStairlinkingvars(), gcg::Seeed::getNTotalStairlinkingvars(), gcg::Seeed::getNVars(), gcg::Seeed::getNVarsForBlock(), gcg::Seeed::getPctConssFromFreeVector(), gcg::Seeed::getPctConssToBlockVector(), gcg::Seeed::getPctConssToBorderVector(), gcg::Seeed::getPctVarsFromFreeVector(), gcg::Seeed::getPctVarsToBlockVector(), gcg::Seeed::getPctVarsToBorderVector(), gcg::Seeed::getStairlinkingvars(), gcg::Seeed::getUsergiven(), gcg::Seeed::getVarsForBlock(), and gcg::PARTIAL.

Referenced by DECgetBestDecomp(), and SCIPconshdlrDecompGetDecdecomps().

SCIP_RETCODE gcg::Seeedpool::createSeeedFromDecomp ( DEC_DECOMP decomp,
SeeedPtr newseeed 
)

creates a seeed for a given decomposition the resulting seeed will not have a detectorchaininfo or any ancestor or finishing detector data only use this method if the seeedpool is for the transformed problem the resulting seeed may only be added to the seeedpool for the presolved problem

Parameters
decompdecomposition the seeed is created for
newseeedthe new seeed created from the decomp
Returns
scip return code

creates a seeed for a given decomposition the resulting seeed will not have a detectorchaininfo or any ancestor or finishing detector data only use this method if the seeedpool is for the transformed problem the resulting seeed may only be added to the seeedpool for the presolved problem

Parameters
decompdecomposition the seeed is created for
newseeedthe new seeed created from the decomp

Definition at line 5472 of file class_seeedpool.cpp.

References gcg::Seeed::addClockTime(), gcg::Seeed::addNNewBlocks(), gcg::Seeed::addPctConssFromFree(), gcg::Seeed::addPctConssToBlock(), gcg::Seeed::addPctConssToBorder(), gcg::Seeed::addPctVarsFromFree(), gcg::Seeed::addPctVarsToBlock(), gcg::Seeed::addPctVarsToBorder(), gcg::Seeed::bookAsBlockCons(), gcg::Seeed::bookAsBlockVar(), gcg::Seeed::bookAsLinkingVar(), gcg::Seeed::bookAsMasterCons(), gcg::Seeed::bookAsMasterVar(), gcg::Seeed::bookAsStairlinkingVar(), gcg::Seeed::calcStairlinkingVars(), gcg::Seeed::checkConsistency(), DECdecompCheckConsistency(), DECdecompGetConstoblock(), DECdecompGetDetectorChain(), DECdecompGetDetectorChainSize(), DECdecompGetDetectorChainString(), DECdecompGetDetectorClockTimes(), DECdecompGetDetectorPctConssFromOpen(), DECdecompGetDetectorPctConssToBlock(), DECdecompGetDetectorPctConssToBorder(), DECdecompGetDetectorPctVarsFromOpen(), DECdecompGetDetectorPctVarsToBlock(), DECdecompGetDetectorPctVarsToBorder(), DECdecompGetLinkingconss(), DECdecompGetNBlocks(), DECdecompGetNConss(), DECdecompGetNLinkingconss(), DECdecompGetNNewBlocks(), DECdecompGetNStairlinkingvars(), DECdecompGetPresolved(), DECdecompGetStairlinkingvars(), DECdecompGetVartoblock(), gcg::Seeed::flushBooked(), getConsForIndex(), getIndexForCons(), getIndexForVar(), gcg::Seeed::getNBlocks(), getNewIdForSeeed(), gcg::Seeed::getNOpenconss(), gcg::Seeed::getNOpenvars(), getNVars(), getVarForIndex(), gcg::Seeed::isComplete(), gcg::Seeed::isVarStairlinkingvar(), prepareSeeed(), gcg::Seeed::setDetectorChainString(), gcg::Seeed::setDetectorPropagated(), gcg::Seeed::setIsFromUnpresolved(), and gcg::Seeed::setNBlocks().

Referenced by SCIPconshdlrDecompAddLegacymodeDecompositions().

VarClassifier * gcg::Seeedpool::createVarClassifierForObjValues ( )

returns a new variable classifier where all variables with identical objective function value are assigned to the same class

Returns
var classififier according to objective function coefficient

returns a new variable classifier where all variables with identical objective function value are assigned to the same class

all found objective function values

vector assigning a class index to each variable

stores a var's classindex if the objective value of a var has already been found for another var

new VarClassifier

check whether current objective funtion value already exists

assign var to class and save objective function value, if it is new

set up class information

assign vars according to classforvars vactor

Definition at line 4598 of file class_seeedpool.cpp.

References gcg::VarClassifier::assignVarToClass(), gcg::IndexClassifier::getName(), gcg::IndexClassifier::getNClasses(), gcg::VarClassifier::getNVars(), getNVars(), getVarForIndex(), gcg::IndexClassifier::setClassDescription(), and gcg::IndexClassifier::setClassName().

Referenced by calcClassifierAndNBlockCandidates().

VarClassifier * gcg::Seeedpool::createVarClassifierForObjValueSigns ( )

returns a new variable classifier where all variables are assigned to class zero, positive or negative according to their objective function value sign all class zero variables are assumed to be only master variables (set via DECOMPINFO)

Returns
var classififier according to objective function coefficient sign

returns a new variable classifier where all variables are assigned to class zero, positive or negative according to their objective function value sign all class zero variables are assumed to be only master variables (set via DECOMPINFO)

Todo:
correct?

new VarClassifier

set up class information

assign vars

Definition at line 4664 of file class_seeedpool.cpp.

References gcg::ALL, gcg::VarClassifier::assignVarToClass(), gcg::IndexClassifier::getName(), gcg::IndexClassifier::getNClasses(), getNVars(), getVarForIndex(), gcg::MASTER, gcg::IndexClassifier::removeEmptyClasses(), gcg::VarClassifier::setClassDecompInfo(), gcg::IndexClassifier::setClassDescription(), and gcg::IndexClassifier::setClassName().

Referenced by calcClassifierAndNBlockCandidates().

VarClassifier * gcg::Seeedpool::createVarClassifierForSCIPVartypes ( )

returns a new variable classifier where all variables with identical SCIP vartype are assigned to the same class

Returns
variable classifier concerning SCIP vartype

returns a new variable classifier where all variables with identical SCIP vartype are assigned to the same class

firstly, assign all variables to classindices

check whether the variable's vartype is new

if it is new, create a new class index

secondly, use these information to create a VarClassifier

set class names and descriptions of every class

copy the variable assignment information found in first step

Definition at line 4710 of file class_seeedpool.cpp.

References gcg::BLOCK, getNVars(), getVarForIndex(), and gcg::LINKING.

Referenced by calcClassifierAndNBlockCandidates().

void gcg::Seeedpool::findDecompositions ( )

calls findSeeeds method and sort the finished decompositions by score

calls findSeeeds method and translates the resulting seeeds into decompositions

Definition at line 1946 of file class_seeedpool.cpp.

References findSeeeds(), and sortFinishedForScore().

gcg::Seeed * gcg::Seeedpool::findFinishedSeeedByID ( int  seeedid)

returns seeed with the corresponding id or NULL if it is not found in this seeedpool

Parameters
seeedidid of seed is looked for
Returns
a seeed with id as id or NULL no such seeed exists

returns seeed with the corresponding id or NULL if there is no finished seeed with that id

Definition at line 1973 of file class_seeedpool.cpp.

Referenced by SCIPconshdlrDecompArePricingprobsIdenticalForSeeedid(), SCIPconshdlrDecompCreateVarmapForSeeedId(), and SCIPconshdlrDecompGetNFormerDetectionConssForID().

std::vector< SeeedPtr > gcg::Seeedpool::findSeeeds ( )

constructs seeeds using the registered detectors

Returns
vector of found seeeds, that has to be freed by the caller of findSeeeds()

constructs seeeds using the registered detectors

Returns
user has to free seeeds

1) read parameter, as there are: maxrounds 2) loop rounds 3) every seeed in seeeds 4) every detector not registered yet propagates seeed 5)

set detection data

this does not look well streamlined: currseeeds should be empty here, and seeedstopopulate should be the only seeeds to poopulate

add translated original seeeds (of unpresolved problem)

the current seeed is handled by all detectors

if the seeed is also propagated by the detector go on with the next detector

check if detector is callable in current detection round

new seeeds are created by the current detector

if a new seeed is no duplicate it is either added to the nextRoundSeeeds or the finishedSeeeds

cleanup propagation data structure

if the finishing of the detector is not enabled go on with the next detector

complete the currseeeds with finishing detectors and add them to finished seeeds

if the finishing of the detector is not enabled go on with the next detector

count the successful refinement calls for each detector

preliminary output detector stats

delete the seeeds

postprocess the finished seeeds

if the postprocessing of the detector is not enabled go on with the next detector

Definition at line 1283 of file class_seeedpool.cpp.

References gcg::Seeed::addDecChangesFromAncestor(), addSeeedToAncestor(), addSeeedToFinished(), addSeeedToFinishedUnchecked(), gcg::Seeed::calcHashvalue(), gcg::Seeed::checkConsistency(), DECdetectorGetName(), gcg::Seeed::deleteEmptyBlocks(), gcg::Seeed::displaySeeed(), gcg::getDetectorCallRoundInfo(), gcg::Seeed::getID(), getNewIdForSeeed(), gcg::Seeed::getNOpenconss(), gcg::Seeed::getNOpenvars(), getNPostprocessingDetectors(), gcg::Seeed::isComplete(), gcg::Seeed::isPropagatedBy(), gcg::Seeed::isTrivial(), Seeed_Propagation_Data::newSeeeds, Seeed_Propagation_Data::nNewSeeeds, postprocessingtime, prepareSeeed(), SCIPconshdlrDecompGetCurrScoretype(), gcg::seeedIsNoDuplicate(), gcg::seeedIsNoDuplicateOfSeeeds(), Seeed_Propagation_Data::seeedpool, Seeed_Propagation_Data::seeedToPropagate, gcg::Seeed::setDetectorPropagated(), gcg::Seeed::setFinishedByFinisher(), gcg::Seeed::setFinishingDetectorPropagated(), gcg::Seeed::setID(), gcg::Seeed::setSeeedpool(), gcg::Seeed::showVisualisation(), gcg::Seeed::sort(), and sortAllRelevantSeeeds().

Referenced by findDecompositions().

std::vector< SeeedPtr > gcg::Seeedpool::finishIncompleteSeeeds ( std::vector< SeeedPtr incompleteseeeds)

method to complete a set of incomplete seeeds with the help of all included detectors that implement a finishing method

Parameters
incompleteseeedsthe set of incompleted seeeds
Returns
vector of completed decompositions, has to be freed by the caller

method to complete a set of incomplete seeeds with the help of all included detectors that implement a finishing method

Returns
set of completed decomposition

if the finishing of the detector is not enabled go on with the next detector

Parameters
incompleteseeedsthe set of incompleted seeeds

Definition at line 1871 of file class_seeedpool.cpp.

References gcg::Seeed::addDecChangesFromAncestor(), gcg::Seeed::calcHashvalue(), DECdetectorGetName(), gcg::Seeed::getID(), getNewIdForSeeed(), Seeed_Propagation_Data::newSeeeds, Seeed_Propagation_Data::nNewSeeeds, gcg::seeedIsNoDuplicateOfSeeeds(), Seeed_Propagation_Data::seeedpool, Seeed_Propagation_Data::seeedToPropagate, gcg::Seeed::setFinishedByFinisher(), gcg::Seeed::setID(), and gcg::Seeed::showVisualisation().

SeeedPtr gcg::Seeedpool::getAncestorSeeed ( int  seeedindex)

returns a seeed from ancestor seeed data structure with given index

Parameters
seeedindexindex of seeed in ancestor seeed data structure
Returns
seeed from ancestor seeed data structure

returns a seeed from ancestor seeed data structure

Parameters
seeedindexindex of seeed in ancestor seeed data structure

Definition at line 2387 of file class_seeedpool.cpp.

Referenced by MiscVisualization::GCGgetSeeedpoolForSeeed(), and SCIPconshdlrDecompGetAllRelevantSeeeds().

ConsClassifier * gcg::Seeedpool::getConsClassifier ( int  givenClassifierIndex)

returns pointer to a constraint classifier

Parameters
classifierIndexindex of constraint classifier
Returns
pointer to a cosntraint classifier with the given index

returns pointer to a constraint classifier

Parameters
givenClassifierIndexindex of constraint classifier

Definition at line 4512 of file class_seeedpool.cpp.

References consclassescollection.

int * gcg::Seeedpool::getConsClassifierArray ( int  givenClassifierIndex)

returns the assignment of constraints to classes of a classifier as integer array

Parameters
classifierIndexindex of the constraint classifier the assignment i asked for
Returns
array conatining for each constraint id the assigned class of the constraint for the classifier of the given index

returns the assignment of constraints to classes of a classifier as integer array

Parameters
givenClassifierIndexindex of constraint classifier

Definition at line 4522 of file class_seeedpool.cpp.

References consclassescollection.

const int * gcg::Seeedpool::getConssForCons ( int  cons)

return array of constraint indices that have a common variable with the given constraint

Parameters
consIndexindex of the constraint the neighboring constraints are
Returns
return array of constraint indices that have a common variable with the given constraint
Note
constraint adjacency data structure has to initilized

returns the constraint indices of the coefficient matrix for a constraint

Parameters
consindex of the constraint to be considered

Definition at line 3215 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignSmallestComponentsButOneConssAdjacency(), and gcg::Seeed::completeByConnectedConssAdjacency().

const int * gcg::Seeedpool::getConssForVar ( int  var)

returns the constraint indices of the coefficient matrix for a variable

Parameters
varIndexindex of the variable to be considered
Returns
vector of constraint indices that have a nonzero entry with this variable

returns the constraint indices of the coefficient matrix for a variable

Parameters
varindex of the variable to be considered

Definition at line 3179 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignCurrentStairlinking(), gcg::Seeed::buildDecChainString(), calcStrongDecompositionScore(), gcg::Seeed::completeByConnected(), gcg::Seeed::completeGreedily(), connected(), gcg::Seeed::considerImplicits(), gcg::HypercolGraph< T >::createFromPartialMatrix(), createGraphFromPartialMatrix(), gcg::Seeed::findLinkingVarsPotentiallyStairlinking(), gcg::Seeed::findVarsLinkingToMaster(), gcg::Seeed::findVarsLinkingToStairlinking(), and gcg::Seeed::initOnlyBinMaster().

SeeedPtr gcg::Seeedpool::getCurrentSeeed ( int  seeedindex)

returns a seeed from current (open) seeed data structure

Parameters
seeedindexindex of seeed in current seeed data structure
Returns
index of seeed in current (open) seeed data structure

returns a seeed from current (open) seeed data structure

Parameters
seeedindexindex of seeed in current (open) seeed data structure

Definition at line 2397 of file class_seeedpool.cpp.

Referenced by MiscVisualization::GCGgetSeeedpoolForSeeed().

DEC_DETECTOR * gcg::Seeedpool::getDetectorForIndex ( int  detectorIndex)

returns the detector related to a detector index

Parameters
detectorIndexindex of the detector to be considered
Returns
pointer to detector related to a detector index

returns the SCIP detector related to a detector index

Parameters
detectorIndexindex of the detector to be considered

Definition at line 3266 of file class_seeedpool.cpp.

SCIP_Real gcg::Seeedpool::getDualvalOptimalLP ( int  consindex)

returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the seeedpool; if it is not calculated yet it will be calculated

Parameters
consindexindex of constraint the value is asked for
Returns
the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the seeedpool

returns the value of the optimal lp relaxation dual value of the given constrainr rid correspondoning problem of the seeedpool; if it is not calculated yet it will be calculated

Definition at line 3187 of file class_seeedpool.cpp.

Referenced by calcStrongDecompositionScore().

SCIP_Real gcg::Seeedpool::getDualvalRandom ( int  consindex)

return the a random value of the dual variable of the corresponding ; if it is not calculated yet it will be calculated

Parameters
consindexindex of constraint the value is asked for
Returns
the a random value of the dual variable of the corresponding

return the a random value of the dual variable of the corresponding ; if it is not calculated yet it will be calculated

Definition at line 3199 of file class_seeedpool.cpp.

Referenced by calcStrongDecompositionScore().

SeeedPtr gcg::Seeedpool::getFinishedSeeed ( int  seeedindex)

returns a seeed from finished seeed data structure

Parameters
seeedindexindex of seeed in finished seeed data structure
Returns
seeed from finished seeed data structurereturns a seeed from finished seeed data structure

returns a seeed from finished seeed data structure

Parameters
seeedindexindex of seeed in finished seeed data structure

Definition at line 2407 of file class_seeedpool.cpp.

Referenced by DECwriteAllDecomps(), MiscVisualization::GCGgetSeeedpoolForSeeed(), SCIPconshdlrDecompCheckConsistency(), SCIPconshdlrDecompGetAllRelevantSeeeds(), SCIPconshdlrDecompGetDecdecomps(), SCIPconshdlrDecompTranslateAndAddCompleteUnpresolvedSeeeds(), and SCIPconshdlrDecompUpdateSeeedlist().

DEC_DETECTOR * gcg::Seeedpool::getFinishingDetectorForIndex ( int  detectorIndex)

returns the detector related to a finishing detector index

Parameters
detectorIndexindex of the finishing detector to be considered
Returns
detector pointer related to a finishing detector index

returns the SCIP detector related to a finishing detector index

Parameters
detectorIndexindex of the finishing detector to be considered

Definition at line 3274 of file class_seeedpool.cpp.

SeeedPtr gcg::Seeedpool::getIncompleteSeeed ( int  seeedindex)

returns a seeed from incomplete seeed data structure

Parameters
seeedindexindex of seeed in incomplete seeed data structure
Returns
a seeed from incomplete seeed data structure

returns a seeed from incomplete seeed data structure

Parameters
seeedindexindex of seeed in incomplete seeed data structure

Definition at line 2417 of file class_seeedpool.cpp.

Referenced by MiscVisualization::GCGgetSeeedpoolForSeeed(), SCIPconshdlrDecompPopulateSelected(), and SCIPconshdlrDecompUpdateSeeedlist().

int gcg::Seeedpool::getIndexForCons ( SCIP_CONS *  cons)

returns the constraint index related to a SCIP constraint

Parameters
consthe SCIP constraint pointer the index is asked for
Returns
the constraint index related to a SCIP constraint

returns the constraint index related to a SCIP constraint

Definition at line 3315 of file class_seeedpool.cpp.

Referenced by createSeeedFromDecomp(), gcg::HyperrowcolGraph< T >::createSeeedFromPartition(), gcg::HyperrowGraph< T >::createSeeedFromPartition(), gcg::HypercolGraph< T >::createSeeedFromPartition(), gcg::findTranslationForDec(), SCIPconshdlrDecompUserSeeedSetConsToBlock(), and SCIPconshdlrDecompUserSeeedSetConsToMaster().

int gcg::Seeedpool::getIndexForDetector ( DEC_DETECTOR detector)

the detector index related to a detector

Parameters
detectorpointer of detector the index is asked for
Returns
the detector index related to a detector

returns the detector index related to a detector

Definition at line 3323 of file class_seeedpool.cpp.

int gcg::Seeedpool::getIndexForFinishingDetector ( DEC_DETECTOR detector)

returns the finishing detector index related to a detector

Parameters
detectorpointer of finishing detector
Returns
the finishing detector index

returns the finishing detector index related to a detector

Definition at line 3331 of file class_seeedpool.cpp.

int gcg::Seeedpool::getIndexForPostprocessingDetector ( DEC_DETECTOR detector)

returns the postprocessing detector index related to a detector

Parameters
detectorpointer to the postprocessing detector
Returns
the postprocessing detector index

returns the postprocessing detector index related to a detector

Definition at line 3339 of file class_seeedpool.cpp.

int gcg::Seeedpool::getIndexForVar ( SCIP_VAR *  var)

returns the variable index related to a SCIP variable

Parameters
varvariable pointer the index is asked for
Returns
the variable index related to a SCIP variable

returns the variable index related to a SCIP variable

Definition at line 3307 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::checkConsistency(), createSeeedFromDecomp(), gcg::findTranslationForDec(), SCIPconshdlrDecompCreateVarmapForSeeedId(), SCIPconshdlrDecompUserSeeedSetVarToBlock(), SCIPconshdlrDecompUserSeeedSetVarToLinking(), and SCIPconshdlrDecompUserSeeedSetVarToMaster().

int gcg::Seeedpool::getNAncestorSeeeds ( )

returns size of ancestor seeed data structure

Returns
size of ancestor seeed data structure

returns size of ancestor seeed data structure

Definition at line 2427 of file class_seeedpool.cpp.

Referenced by MiscVisualization::GCGgetSeeedpoolForSeeed().

int gcg::Seeedpool::getNConsClassifiers ( )

returns number of different constraint classifiers

Returns
number of different constraint classifiers

returns number of different constraint classifiers

Definition at line 4534 of file class_seeedpool.cpp.

References consclassescollection.

int gcg::Seeedpool::getNConssForCons ( int  cons)

returns the number of constraints for a given constraint

Parameters
consIndexindex of the constraint to be considered
Returns
the number of constraints for a given constraint

returns the number of constraints for a given variable

Parameters
consindex of the constraint to be considered

Definition at line 3241 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignSmallestComponentsButOneConssAdjacency(), and gcg::Seeed::completeByConnectedConssAdjacency().

int gcg::Seeedpool::getNConssForVar ( int  var)

returns the number of constraints for a given variable where the var has a nonzero entry in

Parameters
varIndexindex of the variable to be considered
Returns
the number of constraints for a given variablereturns the number of constraints for a given variable

returns the number of constraints for a given variable

Parameters
varindex of the variable to be considered

Definition at line 3233 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignCurrentStairlinking(), gcg::Seeed::buildDecChainString(), calcStrongDecompositionScore(), gcg::Seeed::completeByConnected(), gcg::Seeed::completeGreedily(), connected(), gcg::Seeed::considerImplicits(), gcg::HypercolGraph< T >::createFromPartialMatrix(), createGraphFromPartialMatrix(), gcg::Seeed::findLinkingVarsPotentiallyStairlinking(), gcg::Seeed::findVarsLinkingToMaster(), gcg::Seeed::findVarsLinkingToStairlinking(), and gcg::Seeed::initOnlyBinMaster().

int gcg::Seeedpool::getNCurrentSeeeds ( )

returns size of current (open) seeed data structure

Returns
size of current (open) seeed data structure

returns size of current (open) seeed data structure

Definition at line 2433 of file class_seeedpool.cpp.

Referenced by MiscVisualization::GCGgetSeeedpoolForSeeed().

int gcg::Seeedpool::getNDetectors ( )

returns the number of propagating detectors used in the seeedpool

Returns
number of detectors

returns the number of detectors used in the seeedpool

Definition at line 3355 of file class_seeedpool.cpp.

int gcg::Seeedpool::getNFinishedSeeeds ( )

returns size of finished seeed data structure

Returns
size of finished seeed data structure

returns size of finished seeed data structure

Definition at line 2439 of file class_seeedpool.cpp.

Referenced by MiscVisualization::GCGgetSeeedpoolForSeeed(), and SCIPconshdlrDecompTranslateAndAddCompleteUnpresolvedSeeeds().

int gcg::Seeedpool::getNFinishingDetectors ( )

returns the number of finishing detectors used in the seeedpool

Returns
the number of finishing detectors used in the seeedpool

returns the number of finishing detectors used in the seeedpool

Definition at line 3367 of file class_seeedpool.cpp.

int gcg::Seeedpool::getNIncompleteSeeeds ( )

returns size of incomplete seeed data structure

Returns
size of incomplete seeed data structure

returns size of incomplete seeed data structure

Definition at line 2445 of file class_seeedpool.cpp.

Referenced by MiscVisualization::GCGgetSeeedpoolForSeeed().

int gcg::Seeedpool::getNNonzeros ( )

returns the number of nonzero entries in the coefficient matrix

Returns
the number of nonzero entries in the coefficient matrix

returns the number of nonzero entries in the coefficient matrix

Definition at line 3361 of file class_seeedpool.cpp.

Referenced by SCIPconshdlrDecompAdaptScore().

int gcg::Seeedpool::getNPostprocessingDetectors ( )

returns the number of postprocessing detectors used in the seeedpool

Returns
the number of postprocessing detectors used in the seeedpool

returns the number of postprocessing detectors used in the seeedpool

Definition at line 3373 of file class_seeedpool.cpp.

Referenced by findSeeeds().

int gcg::Seeedpool::getNTotalConss ( )

returns total number of constraints ( ranged constraints (lb ub) are counted twice )

Returns
total number of constraints where ranged constraints are counted twice

returns total number of constraints where ranged constraints are counted twice

Definition at line 2452 of file class_seeedpool.cpp.

References GCGconsIsRanged(), and getNConss().

Referenced by GCGprintMiplibBaseInformation(), and gcg::Seeed::getComponentInformation().

long gcg::Seeedpool::getNTotalNonzeros ( )

returns the number of nonzero entries in the coefficient matrix

Returns
the number of nonzero entries in the coefficient matrix

returns the number of nonzero entries in the coefficient matrix

Definition at line 2466 of file class_seeedpool.cpp.

References GCGconsGetNVars(), GCGconsIsRanged(), getNConss(), and getScipCons().

Referenced by GCGprintMiplibBaseInformation().

int gcg::Seeedpool::getNUserCandidatesNBlocks ( )

returns number of user-given block size candidates

Returns
number of user-given block size candidates

returns number of user-given block size candidates

Definition at line 3578 of file class_seeedpool.cpp.

int gcg::Seeedpool::getNVarClassifiers ( )

returns number of different variable classifiers

Returns
number of different variable classifiers

returns number of different variable classifiers

Definition at line 4838 of file class_seeedpool.cpp.

References varclassescollection.

int gcg::Seeedpool::getNVarsForCons ( int  cons)

returns the number of variables for a given constraint

Parameters
consIndexindex of the constraint to be considered
Returns
the number of variables for a given constraintreturns the number of variables for a given constraint

returns the number of variables for a given constraint

Parameters
consindex of the constraint to be considered

Definition at line 3225 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignCurrentStairlinking(), gcg::Seeed::assignSmallestComponentsButOneConssAdjacency(), gcg::Seeed::buildDecChainString(), calcCandidatesNBlocks(), gcg::Seeed::calcHashvalue(), gcg::Seeed::calcNCoeffsForBlockForMastercons(), gcg::RowGraphWeighted< T >::calculateSimilarity(), gcg::Seeed::checkConsistency(), gcg::Seeed::completeByConnected(), gcg::Seeed::completeByConnectedConssAdjacency(), gcg::Seeed::completeGreedily(), connected(), gcg::Seeed::considerImplicits(), createConsClassifierForNNonzeros(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphFromPartialMatrix(), createGraphNewDetection(), createRowindexList(), createSeeedFromMasterconss(), gcg::RowGraph< T >::createSeeedFromPartition(), gcg::HyperrowcolGraph< T >::createSeeedFromPartition(), gcg::HyperrowGraph< T >::createSeeedFromPartition(), gcg::HypercolGraph< T >::createSeeedFromPartition(), DEC_DECL_PROPAGATESEEED(), gcg::Seeed::evaluate(), gcg::Seeed::filloutSeeedFromConstoblock(), graphCompletible(), gcg::Seeed::postprocessMasterToBlocksConssAdjacency(), removeSomeOneblockDecomps(), setupArrays(), and setuparraysnewdetection().

DEC_DETECTOR * gcg::Seeedpool::getPostprocessingDetectorForIndex ( int  detectorIndex)

returns the detector related to a finishing detector index

Parameters
detectorIndexindex of the postprocessing detector to be considered
Returns
detector pointer related to a postprocessing detector index

returns the SCIP detector related to a postprocessing detector index

Parameters
detectorIndexindex of the postprocessing detector to be considered

Definition at line 3283 of file class_seeedpool.cpp.

SCIP_CONS * gcg::Seeedpool::getScipCons ( int  consid)

returns scip cons for corresponing id

Parameters
considthe index of the constraint
Returns
pointer of constraint for the given index

returns scip cons for corresponing id

Definition at line 3399 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::getComponentInformation(), getNTotalNonzeros(), and gcg::Seeed::getScore().

SCIP_VAR * gcg::Seeedpool::getScipVar ( int  varid)

returns scip var for corresponding id

Parameters
varidthe index of the variable
Returns
returns scip var for corresponding id

returns scip var for corresponing id

Definition at line 3407 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::initOnlyBinMaster().

std::vector< int > gcg::Seeedpool::getSortedCandidatesNBlocks ( )

returns the candidates for number of blocks added by the user followed by the found ones sorted in descending order by how often a candidate was proposed )

Note
See also
getSortedCandidatesNBlocksFull()
Returns
the candidates for number of blocks sorted in descending order by how often a candidate was added

returns the candidates for block size sorted in descending order by how often a candidate was added

first: get the block number candidates directly given by the user

second: sort the current candidates

optional: print sorted candidates

secondly: push candidates to output vector

Definition at line 3416 of file class_seeedpool.cpp.

Referenced by detection(), and fromToolbox().

std::vector< std::pair< int, int > > gcg::Seeedpool::getSortedCandidatesNBlocksFull ( )

returns (candidate-nvotes) pair for candidates for number of blocks added by the user followed by the found ones sorted in descending order by how often a candidate was proposed, candidates are first )

Note
See also
getSortedCandidatesNBlocks()
Returns
vector of (candidate-nvotes) pair the candidates for block size sorted in descending order by how often a candidate was added with nvotes information*

returns the candidates for block size sorted in descending order by how often a candidate was added

first: get the block number candidates directly given by the user

second: sort the current candidates

optional: print sorted candidates

secondly: push candidates to output vector

Definition at line 3460 of file class_seeedpool.cpp.

SCIP_Bool gcg::Seeedpool::getTransformedInfo ( )

returns true if the matrix structure corresponds to the transformed problem

Returns
TRUE if the matrix structure corresponds to the transformed problem

returns true if the matrix structure corresponds to the transformed problem

Definition at line 5608 of file class_seeedpool.cpp.

SCIP_Real gcg::Seeedpool::getVal ( int  row,
int  col 
)

returns a coefficient from the coefficient matrix

Parameters
rowindex of the constraint to be considered
colindex of the variable to be considered
Returns
a coefficient from the coefficient matrix

returns a coefficient from the coefficient matrix

Parameters
rowindex of the constraint to be considered
colindex of the variable to be considered

Definition at line 3292 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignCurrentStairlinking(), gcg::Seeed::buildDecChainString(), calcStrongDecompositionScore(), gcg::Seeed::checkConsistency(), createGraphNewDetection(), gcg::Seeed::evaluate(), removeSomeOneblockDecomps(), setuparraysnewdetection(), writeGpNonzeros(), and writeTikzNonzeros().

const SCIP_Real * gcg::Seeedpool::getValsForCons ( int  cons)

returns the nonzero coefficients of the coefficient matrix for a constraint

Parameters
consIndexindex of the constraint to be considered
Returns
array of coefficients of in matrix for constraints
Note
same order as in
See also
getVarsForCons()

returns the coefficients of the matrix for a constraint

Parameters
consindex of the constraint to be considered

Definition at line 3171 of file class_seeedpool.cpp.

Referenced by createGraph(), and setupArrays().

VarClassifier * gcg::Seeedpool::getVarClassifier ( int  givenClassifierIndex)

returns pointer to a variable classifier with given index

Parameters
classifierIndexindex of variable classifer
Returns
pointer to a variable classifier with given index

returns pointer to a variable classifier

Parameters
givenClassifierIndexindex of variable classifier

Definition at line 4816 of file class_seeedpool.cpp.

References varclassescollection.

int * gcg::Seeedpool::getVarClassifierArray ( int  givenClassifierIndex)

returns the assignment of variables to classes of a classifier as integer array

Parameters
classifierIndexindex of the variables classifier the assignment vector is requested for
Returns
array of class indices for the variable indices

returns the assignment of variables to classes of a classifier as integer array

Parameters
givenClassifierIndexindex of constraint classifier

Definition at line 4826 of file class_seeedpool.cpp.

References varclassescollection.

const int * gcg::Seeedpool::getVarsForCons ( int  cons)

returns the variable indices of the coefficient matrix for a constraint

Parameters
consIndexindex of the constraint to be considered
Returns
the variable indices of the coefficient matrix for a constraintreturns the variable indices of the coefficient matrix for a constraint

returns the variable indices of the matrix for a constraint

Parameters
consindex of the constraint to be considered

Definition at line 3163 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignCurrentStairlinking(), gcg::Seeed::assignSmallestComponentsButOneConssAdjacency(), gcg::Seeed::buildDecChainString(), gcg::Seeed::calcHashvalue(), gcg::Seeed::calcNCoeffsForBlockForMastercons(), gcg::RowGraphWeighted< T >::calculateSimilarity(), gcg::Seeed::checkConsistency(), gcg::Seeed::completeByConnected(), gcg::Seeed::completeByConnectedConssAdjacency(), gcg::Seeed::completeGreedily(), connected(), gcg::Seeed::considerImplicits(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphFromPartialMatrix(), createGraphNewDetection(), createRowindexList(), createSeeedFromMasterconss(), gcg::RowGraph< T >::createSeeedFromPartition(), gcg::HyperrowcolGraph< T >::createSeeedFromPartition(), gcg::HyperrowGraph< T >::createSeeedFromPartition(), gcg::HypercolGraph< T >::createSeeedFromPartition(), gcg::Seeed::evaluate(), gcg::Seeed::filloutSeeedFromConstoblock(), graphCompletible(), gcg::Seeed::postprocessMasterToBlocksConssAdjacency(), removeSomeOneblockDecomps(), and setuparraysnewdetection().

bool gcg::Seeedpool::hasDuplicate ( SeeedPtr  seeed)

returns true if the given seeed is a duplicate of a seeed that is already contained in finished seeeds or current seeeds data structure

Parameters
seeedpointer of seeed that is to check
Returns
true iff the given seeed is a duplicate of a seeed that is already contained in finished seeeds or current seeeds data structure

returns true if the given seeed is a duplicate of a seeed that is already contained in finished seeeds or current seeeds data structure

Definition at line 2486 of file class_seeedpool.cpp.

References gcg::seeedIsNoDuplicate().

bool gcg::Seeedpool::isConsCardinalityCons ( int  consindexd)

returns whether a constraint is a cardinality constraint, i.e. of the ){i} x_i == b

Parameters
consindexdindex of constraint that is be checked
Returns
returns whether a constraint is a cardinality constraint

Definition at line 3021 of file class_seeedpool.cpp.

References GCGgetConsIsCardinalityCons().

Referenced by gcg::Seeed::hasSetppccardMaster().

bool gcg::Seeedpool::isConsSetpp ( int  consindexd)

is cons with specified indec partitioning, or packing covering constraint?

Parameters
consindexdindex of the given cons
Returns
is cons with specified indec partitioning, or packing covering constraint

is cons with specified indec partitioning, or packing constraint?

Definition at line 3088 of file class_seeedpool.cpp.

References GCGgetConsIsSetppc().

Referenced by gcg::Seeed::hasSetppMaster().

bool gcg::Seeedpool::isConsSetppc ( int  consindexd)

is cons with specified index partitioning packing, or covering constraint?

Parameters
consindexindec of cons to be checked
Returns
whether a constraint is partitioning packing, or covering constraint?

is cons with specified indec partitioning, packing, or covering constraint?

Definition at line 3037 of file class_seeedpool.cpp.

References GCGgetConsIsSetppc().

Referenced by gcg::Seeed::hasSetppccardMaster(), and gcg::Seeed::hasSetppcMaster().

SCIP_Bool gcg::Seeedpool::isForBenders ( )

returns whether or not this seeedpool is for detectiong decompositions for benders

Returns
whether or not this seeedpool is for detectiong decompositions for benders

returns whether or not this seeedpool is for detectiong decompositions for benders

Definition at line 2497 of file class_seeedpool.cpp.

Referenced by gcg::Seeed::assignCurrentStairlinking(), gcg::Seeed::considerImplicits(), and gcg::Seeed::deleteEmptyBlocks().

SCIP_Bool gcg::Seeedpool::isSeeedDuplicateofFinished ( SeeedPtr  seeed)

check if seeed is a duplicate of an existing finished seeed

Parameters
seeedseeed to be checked
Returns
TRUE iff seeed is a duplicate of an existing finished seeed

Definition at line 2059 of file class_seeedpool.cpp.

References gcg::seeedIsNoDuplicateOfSeeeds().

SCIP_Bool gcg::Seeedpool::isSeeedDuplicateofIncomplete ( SeeedPtr  seeed)

check if seeed is a duplicate of an existing incomplete seeed

Parameters
seeedseeed to be checked
Returns
TRUE iff seeed is a duplicate of an existing incomplete seeed

Definition at line 2052 of file class_seeedpool.cpp.

References gcg::seeedIsNoDuplicateOfSeeeds().

void gcg::Seeedpool::populate ( std::vector< SeeedPtr seeeds)

registers seeeds, e.g. done with translated seeeds from the original problem

Parameters
seeedsvector of seeeds that are about to be populated

registers translated seeeds from the original problem

Definition at line 3001 of file class_seeedpool.cpp.

SCIP_RETCODE gcg::Seeedpool::prepareSeeed ( SeeedPtr  seeed)

registers a seeed for a seeedpool, sets it up by and calculates its hash value

Parameters
seeedpointer f seeed to be prepared
Returns
scip return code

sorts the seeed and calculates a its implicit assignments, hashvalue and evaluation

Definition at line 3009 of file class_seeedpool.cpp.

References gcg::Seeed::calcHashvalue(), gcg::Seeed::considerImplicits(), gcg::Seeed::deleteEmptyBlocks(), and gcg::Seeed::setSeeedpool().

Referenced by createSeeedFromDecomp(), findSeeeds(), SCIPconshdlrDecompTranslateAndAddCompleteUnpresolvedSeeeds(), and SCIPconshdlrDecompUserSeeedFlush().

SCIP_RETCODE gcg::Seeedpool::printBlockcandidateInformation ( SCIP *  scip,
FILE *  file 
)

output method for json file writer to write block candidate information

Parameters
scipSCIP data structure
fileoutput file or NULL for standard output
Returns
scip return code
Parameters
scipSCIP data structure
fileoutput file or NULL for standard output

Definition at line 5613 of file class_seeedpool.cpp.

Referenced by detection(), and GCGprintBlockcandidateInformation().

SCIP_RETCODE gcg::Seeedpool::printClassifierInformation ( SCIP *  scip,
FILE *  file 
)

output method for json file writer to write classifier candidate information

Parameters
scipSCIP data structure
fileoutput file or NULL for standard output
Returns
scip return code

NCLASSIFIER

CLASSIFIERNAME

NCLASSES

CLASSNAME

NMEMBERS

NCLASSIFIER

CLASSIFIERNAME

NCLASSES

CLASSNAME

NMEMBERS

Parameters
scipSCIP data structure
fileoutput file or NULL for standard output

Definition at line 5633 of file class_seeedpool.cpp.

References consclassescollection, gcg::IndexClassifier::getClassDescription(), gcg::IndexClassifier::getClassName(), gcg::ConsClassifier::getClassOfCons(), gcg::VarClassifier::getClassOfVar(), gcg::IndexClassifier::getName(), gcg::IndexClassifier::getNClasses(), getNConss(), getNVars(), and varclassescollection.

Referenced by GCGprintClassifierInformation().

void gcg::Seeedpool::reduceConsclasses ( )

adds constraint classifiers with a reduced number of classes

adds constraint classifiers with a reduced number of classes

set the number of classes the classifiers should be reduced to

Definition at line 4540 of file class_seeedpool.cpp.

References addConsClassifier(), consclassescollection, getNConss(), and getNVars().

Referenced by calcClassifierAndNBlockCandidates().

void gcg::Seeedpool::reduceVarclasses ( )

adds variable classifiers with a reduced number of classes this is done by greedliy merge two smallest classes into one new until limit from settings is requested

adds variable classifiers with a reduced number of classes

set the number of classes the classifiers should be reduced to

Definition at line 4844 of file class_seeedpool.cpp.

References addVarClassifier(), getNConss(), getNVars(), and varclassescollection.

Referenced by calcClassifierAndNBlockCandidates().

std::vector< SeeedPtr > gcg::Seeedpool::removeSomeOneblockDecomps ( std::vector< SeeedPtr seeeds)

returns a vector of seeeds such that all seeeds of given a vector of seeeds having only one block are removed except for the two seeeds with the lowest numbers of masterconss

Parameters
givenseeedsvector of seeeds to be reduced
Returns
the reduced vector of seeedsreturns a vector of seeeds where all seeeds of given seeeds having only one block are removed except for the two seeeds with the lowest numbers of masterconss

returns a vector of seeeds where all seeeds of the given seeeds having only one block are removed except for the two seeeds with the lowest numbers of masterconss

calculate lowest and second lowest number of masterconss of all one block seeeds

the two one block seeeds with lowest number of masterconss remain

all other one block seeeds are removed

Definition at line 4868 of file class_seeedpool.cpp.

References DEFAULT_RANDSEED, GCG_RANDOM_DUAL_EXPECTED_EQUAL, GCG_RANDOM_DUAL_EXPECTED_OVERESTIMATE, GCG_RANDOM_DUAL_NAIVE, GCGconsGetLhs(), GCGconsGetRhs(), getConsForIndex(), getNConss(), getNVars(), getNVarsForCons(), getVal(), getVarForIndex(), and getVarsForCons().

void gcg::Seeedpool::sortAllRelevantSeeeds ( )

sorts seeeds in allrelevantseeeds data structure by ascending id

Note
needed for fast access to ancestors

sorts seeeds in allrelevantseeeds data structure by ascending id

Definition at line 3139 of file class_seeedpool.cpp.

Referenced by findSeeeds().

void gcg::Seeedpool::translateSeeedData ( Seeedpool origpool,
std::vector< Seeed * >  origseeeds,
std::vector< Seeed * > &  newseeeds,
std::vector< ConsClassifier * >  otherconsclassifiers,
std::vector< ConsClassifier * > &  newconsclassifiers,
std::vector< VarClassifier * >  othervarclassifiers,
std::vector< VarClassifier * > &  newvarclassifiers 
)

translates seeeds and classifiers if the index structure of the problem has changed, e.g. due to presolving

Parameters
otherpoolold seeedpool
otherseeedsvector of seeeds to be translated
newseeedstranslated seeeds (caller should pass empty vector)
otherconsclassifiersconsclassifiers to be translated
newconsclassifiersranslated consclassifiers (pass empty vector)
othervarclassifiersvarclassifiers to be translated
newvarclassifierstranslated varclassifiers (pass empty vector)

translates seeeds and classifiers if the index structure of the problem has changed, e.g. due to presolving

Parameters
origpoolold seeedpool
origseeedsseeeds to be translated
newseeedstranslated seeeds (pass empty vector)
otherconsclassifiersconsclassifiers to be translated
newconsclassifierstranslated consclassifiers (pass empty vector)
othervarclassifiersvarclassifiers to be translated
newvarclassifierstranslated varclassifiers (pass empty vector)

Definition at line 2506 of file class_seeedpool.cpp.

References translatingtime.

void gcg::Seeedpool::translateSeeeds ( Seeedpool origpool,
std::vector< Seeed * >  origseeeds,
std::vector< Seeed * > &  newseeeds 
)

translates seeeds if the index structure of the problem has changed, e.g. due to presolving

Parameters
otherpoolold seeedpool
otherseeedsseeeds to be translated
newseeedstranslated seeeds (pass empty vector)translates seeeds if the index structure of the problem has changed, e.g. due to presolving

translates seeeds if the index structure of the problem has changed, e.g. due to presolving

BUG consider removing this shortcut

Parameters
origpoolold seeedpool
origseeedsseeeds to be translated
newseeedstranslated seeeds (pass empty vector)

Definition at line 2583 of file class_seeedpool.cpp.

References gcg::ConsClassifier::addClass(), gcg::VarClassifier::addClass(), gcg::ALL, gcg::ConsClassifier::assignConsToClass(), gcg::VarClassifier::assignVarToClass(), gcg::BOTH, gcg::Seeed::getAncestorList(), gcg::ConsClassifier::getClassDecompInfo(), gcg::VarClassifier::getClassDecompInfo(), gcg::IndexClassifier::getClassDescription(), gcg::IndexClassifier::getClassName(), gcg::ConsClassifier::getClassOfCons(), gcg::VarClassifier::getClassOfVar(), gcg::Seeed::getConssForBlock(), gcg::Seeed::getDetectorchain(), gcg::Seeed::getDetectorChainString(), gcg::Seeed::getDetectorchainVector(), gcg::Seeed::getDetectorClockTime(), gcg::Seeed::getFinishedByFinisher(), gcg::Seeed::getID(), gcg::Seeed::getLinkingvars(), gcg::Seeed::getMasterconss(), gcg::Seeed::getMastervars(), gcg::IndexClassifier::getName(), gcg::Seeed::getNBlocks(), gcg::IndexClassifier::getNClasses(), gcg::Seeed::getNConssForBlock(), gcg::Seeed::getNDetectors(), getNewIdForSeeed(), gcg::Seeed::getNLinkingvars(), gcg::Seeed::getNMasterconss(), gcg::Seeed::getNMastervars(), gcg::Seeed::getNNewBlocks(), getNVars(), gcg::Seeed::getPctConssFromFree(), gcg::Seeed::getPctConssToBlock(), gcg::Seeed::getPctConssToBorder(), gcg::Seeed::getPctVarsFromFree(), gcg::Seeed::getPctVarsToBlock(), gcg::Seeed::getPctVarsToBorder(), gcg::Seeed::getUsergiven(), gcg::IndexClassifier::removeEmptyClasses(), SCIPconshdlrDecompGetCurrScoretype(), gcg::ConsClassifier::setClassDecompInfo(), gcg::VarClassifier::setClassDecompInfo(), gcg::IndexClassifier::setClassDescription(), and gcg::IndexClassifier::setClassName().

Referenced by DECgetBestDecomp(), and SCIPconshdlrDecompTranslateAndAddCompleteUnpresolvedSeeeds().

Member Data Documentation

SCIP_Real gcg::Seeedpool::classificationtime

time that was consumed by the classification of the constraint and variables classifiers

Definition at line 188 of file class_seeedpool.h.

Referenced by calcClassifierAndNBlockCandidates().

std::vector<ConsClassifier*> gcg::Seeedpool::consclassescollection
SCIP_Real gcg::Seeedpool::nblockscandidatescalctime

time that was used to calulate the candidates of te block number

Definition at line 189 of file class_seeedpool.h.

Referenced by calcClassifierAndNBlockCandidates().

SCIP_Real gcg::Seeedpool::postprocessingtime

time that was spent in postproceesing decomposigtions

Definition at line 190 of file class_seeedpool.h.

Referenced by findSeeeds().

SCIP_Real gcg::Seeedpool::scorecalculatingtime

time that was spent by calculating scores

Definition at line 191 of file class_seeedpool.h.

Referenced by gcg::Seeed::buildDecChainString().

SCIP_Real gcg::Seeedpool::translatingtime

time that was spent by transforming seeeds between presolved and unpresolved problem

Definition at line 192 of file class_seeedpool.h.

Referenced by translateSeeedData().

std::vector<VarClassifier*> gcg::Seeedpool::varclassescollection