gcg::Seeed Class Reference

Detailed Description

class to manage partial decompositions (aka seeed), each seeed corresponds to one seeedpool which contains the problem information, there is one seeedpool for the original and the transformed problem.

Definition at line 71 of file class_seeed.h.

#include <class_seeed.h>

Public Member Functions

 Seeed (SCIP *scip, int id, Seeedpool *seeedpool)
 
 Seeed (const Seeed *seeedToCopy)
 
 ~Seeed ()
 
int addBlock ()
 adds a block, returns the number of the new block More...
 
void addClockTime (SCIP_Real clocktime)
 incorporates the needed time of a certain detector in the detector chain More...
 
void addDecChangesFromAncestor (Seeed *ancestor)
 incorporates the changes from ancestor seeed into the statistical data structures More...
 
void addDetectorChainInfo (const char *decinfo)
 adds a detectorchain information string to the corresponding vector (that carries information for each detector call) More...
 
void addNNewBlocks (int nnewblocks)
 bookkeeping information: adds number of new blocks created by a detector added to detector chain More...
 
void addPctConssFromFree (SCIP_Real pct)
 bookkeeping information: fraction of constraints that are not longer open for a detector added to detector chain More...
 
void addPctConssToBlock (SCIP_Real pct)
 bookkeeping information: adds fraction of constraints assigned to a block for a detector added to detector chain More...
 
void addPctConssToBorder (SCIP_Real pct)
 bookkeeping information: adds fraction of constraints assigned to the border for a detector added to detector chain More...
 
void addPctVarsFromFree (SCIP_Real pct)
 bookkeeping information: adds fraction of variables that are not longer open for a detector added to detector chain More...
 
void addPctVarsToBlock (SCIP_Real pct)
 bookkeeping information: adds fraction of variables assigned to a block for a detector added to detector chain More...
 
void addPctVarsToBorder (SCIP_Real pct)
 bookkeeping information: adds fraction of variables assigned to the border for a detector added to detector chain More...
 
bool alreadyAssignedConssToBlocks ()
 method to check if at leas one constraint is assigned to some block More...
 
SCIP_RETCODE assignBorderFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 assigns open conss to master according to the cons assignment information given in constoblock hashmap, More...
 
bool assignCurrentStairlinking ()
 assigns open vars to stairlinking if they can be found in exactly two consecutive blocks, returns More...
 
SCIP_RETCODE assignSeeedFromConstoblock (SCIP_HASHMAP *constoblock, int additionalNBlocks)
 adds blocks and assigns open conss to such a new block or to master according to the cons assignment information given in constoblock hashmap More...
 
SCIP_RETCODE assignSeeedFromConstoblockVector (std::vector< int > constoblock, int additionalNBlocks)
 adds blocks and assigns open conss to such a new block or to master according to the cons assignment information given in constoblock vector More...
 
SCIP_RETCODE bookAsBlockCons (int consToBlock, int block)
 books a constraint to be added to the block constraints of the given block (by calling flushBooked all bookings are in fact performed) More...
 
SCIP_RETCODE bookAsBlockVar (int varToBlock, int block)
 books a variable to be added to the block constraints of the given block (by calling flushBooked all bookings are in fact performed) More...
 
SCIP_RETCODE bookAsMasterCons (int consToMaster)
 books a constraint to be added to the master constraints (by calling flushBooked all bookings are in fact performed) More...
 
SCIP_RETCODE bookAsMasterVar (int varToMaster)
 books a variable to be added to the master variables (by calling flushBooked all bookings are in fact performed) More...
 
SCIP_RETCODE bookAsLinkingVar (int varToLinking)
 books a variable to be added to the linking variables (by calling flushBooked all bookings are in fact performed) More...
 
SCIP_RETCODE bookAsStairlinkingVar (int varToStairlinking, int firstBlock)
 books a variable to be added to the stairlinking variables of the given block and the following block (after calling flushBooked) More...
 
void calcAggregationInformation ()
 checks if aggregation of sub problems is possible and stores the corresponding aggregation information More...
 
void calcHashvalue ()
 calculates the hash value of the seeed for comparing More...
 
void calcStairlinkingVars ()
 reassigns linking vars to stairlinkingvars if possible potentially reorders blocks for making a maximum number of linking vars stairlinking if all vars that connect exactly two blocks have a staircase structure, all of them become stairlinkingvars otherwise, the stairlinking assignment is done greedily precondition: seeed does not have any stairlinking vars More...
 
void calcNCoeffsForBlockForMastercons ()
 counts for each pair of block and master constraint, how many nonzero entries the variables of the blocks have in the master constraint More...
 
void changeBlockOrderStaircase (GraphGCG *g)
 changes the block order in a way such that all linking vars that are potentially stairlinking may be reassigned to stairlinking More...
 
void changeBlockOrderGreedily (GraphGCG *g)
 changes the block order in a way such that some linking vars that are potentially stairlinking may be reassigned to stairlinking using a greedy method More...
 
void changeBlockOrder (std::vector< int > oldToNewBlockIndex)
 changes the order of the blocks according to the given mapping More...
 
bool checkAllConssAssigned ()
 returns true iff all constraints are assigned and deletes the vector open conss if so More...
 
bool checkConsistency ()
 returns true if the assignments in the seeed are consistent the following checks are performed: 1) check if nblocks is set appropriately 2) check for empty (row- and col-wise) blocks 3) every variable is assigned at most once 4) check if all not assigned variables are open vars 5) check if all open vars are not assigned 6) every constraint is assigned at most once 7) check if all not assigned constraints are open cons 8) check if all open conss are not assigned 9) check if the datastructures are sorted 10) check if variables hitting a cons are either in the cons's block or border or still open More...
 
SCIP_RETCODE completeByConnected ()
 assigns all open constraints and open variables strategy: assigns all conss and vars to the same block if they are connected a cons and a var are adjacent if the var appears in the cons More...
 
SCIP_RETCODE assignSmallestComponentsButOneConssAdjacency ()
 computes components corresponding to connectedness of conss and vars as in More...
 
SCIP_RETCODE postprocessMasterToBlocks (SCIP_Bool *success)
 try to reassign each mastercons to one block without inducing conflicts More...
 
SCIP_RETCODE postprocessMasterToBlocksConssAdjacency (SCIP_Bool *success)
 try to reassign each mastercons to one block without inducing conflicts using the cons adjacency data structure More...
 
SCIP_RETCODE completeByConnectedConssAdjacency ()
 assigns all open constraints and open variables strategy: assigns all conss and vars to the same block if they are connected a cons and a var are adjacent if the var appears in the cons More...
 
SCIP_RETCODE completeGreedily ()
 assigns all open constraints and open variables strategy: assigns a cons (and related vars) to a new block if possible, if not to an existing block if possible (by means of prior var assignments) and finally to master, if there does not exist such a block More...
 
bool consClassifierUsed (int detectorchainindex)
 returns true if the given detector used a consclassifier More...
 
SCIP_RETCODE considerImplicits ()
 : assigns every open cons/var in the following manner: More...
 
SCIP_RETCODE copyClassifierStatistics (const Seeed *otherseeed)
 copies the given seeed's classifier statistics More...
 
SCIP_RETCODE deleteEmptyBlocks (bool variables)
 deletes empty blocks and sets nblocks accordingly, a block is considered to be empty if no constraint is assigned to it, variables in blocks with no constraints become open More...
 
SCIP_RETCODE deleteOpencons (int opencons)
 deletes a cons from list of open conss More...
 
SCIP_RETCODE deleteOpenvar (int openvar)
 deletes a var from the list of open vars More...
 
SCIP_RETCODE displayAggregationInformation ()
 prints out the aggregation information that is calculated yet, i.e. if there has been identified identical blocks More...
 
SCIP_RETCODE displayConss ()
 displays the assignments of the conss to blocks and master More...
 
SCIP_RETCODE displayInfo (int detailLevel)
 displays the relevant information of the seeed More...
 
SCIP_RETCODE displaySeeed ()
 displays the relevant information of the seeed More...
 
SCIP_RETCODE displayVars ()
 displays the assignments of the vars More...
 
SCIP_Real evaluate (SCORETYPE type)
 computes and returns the score of the given type of the seeed More...
 
SCIP_RETCODE filloutBorderFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 every constraint is either assigned to master or open according to the cons assignment information given in constoblock hashmap variables are set accordingly More...
 
SCIP_RETCODE filloutSeeedFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 assigns all conss to master or a block according to the cons assignment information given in constoblock hashmap More...
 
SCIP_RETCODE findVarsLinkingToMaster ()
 reassigns variables classified as linking to master if the variable only hits master conss More...
 
SCIP_RETCODE findVarsLinkingToStairlinking ()
 reassigns variables classified as linking to stairlinking if the variable hits conss in exactly two consecutive blocks More...
 
std::vector< std::pair< int, std::vector< int > > > findLinkingVarsPotentiallyStairlinking ()
 calculates potential stair linking variables with their blocks More...
 
SCIP_RETCODE flushBooked ()
 assigns all booked constraints and variables and deletes them from list of open cons and open vars More...
 
int getAncestorID (int ancestorindex)
 gets seeed id of given ancestor id More...
 
std::vector< int > getAncestorList ()
 get ancestor ids as vector More...
 
void setAncestorList (std::vector< int > newlist)
 
void addAncestorID (int ancestor)
 
const std::vector< int > & getBlocksForRep (int repid)
 get a vector of block ids that are identical to block with id repid More...
 
char * getDetectorChainString ()
 the detectorchainstring contains the chars of all detectors that worked on this seeed in this order More...
 
std::string getDetectorchainInfo (int detectorchainindex)
 returns detectorchain info of detector related to given detectorchain index More...
 
SCIP_Real getDetectorClockTime (int detectorchainindex)
 returns the time that the detector related to the given detectorchainindex needed for detecting More...
 
std::vector< SCIP_Real > getDetectorClockTimes ()
 returns a vector of the clock times that each detector needed that was involved in this seeed More...
 
std::string getComponentInformation ()
 returns a string containing statistical data of the numbers of constraints and variables in the components: in particular: ncomponents, percentage_min_nconss, percentage_max_nconss, percentage_median_nconss, percentage_mean_nconss , percentage_min_nvars, percentage_max_nvars, percentage_median_nvars, percentage_mean_nvars More...
 
SCIP_RETCODE getConsClassifierData (int detectorchainindex, ConsClassifier **classifier, std::vector< int > &consclassesmaster)
 returns the data of the consclassifier that the given detector made use of More...
 
const int * getConssForBlock (int block)
 returns array containing constraints assigned to a block More...
 
DEC_DETECTOR ** getDetectorchain ()
 returns detector chain as array of detector pointers More...
 
std::vector< DEC_DETECTOR * > getDetectorchainVector ()
 returns the detectorchain as a vector of detector pointers More...
 
std::string getDetectorStatistics (int detectorchainindex)
 returns a string displaying all detector-related information, i.e. clock times and assignment data More...
 
std::string getDetectorClassifierInfo (int detectorchainindex, bool displayConssVars)
 returns a string displaying classifier information if such a classifier was used More...
 
bool getFinishedByFinisher ()
 returns true iff this seeed was finished by finishSeeed() method of a detector More...
 
bool getFinishedByFinisherUnpresolved ()
 returns true if the seeed is finished by a finisher in the unpresolved problem More...
 
DEC_DETECTORgetFinishedUnpresolvedBy ()
 returns the detector that finished this seeed in the unpresolved problem if there exists one, NULL otherwise More...
 
long getHashValue ()
 returns the calculated hash value of this seeed More...
 
int getID ()
 returns the unique id of the seeed More...
 
const int * getLinkingvars ()
 returns array containing all linking vars indices More...
 
const int * getMasterconss ()
 
const int * getMastervars ()
 
SCIP_Real getMaxWhiteScore ()
 returns the "maximum white score" More...
 
SCIP_Real getBendersScore ()
 returns the experimental benders score 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 = {b=1}^(nblocks) {blockvars bv of block b hitting a master constraint} {all blocks b2 != b} nblockcons(b2) More...
 
int getNCoeffsForBlock (int blockid)
 returns the number of nonzero coeffs in a certain block More...
 
int getNCoeffsForMaster ()
 
SCIP_Real getScore (SCORETYPE type)
 returns the score of the seeed (depending on used scoretype) More...
 
SCIP_Bool hasSetppccardMaster ()
 checks if all master constraints set partitioning, set packing, set cover, or cardinality constraints More...
 
SCIP_Bool hasSetppcMaster ()
 checks iff all master constraints set partitioning, set packing, or set cover constraints More...
 
SCIP_Bool hasSetppMaster ()
 checks iff all master constraints set partitioning, or set packing constraints More...
 
USERGIVEN getUsergiven ()
 returns the USERGIVEN status of this seeeds More...
 
int getNAncestors ()
 returns number of ancestor seeeds More...
 
int getNBlocks ()
 returns the number of blocks More...
 
int getNConss ()
 returns the number of constraints More...
 
int getNConssForBlock (int block)
 returns size of the vector containing conss assigned to a block More...
 
int getNDetectorchainInfo ()
 returns size of the detectorchain info vector More...
 
int getNDetectors ()
 returns the number of detectors the seeed is propagated by More...
 
int getNUsedClassifier ()
 returns the number used classifiers More...
 
int getNLinkingvars ()
 returns size of the vector containing linking vars More...
 
int getNMasterconss ()
 returns size of the vector containing master conss More...
 
int getNMastervars ()
 returns size of the vector containing master vars (hitting only constraints in the master) More...
 
int getNNewBlocks (int detectorchainindex)
 returns number of blocks a detector added More...
 
std::vector< int > getNNewBlocksVector ()
 number of blocks the detectors in the detectorchain added More...
 
int getNTotalStairlinkingvars ()
 returns total number of stairlinking vars More...
 
int getNOpenconss ()
 returns size of vector containing constraints not assigned yet More...
 
int getNOpenvars ()
 returns size of vector containing variables not assigned yet More...
 
int getNReps ()
 returns the number of blockrepresentatives More...
 
int getNStairlinkingvars (int block)
 returns size of the vector containing stairlinking vars More...
 
int getNVars ()
 returns number of vars More...
 
int getNVarsForBlock (int block)
 returns size of the vector containing vars assigned to a block More...
 
const int * getOpenconss ()
 returns array containing constraints not assigned yet More...
 
std::vector< int > getOpenconssVec ()
 returns a vector containing constraint ids not assigned yet as vector More...
 
const int * getOpenvars ()
 returns array containing variables not assigned yet More...
 
std::vector< int > getOpenvarsVec ()
 
SCIP_Real getPctVarsToBorder (int detectorchainindex)
 returns fraction of variables assigned to the border for a detector More...
 
std::vector< SCIP_Real > getPctVarsToBorderVector ()
 returns fraction of variables assigned to the border for detectors in detectorchain More...
 
SCIP_Real getPctVarsToBlock (int detectorchainindex)
 returns fraction of variables assigned to a block for a detector More...
 
std::vector< SCIP_Real > getPctVarsToBlockVector ()
 returns fraction of variables assigned to a block for detectors in detectorchain More...
 
SCIP_Real getPctVarsFromFree (int detectorchainindex)
 returns fraction of variables that are not longer open for a detector More...
 
std::vector< SCIP_Real > getPctVarsFromFreeVector ()
 returns fraction of variables that are not longer open for detectors in detectorchain More...
 
SCIP_Real getPctConssToBorder (int detectorchainindex)
 returns fraction of constraints assigned to the border for a detector More...
 
std::vector< SCIP_Real > getPctConssToBorderVector ()
 returns fraction of constraints assigned to the border for detectors in detectorchain More...
 
SCIP_Real getPctConssToBlock (int detectorchainindex)
 returns fraction of constraints assigned to a block for a detector More...
 
std::vector< SCIP_Real > getPctConssToBlockVector ()
 returns fraction of constraints assigned to a block for detectors in detectorchain More...
 
SCIP_Real getPctConssFromFree (int detectorchainindex)
 returns fraction of constraints that are not longer open for a detector More...
 
std::vector< SCIP_Real > getPctConssFromFreeVector ()
 returns fraction of constraints that are not longer open for detectors in detectorchain More...
 
int getRepForBlock (int blockid)
 returns index of the representative block for a block, this might be blockid itself More...
 
std::vector< int > & getRepVarmap (int repid, int blockrepid)
 returns the represenation varmap as vector for represenative repid and the blockrepid-th block that is represented by repid More...
 
SeeedpoolgetSeeedpool ()
 returns the corresponding seeedpool More...
 
const int * getStairlinkingvars (int block)
 returns array containing stairlinking vars, More...
 
bool getStemsFromUnpresolved ()
 returns true if this seeed stems from the unpresolved problem More...
 
SCIP_RETCODE getVarClassifierData (int detectorchainindex, VarClassifier **classifier, std::vector< int > &varclasseslinking, std::vector< int > &varclassesmaster)
 returns the data of the varclassifier that the given detector made use of More...
 
const int * getVarsForBlock (int block)
 returns array containing vars of a block More...
 
int getVarProbindexForBlock (int varid, int block)
 returns index in variables array of a block for a variable More...
 
void initOnlyBinMaster ()
 prepare the seeed such that all predecessors have the folloing property: all variables in the master problem are binary variables thus all other variables are assigned to a block requirement: all constraints and variables are open when this method is called More...
 
SCIP_Bool isAgginfoToExpensive ()
 checks if calculation of aggregation information is considered to be to expansive More...
 
bool isComplete ()
 returns true if this seeed is complete, i.e. it has no more open constraints and variables More...
 
bool isConsBlockconsOfBlock (int cons, int block)
 returns true if the cons is a cons of the block More...
 
bool isConsMastercons (int cons)
 returns true if the cons is a master cons More...
 
bool isConsOpencons (int cons)
 returns true if the cons is an open cons More...
 
bool isFromLegacymode ()
 returns true if the seeed is from a detector operating in legacymode More...
 
bool isFromUnpresolved ()
 returns true if the seeed is from the unpresolved problem More...
 
bool isSelected ()
 
SCIP_RETCODE isEqual (Seeed *otherseeed, SCIP_Bool *isequal, bool sortseeeds)
 method to check whether this seeed is equal to a given other seeed ( More...
 
bool isEqual (Seeed *other)
 method to check whether this seeed is equal to a given other seeed More...
 
bool isPropagatedBy (DEC_DETECTOR *detectorID)
 returns true if this seeed was propagated by specified detector More...
 
bool isTrivial ()
 returns true if this seeed is considered to be trivial, i.e. all conss are in one block, all conss are in border, all variables linking or mastervars, or all constraints and variables are open More...
 
bool isVarBlockvarOfBlock (int var, int block)
 returns true if the var is assigned to the block More...
 
bool isVarLinkingvar (int var)
 returns true if the var is a linking var More...
 
bool isVarMastervar (int var)
 returns true if the var is a master var More...
 
bool isVarOpenvar (int var)
 returns true if the var is an open var More...
 
bool isVarStairlinkingvar (int var)
 returns true if the var is a stairlinking var More...
 
bool isVarStairlinkingvarOfBlock (int var, int block)
 returns true if the var is a stairlinkingvar of a speciefied block More...
 
SCIP_RETCODE printClassifierInformation (SCIP *scip, FILE *file)
 prints classifier information as described in More...
 
SCIP_RETCODE refineToBlocks ()
 refine seeed with focus on blocks: assigns open conss and vars if they can be found in blocks (without respect to open vars and conss More...
 
SCIP_RETCODE refineToMaster ()
 refine seeed with focus on master: do obvious ( More...
 
void setConsClassifierStatistics (int detectorchainindex, ConsClassifier *classifier, std::vector< int > consclassesmaster)
 registers statistics for a used consclassifier More...
 
SCIP_RETCODE setConsToBlock (int consToBlock, int block)
 adds a constraint to a block, does not delete this cons from list of open conss More...
 
SCIP_RETCODE setConsToMaster (int consToMaster)
 adds a constraint to the master constraints, does not delete this cons from list of open conss More...
 
void setDetectorchain (std::vector< DEC_DETECTOR * > detectorChain)
 
SCIP_RETCODE setDetectorPropagated (DEC_DETECTOR *detector)
 sets seeed to be propagated by a detector More...
 
SCIP_RETCODE setFinishingDetectorPropagated (DEC_DETECTOR *detector)
 sets seeed to be finished by a detector More...
 
void setFinishedByFinisher (bool finished)
 sets whether this seeed was finished by a finishing detector More...
 
void setFinishedByFinisherUnpresolved (bool finishedByFinisherUnpresolved)
 sets whether this seeed is finished by a finisher in the unpresolved problem More...
 
void setFinishedUnpresolvedBy (DEC_DETECTOR *detector)
 sets the detector that finished the seeed in the unpresolved problem More...
 
void setLegacymode (bool legacymode)
 sets whether this seeed stems from a detector operating in legacymode More...
 
SCIP_RETCODE setNBlocks (int nBlocks)
 sets number of blocks, only increasing number allowed More...
 
SCIP_RETCODE setID (int id)
 sets the id of the seeed More...
 
void setIsFromUnpresolved (bool unpresolved)
 sets whether this seeed is from the unpresolved problem More...
 
void setSelected (bool selected)
 set if selection status of this seeeds More...
 
void setSeeedpool (Seeedpool *seeedpool)
 set the corresponding seeedpool of this seeeds More...
 
void setStemsFromUnpresolved (bool stemsfromunpresolved)
 sets whether this seeed stems from an unpresolved problem seeed More...
 
void setUsergiven (USERGIVEN usergiven)
 sets whether this seeed is usergiven More...
 
void setVarClassifierStatistics (int detectorchainindex, VarClassifier *classifier, std::vector< int > varclasseslinking, std::vector< int > varclassesmaster)
 registers statistics for a used varclassifier More...
 
SCIP_RETCODE setVarToBlock (int varToBlock, int block)
 adds a variable to the linking variables, does not delete this var from list of open vars More...
 
SCIP_RETCODE setVarToLinking (int varToLinking)
 adds a variable to the linking variables, does not delete this var from list of open vars More...
 
SCIP_RETCODE setVarToMaster (int varToMaster)
 
SCIP_RETCODE setVarToStairlinking (int varToStairLinking, int block1, int block2)
 adds a variable to the stairlinking variabl, does not delete this var from list of open vars More...
 
void showVisualisation ()
 generates and opens a gp visualization of the seeed More...
 
SCIP_Bool shouldCompletedByConsToMaster ()
 returns true if this seeed is a userseeed that should be completed by setting unspecified constraints to master More...
 
void sort ()
 sorts the vars and conss datat structures by their indices More...
 
const char * getShortCaption ()
 returns a short caption for this seeed More...
 
SCIP_RETCODE setDetectorChainString (char *detectorchainstring)
 sets the detector chain short string More...
 
void setNNewBlocksVector (std::vector< int > newvector)
 set statistical vector of numbers of newly assigned blocks per involved detector More...
 
void setPctConssToBlockVector (std::vector< SCIP_Real > newvector)
 set statistical vector of fractions of constraints set to blocks per involved detector More...
 
void setPctConssFromFreeVector (std::vector< SCIP_Real > newvector)
 set statistical vector of fractions of constraints that are not longer open per involved detector More...
 
void setPctConssToBorderVector (std::vector< SCIP_Real > newvector)
 set statistical vector of fractions of constraints assigned to the border per involved detector More...
 
void setPctVarsToBorderVector (std::vector< SCIP_Real > newvector)
 set statistical vector of fraction sof variables assigned to the border per involved detector More...
 
void setPctVarsToBlockVector (std::vector< SCIP_Real > newvector)
 set statistical vector of fractions of variables assigned to a block per involved detector More...
 
void setPctVarsFromFreeVector (std::vector< SCIP_Real > newvector)
 set statistical vector of variables that are not longer open per involved detector More...
 
void setDetectorClockTimes (std::vector< SCIP_Real > newvector)
 set statistical vector of the times that the detectors needed for detecting per involved detector More...
 
bool varClassifierUsed (int detectorchainindex)
 returns true if the given detector used a varclassifier More...
 
SCIP_RETCODE writeAsDec (FILE *file, Seeedpool *seeedpooltowriteto, SCIP_RESULT *result)
 write this seeed to file in dec format for the corresponding seeedpool More...
 
SCIP_RETCODE buildDecChainString ()
 creates and sets a detector chain short string for this seeed, is built from detector chain More...
 

Constructor & Destructor Documentation

gcg::Seeed::Seeed ( SCIP *  _scip,
int  givenid,
Seeedpool givenseeedpool 
)

constructor

Parameters
scipdata structure
idthat is given to this seeed
seeedpoolthis seeed is created for

constructor initially, all conss and vars are open

Parameters
_scipscip data structure
givenidid that is given to this seeed
givenseeedpoolseeedpool this seeed is created for

Definition at line 87 of file class_seeed.cpp.

Referenced by writeAsDec().

gcg::Seeed::Seeed ( const Seeed seeedtocopy)

copy constructor

Parameters
seeedToCopyseeed to be copied

copy constructor

Parameters
seeedtocopyseeed to be copied

Definition at line 119 of file class_seeed.cpp.

gcg::Seeed::~Seeed ( )

destructor

Definition at line 209 of file class_seeed.cpp.

Member Function Documentation

void gcg::Seeed::addAncestorID ( int  ancestor)

adds ancestor id to back of list

Parameters
ancestorid of ancestor that is to be added

returns ancestor id of given ancestor

Definition at line 4692 of file class_seeed.cpp.

int gcg::Seeed::addBlock ( )

adds a block, returns the number of the new block

adds a block, returns the number of the new block

Definition at line 257 of file class_seeed.cpp.

Referenced by assignSeeedFromConstoblock(), assignSeeedFromConstoblockVector(), and completeGreedily().

void gcg::Seeed::addClockTime ( SCIP_Real  clocktime)

incorporates the needed time of a certain detector in the detector chain

Parameters
clocktimetime to add

incorporates the the needed time of a certain detector in the detector chain

Parameters
clocktimetime to be added

Definition at line 275 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp(), DEC_DECL_PROPAGATESEEED(), detection(), and SCIPconshdlrDecompAddLegacymodeDecompositions().

void gcg::Seeed::addDecChangesFromAncestor ( Seeed ancestor)

incorporates the changes from ancestor seeed into the statistical data structures

Parameters
ancestorseeed whose propagation yielded to the current seeed

incorporates the changes from ancestor seeed

add number of new blocks

Parameters
ancestorseeed whose propagation yielded to the current seeed

Definition at line 283 of file class_seeed.cpp.

References getID(), getNBlocks(), getNConss(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNOpenconss(), getNOpenvars(), getNTotalStairlinkingvars(), and getNVars().

Referenced by gcg::Seeedpool::findSeeeds(), gcg::Seeedpool::finishIncompleteSeeeds(), and SCIPconshdlrDecompAddLegacymodeDecompositions().

void gcg::Seeed::addDetectorChainInfo ( const char *  decinfo)

adds a detectorchain information string to the corresponding vector (that carries information for each detector call)

Parameters
decinfoinformation string (about the detector call) to add

adds a detector chain info

Parameters
decinfoinformation string (about the detector call) to add

Definition at line 304 of file class_seeed.cpp.

Referenced by DEC_DECL_FINISHSEEED(), DEC_DECL_PROPAGATEFROMTOOLBOX(), DEC_DECL_PROPAGATESEEED(), detection(), and fromToolbox().

void gcg::Seeed::addNNewBlocks ( int  nnewblocks)

bookkeeping information: adds number of new blocks created by a detector added to detector chain

Parameters
nnewblocksnumber of new added blocks by latest detector call

adds number of new blocks created by a detector added to detector chain

Parameters
nnewblocksnumber of new added blocks by latest detector call

Definition at line 323 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp().

void gcg::Seeed::addPctConssFromFree ( SCIP_Real  pct)

bookkeeping information: fraction of constraints that are not longer open for a detector added to detector chain

Parameters
pctfraction of constraints that are not longer open

adds fraction of constraints that are not longer open for a detector added to detector chain

Parameters
pctfraction of constraints that are not longer open

Definition at line 333 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp().

void gcg::Seeed::addPctConssToBlock ( SCIP_Real  pct)

bookkeeping information: adds fraction of constraints assigned to a block for a detector added to detector chain

Parameters
pctfraction of constraints assigned to a block

adds fraction of constraints assigned to a block for a detector added to detector chain

Parameters
pctfraction of constraints assigned to a block

Definition at line 343 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp().

void gcg::Seeed::addPctConssToBorder ( SCIP_Real  pct)

bookkeeping information: adds fraction of constraints assigned to the border for a detector added to detector chain

Parameters
pctfraction of constraints assigned to the border

adds fraction of constraints assigned to the border for a detector added to detector chain

Parameters
pctfraction constraints assigned to the border

Definition at line 353 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp().

void gcg::Seeed::addPctVarsFromFree ( SCIP_Real  pct)

bookkeeping information: adds fraction of variables that are not longer open for a detector added to detector chain

Parameters
pctfraction of variables that are not longer open

adds fraction of variables that are not longer open for a detector added to detector chain

Parameters
pctfraction of variables that are not longer open

Definition at line 363 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp().

void gcg::Seeed::addPctVarsToBlock ( SCIP_Real  pct)

bookkeeping information: adds fraction of variables assigned to a block for a detector added to detector chain

Parameters
pctfraction of variables assigned to a block

adds fraction of variables assigned to a block for a detector added to detector chain

Parameters
pctfraction of variables assigned to a block

Definition at line 373 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp().

void gcg::Seeed::addPctVarsToBorder ( SCIP_Real  pct)

bookkeeping information: adds fraction of variables assigned to the border for a detector added to detector chain

Parameters
pctfraction of variables assigned to a block

adds fraction of variables assigned to the border for a detector added to detector chain

Parameters
pctfraction of variables assigned to a block

Definition at line 383 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp().

bool gcg::Seeed::alreadyAssignedConssToBlocks ( )

method to check if at leas one constraint is assigned to some block

Returns
true if at least one constraint is assigned to a block

returns true if at least one constraint is assigned to a block

Definition at line 393 of file class_seeed.cpp.

Referenced by filloutBorderFromConstoblock(), and filloutSeeedFromConstoblock().

SCIP_RETCODE gcg::Seeed::assignBorderFromConstoblock ( SCIP_HASHMAP *  constoblock,
int  givenNBlocks 
)

assigns open conss to master according to the cons assignment information given in constoblock hashmap,

Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons* !!) to block indices
givenNBlocksnumber of blocks the hashmap contains
Returns
scip return code
Note
for conss assigned to blocks according to constoblock there is no assignment
See also
assignSeeedFromConstoblock

assigns open conss to master according to the cons assignment information given in constoblock hashmap

Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons* !!) to block indices *< (master assignment is indicated by assigning cons to index additionalNBlocks)
givenNBlocksnumber of blocks the hashmap contains

Definition at line 402 of file class_seeed.cpp.

References bookAsMasterCons(), checkConsistency(), flushBooked(), getNOpenconss(), and sort().

bool gcg::Seeed::assignCurrentStairlinking ( )

assigns open vars to stairlinking if they can be found in exactly two consecutive blocks, returns

Returns
true iff at least one stairlinkingvar was assigned

assigns open vars to stairlinking if they can be found in two consecutive blocks, returns true if stairlinkingvars are assigned

assign all vars included in two consecutive blocks to stairlinking

Definition at line 429 of file class_seeed.cpp.

References bookAsBlockCons(), bookAsBlockVar(), bookAsLinkingVar(), bookAsMasterCons(), bookAsStairlinkingVar(), flushBooked(), gcg::Seeedpool::getConssForVar(), getNBlocks(), getNConssForBlock(), gcg::Seeedpool::getNConssForVar(), getNOpenvars(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVal(), gcg::Seeedpool::getVarsForCons(), isConsBlockconsOfBlock(), isConsMastercons(), isConsOpencons(), gcg::Seeedpool::isForBenders(), isVarBlockvarOfBlock(), isVarMastervar(), isVarOpenvar(), and sort().

Referenced by detection().

SCIP_RETCODE gcg::Seeed::assignSeeedFromConstoblock ( SCIP_HASHMAP *  constoblock,
int  additionalNBlocks 
)

adds blocks and assigns open conss to such a new block or to master according to the cons assignment information given in constoblock hashmap

Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons* !!) to block indices
additionalNBlocksnumber of (additional) blocks the hashmap contains
Returns
scip return code
See also
assignSeeedFromConstoblockVector

adds blocks and assigns open conss to such a new block or to master according to the cons assignment information given in constoblock hashmap

Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons* !!) to block indices *< (master assignment is indicated by assigning cons to index additionalNBlocks)
additionalNBlocksnumber of (additional) blocks the hashmap contains

Definition at line 815 of file class_seeed.cpp.

References addBlock(), bookAsBlockCons(), bookAsMasterCons(), checkConsistency(), deleteEmptyBlocks(), flushBooked(), getNOpenconss(), and sort().

Referenced by detection().

SCIP_RETCODE gcg::Seeed::assignSeeedFromConstoblockVector ( std::vector< int >  constoblock,
int  additionalNBlocks 
)

adds blocks and assigns open conss to such a new block or to master according to the cons assignment information given in constoblock vector

Parameters
constoblockvector containing an assignment of conss to a block or to master
additionalNBlocksnumber of (additional) blocks the vector contains
Returns
scip return code
See also
assignSeeedFromConstoblock()

adds blocks and assigns open conss to such a new block or to master according to the cons assignment information given in constoblock vector

Parameters
constoblockvector containing an assignment of conss to a block or to master *< (master is indicated by assigning cons to index additionalNBlocks)
additionalNBlocksnumber of (additional) blocks the vector contains

Definition at line 855 of file class_seeed.cpp.

References addBlock(), bookAsBlockCons(), bookAsMasterCons(), checkConsistency(), deleteEmptyBlocks(), flushBooked(), getNOpenconss(), and sort().

SCIP_RETCODE gcg::Seeed::assignSmallestComponentsButOneConssAdjacency ( )

computes components corresponding to connectedness of conss and vars as in

See also
completeByConnectedConssAdjacency and assigns them accordingly but one of largest components
completeByConnected
Returns
scip return code

assigns all open constraints and open variables strategy: assigns all conss same block if they are connected two constraints are adjacent if there is a common variable this relies on the consadjacency structure of the seeedpool hence it cannot be applied in presence of linking variables

tools to check if the openVars can still be found in a constraint yet

stores, in which block the variable can be found

tools to update openVars

initialize data structures

do breadth first search to find connected conss

assign found conss and vars to a new block

Definition at line 2600 of file class_seeed.cpp.

References bookAsBlockCons(), bookAsBlockVar(), checkConsistency(), completeByConnected(), gcg::Seeedpool::createConssAdjacency(), flushBooked(), gcg::Seeedpool::getConssForCons(), getNBlocks(), gcg::Seeedpool::getNConssForCons(), getNLinkingvars(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVarsForCons(), isConsMastercons(), isConsOpencons(), isVarLinkingvar(), isVarMastervar(), setNBlocks(), and sort().

Referenced by DEC_DECL_FINISHSEEED(), and DEC_DECL_PROPAGATESEEED().

SCIP_RETCODE gcg::Seeed::bookAsBlockCons ( int  consToBlock,
int  block 
)

books a constraint to be added to the block constraints of the given block (by calling flushBooked all bookings are in fact performed)

Parameters
consToBlockconstraint index to assign
blockindex of block cons is assigned to
Returns
scip return code
See also
flushBooked()

books a constraint to be added to the block constraints of the given block (after calling flushBooked)

Definition at line 895 of file class_seeed.cpp.

References setNBlocks().

Referenced by assignCurrentStairlinking(), assignSeeedFromConstoblock(), assignSeeedFromConstoblockVector(), assignSmallestComponentsButOneConssAdjacency(), completeGreedily(), considerImplicits(), gcg::Seeedpool::createSeeedFromDecomp(), GCGprintMiplibConnectedInformation(), initOnlyBinMaster(), SCIPconshdlrDecompToolboxModifyConss(), and writeAsDec().

SCIP_RETCODE gcg::Seeed::bookAsBlockVar ( int  varToBlock,
int  block 
)

books a variable to be added to the block constraints of the given block (by calling flushBooked all bookings are in fact performed)

Parameters
varToBlockvariable index to be booked for block assignment
blockindex of block variables is assigned to
Returns
scip return code
See also
flushBooked()

books a variable to be added to the block variables of the given block (after calling flushBooked)

Definition at line 911 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), assignSmallestComponentsButOneConssAdjacency(), completeGreedily(), considerImplicits(), gcg::Seeedpool::createSeeedFromDecomp(), deleteEmptyBlocks(), GCGprintMiplibConnectedInformation(), initOnlyBinMaster(), SCIPconshdlrDecompToolboxModifyVars(), and writeAsDec().

SCIP_RETCODE gcg::Seeed::bookAsLinkingVar ( int  varToLinking)

books a variable to be added to the linking variables (by calling flushBooked all bookings are in fact performed)

Parameters
varToLinkingindex of variable that is booked for assigning to linking
Returns
scip return code
See also
flushBooked()

books a variable to be added to the linking variables (after calling flushBooked)

Definition at line 947 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), completeGreedily(), considerImplicits(), gcg::Seeedpool::createSeeedFromDecomp(), DEC_DECL_PROPAGATEFROMTOOLBOX(), DEC_DECL_PROPAGATESEEED(), SCIPconshdlrDecompToolboxModifyVars(), and writeAsDec().

SCIP_RETCODE gcg::Seeed::bookAsMasterCons ( int  consToMaster)

books a constraint to be added to the master constraints (by calling flushBooked all bookings are in fact performed)

Parameters
consToMasterindex of the constraint to be booked for master assignment
Returns
scip return code
See also
flushBooked()

books a constraint to be added to the master constraints (after calling flushBooked)

Definition at line 925 of file class_seeed.cpp.

Referenced by assignBorderFromConstoblock(), assignCurrentStairlinking(), assignSeeedFromConstoblock(), assignSeeedFromConstoblockVector(), completeGreedily(), considerImplicits(), gcg::Seeedpool::createSeeedFromDecomp(), DEC_DECL_PROPAGATEFROMTOOLBOX(), DEC_DECL_PROPAGATESEEED(), SCIPconshdlrDecompToolboxModifyConss(), SCIPconshdlrDecompUserSeeedFlush(), and writeAsDec().

SCIP_RETCODE gcg::Seeed::bookAsMasterVar ( int  varToMaster)

books a variable to be added to the master variables (by calling flushBooked all bookings are in fact performed)

Parameters
varToMasterindex index of the variable to be booked for master assignment
Returns
scip return code
See also
flushBooked()

books a variable to be added to the master variables (after calling flushBooked)

Definition at line 936 of file class_seeed.cpp.

Referenced by completeGreedily(), considerImplicits(), gcg::Seeedpool::createSeeedFromDecomp(), DEC_DECL_PROPAGATEFROMTOOLBOX(), DEC_DECL_PROPAGATESEEED(), SCIPconshdlrDecompToolboxModifyVars(), and writeAsDec().

SCIP_RETCODE gcg::Seeed::bookAsStairlinkingVar ( int  varToStairlinking,
int  firstBlock 
)

books a variable to be added to the stairlinking variables of the given block and the following block (after calling flushBooked)

Parameters
varToStairlinkingindex of variables to be assigned as stairlinking variable
firstBlockstairlinking variables hit exactly two consecutive blocks, this is the indwex of the first of these blocks
Returns
scip return code
See also
flushBooked()

books a variable to be added to the stairlinking variables of the given block and the following block (after calling flushBooked)

Definition at line 958 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), completeGreedily(), gcg::Seeedpool::createSeeedFromDecomp(), and writeAsDec().

void gcg::Seeed::calcAggregationInformation ( )

checks if aggregation of sub problems is possible and stores the corresponding aggregation information

checks if aggregation of sub problems is possible and stores the corresponding aggregation information;

handle varmap

Definition at line 1124 of file class_seeed.cpp.

References getNBlocks(), getNVarsForBlock(), gcg::Seeedpool::getScip(), isAgginfoToExpensive(), and isComplete().

Referenced by buildDecChainString(), evaluate(), and SCIPconshdlrDecompArePricingprobsIdenticalForSeeedid().

void gcg::Seeed::calcHashvalue ( )

calculates the hash value of the seeed for comparing

calculates the hashvalue of the seeed for comparing

find sorting for blocks (non decreasing according smallest row index)

Definition at line 1249 of file class_seeed.cpp.

References gcg::compare_blocks(), getConssForBlock(), getMasterconss(), getNBlocks(), getNConss(), getNConssForBlock(), getNMasterconss(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVarsForCons(), and isVarBlockvarOfBlock().

Referenced by gcg::Seeedpool::findSeeeds(), gcg::Seeedpool::finishIncompleteSeeeds(), getHashValue(), postprocessMasterToBlocksConssAdjacency(), and gcg::Seeedpool::prepareSeeed().

void gcg::Seeed::calcNCoeffsForBlockForMastercons ( )

counts for each pair of block and master constraint, how many nonzero entries the variables of the blocks have in the master constraint

Definition at line 2147 of file class_seeed.cpp.

References getMasterconss(), getNBlocks(), getNCoeffsForBlock(), getNConssForBlock(), getNMasterconss(), getNVarsForBlock(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVarsForCons(), and isVarBlockvarOfBlock().

void gcg::Seeed::calcStairlinkingVars ( )

reassigns linking vars to stairlinkingvars if possible potentially reorders blocks for making a maximum number of linking vars stairlinking if all vars that connect exactly two blocks have a staircase structure, all of them become stairlinkingvars otherwise, the stairlinking assignment is done greedily precondition: seeed does not have any stairlinking vars

reassigns linking vars stairlinkingvars if possible potentially reorders blocks for making a maximum number of linking vars stairlinking if all vars that connect exactly two blocks have a staircase structure, all of them become stairlinkingvars otherwise, the stairlinking assignment is done greedily precondition: seeed does not have any stairlinking vars

Definition at line 1342 of file class_seeed.cpp.

References changeBlockOrderGreedily(), changeBlockOrderStaircase(), checkConsistency(), findLinkingVarsPotentiallyStairlinking(), findVarsLinkingToStairlinking(), gcg::GraphGCG::getEdgeWeight(), getNBlocks(), gcg::GraphGCG::getNeighbors(), gcg::GraphGCG::getNNeighbors(), getNTotalStairlinkingvars(), gcg::GraphGCG::isEdge(), and gcg::GraphGCG::setEdge().

Referenced by gcg::Seeedpool::createSeeedFromDecomp().

void gcg::Seeed::changeBlockOrder ( std::vector< int >  oldToNewBlockIndex)

changes the order of the blocks according to the given mapping

Parameters
oldToNewBlockIndexthe mapping from old to new block indices
Note
precondition: given mapping needs to be an adequately sized permutation

changes the order of the blocks according to the given mapping precondition: given mapping needs to be an adequately sized permutation

Parameters
oldToNewBlockIndexthe mapping from old to new block indices

Definition at line 1579 of file class_seeed.cpp.

References getNBlocks(), and getNTotalStairlinkingvars().

Referenced by changeBlockOrderGreedily(), and changeBlockOrderStaircase().

void gcg::Seeed::changeBlockOrderGreedily ( GraphGCG g)

changes the block order in a way such that some linking vars that are potentially stairlinking may be reassigned to stairlinking using a greedy method

Parameters
ggraph with blocks as nodes and weighted edges for the number of potentially stairlinkingvars connecting two blocks

changes the block order in a way such that some linking vars that are potentially stairlinking may be reassigned to stairlinking using a greedy method

Parameters
ggraph with blocks as nodes and weighted edges for the number of potentially stairlinkingvars connecting two blocks

Definition at line 1518 of file class_seeed.cpp.

References changeBlockOrder(), gcg::GraphGCG::getEdgeWeight(), getNBlocks(), gcg::GraphGCG::getNeighbors(), and gcg::GraphGCG::getNNeighbors().

Referenced by calcStairlinkingVars().

void gcg::Seeed::changeBlockOrderStaircase ( GraphGCG g)

changes the block order in a way such that all linking vars that are potentially stairlinking may be reassigned to stairlinking

Parameters
ggraph with blocks as nodes and weighted edges for the number of potentially stairlinkingvars connecting two blocks
Note
precondition: all potentially stairlinking vars have a staircase structure

changes the block order in a way such that all linking vars that are potentially stairlinking may be reassigned to stairlinking precondition: all potentially stairlinking vars have a staircase structure

Parameters
ggraph with blocks as nodes and weighted edges for the number of potentially stairlinkingvars connecting two blocks

Definition at line 1464 of file class_seeed.cpp.

References changeBlockOrder(), getNBlocks(), gcg::GraphGCG::getNeighbors(), and gcg::GraphGCG::getNNeighbors().

Referenced by calcStairlinkingVars().

bool gcg::Seeed::checkAllConssAssigned ( )

returns true iff all constraints are assigned and deletes the vector open conss if so

Returns
true iff all constraints are assigned

returns whether all cons are assigned and deletes the vector open cons if all are assigned

Definition at line 1602 of file class_seeed.cpp.

Referenced by completeGreedily().

bool gcg::Seeed::checkConsistency ( )

returns true if the assignments in the seeed are consistent the following checks are performed: 1) check if nblocks is set appropriately 2) check for empty (row- and col-wise) blocks 3) every variable is assigned at most once 4) check if all not assigned variables are open vars 5) check if all open vars are not assigned 6) every constraint is assigned at most once 7) check if all not assigned constraints are open cons 8) check if all open conss are not assigned 9) check if the datastructures are sorted 10) check if variables hitting a cons are either in the cons's block or border or still open

Returns
true if the seeed seems to be consistent

returns true if the assignments in the seeed are consistent

check if nblocks is set appropriately

check for empty (row- and col-wise) blocks

check variables (every variable is assigned at most once)

check if all not assigned variables are open vars

check if all open vars are not assigned

check constraints (every constraint is assigned at most once)

check if all not assigned constraints are open cons

check if all open conss are not assigned

check if the seeed is sorted

check if variables hitting a cons are either in the cons's block or border or still open

Definition at line 1640 of file class_seeed.cpp.

References cmpGraphPairNewdetection(), displaySeeed(), GCGconsGetLhs(), GCGconsGetNVars(), GCGconsGetRhs(), GCGconsGetVals(), gcg::Seeedpool::getConsForIndex(), getConssForBlock(), gcg::Seeedpool::getIndexForVar(), getLinkingvars(), getMasterconss(), getMastervars(), getNBlocks(), getNConssForBlock(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNStairlinkingvars(), getNVars(), getNVarsForBlock(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getScip(), getStairlinkingvars(), gcg::Seeedpool::getVal(), gcg::Seeedpool::getVarForIndex(), getVarProbindexForBlock(), getVarsForBlock(), gcg::Seeedpool::getVarsForCons(), isConsOpencons(), isVarBlockvarOfBlock(), isVarLinkingvar(), isVarOpenvar(), isVarStairlinkingvarOfBlock(), and gcg::realArraysAreEqual().

Referenced by assignBorderFromConstoblock(), assignSeeedFromConstoblock(), assignSeeedFromConstoblockVector(), assignSmallestComponentsButOneConssAdjacency(), calcStairlinkingVars(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), gcg::Seeedpool::createDecompFromSeeed(), gcg::Seeedpool::createSeeedFromDecomp(), detection(), evaluate(), filloutBorderFromConstoblock(), filloutSeeedFromConstoblock(), gcg::Seeedpool::findSeeeds(), SCIPconshdlrDecompShowListExtract(), SCIPconshdlrDecompTranslateAndAddCompleteUnpresolvedSeeeds(), and SCIPconshdlrDecompUserSeeedFlush().

SCIP_RETCODE gcg::Seeed::completeByConnected ( )

assigns all open constraints and open variables strategy: assigns all conss and vars to the same block if they are connected a cons and a var are adjacent if the var appears in the cons

Returns
scip return code

assigns all open constraints and open variables strategy: assigns all conss and vars to the same block if they are indirectly connected a cons and a var are directly connected if the var appears in the cons

tools to check if the openVars can still be found in a constraint yet

stores, in which block the variable can be found

tools to update openVars

initialize data structures

do breadth first search to find connected conss and vars

assign found conss and vars to a new block

assign left open vars to block 0, if it exists, and to master, otherwise

Definition at line 2222 of file class_seeed.cpp.

References checkConsistency(), deleteOpencons(), deleteOpenvar(), gcg::Seeedpool::getConssForVar(), getNBlocks(), gcg::Seeedpool::getNConssForVar(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVarsForCons(), isConsOpencons(), isVarLinkingvar(), isVarOpenvar(), refineToMaster(), setConsToBlock(), setNBlocks(), setVarToBlock(), setVarToMaster(), and sort().

Referenced by assignSmallestComponentsButOneConssAdjacency(), completeByConnectedConssAdjacency(), DEC_DECL_FINISHSEEED(), DEC_DECL_PROPAGATESEEED(), and detection().

SCIP_RETCODE gcg::Seeed::completeByConnectedConssAdjacency ( )

assigns all open constraints and open variables strategy: assigns all conss and vars to the same block if they are connected a cons and a var are adjacent if the var appears in the cons

Note
this relies on the consadjacency structure of the seeedpool hence it cannot be applied in presence of linking variables
Returns
scip return code

assigns all open constraints and open variables strategy: assigns all conss same block if they are connected two constraints are adjacent if there is a common variable this relies on the consadjacency structure of the seeedpool hence it cannot be applied in presence of linking variables

tools to check if the openVars can still be found in a constraint yet

stores, in which block the variable can be found

tools to update openVars

initialize data structures

do breadth first search to find connected conss

assign found conss and vars to a new block

assign left open vars to block 0, if it exists, and to master, otherwise

Definition at line 2463 of file class_seeed.cpp.

References checkConsistency(), completeByConnected(), deleteOpencons(), deleteOpenvar(), gcg::Seeedpool::getConssForCons(), getNBlocks(), gcg::Seeedpool::getNConssForCons(), getNLinkingvars(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVarsForCons(), isConsMastercons(), isConsOpencons(), isVarLinkingvar(), isVarMastervar(), isVarOpenvar(), refineToMaster(), setConsToBlock(), setNBlocks(), setVarToBlock(), setVarToMaster(), and sort().

Referenced by DEC_DECL_FINISHSEEED(), and DEC_DECL_PROPAGATESEEED().

SCIP_RETCODE gcg::Seeed::completeGreedily ( )

assigns all open constraints and open variables strategy: assigns a cons (and related vars) to a new block if possible, if not to an existing block if possible (by means of prior var assignments) and finally to master, if there does not exist such a block

Returns
scip return code

assigns all open constraints and open variables strategy: assigns a cons (and related vars) to any block if possible by means of prior var assignments and to master, if there does not exist such a block

tools to check if the openVars can still be found in a constraint yet

stores, in which block the variable can be found

check if the openVars can already be found in a constraint

assigns all open constraints and open variables strategy: assign all conss and vars that are indirectly connected to the same block a cons and a var are directly connected if the var appears in the cons

test if the variable can be found in blocks

if the variable can be found in one block set the variable to a variable of the block

the variable does'nt need to be checked any more

if the variable can be found in two blocks check if it is a linking var or a stairlinking var

the variable does'nt need to be checked any more

the variable does'nt need to be checked any more

if the variable can be found in more than two blocks it is a linking var

the variable does'nt need to be checked any more

if the variable can be found in an open constraint it is still an open var

test if the variable can be found in a master constraint yet

the variable does'nt need to be checked any more

assign open conss greedily

stores the open vars of the blocks

if the constraint can be assigned to a block

check if the constraint can be assigned to a block

check if all vars of the constraint are a block var of the current block, an open var, a linkingvar or a mastervar

the open vars don't get vars of the block

the constraint can't be constraint of the block, check the next block

the constraint can be assigned to the current block

the openvars in the constraint get block vars

the constraint can not be assigned to a block, set it to master

assign open vars greedily

check if the open conss are all assigned

             assigns all open constraints and open variables

strategy: assign all conss and vars to the same block if they are indirectly connected a cons and a var are directly connected if the var appears in the cons

check if the open vars are all assigned

Definition at line 2774 of file class_seeed.cpp.

References addBlock(), bookAsBlockCons(), bookAsBlockVar(), bookAsLinkingVar(), bookAsMasterCons(), bookAsMasterVar(), bookAsStairlinkingVar(), checkAllConssAssigned(), checkConsistency(), deleteOpenvar(), flushBooked(), gcg::Seeedpool::getConssForVar(), gcg::Seeedpool::getNConssForVar(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVarsForCons(), isVarBlockvarOfBlock(), isVarLinkingvar(), isVarOpenvar(), isVarStairlinkingvarOfBlock(), setConsToBlock(), and setVarToBlock().

Referenced by DEC_DECL_FINISHSEEED(), and DEC_DECL_PROPAGATESEEED().

bool gcg::Seeed::consClassifierUsed ( int  detectorchainindex)

returns true if the given detector used a consclassifier

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
true iff the given detector used a consclassifier

returns true if the given detector used a consclassifier

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 2996 of file class_seeed.cpp.

Referenced by getConsClassifierData(), and getDetectorClassifierInfo().

SCIP_RETCODE gcg::Seeed::considerImplicits ( )

: assigns every open cons/var in the following manner:

  • to the respective block if it hits exactly one blockvar/blockcons and no open vars/conss
  • to master/linking if it hits blockvars/blockconss assigned to different blocks
  • and every cons to master that hits a master var
  • and every var to master if it does not hit any blockcons and has no open cons
  • leave the cons/variableopen if nothing from the above holds
    Returns
    scip return code
    assigns every open cons/var

to the respective block if it hits exactly one blockvar/blockcons and no open vars/conss

  • to master/linking if it hits blockvars/blockconss assigned to different blocks
  • and every cons to master that hits a master var
  • and every var to master if it does not hit any blockcons and has no open cons

blocks with blockvars which can be found in the cons

blocks in which the open var can be found

set openConss with more than two blockvars to master

set open var to linking, if it can be found in more than one block or set it to a block if it has only constraints in that block and no open constraints or set it to master if it only hits master constraints

Definition at line 3011 of file class_seeed.cpp.

References bookAsBlockCons(), bookAsBlockVar(), bookAsLinkingVar(), bookAsMasterCons(), bookAsMasterVar(), flushBooked(), gcg::Seeedpool::getConssForVar(), gcg::Seeedpool::getNConssForVar(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVarsForCons(), isConsBlockconsOfBlock(), isConsMastercons(), isConsOpencons(), gcg::Seeedpool::isForBenders(), isVarBlockvarOfBlock(), isVarMastervar(), isVarOpenvar(), and sort().

Referenced by detection(), gcg::Seeedpool::prepareSeeed(), refineToMaster(), SCIPconshdlrDecompToolboxActOnSeeed(), SCIPconshdlrDecompUserSeeedFlush(), gcg::Seeedpool::Seeedpool(), and writeAsDec().

SCIP_RETCODE gcg::Seeed::copyClassifierStatistics ( const Seeed otherseeed)

copies the given seeed's classifier statistics

Parameters
otherseeedseeed whose classifier statistics are to be copied
Returns
scip return code

copies the given seeed's classifier statistics

Definition at line 3170 of file class_seeed.cpp.

SCIP_RETCODE gcg::Seeed::deleteEmptyBlocks ( bool  variables)

deletes empty blocks and sets nblocks accordingly, a block is considered to be empty if no constraint is assigned to it, variables in blocks with no constraints become open

Parameters
variablesif true, then blocks with no constraints but at least one variable are considered to be nonempty
Returns
scip return code

deletes empty blocks

Definition at line 3182 of file class_seeed.cpp.

References bookAsBlockVar(), flushBooked(), and gcg::Seeedpool::isForBenders().

Referenced by assignSeeedFromConstoblock(), assignSeeedFromConstoblockVector(), filloutSeeedFromConstoblock(), gcg::Seeedpool::findSeeeds(), gcg::Seeedpool::prepareSeeed(), SCIPconshdlrDecompToolboxModifyVars(), and writeAsDec().

SCIP_RETCODE gcg::Seeed::deleteOpencons ( int  opencons)

deletes a cons from list of open conss

Parameters
openconsid of the cons that is not considered open anymore
Returns
scip return code

deletes a cons from list of open conss

Definition at line 3275 of file class_seeed.cpp.

Referenced by completeByConnected(), completeByConnectedConssAdjacency(), filloutBorderFromConstoblock(), and flushBooked().

SCIP_RETCODE gcg::Seeed::deleteOpenvar ( int  openvar)

deletes a var from the list of open vars

Parameters
openvarid of the var that is not considered open anymore
Returns
scip return coded

deletes a var from the list of open vars

Definition at line 3291 of file class_seeed.cpp.

Referenced by completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), and flushBooked().

SCIP_RETCODE gcg::Seeed::displayAggregationInformation ( )

prints out the aggregation information that is calculated yet, i.e. if there has been identified identical blocks

Returns
scip return code

Definition at line 3305 of file class_seeed.cpp.

Referenced by displayInfo().

SCIP_RETCODE gcg::Seeed::displayConss ( )

displays the assignments of the conss to blocks and master

Returns
scip return code

displays the assignments of the conss

Definition at line 3328 of file class_seeed.cpp.

References gcg::Seeedpool::getConsForIndex(), getConssForBlock(), getNConssForBlock(), getNMasterconss(), and getNOpenconss().

SCIP_RETCODE gcg::Seeed::displayInfo ( int  detailLevel)

displays the relevant information of the seeed

Parameters
detailLevelpass a value that indicates how detailed the output should be: 0: brief overview 1: block and detector info 2: cons and var assignments
Returns
scip return code

displays the relevant information of the seeed

Definition at line 3370 of file class_seeed.cpp.

References DECdetectorGetName(), displayAggregationInformation(), gcg::Seeedpool::getConsForIndex(), getConssForBlock(), getDetectorStatistics(), getLinkingvars(), getMasterconss(), getMastervars(), getNConss(), getNConssForBlock(), getNDetectors(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNOpenconss(), getNOpenvars(), getNStairlinkingvars(), getNVars(), getNVarsForBlock(), getOpenconss(), getOpenvars(), getStairlinkingvars(), gcg::Seeedpool::getVarForIndex(), getVarsForBlock(), hasSetppccardMaster(), hasSetppcMaster(), hasSetppMaster(), and isFromLegacymode().

Referenced by SCIPconshdlrDecompToolboxActOnSeeed().

SCIP_RETCODE gcg::Seeed::displaySeeed ( )

displays the relevant information of the seeed

Returns
scip return code

displays the relevant information of the seeed

Definition at line 3652 of file class_seeed.cpp.

References DECdetectorGetName(), getNConssForBlock(), getNDetectors(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNOpenconss(), getNOpenvars(), getNStairlinkingvars(), and getNVarsForBlock().

Referenced by checkConsistency(), and gcg::Seeedpool::findSeeeds().

SCIP_RETCODE gcg::Seeed::displayVars ( )

displays the assignments of the vars

Returns
scip return code

displays the assignments of the vars

Definition at line 3710 of file class_seeed.cpp.

References getNLinkingvars(), getNMastervars(), getNOpenvars(), getNStairlinkingvars(), getNVarsForBlock(), getStairlinkingvars(), gcg::Seeedpool::getVarForIndex(), and getVarsForBlock().

SCIP_Real gcg::Seeed::evaluate ( SCORETYPE  sctype)

computes and returns the score of the given type of the seeed

Parameters
typethe scoretype that should be calculated
Returns
the score value (usually in [0,1] with 1 best poosible )
See also
enum scoretype in cons_decomp.h for a list of scoretypes

computes the score of the given seeed based on the border, the average density score and the ratio of linking variables

Todo:
bound calculation for unfinished decompositions could be more precise

< score of the border

< score of block densities

< score related to interlinking blocks

< accumulated score

linking var hits block

Definition at line 3789 of file class_seeed.cpp.

References calcAggregationInformation(), checkConsistency(), DEC_DECTYPE_ARROWHEAD, DEC_DECTYPE_BORDERED, DEC_DECTYPE_DIAGONAL, DEC_DECTYPE_STAIRCASE, DEC_DECTYPE_UNKNOWN, getConssForBlock(), getLinkingvars(), getNBlocks(), getNConss(), getNConssForBlock(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNOpenconss(), getNOpenvars(), getNStairlinkingvars(), getNTotalStairlinkingvars(), getNVars(), getNVarsForBlock(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getScip(), getScore(), gcg::Seeedpool::getVal(), gcg::Seeedpool::getVarsForCons(), hasSetppccardMaster(), isTrivial(), isVarBlockvarOfBlock(), isVarLinkingvar(), isVarMastervar(), isVarStairlinkingvar(), and MAX_WHITE.

SCIP_RETCODE gcg::Seeed::filloutBorderFromConstoblock ( SCIP_HASHMAP *  constoblock,
int  givenNBlocks 
)

every constraint is either assigned to master or open according to the cons assignment information given in constoblock hashmap variables are set accordingly

Note
precondition: no constraint or variable is already assigned to a block
Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons* !!) to block indices (master assignment is indicated by assigning cons to index additionalNBlocks)
givenNBlocksnumber of blocks the hashmap contains
Returns
scip return code

assigns all conss to master or declares them to be open (and declares all vars to be open) according to the cons assignment information given in constoblock hashmap precondition: no cons or var is already assigned to a block

Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons* !!) to block indices *< (master assignment is indicated by assigning cons to index additionalNBlocks)
givenNBlocksnumber of blocks the hashmap contains

Definition at line 4257 of file class_seeed.cpp.

References alreadyAssignedConssToBlocks(), checkConsistency(), deleteOpencons(), gcg::Seeedpool::getNConss(), gcg::Seeedpool::getNVars(), setConsToMaster(), and sort().

SCIP_RETCODE gcg::Seeed::filloutSeeedFromConstoblock ( SCIP_HASHMAP *  constoblock,
int  givenNBlocks 
)

assigns all conss to master or a block according to the cons assignment information given in constoblock hashmap

Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons* !!) to block indices < (master assignment is indicated by assigning cons to index additionalNBlocks)
givenNBlocksnumber of blocks the hashmap contains
Returns
scip return code calculates implicit variable assignment through cons assignment
Note
precondition: no cons or var is already assigned to a block and constoblock contains information for every cons

assigns all conss to master or a block according to the cons assignment information given in constoblock hashmap calculates implicit variable assignment through cons assignment precondition: no cons or var is already assigned to a block and constoblock contains information for every cons

test if the variable can be found in blocks

if the var can be found in one block set the var to block var

if the variable can be found in two blocks check if it is a linking var or a stairlinking var

if the variable can be found in more than two blocks it is a linking var

Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons* !!) to block indices *< (master assignment is indicated by assigning cons to index additionalNBlocks)
givenNBlocksnumber of blocks the hashmap contains

Definition at line 4300 of file class_seeed.cpp.

References alreadyAssignedConssToBlocks(), checkConsistency(), deleteEmptyBlocks(), gcg::Seeedpool::getNConss(), gcg::Seeedpool::getNVars(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeedpool::getVarsForCons(), setConsToBlock(), setConsToMaster(), setVarToBlock(), setVarToLinking(), setVarToMaster(), setVarToStairlinking(), and sort().

std::vector< std::pair< int, std::vector< int > > > gcg::Seeed::findLinkingVarsPotentiallyStairlinking ( )

calculates potential stair linking variables with their blocks

Returns
a vector of pairs of var index and vector of (two) block indices the related linking variable hits exactly these two blocks given in the related vector

returns a vector of pairs of var indices and vectors of (two) block indices the related linking variable hits exactly the two blocks given in the related vector

Definition at line 4529 of file class_seeed.cpp.

References gcg::Seeedpool::getConssForVar(), getLinkingvars(), gcg::Seeedpool::getNConssForVar(), getNLinkingvars(), and sort().

Referenced by calcStairlinkingVars().

SCIP_RETCODE gcg::Seeed::findVarsLinkingToMaster ( )

reassigns variables classified as linking to master if the variable only hits master conss

Returns
scip return code

reassigns variables classified as linking to master if the variable only hits master conss

Definition at line 4401 of file class_seeed.cpp.

References gcg::Seeedpool::getConssForVar(), getLinkingvars(), gcg::Seeedpool::getNConssForVar(), getNLinkingvars(), and sort().

SCIP_RETCODE gcg::Seeed::findVarsLinkingToStairlinking ( )

reassigns variables classified as linking to stairlinking if the variable hits conss in exactly two consecutive blocks

Returns
scip return code

reassigns variables classified as linking to stairlinking if the variable hits conss in exactly two consecutive blocks

Definition at line 4447 of file class_seeed.cpp.

References gcg::Seeedpool::getConssForVar(), getLinkingvars(), gcg::Seeedpool::getNConssForVar(), getNLinkingvars(), setVarToStairlinking(), and sort().

Referenced by calcStairlinkingVars().

int gcg::Seeed::getAncestorID ( int  ancestorindex)

gets seeed id of given ancestor id

Parameters
ancestorindexindex of ancestor seeed in ancestor list
Returns
seeed id of given ancestor id

returns ancestor id of given ancestor

Parameters
ancestorindexindex of ancestor in listofancestorids data structure

Definition at line 4658 of file class_seeed.cpp.

Referenced by GCGwriteTexFamilyTree(), and SCIPconshdlrDecompCheckConsistency().

std::vector< int > gcg::Seeed::getAncestorList ( )

get ancestor ids as vector

Returns
vector of ids of all ancestors id

returns ancestor id of given ancestor

Definition at line 4669 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::translateSeeeds().

SCIP_Real gcg::Seeed::getBendersScore ( )

returns the experimental benders score 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 = {b=1}^(nblocks) {blockvars bv of block b hitting a master constraint} {all blocks b2 != b} nblockcons(b2)

Returns
experimental benders score

returns the "maximum white score" with adaptions for benders

Definition at line 5178 of file class_seeed.cpp.

References BENDERS, and getScore().

const std::vector< int > & gcg::Seeed::getBlocksForRep ( int  repid)

get a vector of block ids that are identical to block with id repid

Parameters
repidid of the representative block
Returns
vector of block ids that are identical to block with id repid

Definition at line 4675 of file class_seeed.cpp.

Referenced by SCIPconshdlrDecompCreateVarmapForSeeedId().

std::string gcg::Seeed::getComponentInformation ( )

returns a string containing statistical data of the numbers of constraints and variables in the components: in particular: ncomponents, percentage_min_nconss, percentage_max_nconss, percentage_median_nconss, percentage_mean_nconss , percentage_min_nvars, percentage_max_nvars, percentage_median_nvars, percentage_mean_nvars

Returns
returns string with statistical data
Note
used for features for miplib 2017

Definition at line 4734 of file class_seeed.cpp.

References GCGconsIsRanged(), getConssForBlock(), getNBlocks(), getNConss(), getNConssForBlock(), gcg::Seeedpool::getNTotalConss(), getNVars(), getNVarsForBlock(), and gcg::Seeedpool::getScipCons().

Referenced by GCGprintMiplibConnectedInformation(), and GCGprintMiplibDecompInformation().

SCIP_RETCODE gcg::Seeed::getConsClassifierData ( int  detectorchainindex,
ConsClassifier **  classifier,
std::vector< int > &  consclassesmaster 
)

returns the data of the consclassifier that the given detector made use of

Parameters
detectorchainindexindex of the detector in the detectorchain
classifiera pointer to the used consclassifier (set by method)
consclassesmastera vector containing all indices of the consclasses assigned to master (set by method)
Returns
scip return code

returns the data of the consclassifier that the given detector made use of

Parameters
detectorchainindexindex of the detector in the detectorchain
classifiera pointer to the used consclassifier
consclassesmastera vector containing all indices of the consclasses assigned to master

Definition at line 4806 of file class_seeed.cpp.

References consClassifierUsed().

Referenced by getDetectorClassifierInfo().

const int * gcg::Seeed::getConssForBlock ( int  block)

returns array containing constraints assigned to a block

Parameters
blockid of the block the constraint indices are returned
Returns
array containing constraints assigned to a block

returns array containing constraints assigned to a block

Definition at line 4840 of file class_seeed.cpp.

Referenced by buildDecChainString(), calcHashvalue(), checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), createGraphNewDetection(), gcg::createTestPricingprobConss(), displayConss(), displayInfo(), evaluate(), fhook(), getComponentInformation(), isEqual(), setuparraysnewdetection(), gcg::Seeedpool::translateSeeeds(), writeAsDec(), writeGpNonzeros(), and writeTikzNonzeros().

DEC_DETECTOR ** gcg::Seeed::getDetectorchain ( )

returns detector chain as array of detector pointers

Returns
detector chain as array of detector pointers

returns the detectorchain

Definition at line 4849 of file class_seeed.cpp.

Referenced by buildDecChainString(), gcg::Seeedpool::createDecompFromSeeed(), gcg::Seeedpool::translateSeeeds(), writeAsDec(), and writeTexSeeedStatistics().

std::string gcg::Seeed::getDetectorchainInfo ( int  detectorchainindex)

returns detectorchain info of detector related to given detectorchain index

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
detectorchaininfo of the detector with the given index in the detector chain

returns detectorchain info of detector related to given detectorchain index

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 4708 of file class_seeed.cpp.

Referenced by writeSeeedDetectorChainInfoLatex().

char * gcg::Seeed::getDetectorChainString ( )

the detectorchainstring contains the chars of all detectors that worked on this seeed in this order

Returns
detectorchainstring (containing the chars of all detectors that worked on this seeed in this order)

returns detectorchainstring

Definition at line 4702 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), MiscVisualization::GCGgetVisualizationFilename(), GCGwriteTexReport(), SCIPconshdlrDecompShowListExtract(), and gcg::Seeedpool::translateSeeeds().

std::vector< DEC_DETECTOR * > gcg::Seeed::getDetectorchainVector ( )

returns the detectorchain as a vector of detector pointers

Returns
the detectorchain as a vector of detector pointers

returns the detectorchain as a vector

Definition at line 4855 of file class_seeed.cpp.

Referenced by GCGprintDecompInformation(), and gcg::Seeedpool::translateSeeeds().

std::string gcg::Seeed::getDetectorClassifierInfo ( int  detectorchainindex,
bool  displayConssVars 
)

returns a string displaying classifier information if such a classifier was used

Parameters
detectorchainindexindex of the detector in the detectorchain
displayConssVarspass true if constraints and variables of the respective classes should be displayed
Returns
string displaying classifier information if such a classifier was used

returns a string displaying classifier information if such a classifier was used

Parameters
detectorchainindexindex of the detector in the detectorchain
displayConssVarspass true if constraints and variables of the respective classes should be displayed

Definition at line 4888 of file class_seeed.cpp.

References consClassifierUsed(), gcg::IndexClassifier::getClassDescription(), gcg::IndexClassifier::getClassName(), gcg::ConsClassifier::getClassOfCons(), gcg::VarClassifier::getClassOfVar(), getConsClassifierData(), gcg::Seeedpool::getConsForIndex(), gcg::IndexClassifier::getName(), gcg::ConsClassifier::getNConss(), gcg::VarClassifier::getNVars(), getVarClassifierData(), gcg::Seeedpool::getVarForIndex(), and varClassifierUsed().

SCIP_Real gcg::Seeed::getDetectorClockTime ( int  detectorchainindex)

returns the time that the detector related to the given detectorchainindex needed for detecting

Parameters
detectorchainindexindex of the detector the time that should be returned
Returns
the clock time for the corresponding detector in the chain

returns the time that the detector related to the given detectorchainindex needed for detecting

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 4718 of file class_seeed.cpp.

Referenced by getDetectorStatistics(), and gcg::Seeedpool::translateSeeeds().

std::vector< SCIP_Real > gcg::Seeed::getDetectorClockTimes ( )

returns a vector of the clock times that each detector needed that was involved in this seeed

Returns
vector of the clock times

returns the time that the detectors needed for detecting

Definition at line 4728 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and getDetectorStatistics().

std::string gcg::Seeed::getDetectorStatistics ( int  detectorchainindex)

returns a string displaying all detector-related information, i.e. clock times and assignment data

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
string displaying all detector-related information, i.e. clock times and assignment datareturns a string displaying all detector-related information, i.e. clock times and assignment data

returns a string displaying detector-related information, i.e. clock times and assignment data

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 4861 of file class_seeed.cpp.

References getDetectorClockTime(), getDetectorClockTimes(), getNNewBlocks(), getNNewBlocksVector(), getPctConssFromFree(), getPctConssFromFreeVector(), getPctConssToBlock(), getPctConssToBlockVector(), getPctConssToBorder(), getPctConssToBorderVector(), getPctVarsFromFree(), getPctVarsFromFreeVector(), getPctVarsToBlock(), getPctVarsToBlockVector(), getPctVarsToBorder(), and getPctVarsToBorderVector().

Referenced by displayInfo().

bool gcg::Seeed::getFinishedByFinisher ( )

returns true iff this seeed was finished by finishSeeed() method of a detector

Returns
true iff this seeed was finished by finishSeeed() method of a detector

returns true if this seeed was finished by finishSeeed() method of a detector

Definition at line 5119 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and gcg::Seeedpool::translateSeeeds().

bool gcg::Seeed::getFinishedByFinisherUnpresolved ( )

returns true if the seeed is finished by a finisher in the unpresolved problem

Returns
true if the seeed is finished by a finisher in the unpresolved problem

returns true if the seeed is finished by a finisher in the unpresolved problem

Definition at line 5125 of file class_seeed.cpp.

DEC_DETECTOR * gcg::Seeed::getFinishedUnpresolvedBy ( )

returns the detector that finished this seeed in the unpresolved problem if there exists one, NULL otherwise

Returns
the detector that finished this seeed in the unpresolved problem if there exists one, NULL otherwise
Note
after finihed for unpresolved problem the transformed seeed (for the presolved problem) might be not completed

returns the detector that finished this seeed in the unpresolved problem if there exists one, NULL otherwise

Definition at line 5131 of file class_seeed.cpp.

long gcg::Seeed::getHashValue ( )

returns the calculated hash value of this seeed

Returns
the calculated hash value of this seeedreturns the calculated hash value of this seeed

returns the calculated hash value of this seeed

Definition at line 5137 of file class_seeed.cpp.

References calcHashvalue().

Referenced by isEqual().

const int * gcg::Seeed::getLinkingvars ( )

returns array containing all linking vars indices

Returns
array containing all linking vars indices
Note
when accessed it is suppossed to be sorted

returns array containing all linking vars

Definition at line 5152 of file class_seeed.cpp.

Referenced by buildDecChainString(), checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), displayInfo(), evaluate(), findLinkingVarsPotentiallyStairlinking(), findVarsLinkingToMaster(), findVarsLinkingToStairlinking(), isEqual(), gcg::Seeedpool::translateSeeeds(), writeAsDec(), writeGpNonzeros(), and writeTikzNonzeros().

const int * gcg::Seeed::getMasterconss ( )

returns array containing all master conss indices

Returns
array containing all master conss indices
Note
when accessed it is suppossed to be sorted

returns array containing all master conss

Definition at line 5158 of file class_seeed.cpp.

Referenced by buildDecChainString(), calcHashvalue(), calcNCoeffsForBlockForMastercons(), checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), createGraphNewDetection(), displayInfo(), getScore(), hasSetppccardMaster(), hasSetppcMaster(), hasSetppMaster(), isEqual(), postprocessMasterToBlocksConssAdjacency(), setuparraysnewdetection(), gcg::Seeedpool::translateSeeeds(), writeAsDec(), writeGpNonzeros(), and writeTikzNonzeros().

const int * gcg::Seeed::getMastervars ( )

returns array containing all master vars (hitting only constraints in the master, aka static variables) indices

Returns
array containing all master vars (hitting only constraints in the master, aka static variables) indices

returns array containing all master vars (every constraint containing a master var is in master)

Definition at line 5164 of file class_seeed.cpp.

Referenced by checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), displayInfo(), isEqual(), gcg::Seeedpool::translateSeeeds(), writeAsDec(), writeGpNonzeros(), and writeTikzNonzeros().

SCIP_Real gcg::Seeed::getMaxWhiteScore ( )

returns the "maximum white score"

Returns
returns the "maximum white score"
Note
"maximum white score" is fraction of the area of the decomposed matrix that is neither block or border

returns the "maximum white score"

Definition at line 5170 of file class_seeed.cpp.

References getScore(), and MAX_WHITE.

Referenced by gcg::cmpSeeedsMaxWhite(), gcg::Seeedpool::createDecompFromSeeed(), GCGprintDecompInformation(), GCGprintMiplibConnectedInformation(), GCGprintMiplibDecompInformation(), and writeTexSeeedStatistics().

int gcg::Seeed::getNAncestors ( )

returns number of ancestor seeeds

Returns
number of ancestor seeeds

returns number of ancestor seeeds

Definition at line 5289 of file class_seeed.cpp.

Referenced by GCGwriteTexFamilyTree(), and SCIPconshdlrDecompCheckConsistency().

int gcg::Seeed::getNCoeffsForBlock ( int  blockid)

returns the number of nonzero coeffs in a certain block

Parameters
blockidof the block the number of nozerors are requested for
Returns
number of nonzero coeffs in a certain block

returns the number of nonzero coeffs in a certain block

Definition at line 5186 of file class_seeed.cpp.

Referenced by calcNCoeffsForBlockForMastercons(), and setuparraysnewdetection().

int gcg::Seeed::getNCoeffsForMaster ( )

returns the number of nonzero coeffs in master

Returns
the number of nonzero coeffs in master

returns the number of nonzero coeffs in master

Definition at line 5198 of file class_seeed.cpp.

Referenced by setuparraysnewdetection().

int gcg::Seeed::getNConssForBlock ( int  block)
int gcg::Seeed::getNDetectorchainInfo ( )

returns size of the detectorchain info vector

Returns
size of the detectorchain info vector

returns size of the detectorchain info vector

Definition at line 5316 of file class_seeed.cpp.

Referenced by writeAsDec(), and writeSeeedDetectorChainInfoLatex().

int gcg::Seeed::getNDetectors ( )

returns the number of detectors the seeed is propagated by

Returns
number of detectors the seeed is propagated by

returns the number of detectors the seeed is propagated by

Definition at line 5322 of file class_seeed.cpp.

References gcg::NOT.

Referenced by buildDecChainString(), gcg::Seeedpool::createDecompFromSeeed(), DEC_DECL_PROPAGATEFROMTOOLBOX(), DEC_DECL_PROPAGATESEEED(), displayInfo(), displaySeeed(), gcg::Seeedpool::translateSeeeds(), and writeTexSeeedStatistics().

int gcg::Seeed::getNMastervars ( )

returns size of the vector containing master vars (hitting only constraints in the master)

Returns
size of the vector containing master vars (hitting only constraints in the master)

returns size of the vector containing master vars (hitting only constraints in the master)

Definition at line 5375 of file class_seeed.cpp.

Referenced by addDecChangesFromAncestor(), buildDecChainString(), checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), displayInfo(), displaySeeed(), displayVars(), evaluate(), GCGprintDecompInformation(), isEqual(), isTrivial(), SCIPconshdlrDecompShowListExtract(), gcg::Seeedpool::translateSeeeds(), writeAsDec(), writeGpNonzeros(), writeGpSeeed(), writeTexSeeed(), writeTexSeeedStatistics(), and writeTikzNonzeros().

int gcg::Seeed::getNNewBlocks ( int  detectorchainindex)

returns number of blocks a detector added

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
number of blocks a detector added

returns number of blocks a detector added

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 5344 of file class_seeed.cpp.

Referenced by getDetectorStatistics(), and gcg::Seeedpool::translateSeeeds().

std::vector< int > gcg::Seeed::getNNewBlocksVector ( )

number of blocks the detectors in the detectorchain added

Returns
number of blocks the detectors in the detectorchain added

returns number of blocks the detectors in the detectorchain added

Definition at line 5354 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and getDetectorStatistics().

int gcg::Seeed::getNOpenconss ( )

returns size of vector containing constraints not assigned yet

Returns
returns size of vector containing constraints not assigned yet

returns size of vector containing constraints not assigned yet

Definition at line 5392 of file class_seeed.cpp.

Referenced by addDecChangesFromAncestor(), assignBorderFromConstoblock(), assignSeeedFromConstoblock(), assignSeeedFromConstoblockVector(), blocking(), blockingDynamic(), blockingStatic(), gcg::RowGraphWeighted< T >::calculateSimilarity(), connected(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphFromPartialMatrix(), createRowindexList(), gcg::Seeedpool::createSeeedFromDecomp(), createSeeedFromMasterconss(), gcg::RowGraph< T >::createSeeedFromPartition(), gcg::HyperrowcolGraph< T >::createSeeedFromPartition(), gcg::HyperrowGraph< T >::createSeeedFromPartition(), gcg::HypercolGraph< T >::createSeeedFromPartition(), DEC_DECL_PROPAGATEFROMTOOLBOX(), DEC_DECL_PROPAGATESEEED(), detection(), detectIsomorph(), displayConss(), displayInfo(), displaySeeed(), evaluate(), fhookForSeeeds(), gcg::Seeedpool::findSeeeds(), fromToolbox(), getShortCaption(), graphCompletible(), indexmapInit(), initData(), isComplete(), isTrivial(), rankOrderClustering(), rankOrderClusteringIteration(), rowsWithConstriction(), SCIPconshdlrDecompShowListExtract(), SCIPconshdlrDecompToolboxModifyConss(), SCIPconshdlrDecompUserSeeedFlush(), setupArrays(), writeGpNonzeros(), writeGpSeeed(), writeTexSeeed(), and writeTikzNonzeros().

int gcg::Seeed::getNReps ( )

returns the number of blockrepresentatives

Returns
the number of blockrepresentatives

returns the number of blockrepresentatives

Definition at line 5404 of file class_seeed.cpp.

Referenced by SCIPconshdlrDecompArePricingprobsIdenticalForSeeedid().

int gcg::Seeed::getNStairlinkingvars ( int  block)

returns size of the vector containing stairlinking vars

Parameters
blockid of the block the size of the stairlinking vector is asked for
Returns
size of the vector containing stairlinking vars

returns size of the vector containing stairlinking vars

Definition at line 5410 of file class_seeed.cpp.

Referenced by buildDecChainString(), checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), displayInfo(), displaySeeed(), displayVars(), evaluate(), getNTotalStairlinkingvars(), isEqual(), writeAsDec(), writeGpNonzeros(), writeGpSeeed(), writeTexSeeed(), and writeTikzNonzeros().

int gcg::Seeed::getNTotalStairlinkingvars ( )
int gcg::Seeed::getNUsedClassifier ( )

returns the number used classifiers

Returns
number used classifiers

returns the number used classifiers

Definition at line 5331 of file class_seeed.cpp.

Referenced by printClassifierInformation().

int gcg::Seeed::getNVarsForBlock ( int  block)

returns size of the vector containing vars assigned to a block

Parameters
blockid of the block the number of variables is asked for
Returns
size of the vector containing vars assigned to a block

returns size of the vector containing vars assigned to a block

Definition at line 5425 of file class_seeed.cpp.

Referenced by buildDecChainString(), calcAggregationInformation(), calcNCoeffsForBlockForMastercons(), gcg::Seeedpool::calcStrongDecompositionScore(), checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), createGraphNewDetection(), displayInfo(), displaySeeed(), displayVars(), evaluate(), fhook(), GCGprintDecompInformation(), getComponentInformation(), isAgginfoToExpensive(), isEqual(), postprocessMasterToBlocksConssAdjacency(), setuparraysnewdetection(), writeAsDec(), writeGpNonzeros(), writeGpSeeed(), writeTexSeeed(), and writeTikzNonzeros().

std::vector< int > gcg::Seeed::getOpenconssVec ( )

returns a vector containing constraint ids not assigned yet as vector

Returns
returns a vector containing constraint ids not assigned yet as vector

returns array containing constraints not assigned yet

Definition at line 5440 of file class_seeed.cpp.

std::vector< int > gcg::Seeed::getOpenvarsVec ( )

returns array containing variables not assigned yet as vector

Returns
array containing variables not assigned yet as vector

returns array containing variables not assigned yet

Definition at line 5453 of file class_seeed.cpp.

SCIP_Real gcg::Seeed::getPctConssFromFree ( int  detectorchainindex)

returns fraction of constraints that are not longer open for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
fraction of constraints that are not longer open for a detector

returns fraction of constraints that are not longer open for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 5586 of file class_seeed.cpp.

Referenced by getDetectorStatistics(), and gcg::Seeedpool::translateSeeeds().

std::vector< SCIP_Real > gcg::Seeed::getPctConssFromFreeVector ( )

returns fraction of constraints that are not longer open for detectors in detectorchain

Returns
vector of fractions of constraints that are not longer open for detectors in detectorchain

returns fraction of constraints that are not longer open for detectors in detectorchain

Definition at line 5596 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and getDetectorStatistics().

SCIP_Real gcg::Seeed::getPctConssToBlock ( int  detectorchainindex)

returns fraction of constraints assigned to a block for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
fraction of constraints assigned to a block for a detector

returns fraction of constraints assigned to a block for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 5562 of file class_seeed.cpp.

Referenced by getDetectorStatistics(), and gcg::Seeedpool::translateSeeeds().

std::vector< SCIP_Real > gcg::Seeed::getPctConssToBlockVector ( )

returns fraction of constraints assigned to a block for detectors in detectorchain

Returns
vector of fractions of constraints assigned to a block for detectors in detectorchain

returns fraction of constraints assigned to a block for detectors in detectorchain

Definition at line 5572 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and getDetectorStatistics().

SCIP_Real gcg::Seeed::getPctConssToBorder ( int  detectorchainindex)

returns fraction of constraints assigned to the border for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
returns fraction of constraints assigned to the border for a detector

returns fraction of constraints assigned to the border for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 5537 of file class_seeed.cpp.

Referenced by getDetectorStatistics(), and gcg::Seeedpool::translateSeeeds().

std::vector< SCIP_Real > gcg::Seeed::getPctConssToBorderVector ( )

returns fraction of constraints assigned to the border for detectors in detectorchain

Returns
vector of fractions of constraints assigned to the border for detectors in detectorchain

returns fraction of constraints assigned to the border for detectors in detectorchain

Definition at line 5547 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and getDetectorStatistics().

SCIP_Real gcg::Seeed::getPctVarsFromFree ( int  detectorchainindex)

returns fraction of variables that are not longer open for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
index of the detector in the detectorchain

returns fraction of variables that are not longer open for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 5512 of file class_seeed.cpp.

Referenced by getDetectorStatistics(), and gcg::Seeedpool::translateSeeeds().

std::vector< SCIP_Real > gcg::Seeed::getPctVarsFromFreeVector ( )

returns fraction of variables that are not longer open for detectors in detectorchain

Returns
vecort or fractions of variables that are not longer open for detectors in detectorchain

returns fraction of variables that are not longer open for detectors in detectorchain

Definition at line 5522 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and getDetectorStatistics().

SCIP_Real gcg::Seeed::getPctVarsToBlock ( int  detectorchainindex)

returns fraction of variables assigned to a block for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
fraction of variables assigned to a block for a detector

returns fraction of variables assigned to a block for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 5485 of file class_seeed.cpp.

Referenced by getDetectorStatistics(), and gcg::Seeedpool::translateSeeeds().

std::vector< SCIP_Real > gcg::Seeed::getPctVarsToBlockVector ( )

returns fraction of variables assigned to a block for detectors in detectorchain

Returns
vector of fractions of variables assigned to a block for detectors in detectorchain

returns fraction of variables assigned to a block for detectors in detectorchain

Definition at line 5495 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and getDetectorStatistics().

SCIP_Real gcg::Seeed::getPctVarsToBorder ( int  detectorchainindex)

returns fraction of variables assigned to the border for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
fraction of variables assigned to the border for a detector

returns fraction of variables assigned to the border for a detector

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 5459 of file class_seeed.cpp.

Referenced by getDetectorStatistics(), and gcg::Seeedpool::translateSeeeds().

std::vector< SCIP_Real > gcg::Seeed::getPctVarsToBorderVector ( )

returns fraction of variables assigned to the border for detectors in detectorchain

Returns
vector of fractions of variables assigned to the border for detectors in detectorchain

returns fraction of variables assigned to the border for detectors in detectorchain

Definition at line 5469 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), and getDetectorStatistics().

int gcg::Seeed::getRepForBlock ( int  blockid)

returns index of the representative block for a block, this might be blockid itself

Parameters
blockidid of the block the representative is asked for
Returns
index of the representative block for a block, this might be blockid itself

returns index of the representative block

Definition at line 5602 of file class_seeed.cpp.

Referenced by SCIPconshdlrDecompArePricingprobsIdenticalForSeeedid(), and SCIPconshdlrDecompCreateVarmapForSeeedId().

std::vector< int > & gcg::Seeed::getRepVarmap ( int  repid,
int  blockrepid 
)

returns the represenation varmap as vector for represenative repid and the blockrepid-th block that is represented by repid

Parameters
repid
blockrepid
Returns
the represenation varmap as vector for represenative repid and the blockrepid-th block that is represented by repid

Definition at line 5608 of file class_seeed.cpp.

Referenced by SCIPconshdlrDecompCreateVarmapForSeeedId().

SCIP_Real gcg::Seeed::getScore ( SCORETYPE  type)

returns the score of the seeed (depending on used scoretype)

Parameters
typethe scoretype
Returns
the score
See also
enum scoretype in cons_decomp.h

returns the score of the seeed (depending on used scoretype)

if there are indicator constraints in the master we want to reject this decomposition

calculate maximum white score anyway

Definition at line 5209 of file class_seeed.cpp.

References BENDERS, BORDER_AREA, CLASSIC, GCGconsGetType(), getMasterconss(), getNMasterconss(), gcg::Seeedpool::getScipCons(), getSeeedpool(), indicator, MAX_FORESEEING_AGG_WHITE, MAX_FORESSEEING_WHITE, MAX_WHITE, SETPART_AGG_FWHITE, and SETPART_FWHITE.

Referenced by gcg::cmpSeeedsAggFWhite(), gcg::cmpSeeedsBenders(), gcg::cmpSeeedsBorderArea(), gcg::cmpSeeedsClassic(), gcg::cmpSeeedsFWhite(), gcg::cmpSeeedsPPCaggFWhite(), gcg::cmpSeeedsPPCfWhite(), evaluate(), GCGprintDecompInformation(), getBendersScore(), getMaxWhiteScore(), postprocessMasterToBlocksConssAdjacency(), SCIPconshdlrDecompChooseCandidatesFromSelected(), and SCIPconshdlrDecompShowListExtract().

Seeedpool * gcg::Seeed::getSeeedpool ( )

returns the corresponding seeedpool

Returns
corresponding seeedpool

returns the corresponding seeedpool

Definition at line 5618 of file class_seeed.cpp.

Referenced by getScore(), and writeAsDec().

const char * gcg::Seeed::getShortCaption ( )

returns a short caption for this seeed

Returns
short caption for this seeed

returns a short caption for this seeed

Definition at line 6454 of file class_seeed.cpp.

References getID(), getNBlocks(), getNOpenconss(), and getNOpenvars().

const int * gcg::Seeed::getStairlinkingvars ( int  block)

returns array containing stairlinking vars,

Note
if a stairlinking variable links block i and i+1 it is only stored in vector of block i
Parameters
blockid of the block the stairlinking variable varctor is asked for
Returns
array containing stairlinking vars,

returns array containing stairlinking vars

Definition at line 5633 of file class_seeed.cpp.

Referenced by checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), displayInfo(), displayVars(), isEqual(), writeAsDec(), writeGpNonzeros(), and writeTikzNonzeros().

bool gcg::Seeed::getStemsFromUnpresolved ( )

returns true if this seeed stems from the unpresolved problem

Returns
TRUE iff seeed stems from the unpresolved problem

returns true if this seeed stems from an unpresolved problem seeed

Definition at line 5642 of file class_seeed.cpp.

USERGIVEN gcg::Seeed::getUsergiven ( )

returns the USERGIVEN status of this seeeds

Returns
the USERGIVEN status of this seeeds
See also
enum USERGIVEN

returns whether this seeed is usergiven

Definition at line 5283 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createDecompFromSeeed(), SCIPconshdlrDecompPopulateSelected(), SCIPconshdlrDecompShowListExtract(), SCIPconshdlrDecompShowListExtractHeader(), and gcg::Seeedpool::translateSeeeds().

SCIP_RETCODE gcg::Seeed::getVarClassifierData ( int  detectorchainindex,
VarClassifier **  classifier,
std::vector< int > &  varclasseslinking,
std::vector< int > &  varclassesmaster 
)

returns the data of the varclassifier that the given detector made use of

Parameters
detectorchainindexindex of the detector in the detectorchain
classifiera pointer to the used varclassifier, , to be set by method
varclasseslinkinga vector containing all indices of the varclasses assigned to linking, to be filled by method
varclassesmastera vector containing all indices of the varclasses assigned to master, to be filled by method
Returns
data of the varclassifier that the given detector made use of

returns the data of the varclassifier that the given detector made use of

Parameters
detectorchainindexindex of the detector in the detectorchain
classifiera pointer to the used varclassifier
varclasseslinkinga vector containing all indices of the varclasses assigned to linking
varclassesmastera vector containing all indices of the varclasses assigned to master

Definition at line 5648 of file class_seeed.cpp.

References varClassifierUsed().

Referenced by getDetectorClassifierInfo().

int gcg::Seeed::getVarProbindexForBlock ( int  varid,
int  block 
)

returns index in variables array of a block for a variable

Parameters
varidthe id of the variable the index
blockthe corresponding block id
Returns
returns index in variables array of a block for a variable

returns array containing vars of a block

Definition at line 5674 of file class_seeed.cpp.

Referenced by checkConsistency(), createGraphNewDetection(), and SCIPconshdlrDecompCreateVarmapForSeeedId().

const int * gcg::Seeed::getVarsForBlock ( int  block)

returns array containing vars of a block

Parameters
blockid of the block the vars are requested for
Returns
returns array containing vars of a block

returns array containing vars of a block

Definition at line 5665 of file class_seeed.cpp.

Referenced by buildDecChainString(), gcg::Seeedpool::calcStrongDecompositionScore(), checkConsistency(), gcg::Seeedpool::createDecompFromSeeed(), createGraphNewDetection(), displayInfo(), displayVars(), fhook(), isEqual(), postprocessMasterToBlocksConssAdjacency(), SCIPconshdlrDecompCreateVarmapForSeeedId(), setuparraysnewdetection(), writeAsDec(), writeGpNonzeros(), and writeTikzNonzeros().

SCIP_Bool gcg::Seeed::hasSetppccardMaster ( )

checks if all master constraints set partitioning, set packing, set cover, or cardinality constraints

Returns
TRUE iff all master constraints set partitioning, set packing, set cover, or cardinality constraints

returns true if the master consists only setpartitioning packing, covering, or cardinality constraints

Definition at line 4172 of file class_seeed.cpp.

References gcg::Seeedpool::getConsForIndex(), getMasterconss(), getNLinkingvars(), getNMasterconss(), getNTotalStairlinkingvars(), gcg::Seeedpool::isConsCardinalityCons(), and gcg::Seeedpool::isConsSetppc().

Referenced by buildDecChainString(), displayInfo(), evaluate(), and GCGprintDecompInformation().

SCIP_Bool gcg::Seeed::hasSetppcMaster ( )

checks iff all master constraints set partitioning, set packing, or set cover constraints

Returns
TRUE iff all master constraints set partitioning, set packing, or set cover

returns true if the master consists only setpartitioning, packing, or covering constraints

Definition at line 4204 of file class_seeed.cpp.

References getMasterconss(), getNLinkingvars(), getNMasterconss(), getNTotalStairlinkingvars(), and gcg::Seeedpool::isConsSetppc().

Referenced by displayInfo().

SCIP_Bool gcg::Seeed::hasSetppMaster ( )

checks iff all master constraints set partitioning, or set packing constraints

Returns
TRUE iff all master constraints set partitioning, or set packing constraints

returns true if the master consists only setpartitioning, or packing constraints

Definition at line 4230 of file class_seeed.cpp.

References getMasterconss(), getNLinkingvars(), getNMasterconss(), getNTotalStairlinkingvars(), and gcg::Seeedpool::isConsSetpp().

Referenced by displayInfo().

void gcg::Seeed::initOnlyBinMaster ( )

prepare the seeed such that all predecessors have the folloing property: all variables in the master problem are binary variables thus all other variables are assigned to a block requirement: all constraints and variables are open when this method is called

prepare the seeed such that all predecessors have the folloing property: all variables in the master problem are binary variables thus all other variables are assigned to a block

reqirement: all constraints and variables are open when this method is called

check if var is NOT a binary variable

Definition at line 978 of file class_seeed.cpp.

References bookAsBlockCons(), bookAsBlockVar(), flushBooked(), gcg::Seeedpool::getConssForVar(), getNConss(), gcg::Seeedpool::getNConssForVar(), getNVars(), gcg::Seeedpool::getScipVar(), and setNBlocks().

Referenced by gcg::Seeedpool::Seeedpool().

SCIP_Bool gcg::Seeed::isAgginfoToExpensive ( )

checks if calculation of aggregation information is considered to be to expansive

Returns
TRUE iff calculation of aggregation information is considered to be to expansive

check if calculating aggregation information is too expensive

check if there are too many master coeffs

Definition at line 1079 of file class_seeed.cpp.

References getNBlocks(), getNConssForBlock(), getNVarsForBlock(), and gcg::Seeedpool::getScip().

Referenced by calcAggregationInformation().

bool gcg::Seeed::isConsBlockconsOfBlock ( int  cons,
int  block 
)

returns true if the cons is a cons of the block

Parameters
consid of constraint to check
blockid of the blocks
Returns
true iff the cons is a cons of the block

returns true if the cons is a cons of the block

Definition at line 5697 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), and considerImplicits().

bool gcg::Seeed::isConsMastercons ( int  cons)

returns true if the cons is a master cons

Parameters
consid of ccons to check if it is master constraint
Returns
true iff the cons is a master cons

returns true if the cons is a master cons

Definition at line 5712 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), assignSmallestComponentsButOneConssAdjacency(), buildDecChainString(), gcg::Seeedpool::calcStrongDecompositionScore(), completeByConnectedConssAdjacency(), and considerImplicits().

bool gcg::Seeed::isConsOpencons ( int  cons)

returns true if the cons is an open cons

Parameters
consid of cons to check
Returns
true iff the cons is an open cons

returns true if the cons is an open cons

Definition at line 5721 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), assignSmallestComponentsButOneConssAdjacency(), buildDecChainString(), checkConsistency(), completeByConnected(), completeByConnectedConssAdjacency(), connected(), considerImplicits(), and createGraphFromPartialMatrix().

SCIP_RETCODE gcg::Seeed::isEqual ( Seeed otherseeed,
SCIP_Bool *  isequal,
bool  sortseeeds 
)

method to check whether this seeed is equal to a given other seeed (

See also
isEqual(Seeed*))
Parameters
otherseeedseeed to check euality with
isequalpointer to store whether seeeds are identical
sortseeedsshould conss and vars be sorted before comparing the seeeds?
Returns
Parameters
otherseeedother seeed
isequalpointer to store whether seeeds are identical
sortseeedsshould conss and vars be sorted before comparing the seeeds?

Definition at line 5743 of file class_seeed.cpp.

References sort().

Referenced by gcg::seeedIsNoDuplicateOfSeeeds().

bool gcg::Seeed::isEqual ( Seeed other)

method to check whether this seeed is equal to a given other seeed

Parameters
otherseed to check equality with
Returns
true iff seeeds are equal

find sorting for blocks (non decreasing according smallest row index)

compares the number of stairlinking vars

compares the number of constraints and variables in the blocks

compares the master cons

compares the master vars

compares the constrains and variables in the blocks

compares the linking vars

Parameters
otherother seeed

Definition at line 5762 of file class_seeed.cpp.

References gcg::compare_blocks(), getConssForBlock(), getHashValue(), getLinkingvars(), getMasterconss(), getMastervars(), getNBlocks(), getNConssForBlock(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNStairlinkingvars(), getNVarsForBlock(), getStairlinkingvars(), and getVarsForBlock().

bool gcg::Seeed::isFromLegacymode ( )

returns true if the seeed is from a detector operating in legacymode

Returns
retruns true iff this partial decomposition is found during legacy mode

returns true if the seeed is from a detector operating in legacymode

Definition at line 5730 of file class_seeed.cpp.

Referenced by displayInfo().

bool gcg::Seeed::isPropagatedBy ( DEC_DETECTOR detectorID)

returns true if this seeed was propagated by specified detector

Parameters
detectorIDpointer to detector to check for
Returns
true iff this seeed was propagated by detectorID

returns true if this seeed was propagated by a detector

Definition at line 5858 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::findSeeeds().

bool gcg::Seeed::isSelected ( )

returns true if the seeed is currently selected in explore menue

Returns
true iff the seeed is currently selected in explore menue

returns true if the seeed is selected

Definition at line 5888 of file class_seeed.cpp.

Referenced by SCIPconshdlrDecompCheckConsistency(), SCIPconshdlrDecompExploreSelect(), SCIPconshdlrDecompPopulateSelected(), and SCIPconshdlrDecompShowListExtract().

bool gcg::Seeed::isTrivial ( )

returns true if this seeed is considered to be trivial, i.e. all conss are in one block, all conss are in border, all variables linking or mastervars, or all constraints and variables are open

Returns
true iff this seeed is considered to be trivial

returns true if this seeed is trivial, i.e. all conss are in one block, all conss are in border, all variables linking or mastervars

Definition at line 5869 of file class_seeed.cpp.

References getNBlocks(), getNConss(), getNConssForBlock(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNOpenconss(), getNOpenvars(), and getNVars().

Referenced by buildDecChainString(), evaluate(), and gcg::Seeedpool::findSeeeds().

bool gcg::Seeed::isVarBlockvarOfBlock ( int  var,
int  block 
)

returns true if the var is assigned to the block

Parameters
varid of var to check
blockid of block to check
Returns
true iff the var is assigned to the block

returns true if the var is assigned to the block

Definition at line 5895 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), buildDecChainString(), calcHashvalue(), calcNCoeffsForBlockForMastercons(), checkConsistency(), completeGreedily(), considerImplicits(), createGraphNewDetection(), and evaluate().

bool gcg::Seeed::isVarLinkingvar ( int  var)

returns true if the var is a linking var

Parameters
varid of var to check
Returns
true iff the var is a linking var

returns true if the var is a linking var

Definition at line 5920 of file class_seeed.cpp.

Referenced by assignSmallestComponentsButOneConssAdjacency(), buildDecChainString(), checkConsistency(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), and evaluate().

bool gcg::Seeed::isVarMastervar ( int  var)

returns true if the var is a master var

Parameters
varid of var to check
Returns
true iff the var is a master var

returns true if the var is a master var

Definition at line 5911 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), assignSmallestComponentsButOneConssAdjacency(), buildDecChainString(), completeByConnectedConssAdjacency(), considerImplicits(), and evaluate().

bool gcg::Seeed::isVarOpenvar ( int  var)

returns true if the var is an open var

Parameters
varid of var to check
Returns
true iff the var is an open var

returns true if the var is an open var

Definition at line 5933 of file class_seeed.cpp.

Referenced by assignCurrentStairlinking(), buildDecChainString(), checkConsistency(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), connected(), considerImplicits(), createGraphFromPartialMatrix(), createRowindexList(), and graphCompletible().

bool gcg::Seeed::isVarStairlinkingvar ( int  var)

returns true if the var is a stairlinking var

Parameters
varid of var to check
Returns
true if the var is a stairlinking var

returns true if the var is a stairlinking var

Definition at line 5942 of file class_seeed.cpp.

Referenced by buildDecChainString(), gcg::Seeedpool::createSeeedFromDecomp(), and evaluate().

bool gcg::Seeed::isVarStairlinkingvarOfBlock ( int  var,
int  block 
)

returns true if the var is a stairlinkingvar of a speciefied block

Parameters
varid of var to check if it is a stairlinking variable hitting specified block
blockid of block to check
Returns
true iff the var is a stairlinkingvar of a speciefied block

returns true if the var is a stairlinkingvar of the block

Definition at line 5956 of file class_seeed.cpp.

Referenced by checkConsistency(), and completeGreedily().

SCIP_RETCODE gcg::Seeed::postprocessMasterToBlocks ( SCIP_Bool *  success)

try to reassign each mastercons to one block without inducing conflicts

Parameters
successpointer to store whether at least one master constraint was reassigned
Returns
scip return code

try to reassign each mastercons to one block without inducing conflicts

Definition at line 2363 of file class_seeed.cpp.

SCIP_RETCODE gcg::Seeed::postprocessMasterToBlocksConssAdjacency ( SCIP_Bool *  success)

try to reassign each mastercons to one block without inducing conflicts using the cons adjacency data structure

Parameters
successpointer to store whether at least one master constraint was reassigned
Returns
scip return code

try to reassign each mastercons to one block without inducing conflicts

Definition at line 2373 of file class_seeed.cpp.

References calcHashvalue(), getMasterconss(), getNBlocks(), getNMasterconss(), getNVars(), getNVarsForBlock(), gcg::Seeedpool::getNVarsForCons(), getScore(), getVarsForBlock(), gcg::Seeedpool::getVarsForCons(), SCIPconshdlrDecompGetCurrScoretype(), and sort().

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

prints classifier information as described in

See also
cls reader
Parameters
scipscip data structure
fileoutput file
Returns
scip return code

classifier is cons classifier

classifier is var classifier

classifier is cons classifier

classifier is var classifier

Definition at line 5979 of file class_seeed.cpp.

References getNUsedClassifier().

Referenced by GCGprintDecompInformation().

SCIP_RETCODE gcg::Seeed::refineToBlocks ( )

refine seeed with focus on blocks: assigns open conss and vars if they can be found in blocks (without respect to open vars and conss

See also
assignHittingOpenconss(),
assignHittingOpenvars())
Note
seeed is might be not complete
Returns
scip return code

refine seeed with focus on blocks: assigns open conss and vars if they can be found in blocks (assignHittingOpenconss(), assignHittingOpenvars())

Definition at line 6060 of file class_seeed.cpp.

References sort().

Referenced by DEC_DECL_PROPAGATESEEED(), and detection().

SCIP_RETCODE gcg::Seeed::refineToMaster ( )

refine seeed with focus on master: do obvious (

See also
considerImplicits()) assignments and assign other conss and vars to master if possible (
assignOpenPartialHittingToMaster())
Returns
scip return code

refine seeed with focus on master: do obvious (considerImplicits()) assignments and assign other conss and vars to master if possible (assignOpenPartialHittingToMaster())

Definition at line 6075 of file class_seeed.cpp.

References considerImplicits().

Referenced by completeByConnected(), completeByConnectedConssAdjacency(), DEC_DECL_PROPAGATESEEED(), and detection().

void gcg::Seeed::setAncestorList ( std::vector< int >  newlist)

set ancestor list directly

Parameters
newlistnew list of ancestor ids

returns ancestor id of given ancestor

Definition at line 4682 of file class_seeed.cpp.

void gcg::Seeed::setConsClassifierStatistics ( int  detectorchainindex,
ConsClassifier classifier,
std::vector< int >  consclassesmaster 
)

registers statistics for a used consclassifier

Parameters
detectorchainindexindex of the detector in the detectorchain
classifierthe used consclassifier
consclassesmastervector of classindices that were assigned to master

registers statistics for a used consclassifier

Parameters
detectorchainindexindex of the detector in the detectorchain
classifierthe used consclassifier
consclassesmastervector of classindices that were assigned to master

Definition at line 6087 of file class_seeed.cpp.

Referenced by DEC_DECL_PROPAGATEFROMTOOLBOX(), and DEC_DECL_PROPAGATESEEED().

SCIP_RETCODE gcg::Seeed::setConsToBlock ( int  consToBlock,
int  block 
)

adds a constraint to a block, does not delete this cons from list of open conss

Parameters
consToBlockid of cons to add
blockid of block to add
Returns
scip return code

directly adds a constraint to a block does not delete this cons from list of open conss

Definition at line 6107 of file class_seeed.cpp.

Referenced by completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), filloutSeeedFromConstoblock(), and flushBooked().

SCIP_RETCODE gcg::Seeed::setConsToMaster ( int  consToMaster)

adds a constraint to the master constraints, does not delete this cons from list of open conss

Parameters
consToMasterid of cons to add
Returns
scip return code

directly adds a constraint to the master constraints does not delete this cons from list of open conss

Definition at line 6126 of file class_seeed.cpp.

Referenced by filloutBorderFromConstoblock(), filloutSeeedFromConstoblock(), and flushBooked().

void gcg::Seeed::setDetectorchain ( std::vector< DEC_DETECTOR * >  givenDetectorChain)

sets the detectorchain with the given vetcor of detector pointers

Parameters
detectorChainvetcor of detector pointers

sets the whole detectorchain

Definition at line 6140 of file class_seeed.cpp.

SCIP_RETCODE gcg::Seeed::setDetectorChainString ( char *  givenDetectorchainstring)

sets the detector chain short string

Parameters
detectorchainstringthe detector chain string to set
Returns
scip return code

sets the detector chain short string

Definition at line 6467 of file class_seeed.cpp.

Referenced by buildDecChainString(), gcg::Seeedpool::createSeeedFromDecomp(), and SCIPconshdlrDecompAddLegacymodeDecompositions().

void gcg::Seeed::setDetectorClockTimes ( std::vector< SCIP_Real >  newvector)

set statistical vector of the times that the detectors needed for detecting per involved detector

Parameters
newvectorvector of the times that the detectors needed for detecting per involved detector

returns the time that the detectors needed for detecting

Definition at line 4821 of file class_seeed.cpp.

SCIP_RETCODE gcg::Seeed::setDetectorPropagated ( DEC_DETECTOR detectorID)

sets seeed to be propagated by a detector

Parameters
detectorpointer to detector that is registered for this seeed
Returns
scip return code

sets seeed to be propagated by a detector

Definition at line 6148 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp(), DEC_DECL_PROPAGATEFROMTOOLBOX(), DEC_DECL_PROPAGATESEEED(), gcg::Seeedpool::findSeeeds(), fromToolbox(), and SCIPconshdlrDecompAddLegacymodeDecompositions().

void gcg::Seeed::setFinishedByFinisher ( bool  finished)

sets whether this seeed was finished by a finishing detector

Parameters
finishedis this seeds finished by a finishing detector

sets whether this seeed was finished by a detector

Definition at line 6173 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::findSeeeds(), and gcg::Seeedpool::finishIncompleteSeeeds().

void gcg::Seeed::setFinishedByFinisherUnpresolved ( bool  finishedByFinisherUnpresolved)

sets whether this seeed is finished by a finisher in the unpresolved problem

Parameters
finishedByFinisherUnpresolvedis this seeed finished by a finisher in the unpresolved problem

sets whether this seeed is finished by a finisher in the unpresolved problem

Definition at line 6182 of file class_seeed.cpp.

void gcg::Seeed::setFinishedUnpresolvedBy ( DEC_DETECTOR detector)

sets the detector that finished the seeed in the unpresolved problem

Parameters
detectorpointe of detector that has finished this seeed in unpresolved problem

sets the detector that finished the seeed in the unpresolved problem

Definition at line 6190 of file class_seeed.cpp.

SCIP_RETCODE gcg::Seeed::setFinishingDetectorPropagated ( DEC_DETECTOR detectorID)

sets seeed to be finished by a detector

Parameters
detectorpointer to detector that has finished this seeeds
Returns
scip return code

sets seeed to be propagated by a finishing detector

Definition at line 6160 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::findSeeeds(), and fromToolbox().

SCIP_RETCODE gcg::Seeed::setID ( int  newid)

sets the id of the seeed

Parameters
idid to be set
Returns
scip return code

sets the id of this seeed

Definition at line 6232 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::findSeeeds(), and gcg::Seeedpool::finishIncompleteSeeeds().

void gcg::Seeed::setIsFromUnpresolved ( bool  unpresolved)

sets whether this seeed is from the unpresolved problem

Parameters
unpresolvedis the seeed from unpresolved problem

sets whether this seeed is from the unpresolved problem

Definition at line 6242 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::createSeeedFromDecomp(), SCIPconshdlrDecompCreateUserSeeed(), SCIPconshdlrDecompPopulateSelected(), and SCIPconshdlrDecompUpdateSeeedlist().

void gcg::Seeed::setLegacymode ( bool  legacymode)

sets whether this seeed stems from a detector operating in legacymode

Parameters
legacymodetrue iff this seeed stems from legacy mode detection

sets whether this seeed stems from a detector operating in legacymode

Definition at line 6198 of file class_seeed.cpp.

Referenced by SCIPconshdlrDecompAddLegacymodeDecompositions().

SCIP_RETCODE gcg::Seeed::setNBlocks ( int  newNBlocks)

sets number of blocks, only increasing number allowed

Parameters
nBlocksnew number of blocks
Returns
scip return code

sets number of blocks, only increasing number allowed

increase number of blocks in conssForBlocks and varsForBlocks

Definition at line 6206 of file class_seeed.cpp.

Referenced by assignSmallestComponentsButOneConssAdjacency(), bookAsBlockCons(), completeByConnected(), completeByConnectedConssAdjacency(), gcg::Seeedpool::createSeeedFromDecomp(), GCGprintMiplibConnectedInformation(), initOnlyBinMaster(), SCIPconshdlrDecompUserSeeedSetnumberOfBlocks(), and writeAsDec().

void gcg::Seeed::setNNewBlocksVector ( std::vector< int >  newvector)

set statistical vector of numbers of newly assigned blocks per involved detector

Parameters
newvectorvector of numbers of newly assigned blocks per involved detector

returns number of blocks the detectors in the detectorchain added

Definition at line 5360 of file class_seeed.cpp.

void gcg::Seeed::setPctConssFromFreeVector ( std::vector< SCIP_Real >  newvector)

set statistical vector of fractions of constraints that are not longer open per involved detector

Parameters
newvectorvector of fractions of constraints that are not longer open per involved detector

returns fraction of constraints that are not longer open for detectors in detectorchain

Definition at line 5625 of file class_seeed.cpp.

void gcg::Seeed::setPctConssToBlockVector ( std::vector< SCIP_Real >  newvector)

set statistical vector of fractions of constraints set to blocks per involved detector

Parameters
newvectorvector of fractions of constraints set to blocks per involved detector

returns fraction of constraints assigned to a block for detectors in detectorchain

Definition at line 5578 of file class_seeed.cpp.

void gcg::Seeed::setPctConssToBorderVector ( std::vector< SCIP_Real >  newvector)

set statistical vector of fractions of constraints assigned to the border per involved detector

Parameters
newvectorvector of fractions of constraints assigned to the border per involved detector

returns fraction of constraints assigned to the border for detectors in detectorchain

Definition at line 5553 of file class_seeed.cpp.

void gcg::Seeed::setPctVarsFromFreeVector ( std::vector< SCIP_Real >  newvector)

set statistical vector of variables that are not longer open per involved detector

Parameters
newvectorvector of fractions of variables that are not longer open per involved detector

returns fraction of variables that are not longer open for detectors in detectorchain

Definition at line 5528 of file class_seeed.cpp.

void gcg::Seeed::setPctVarsToBlockVector ( std::vector< SCIP_Real >  newvector)

set statistical vector of fractions of variables assigned to a block per involved detector

Parameters
newvectorvector of fractions of variables assigned to a block per involved detector

returns fraction of variables assigned to a block for detectors in detectorchain

Definition at line 5502 of file class_seeed.cpp.

void gcg::Seeed::setPctVarsToBorderVector ( std::vector< SCIP_Real >  newvector)

set statistical vector of fraction sof variables assigned to the border per involved detector

Parameters
newvectorvector of fractions of variables assigned to the border per involved detector

returns fraction of variables assigned to the border for detectors in detectorchain

Definition at line 5475 of file class_seeed.cpp.

void gcg::Seeed::setSeeedpool ( Seeedpool givenseeedpool)

set the corresponding seeedpool of this seeeds

Parameters
seeedpoolpointer seeedpool to be set

set the corresponding seeedpool

Definition at line 6259 of file class_seeed.cpp.

Referenced by gcg::Seeedpool::findSeeeds(), gcg::Seeedpool::prepareSeeed(), SCIPconshdlrDecompToolboxActOnSeeed(), and SCIPconshdlrDecompUserSeeedFlush().

void gcg::Seeed::setSelected ( bool  selected)

set if selection status of this seeeds

Parameters
selectedsetswhether this seeed is selected

set selection information about this seeed

Definition at line 6250 of file class_seeed.cpp.

Referenced by SCIPconshdlrDecompExploreSelect().

void gcg::Seeed::setStemsFromUnpresolved ( bool  stemsfromunpresolved)

sets whether this seeed stems from an unpresolved problem seeed

Parameters
stemsfromunpresolvedhas this seeed ancestors from the unpresolved probelm

sets whether this seeed stems from an unpresolved problem seeed

Definition at line 6267 of file class_seeed.cpp.

void gcg::Seeed::setUsergiven ( USERGIVEN  givenusergiven)

sets whether this seeed is usergiven

Parameters
usergivenis this seeed user given

sets whether this seeed is usergiven

Definition at line 6275 of file class_seeed.cpp.

Referenced by SCIPconshdlrDecompUserSeeedSetConsDefaultMaster().

void gcg::Seeed::setVarClassifierStatistics ( int  detectorchainindex,
VarClassifier classifier,
std::vector< int >  varclasseslinking,
std::vector< int >  varclassesmaster 
)

registers statistics for a used varclassifier

Parameters
detectorchainindexindex of the detector in the detectorchain
classifierthe used varclassifier
varclasseslinkingvector of classindices that were assigned to linking
varclassesmastervector of classindices that were assigned to masterregisters statistics for a used varclassifier

registers statistics for a used varclassifier

Parameters
detectorchainindexindex of the detector in the detectorchain
classifierthe used varclassifier
varclasseslinkingvector of classindices that were assigned to linking
varclassesmastervector of classindices that were assigned to master

Definition at line 6283 of file class_seeed.cpp.

Referenced by DEC_DECL_PROPAGATEFROMTOOLBOX(), and DEC_DECL_PROPAGATESEEED().

SCIP_RETCODE gcg::Seeed::setVarToBlock ( int  varToBlock,
int  block 
)

adds a variable to the linking variables, does not delete this var from list of open vars

Parameters
varToBlockid of var to be added
blockid of block to be added
Returns
scip return code

directly adds a variable to the linking variables does not delete this var from list of open vars

Definition at line 6307 of file class_seeed.cpp.

Referenced by completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), filloutSeeedFromConstoblock(), and flushBooked().

SCIP_RETCODE gcg::Seeed::setVarToLinking ( int  varToLinking)

adds a variable to the linking variables, does not delete this var from list of open vars

Parameters
varToLinkingif of var to be set to linking
Returns
scip return code

directly adds a variable to the linking variables does not delete this var from list of open vars

Definition at line 6326 of file class_seeed.cpp.

Referenced by gcg::HyperrowcolGraph< T >::createSeeedFromPartition(), filloutSeeedFromConstoblock(), and flushBooked().

SCIP_RETCODE gcg::Seeed::setVarToMaster ( int  varToMaster)

directly adds a variable to the master variables (hitting only constraints in the master) does not delete this var from list of open vars

Definition at line 6340 of file class_seeed.cpp.

Referenced by completeByConnected(), completeByConnectedConssAdjacency(), filloutSeeedFromConstoblock(), and flushBooked().

SCIP_RETCODE gcg::Seeed::setVarToStairlinking ( int  varToStairlinking,
int  block1,
int  block2 
)

adds a variable to the stairlinking variabl, does not delete this var from list of open vars

Parameters
varToStairLinkingid of variable to be added
block1id of block one
block2id of block two
Note
stairlinking variables are only registered in block with smalller index
Returns
scip return code

directly adds a variable to the stairlinking variables does not delete this var from list of open vars

Definition at line 6355 of file class_seeed.cpp.

Referenced by filloutSeeedFromConstoblock(), findVarsLinkingToStairlinking(), and flushBooked().

SCIP_Bool gcg::Seeed::shouldCompletedByConsToMaster ( )

returns true if this seeed is a userseeed that should be completed by setting unspecified constraints to master

Returns
TRUE iff this seeed is a userseeed that should be completed by setting unspecified constraints to master

returns true if this seeed is a userseeed that should be completed by setting unspecified constraints to master

Definition at line 6419 of file class_seeed.cpp.

References gcg::COMPLETED_CONSTOMASTER.

Referenced by SCIPconshdlrDecompUserSeeedFlush().

void gcg::Seeed::showVisualisation ( )

generates and opens a gp visualization of the seeed

See also
visual/pdfreader and

generates and opens a gp visualization of the seeed

Definition at line 6379 of file class_seeed.cpp.

References MiscVisualization::GCGgetVisualizationFilename(), GCGVisuGetPdfReader(), GCGwriteGpVisualization(), getID(), and gcg::Seeedpool::getScip().

Referenced by gcg::Seeedpool::findSeeeds(), and gcg::Seeedpool::finishIncompleteSeeeds().

bool gcg::Seeed::varClassifierUsed ( int  detectorchainindex)

returns true if the given detector used a varclassifier

Parameters
detectorchainindexindex of the detector in the detectorchain
Returns
true if the given detector used a varclassifier

returns true if the given detector used a varclassifier

Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 4828 of file class_seeed.cpp.

Referenced by getDetectorClassifierInfo(), and getVarClassifierData().

SCIP_RETCODE gcg::Seeed::writeAsDec ( FILE *  file,
Seeedpool seeedpooltowriteto,
SCIP_RESULT *  result 
)

write this seeed to file in dec format for the corresponding seeedpool

Parameters
filepointer to file to write to
seeedpooltowritetoif this is not the seeedpool of the seeed, the seeed is tried to be transformed
resultwill be set to SCIP_SUCCESS if writeing (including possible transformation) was successful
Returns
scip return code

translation is neeeded

translate seeed

unforunately there is no appropiate result type

: statistical stuff

Definition at line 6584 of file class_seeed.cpp.

References bookAsBlockCons(), bookAsBlockVar(), bookAsLinkingVar(), bookAsMasterCons(), bookAsMasterVar(), bookAsStairlinkingVar(), commentchars, considerImplicits(), DECdetectorGetName(), deleteEmptyBlocks(), gcg::findTranslationForDec(), flushBooked(), gcg::Seeedpool::getConsForIndex(), getConssForBlock(), getDetectorchain(), getLinkingvars(), getMasterconss(), getMastervars(), getNBlocks(), gcg::Seeedpool::getNConss(), getNConssForBlock(), getNDetectorchainInfo(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNStairlinkingvars(), gcg::Seeedpool::getNVars(), getNVarsForBlock(), gcg::Seeedpool::getScip(), getSeeedpool(), getStairlinkingvars(), gcg::Seeedpool::getVarForIndex(), getVarsForBlock(), isComplete(), isFromUnpresolved(), Seeed(), and setNBlocks().

Referenced by SCIPconshdlrDecompWriteDec().