Scippy

GCG

Branch-and-Price & Column Generation for Everyone

gcg::PARTIALDECOMP Class Reference

Detailed Description

class to manage partial decompositions

each partialdec corresponds to one detprobdata which contains the problem information, there is one detprobdata for the original and the transformed problem.

Definition at line 78 of file class_partialdecomp.h.

class to manage partial decompositions More...

#include <class_partialdecomp.h>

Public Member Functions

 PARTIALDECOMP (SCIP *scip, bool originalProblem)
 Standard constructor, creates empty partialdec with unique id. More...
 
 PARTIALDECOMP (const PARTIALDECOMP *partialdecToCopy)
 copy constructor More...
 
 ~PARTIALDECOMP ()
 
int addBlock ()
 adds a block More...
 
void addClockTime (SCIP_Real clocktime)
 adds detection time of one detector More...
 
void addDecChangesFromAncestor (PARTIALDECOMP *ancestor)
 adds the statistical differences to an ancestor More...
 
void addDetectorChainInfo (const char *decinfo)
 add information about the detector chain More...
 
void addNNewBlocks (int nnewblocks)
 adds how many new blocks were introduced More...
 
void addPctConssFromFree (SCIP_Real pct)
 adds percentage of closed constraints More...
 
void addPctConssToBlock (SCIP_Real pct)
 adds percentage of constraints assigned to blocks More...
 
void addPctConssToBorder (SCIP_Real pct)
 adds percentage of constraints assigned to border More...
 
void addPctVarsFromFree (SCIP_Real pct)
 adds percentage of closed variables More...
 
void addPctVarsToBlock (SCIP_Real pct)
 adds percentage of variables assigned to blocks More...
 
void addPctVarsToBorder (SCIP_Real pct)
 adds percentage of variables assigned to border More...
 
bool alreadyAssignedConssToBlocks ()
 method to check if at least one constraint is assigned to some block More...
 
SCIP_RETCODE assignBorderFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 assigns open conss to master More...
 
bool assignCurrentStairlinking ()
 assigns open vars to stairlinking if appropriate More...
 
void assignOpenConssToMaster ()
 assigns open conss to master More...
 
SCIP_RETCODE assignPartialdecFromConstoblock (SCIP_HASHMAP *constoblock, int additionalNBlocks)
 assigns conss structure according to given hashmap More...
 
SCIP_RETCODE assignPartialdecFromConstoblockVector (std::vector< int > constoblock, int additionalNBlocks)
 assigns conss structure according to given vector More...
 
void assignSmallestComponentsButOneConssAdjacency ()
 computes components by connectedness of conss and vars More...
 
void calcStairlinkingVars ()
 reassigns linking vars to stairlinkingvars if possible More...
 
bool checkAllConssAssigned ()
 checks if all conss are assigned More...
 
bool checkConsistency ()
 Checks whether the assignments in the partialdec are consistent. More...
 
void complete ()
 assigns all open constraints and open variables trivially More...
 
void completeByConnected ()
 assigns all open constraints and open variables More...
 
void completeByConnectedConssAdjacency ()
 assigns all open constraints and open variables More...
 
void completeGreedily ()
 assigns all open constraints and open variables More...
 
void removeMastercons (int consid)
 removes the given cons from master More...
 
void considerImplicits ()
 : assigns every open cons/var More...
 
void copyPartitionStatistics (const PARTIALDECOMP *otherpartialdec)
 copies the given partialdec's partition statistics More...
 
void deleteEmptyBlocks (bool variables)
 deletes empty blocks and sets nblocks accordingly More...
 
void deleteOpencons (int opencons)
 deletes a cons from list of open conss More...
 
std::vector< int >::const_iterator deleteOpencons (std::vector< int >::const_iterator itr)
 deletes a cons from list of open conss More...
 
void deleteOpenvar (int openvar)
 deletes a var from the list of open vars More...
 
std::vector< int >::const_iterator deleteOpenvar (std::vector< int >::const_iterator itr)
 deletes a var from the list of open vars More...
 
void displayInfo (int detailLevel)
 displays the relevant information of the partialdec More...
 
SCIP_RETCODE filloutBorderFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 every constraint is either assigned to master or open More...
 
SCIP_RETCODE filloutPartialdecFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 assigns all conss to master or a block More...
 
void findVarsLinkingToMaster ()
 reassigns linking variables to master if appropriate More...
 
void findVarsLinkingToStairlinking ()
 reassigns variables classified as linking to stairlinking if appropriate More...
 
int getAncestorID (int ancestorindex)
 gets partialdec id of given ancestor id More...
 
std::vector< int > & getAncestorList ()
 get ancestor ids as vector More...
 
void setAncestorList (std::vector< int > &newlist)
 
void removeAncestorID (int ancestorid)
 
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...
 
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 partialdec More...
 
std::vector< int > & getConssForBlock (int block)
 returns array containing constraints assigned to a block More...
 
std::vector< DEC_DETECTOR * > & getDetectorchain ()
 returns detector chain as vector of detector pointers More...
 
bool getFinishedByFinisher ()
 returns true iff this partialdec was finished by finishPartialdec() method of a detector More...
 
unsigned long getHashValue ()
 returns the calculated hash value of this partialdec More...
 
int getID ()
 returns the unique id of the partialdec More...
 
std::vector< int > & getLinkingvars ()
 returns array containing all linking vars indices More...
 
std::vector< int > & getMasterconss ()
 Gets array containing all master conss indices. More...
 
std::vector< int > & getMastervars ()
 Gets array containing all master vars indices. More...
 
int getNCoeffsForBlock (int blockid)
 Gets the number of nonzero coeffs in a certain block. More...
 
int getNCoeffsForMaster ()
 
SCIP_Real getScore (SCORETYPE type)
 returns the score of the partialdec (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 ()
 Gets the USERGIVEN status of this partialdecs. More...
 
int getNAncestors ()
 Gets number of ancestor partialdecs. More...
 
int getNBlocks ()
 Gets the number of blocks. More...
 
int getNConss ()
 Gets the number of constraints. More...
 
int getNConssForBlock (int block)
 Gets size of the vector containing conss assigned to a block. More...
 
std::vector< std::string > & getDetectorchainInfo ()
 Gets the detectorchain info vector. More...
 
int getNDetectors ()
 Gets the number of detectors the partialdec is propagated by. More...
 
int getNLinkingvars ()
 Gets size of the vector containing linking vars. More...
 
int getNMasterconss ()
 Gets size of the vector containing master conss. More...
 
int getNMastervars ()
 Gets size of the vector containing master vars. More...
 
int getNNewBlocks (int detectorchainindex)
 Gets number of blocks a detector added. More...
 
std::vector< int > getNNewBlocksVector ()
 gets number of blocks the detectors in the detectorchain added More...
 
int getNTotalStairlinkingvars ()
 Gets total number of stairlinking vars. More...
 
int getNOpenconss ()
 Gets size of vector containing constraints not assigned yet. More...
 
int getNOpenvars ()
 Gets size of vector containing variables not assigned yet. More...
 
int getNReps ()
 Gets the number of blockrepresentatives. More...
 
int getNStairlinkingvars (int block)
 Gets size of the vector containing stairlinking vars. More...
 
int getNVars ()
 Gets number of vars. More...
 
int getNVarsForBlock (int block)
 Gets size of the vector containing vars assigned to a block. More...
 
int getNVarsForBlocks ()
 Gets overall number of vars assigned to a block. More...
 
const int * getOpenconss ()
 Gets array containing constraints not assigned yet. More...
 
std::vector< int > & getOpenconssVec ()
 Gets a vector containing constraint ids not assigned yet as vector. More...
 
const int * getOpenvars ()
 Gets array containing variables not assigned yet. More...
 
std::vector< int > & getOpenvarsVec ()
 
SCIP_Real getPctVarsToBorder (int detectorchainindex)
 Gets fraction of variables assigned to the border for a detector. More...
 
std::vector< SCIP_Real > & getPctVarsToBorderVector ()
 Gets fraction of variables assigned to the border for detectors in detectorchain. More...
 
SCIP_Real getPctVarsToBlock (int detectorchainindex)
 Gets 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)
 Gets fraction of variables that are not longer open for a detector. More...
 
std::vector< SCIP_Real > & getPctVarsFromFreeVector ()
 Gets fraction of variables that are not longer open for detectors in detectorchain. More...
 
SCIP_Real getPctConssToBorder (int detectorchainindex)
 Gets fraction of constraints assigned to the border for a detector. More...
 
std::vector< SCIP_Real > & getPctConssToBorderVector ()
 Gets fraction of constraints assigned to the border for detectors in detectorchain. More...
 
SCIP_Real getPctConssToBlock (int detectorchainindex)
 Gets fraction of constraints assigned to a block for a detector. More...
 
std::vector< SCIP_Real > & getPctConssToBlockVector ()
 Gets fraction of constraints assigned to a block for detectors in detectorchain. More...
 
SCIP_Real getPctConssFromFree (int detectorchainindex)
 Gets fraction of constraints that are not longer open for a detector. More...
 
std::vector< SCIP_Real > & getPctConssFromFreeVector ()
 Gets fraction of constraints that are not longer open for detectors in detectorchain. More...
 
int getRepForBlock (int blockid)
 Gets index of the representative block for a block, this might be blockid itself. More...
 
std::vector< int > & getRepVarmap (int repid, int blockrepid)
 Gets the represenation varmap. More...
 
DETPROBDATAgetDetprobdata ()
 Gets the corresponding detprobdata. More...
 
const int * getStairlinkingvars (int block)
 Gets array containing stairlinking vars,. More...
 
std::vector< int > & getVarsForBlock (int block)
 Gets array containing vars of a block. More...
 
int getVarProbindexForBlock (int varid, int block)
 Gets index in variables array of a block for a variable. More...
 
bool isComplete ()
 Gets whether this partialdec is complete, i.e. it has no more open constraints and variables. More...
 
bool isConsMastercons (int cons)
 Gets whether the cons is a master cons. More...
 
bool isConsOpencons (int cons)
 Gets whether the cons is an open cons. More...
 
bool isAssignedToOrigProb ()
 Gets whether the partialdec is from the presolved problem. More...
 
bool isSelected ()
 
SCIP_RETCODE isEqual (PARTIALDECOMP *otherpartialdec, SCIP_Bool *isequal, bool sortpartialdecs)
 method to check whether this partialdec is equal to a given other partialdec ( More...
 
bool isEqual (PARTIALDECOMP *other)
 method to check whether this partialdec is equal to a given other partialdec More...
 
bool isPropagatedBy (DEC_DETECTOR *detector)
 Gets whether this partialdec was propagated by specified detector. More...
 
bool isTrivial ()
 Gets whether this partialdec is considered to be trivial. More...
 
bool isVarBlockvarOfBlock (int var, int block)
 Checks whether the var is assigned to the block. More...
 
bool isVarLinkingvar (int var)
 Checks whether the var is a linking var. More...
 
bool isVarMastervar (int var)
 Checks whether the var is a master var. More...
 
bool isVarOpenvar (int var)
 Checks whether the var is an open var. More...
 
bool isVarStairlinkingvar (int var)
 Checks whether the var is a stairlinking var. More...
 
bool isVarStairlinkingvarOfBlock (int var, int block)
 Checks whether the var is a stairlinkingvar of a specified block. More...
 
void printPartitionInformation (SCIP *givenscip, FILE *file)
 prints partition information as described in More...
 
void refineToBlocks ()
 refine partialdec with focus on blocks More...
 
void refineToMaster ()
 refine partialdec with focus on master More...
 
void setConsPartitionStatistics (int detectorchainindex, ConsPartition *partition, std::vector< int > &consclassesmaster)
 registers statistics for a used conspartition More...
 
void setConsToBlock (int consToBlock, int block)
 adds a constraint to a block, does not delete this cons from list of open conss More...
 
void fixConsToBlock (int cons, int block)
 adds a constraint to a block More...
 
bool fixConsToBlock (SCIP_CONS *cons, int block)
 adds a constraint to a block More...
 
void setConsToMaster (int consToMaster)
 adds a constraint to the master constraints, does not delete this cons from list of open conss More...
 
std::vector< int >::const_iterator fixConsToMaster (std::vector< int >::const_iterator itr)
 fixes a constraint to the master constraints More...
 
void fixConsToMaster (int cons)
 fixes a constraint to the master constraints More...
 
bool fixConsToMaster (SCIP_CONS *cons)
 fixes a constraint to the master constraints More...
 
void setDetectorchain (std::vector< DEC_DETECTOR * > &givenDetectorChain)
 sets the detectorchain with the given vector of detector pointers More...
 
void setDetectorPropagated (DEC_DETECTOR *detector)
 sets partialdec to be propagated by a detector More...
 
void setDetectorFinished (DEC_DETECTOR *detector)
 sets detector that finished the partialdec More...
 
void setDetectorFinishedOrig (DEC_DETECTOR *detectorID)
 sets detector that finished the partialdec in the original problem More...
 
void setFinishedByFinisher (bool finished)
 sets whether this partialdec was finished by a finishing detector More...
 
void setFinishedByFinisherOrig (bool finished)
 sets whether this partialdec was finished by a finishing detector in the original problem More...
 
void setNBlocks (int nblocks)
 sets number of blocks, only increasing number allowed More...
 
void setSelected (bool selected)
 set the selection status of this partialdecs More...
 
void setStemsFromOrig (bool fromorig)
 sets whether this partialdec stems from an orig problem partialdec More...
 
void setUsergiven (USERGIVEN usergiven)
 sets whether this partialdec is user given More...
 
void setVarPartitionStatistics (int detectorchainindex, VarPartition *partition, std::vector< int > &varclasseslinking, std::vector< int > &varclassesmaster)
 registers statistics for a used varpartition More...
 
void setVarToBlock (int varToBlock, int block)
 adds a variable to the linking variables, does not delete this var from list of open vars More...
 
void fixVarToBlock (int var, int block)
 adds a variable to the linking variables More...
 
std::vector< int >::const_iterator fixVarToBlock (std::vector< int >::const_iterator itr, int block)
 adds a variable to the linking variables More...
 
void setVarToLinking (int varToLinking)
 adds a variable to the linking variables, does not delete this var from list of open vars More...
 
void fixVarToLinking (int var)
 adds a variable to the linking variables More...
 
std::vector< int >::const_iterator fixVarToLinking (std::vector< int >::const_iterator itr)
 adds a variable to the linking variables More...
 
void setVarToMaster (int varToMaster)
 adds a variable to the master variables, does not delete this var from list of open vars More...
 
void fixVarToMaster (int var)
 adds a variable to the master variables More...
 
std::vector< int >::const_iterator fixVarToMaster (std::vector< int >::const_iterator itr)
 adds a variable to the master variables More...
 
void setVarToStairlinking (int varToStairLinking, int block1, int block2)
 adds a variable to the stairlinking variables, does not delete this var from list of open vars More...
 
void fixVarToStairlinking (int var, int firstblock)
 adds a variable to the stairlinking variables More...
 
std::vector< int >::const_iterator fixVarToStairlinking (std::vector< int >::const_iterator itr, int firstblock)
 adds a variable to the stairlinking variables More...
 
bool fixConsToBlockByName (const char *consname, int blockid)
 assigns a constraint by name to a block More...
 
bool fixVarToBlockByName (const char *varname, int blockid)
 assigns a variable by name to a block More...
 
bool fixConsToMasterByName (const char *consname)
 assgins a constraint by name as master More...
 
bool fixVarToMasterByName (const char *varname)
 assigns a variable with given name as master More...
 
bool fixVarToLinkingByName (const char *varname)
 assigns a variable by name to the linking variables More...
 
void showVisualization ()
 generates and opens a gp visualization of the partialdec More...
 
void generateVisualization (char *filename, char *outname, GP_OUTPUT_FORMAT outputformat=GP_OUTPUT_FORMAT_PDF)
 generates a visualization of the partialdec using gnuplot More...
 
void writeVisualizationFile (char *filename, char *outname, GP_OUTPUT_FORMAT outputformat=GP_OUTPUT_FORMAT_PDF)
 writes a gp visualization of the partialdec to a file More...
 
void exportVisualization ()
 generates a gp visualization of the partialdec without compilation or opening More...
 
SCIP_Bool shouldCompletedByConsToMaster ()
 Checks whether this partialdec is a userpartialdec that should be completed. More...
 
bool sort ()
 sorts the vars and conss data structures by their indices 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 of 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...
 
SCIP_Real getClassicScore ()
 gets the classic score More...
 
void setClassicScore (SCIP_Real score)
 set the classic score More...
 
SCIP_Real getBorderAreaScore ()
 gets the border area score More...
 
void setBorderAreaScore (SCIP_Real score)
 set the border area score More...
 
SCIP_Real getMaxWhiteScore ()
 gets the maximum white area score More...
 
void setMaxWhiteScore (SCIP_Real score)
 set the maximum white area score More...
 
SCIP_Real getMaxForWhiteScore ()
 gets the maximum foreseeing white area score More...
 
void setMaxForWhiteScore (SCIP_Real score)
 set the maximum foreseeing white area score More...
 
SCIP_Real getSetPartForWhiteScore ()
 gets the setpartitioning maximum foreseeing white area score More...
 
void setSetPartForWhiteScore (SCIP_Real score)
 set the setpartitioning maximum foreseeing white area score More...
 
SCIP_Real getMaxForWhiteAggScore ()
 gets the maximum foreseeing white area score with respect to aggregatable blocks More...
 
void setMaxForWhiteAggScore (SCIP_Real score)
 set the maximum foreseeing white area score with respect to aggregatable blocks More...
 
SCIP_Real getSetPartForWhiteAggScore ()
 gets the setpartitioning maximum foreseeing white area score with respect to aggregateable More...
 
void setSetPartForWhiteAggScore (SCIP_Real score)
 set the setpartitioning maximum foreseeing white area score with respect to aggregateable More...
 
SCIP_Real getBendersScore ()
 gets the benders score More...
 
void setBendersScore (SCIP_Real score)
 set the benders score More...
 
SCIP_Real getStrongDecompScore ()
 gets the strong decomposition score More...
 
void setStrongDecompScore (SCIP_Real score)
 set the strong decomposition score More...
 
void prepare ()
 
bool aggInfoCalculated ()
 Checks if the aggregation information was already calculated. More...
 
void calcAggregationInformation (bool ignoreDetectionLimits)
 computes if aggregation of sub problems is possible More...
 
std::vector< std::vector< int > > & getConssForBlocks ()
 
int getTranslatedpartialdecid () const
 
void setTranslatedpartialdecid (int decid)
 
void buildDecChainString (char *buffer)
 creates a detector chain short string for this partialdec, is built from detector chain More...
 

Constructor & Destructor Documentation

◆ PARTIALDECOMP() [1/2]

gcg::PARTIALDECOMP::PARTIALDECOMP ( SCIP *  scip,
bool  originalProblem 
)

Standard constructor, creates empty partialdec with unique id.

Note
initially, all conss and vars are open
Parameters
scipscip data structure
originalProblemtrue iff partialdec is for presolved problem (else for original problem)

Definition at line 90 of file class_partialdecomp.cpp.

References GCGconshdlrDecompGetNextPartialdecID(), GCGconshdlrDecompRegisterPartialdec(), getDetprobdata(), gcg::DETPROBDATA::getNConss(), and gcg::DETPROBDATA::getNVars().

◆ PARTIALDECOMP() [2/2]

gcg::PARTIALDECOMP::PARTIALDECOMP ( const PARTIALDECOMP partialdecToCopy)

copy constructor

Parameters
partialdecToCopypartialdec to be copied

Definition at line 136 of file class_partialdecomp.cpp.

References GCGconshdlrDecompGetNextPartialdecID(), GCGconshdlrDecompRegisterPartialdec(), and getTranslatedpartialdecid().

◆ ~PARTIALDECOMP()

gcg::PARTIALDECOMP::~PARTIALDECOMP ( )

Standard destructor

Definition at line 220 of file class_partialdecomp.cpp.

References GCGconshdlrDecompDeregisterPartialdec().

Member Function Documentation

◆ addBlock()

int gcg::PARTIALDECOMP::addBlock ( )

adds a block

Returns
the number (id) of the new block

Definition at line 270 of file class_partialdecomp.cpp.

Referenced by assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), and completeGreedily().

◆ addClockTime()

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

adds detection time of one detector

incorporates the needed time of some detector in the detector chain

Parameters
clocktimetime to be added

Definition at line 286 of file class_partialdecomp.cpp.

Referenced by blocking(), createPartialdecFromDecomp(), DEC_DECL_PROPAGATEPARTIALDEC(), detection(), and detectIsomorph().

◆ addDecChangesFromAncestor()

void gcg::PARTIALDECOMP::addDecChangesFromAncestor ( PARTIALDECOMP ancestor)

adds the statistical differences to an ancestor

incorporates the changes from ancestor partialdec into the statistical data structures

Parameters
ancestorpartialdec whose propagation yielded to the current partialdec

Definition at line 294 of file class_partialdecomp.cpp.

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

Referenced by detect().

◆ addDetectorChainInfo()

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

add information about the detector chain

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

Definition at line 315 of file class_partialdecomp.cpp.

Referenced by blocking(), DEC_DECL_FINISHPARTIALDEC(), DEC_DECL_POSTPROCESSPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), and detection().

◆ addNNewBlocks()

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

adds how many new blocks were introduced

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

Definition at line 334 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctConssFromFree()

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

adds percentage of closed constraints

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

Definition at line 342 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctConssToBlock()

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

adds percentage of constraints assigned to blocks

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

Definition at line 350 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctConssToBorder()

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

adds percentage of constraints assigned to border

bookkeeping information: 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 358 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctVarsFromFree()

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

adds percentage of closed variables

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

Definition at line 366 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctVarsToBlock()

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

adds percentage of variables assigned to blocks

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

Definition at line 374 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctVarsToBorder()

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

adds percentage of variables assigned to border

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

Parameters
pctfraction of variables assigned to the border

Definition at line 382 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ alreadyAssignedConssToBlocks()

bool gcg::PARTIALDECOMP::alreadyAssignedConssToBlocks ( )

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

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

Definition at line 390 of file class_partialdecomp.cpp.

Referenced by DEC_DECL_PROPAGATEPARTIALDEC(), filloutBorderFromConstoblock(), and filloutPartialdecFromConstoblock().

◆ assignBorderFromConstoblock()

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

assigns open conss to master

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

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

Definition at line 399 of file class_partialdecomp.cpp.

References checkConsistency(), deleteOpencons(), getNOpenconss(), setConsToMaster(), and sort().

◆ assignCurrentStairlinking()

bool gcg::PARTIALDECOMP::assignCurrentStairlinking ( )

assigns open vars to stairlinking if appropriate

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

Returns
true iff at least one stairlinkingvar was assigned

Definition at line 429 of file class_partialdecomp.cpp.

References deleteOpenvar(), getDetprobdata(), getNConssForBlock(), getNOpenvars(), gcg::DETPROBDATA::getVal(), setVarToStairlinking(), and sort().

Referenced by blocking(), and detection().

◆ assignOpenConssToMaster()

void gcg::PARTIALDECOMP::assignOpenConssToMaster ( )

assigns open conss to master

Definition at line 680 of file class_partialdecomp.cpp.

References setConsToMaster().

Referenced by GCGconshdlrDecompAddBasicPartialdec().

◆ assignPartialdecFromConstoblock()

SCIP_RETCODE gcg::PARTIALDECOMP::assignPartialdecFromConstoblock ( SCIP_HASHMAP *  constoblock,
int  additionalNBlocks 
)

assigns conss structure according to given hashmap

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

Returns
scip return code
See also
assignPartialdecFromConstoblockVector()
Note
master assignment is indicated by assigning cons to index additionalNBlocks
Parameters
constoblockhashmap assigning cons indices (not SCIP_Cons*) to block indices
additionalNBlocksnumber of (additional) blocks the hashmap contains

Definition at line 835 of file class_partialdecomp.cpp.

References addBlock(), checkConsistency(), deleteEmptyBlocks(), deleteOpencons(), getNOpenconss(), setConsToBlock(), setConsToMaster(), and sort().

Referenced by blocking(), and detection().

◆ assignPartialdecFromConstoblockVector()

SCIP_RETCODE gcg::PARTIALDECOMP::assignPartialdecFromConstoblockVector ( std::vector< int >  constoblock,
int  additionalNBlocks 
)

assigns conss structure according to given vector

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

Returns
scip return code
See also
assignPartialdecFromConstoblock()
Note
master is indicated by assigning cons to index additionalNBlocks
Parameters
constoblockvector containing an assignment of conss to a block or to master
additionalNBlocksnumber of (additional) blocks the vector contains

Definition at line 881 of file class_partialdecomp.cpp.

References addBlock(), checkConsistency(), deleteEmptyBlocks(), deleteOpencons(), getNOpenconss(), setConsToBlock(), setConsToMaster(), and sort().

◆ assignSmallestComponentsButOneConssAdjacency()

void gcg::PARTIALDECOMP::assignSmallestComponentsButOneConssAdjacency ( )

computes components by connectedness of conss and vars

computes components corresponding to connectedness of conss and vars and assigns them accordingly (all but one of largest components)

strategy: assigns all conss same block if they are connected two constraints are adjacent if there is a common variable

Note
this relies on the consadjacency structure of the detprobdata hence it cannot be applied in presence of linking variables

Definition at line 928 of file class_partialdecomp.cpp.

References checkConsistency(), complete(), gcg::DETPROBDATA::createConssAdjacency(), fixConsToBlock(), fixVarToBlock(), gcg::DETPROBDATA::getConssForCons(), getDetprobdata(), getNBlocks(), getNLinkingvars(), getOpenconssVec(), gcg::DETPROBDATA::getVarsForCons(), isConsMastercons(), isConsOpencons(), gcg::DETPROBDATA::isConssAdjInitialized(), isVarLinkingvar(), isVarMastervar(), prepare(), and setNBlocks().

Referenced by DEC_DECL_FINISHPARTIALDEC(), and DEC_DECL_PROPAGATEPARTIALDEC().

◆ calcStairlinkingVars()

void gcg::PARTIALDECOMP::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

Note
precondition: partialdec does not have any stairlinking vars

Definition at line 1322 of file class_partialdecomp.cpp.

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

Referenced by createPartialdecFromDecomp().

◆ checkAllConssAssigned()

bool gcg::PARTIALDECOMP::checkAllConssAssigned ( )

checks if all conss are assigned

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

Returns
true iff all constraints are assigned

Definition at line 1511 of file class_partialdecomp.cpp.

Referenced by completeGreedily().

◆ checkConsistency()

bool gcg::PARTIALDECOMP::checkConsistency ( )

Checks whether the assignments in the partialdec are consistent.

The following checks are performed:

  • check if nblocks is set appropriately
  • check for empty (row- and col-wise) blocks
  • every variable is assigned at most once
  • check if all not assigned variables are open vars
  • check if all open vars are not assigned
  • 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 data structures are sorted
  • check if variables hitting a cons are either in the cons's block or border or still open
    Returns
    true iff the partialdec seems to be consistent

Definition at line 1546 of file class_partialdecomp.cpp.

References getConssForBlock(), getDetectorchain(), getDetectorchainInfo(), getDetprobdata(), getLinkingvars(), getMasterconss(), getMastervars(), getNBlocks(), getNConssForBlock(), getNDetectors(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNStairlinkingvars(), getNVarsForBlock(), gcg::DETPROBDATA::getNVarsForCons(), getStairlinkingvars(), getVarsForBlock(), gcg::DETPROBDATA::getVarsForCons(), isConsOpencons(), isVarBlockvarOfBlock(), isVarLinkingvar(), isVarOpenvar(), and isVarStairlinkingvarOfBlock().

Referenced by gcg::DETPROBDATA::addPartialdecToFinished(), gcg::DETPROBDATA::addPartialdecToFinishedUnchecked(), gcg::DETPROBDATA::addPartialdecToOpen(), assignBorderFromConstoblock(), assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), assignSmallestComponentsButOneConssAdjacency(), calcStairlinkingVars(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), createDecompFromPartialdec(), detection(), filloutBorderFromConstoblock(), and filloutPartialdecFromConstoblock().

◆ complete()

void gcg::PARTIALDECOMP::complete ( )

assigns all open constraints and open variables trivially

strategy: assigns all open conss and vars to blocks if they can be refined there, otherwise to the master

Note
partialdecomps should usually be completed by a detector, only use this function if you know what you are doing.

Definition at line 2125 of file class_partialdecomp.cpp.

References prepare(), refineToBlocks(), setConsToMaster(), and setVarToMaster().

Referenced by assignSmallestComponentsButOneConssAdjacency().

◆ completeByConnected()

void gcg::PARTIALDECOMP::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

Definition at line 2157 of file class_partialdecomp.cpp.

References checkConsistency(), deleteOpencons(), deleteOpenvar(), gcg::DETPROBDATA::getConssForVar(), getDetprobdata(), getNBlocks(), getNOpenconss(), getNOpenvars(), gcg::DETPROBDATA::getVarsForCons(), isConsOpencons(), isVarLinkingvar(), isVarOpenvar(), prepare(), refineToMaster(), setConsToBlock(), setNBlocks(), setVarToBlock(), and setVarToMaster().

Referenced by completeByConnectedConssAdjacency(), DEC_DECL_FINISHPARTIALDEC(), and detection().

◆ completeByConnectedConssAdjacency()

void gcg::PARTIALDECOMP::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 detprobdata hence it cannot be applied in presence of linking variables

Definition at line 2273 of file class_partialdecomp.cpp.

References checkConsistency(), completeByConnected(), deleteOpencons(), deleteOpenvar(), gcg::DETPROBDATA::getConssForCons(), getDetprobdata(), getNBlocks(), getNLinkingvars(), getNOpenconss(), getNOpenvars(), gcg::DETPROBDATA::getVarsForCons(), isConsMastercons(), isConsOpencons(), isVarLinkingvar(), isVarMastervar(), isVarOpenvar(), prepare(), refineToMaster(), setConsToBlock(), setNBlocks(), setVarToBlock(), and setVarToMaster().

Referenced by DEC_DECL_FINISHPARTIALDEC().

◆ completeGreedily()

◆ removeMastercons()

void gcg::PARTIALDECOMP::removeMastercons ( int  consid)

removes the given cons from master

Parameters
considid of cons

Definition at line 2588 of file class_partialdecomp.cpp.

Referenced by DEC_DECL_POSTPROCESSPARTIALDEC().

◆ considerImplicits()

void gcg::PARTIALDECOMP::considerImplicits ( )

: assigns every open cons/var

Assignments happen as follows:

  • 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

Definition at line 2608 of file class_partialdecomp.cpp.

References deleteOpencons(), deleteOpenvar(), fixConsToMaster(), gcg::DETPROBDATA::getConssForVar(), getDetprobdata(), gcg::DETPROBDATA::getNConssForVar(), gcg::DETPROBDATA::getNVarsForCons(), gcg::DETPROBDATA::getVarsForCons(), isConsMastercons(), isConsOpencons(), isVarBlockvarOfBlock(), isVarMastervar(), isVarOpenvar(), setConsToBlock(), setConsToMaster(), setVarToBlock(), setVarToLinking(), setVarToMaster(), and sort().

Referenced by DEC_DECL_FINISHPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), detection(), prepare(), and refineToMaster().

◆ copyPartitionStatistics()

void gcg::PARTIALDECOMP::copyPartitionStatistics ( const PARTIALDECOMP otherpartialdec)

copies the given partialdec's partition statistics

Parameters
otherpartialdecpartialdec whose partition statistics are to be copied

Definition at line 2784 of file class_partialdecomp.cpp.

◆ deleteEmptyBlocks()

void gcg::PARTIALDECOMP::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

Definition at line 2794 of file class_partialdecomp.cpp.

References fixVarToBlock(), and sort().

Referenced by assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), detect(), filloutPartialdecFromConstoblock(), and prepare().

◆ deleteOpencons() [1/2]

void gcg::PARTIALDECOMP::deleteOpencons ( int  opencons)

◆ deleteOpencons() [2/2]

std::vector< int >::const_iterator gcg::PARTIALDECOMP::deleteOpencons ( std::vector< int >::const_iterator  itr)

deletes a cons from list of open conss

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openconss

Definition at line 2878 of file class_partialdecomp.cpp.

◆ deleteOpenvar() [1/2]

void gcg::PARTIALDECOMP::deleteOpenvar ( int  openvar)

deletes a var from the list of open vars

Parameters
openvarid of the var that is not considered open anymore

Definition at line 2887 of file class_partialdecomp.cpp.

Referenced by assignCurrentStairlinking(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), considerImplicits(), fixVarToBlock(), fixVarToLinking(), fixVarToMaster(), and fixVarToStairlinking().

◆ deleteOpenvar() [2/2]

std::vector< int >::const_iterator gcg::PARTIALDECOMP::deleteOpenvar ( std::vector< int >::const_iterator  itr)

deletes a var from the list of open vars

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openvars

Definition at line 2900 of file class_partialdecomp.cpp.

◆ displayInfo()

void gcg::PARTIALDECOMP::displayInfo ( int  detailLevel)

◆ filloutBorderFromConstoblock()

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

every constraint is either assigned to master or open

Assignment happens 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
Returns
scip return code
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 3274 of file class_partialdecomp.cpp.

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

◆ filloutPartialdecFromConstoblock()

SCIP_RETCODE gcg::PARTIALDECOMP::filloutPartialdecFromConstoblock ( SCIP_HASHMAP *  constoblock,
int  givenNBlocks 
)

assigns all conss to master or a block

Assignment happens according to the cons assignment information given in constoblock hashmap

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
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 3313 of file class_partialdecomp.cpp.

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

◆ findVarsLinkingToMaster()

void gcg::PARTIALDECOMP::findVarsLinkingToMaster ( )

reassigns linking variables to master if appropriate

Variables are reassigned as master if the variable only hits master conss

Definition at line 3413 of file class_partialdecomp.cpp.

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

Referenced by GCGconshdlrDecompAddPreexisitingPartialDec().

◆ findVarsLinkingToStairlinking()

void gcg::PARTIALDECOMP::findVarsLinkingToStairlinking ( )

reassigns variables classified as linking to stairlinking if appropriate

Variables are reassigned as master if the variable hits conss in exactly two consecutive blocks

Definition at line 3457 of file class_partialdecomp.cpp.

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

Referenced by calcStairlinkingVars(), and GCGconshdlrDecompAddPreexisitingPartialDec().

◆ getAncestorID()

int gcg::PARTIALDECOMP::getAncestorID ( int  ancestorindex)

gets partialdec id of given ancestor id

Returns
partialdec id of given ancestor id
Parameters
ancestorindexindex of ancestor in list of ancestor ids data structure

Definition at line 3587 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCheckConsistency().

◆ getAncestorList()

std::vector< int > & gcg::PARTIALDECOMP::getAncestorList ( )

get ancestor ids as vector

Returns
vector of ids of all ancestors id

Definition at line 3597 of file class_partialdecomp.cpp.

◆ setAncestorList()

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

set ancestor list directly

Parameters
newlistnew list of ancestor ids

Definition at line 3608 of file class_partialdecomp.cpp.

◆ removeAncestorID()

void gcg::PARTIALDECOMP::removeAncestorID ( int  ancestorid)

removes ancestor id from list

Parameters
ancestoridid to remove

Definition at line 3625 of file class_partialdecomp.cpp.

◆ addAncestorID()

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

adds ancestor id to back of list

Parameters
ancestorid of ancestor that is to be added

Definition at line 3616 of file class_partialdecomp.cpp.

◆ getBlocksForRep()

const std::vector< int > & gcg::PARTIALDECOMP::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 3602 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), and GCGconshdlrDecompCreateVarmapForPartialdecId().

◆ getDetectorClockTime()

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

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

Returns
the clock time for the corresponding detector in the chain
Parameters
detectorchainindexindex of the detector in the detectorchain

Definition at line 3646 of file class_partialdecomp.cpp.

◆ getDetectorClockTimes()

std::vector< SCIP_Real > & gcg::PARTIALDECOMP::getDetectorClockTimes ( )

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

Returns
vector of the clock times

Definition at line 3656 of file class_partialdecomp.cpp.

Referenced by createDecompFromPartialdec(), and writePartialdec().

◆ getConssForBlock()

std::vector< int > & gcg::PARTIALDECOMP::getConssForBlock ( int  block)

◆ getDetectorchain()

std::vector< DEC_DETECTOR * > & gcg::PARTIALDECOMP::getDetectorchain ( )

returns detector chain as vector of detector pointers

Returns
detector chain as array of detector pointers

Definition at line 3702 of file class_partialdecomp.cpp.

Referenced by buildDecChainString(), checkConsistency(), createDecompFromPartialdec(), detect(), GCGprintDecompInformation(), writePartialdec(), and writeTexPartialdecStatistics().

◆ getFinishedByFinisher()

bool gcg::PARTIALDECOMP::getFinishedByFinisher ( )

returns true iff this partialdec was finished by finishPartialdec() method of a detector

Returns
true iff this partialdec was finished by finishPartialdec() method of a detector

Definition at line 3967 of file class_partialdecomp.cpp.

◆ getHashValue()

unsigned long gcg::PARTIALDECOMP::getHashValue ( )

returns the calculated hash value of this partialdec

Returns
the calculated hash value of this partialdec

Definition at line 3973 of file class_partialdecomp.cpp.

◆ getID()

◆ getLinkingvars()

std::vector< int > & gcg::PARTIALDECOMP::getLinkingvars ( )

◆ getMasterconss()

std::vector< int > & gcg::PARTIALDECOMP::getMasterconss ( )

Gets array containing all master conss indices.

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

Definition at line 3992 of file class_partialdecomp.cpp.

Referenced by checkConsistency(), createDecompFromPartialdec(), createGraphNewDetection(), DEC_DECL_POSTPROCESSPARTIALDEC(), displayInfo(), GCGconshdlrDecompCalcBendersScore(), getScore(), hasSetppccardMaster(), hasSetppcMaster(), hasSetppMaster(), isEqual(), setuparraysnewdetection(), writeGpNonzeros(), writePartialdec(), and writeTikzNonzeros().

◆ getMastervars()

std::vector< int > & gcg::PARTIALDECOMP::getMastervars ( )

Gets array containing all master vars indices.

master vars hit only constraints in the master, aka static variables

Returns
array containing all master vars indices

Definition at line 3998 of file class_partialdecomp.cpp.

Referenced by checkConsistency(), createDecompFromPartialdec(), displayInfo(), isEqual(), writeGpNonzeros(), writePartialdec(), and writeTikzNonzeros().

◆ getNCoeffsForBlock()

int gcg::PARTIALDECOMP::getNCoeffsForBlock ( int  blockid)

Gets 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

Definition at line 4004 of file class_partialdecomp.cpp.

Referenced by cmpGraphPair().

◆ getNCoeffsForMaster()

int gcg::PARTIALDECOMP::getNCoeffsForMaster ( )

Gets the number of nonzero coeffs in master

Returns
the number of nonzero coeffs in master

Definition at line 4015 of file class_partialdecomp.cpp.

Referenced by cmpGraphPair().

◆ getScore()

◆ hasSetppccardMaster()

SCIP_Bool gcg::PARTIALDECOMP::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

Definition at line 3197 of file class_partialdecomp.cpp.

References gcg::DETPROBDATA::getCons(), getDetprobdata(), getMasterconss(), getNLinkingvars(), getNMasterconss(), getNTotalStairlinkingvars(), gcg::DETPROBDATA::isConsCardinalityCons(), and gcg::DETPROBDATA::isConsSetppc().

Referenced by displayInfo(), GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), GCGconshdlrDecompCalcSetPartForWhiteAggScore(), and GCGprintDecompInformation().

◆ hasSetppcMaster()

SCIP_Bool gcg::PARTIALDECOMP::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

Definition at line 3226 of file class_partialdecomp.cpp.

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

Referenced by displayInfo().

◆ hasSetppMaster()

SCIP_Bool gcg::PARTIALDECOMP::hasSetppMaster ( )

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

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

Definition at line 3250 of file class_partialdecomp.cpp.

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

Referenced by displayInfo().

◆ getUsergiven()

USERGIVEN gcg::PARTIALDECOMP::getUsergiven ( )

Gets the USERGIVEN status of this partialdecs.

Returns
the USERGIVEN status of this partialdecs
See also
enum USERGIVEN

Definition at line 4097 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompAddPreexisitingPartialDec(), writePartialdec(), and writeTexPartialdecStatistics().

◆ getNAncestors()

int gcg::PARTIALDECOMP::getNAncestors ( )

Gets number of ancestor partialdecs.

Returns
number of ancestor partialdecs

Definition at line 4103 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCheckConsistency().

◆ getNBlocks()

◆ getNConss()

◆ getNConssForBlock()

◆ getDetectorchainInfo()

std::vector< std::string > & gcg::PARTIALDECOMP::getDetectorchainInfo ( )

Gets the detectorchain info vector.

Returns
detectorchain info vector

Definition at line 4130 of file class_partialdecomp.cpp.

Referenced by checkConsistency(), and writePartialdec().

◆ getNDetectors()

int gcg::PARTIALDECOMP::getNDetectors ( )

Gets the number of detectors the partialdec is propagated by.

Returns
number of detectors the partialdec is propagated by

Definition at line 4136 of file class_partialdecomp.cpp.

Referenced by buildDecChainString(), checkConsistency(), createDecompFromPartialdec(), DEC_DECL_PROPAGATEPARTIALDEC(), and displayInfo().

◆ getNLinkingvars()

◆ getNMasterconss()

◆ getNMastervars()

◆ getNNewBlocks()

int gcg::PARTIALDECOMP::getNNewBlocks ( int  detectorchainindex)

Gets number of blocks a detector added.

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

Definition at line 4154 of file class_partialdecomp.cpp.

Referenced by writePartialdec().

◆ getNNewBlocksVector()

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

gets number of blocks the detectors in the detectorchain added

Returns
number of blocks the detectors in the detectorchain added

Definition at line 4164 of file class_partialdecomp.cpp.

Referenced by createDecompFromPartialdec().

◆ getNTotalStairlinkingvars()

◆ getNOpenconss()

int gcg::PARTIALDECOMP::getNOpenconss ( )

◆ getNOpenvars()

◆ getNReps()

int gcg::PARTIALDECOMP::getNReps ( )

Gets the number of blockrepresentatives.

Returns
the number of blockrepresentatives

Definition at line 4204 of file class_partialdecomp.cpp.

Referenced by aggInfoCalculated(), and GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore().

◆ getNStairlinkingvars()

int gcg::PARTIALDECOMP::getNStairlinkingvars ( int  block)

Gets 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

Definition at line 4210 of file class_partialdecomp.cpp.

Referenced by checkConsistency(), createDecompFromPartialdec(), displayInfo(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), getNTotalStairlinkingvars(), isEqual(), writeGpNonzeros(), writeGpPartialdec(), writeTexPartialdec(), and writeTikzNonzeros().

◆ getNVars()

◆ getNVarsForBlock()

◆ getNVarsForBlocks()

int gcg::PARTIALDECOMP::getNVarsForBlocks ( )

Gets overall number of vars assigned to a block.

Returns
number of vars that are assigned to any block

Definition at line 4235 of file class_partialdecomp.cpp.

◆ getOpenconss()

◆ getOpenconssVec()

std::vector< int > & gcg::PARTIALDECOMP::getOpenconssVec ( )

Gets a vector containing constraint ids not assigned yet as vector.

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

Definition at line 4253 of file class_partialdecomp.cpp.

Referenced by assignSmallestComponentsButOneConssAdjacency(), DEC_DECL_PROPAGATEPARTIALDEC(), and GCGconshdlrDecompAddPreexisitingPartialDec().

◆ getOpenvars()

◆ getOpenvarsVec()

std::vector< int > & gcg::PARTIALDECOMP::getOpenvarsVec ( )

Gets array containing variables not assigned yet as vector

Returns
array containing variables not assigned yet as vector

Definition at line 4265 of file class_partialdecomp.cpp.

Referenced by DEC_DECL_PROPAGATEPARTIALDEC().

◆ getPctVarsToBorder()

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

Gets 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 4271 of file class_partialdecomp.cpp.

Referenced by writePartialdec().

◆ getPctVarsToBorderVector()

std::vector< SCIP_Real > & gcg::PARTIALDECOMP::getPctVarsToBorderVector ( )

Gets 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

Definition at line 4281 of file class_partialdecomp.cpp.

Referenced by createDecompFromPartialdec().

◆ getPctVarsToBlock()

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

Gets 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 4295 of file class_partialdecomp.cpp.

Referenced by writePartialdec().

◆ getPctVarsToBlockVector()

std::vector< SCIP_Real > & gcg::PARTIALDECOMP::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

Definition at line 4305 of file class_partialdecomp.cpp.

Referenced by createDecompFromPartialdec().

◆ getPctVarsFromFree()

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

Gets fraction of variables that are not longer open for a detector.

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

Definition at line 4320 of file class_partialdecomp.cpp.

◆ getPctVarsFromFreeVector()

std::vector< SCIP_Real > & gcg::PARTIALDECOMP::getPctVarsFromFreeVector ( )

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

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

Definition at line 4330 of file class_partialdecomp.cpp.

Referenced by createDecompFromPartialdec().

◆ getPctConssToBorder()

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

Gets fraction of constraints assigned to the border for a detector.

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

Definition at line 4344 of file class_partialdecomp.cpp.

Referenced by writePartialdec().

◆ getPctConssToBorderVector()

std::vector< SCIP_Real > & gcg::PARTIALDECOMP::getPctConssToBorderVector ( )

Gets 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

Definition at line 4354 of file class_partialdecomp.cpp.

Referenced by createDecompFromPartialdec().

◆ getPctConssToBlock()

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

Gets 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 4368 of file class_partialdecomp.cpp.

Referenced by writePartialdec().

◆ getPctConssToBlockVector()

std::vector< SCIP_Real > & gcg::PARTIALDECOMP::getPctConssToBlockVector ( )

Gets 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

Definition at line 4378 of file class_partialdecomp.cpp.

Referenced by createDecompFromPartialdec().

◆ getPctConssFromFree()

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

Gets 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 4392 of file class_partialdecomp.cpp.

◆ getPctConssFromFreeVector()

std::vector< SCIP_Real > & gcg::PARTIALDECOMP::getPctConssFromFreeVector ( )

Gets 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

Definition at line 4402 of file class_partialdecomp.cpp.

Referenced by createDecompFromPartialdec().

◆ getRepForBlock()

int gcg::PARTIALDECOMP::getRepForBlock ( int  blockid)

Gets 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

Definition at line 4408 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid(), and GCGconshdlrDecompCreateVarmapForPartialdecId().

◆ getRepVarmap()

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

Gets the represenation varmap.

Var map is vector for represenative repid and the blockrepid-th block that is represented by repid

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

Definition at line 4415 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCreateVarmapForPartialdecId().

◆ getDetprobdata()

◆ getStairlinkingvars()

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

Gets 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,

Definition at line 4446 of file class_partialdecomp.cpp.

Referenced by checkConsistency(), createDecompFromPartialdec(), displayInfo(), isEqual(), writeGpNonzeros(), and writeTikzNonzeros().

◆ getVarsForBlock()

std::vector< int > & gcg::PARTIALDECOMP::getVarsForBlock ( int  block)

◆ getVarProbindexForBlock()

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

Gets 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

Definition at line 4479 of file class_partialdecomp.cpp.

Referenced by createGraphNewDetection(), and GCGconshdlrDecompCreateVarmapForPartialdecId().

◆ isComplete()

◆ isConsMastercons()

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

Gets whether 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

Definition at line 4515 of file class_partialdecomp.cpp.

Referenced by assignSmallestComponentsButOneConssAdjacency(), completeByConnectedConssAdjacency(), completeGreedily(), considerImplicits(), GCGconshdlrDecompCalcBendersScore(), and GCGconshdlrDecompCalcStrongDecompositionScore().

◆ isConsOpencons()

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

Gets whether the cons is an open cons.

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

Definition at line 4524 of file class_partialdecomp.cpp.

Referenced by assignSmallestComponentsButOneConssAdjacency(), checkConsistency(), completeByConnected(), completeByConnectedConssAdjacency(), connected(), considerImplicits(), createGraphFromPartialMatrix(), GCGconshdlrDecompCalcBendersScore(), and readBlockconss().

◆ isAssignedToOrigProb()

◆ isSelected()

bool gcg::PARTIALDECOMP::isSelected ( )

Gets whether the partialdec is currently selected in explore menue

Returns
true iff the partialdec is currently selected in explore menue

Definition at line 4677 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompIsSelectedByPartialdecId(), and gcg::GCGdialogSelect().

◆ isEqual() [1/2]

SCIP_RETCODE gcg::PARTIALDECOMP::isEqual ( PARTIALDECOMP otherpartialdec,
SCIP_Bool *  isequal,
bool  sortpartialdecs 
)

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

See also
isEqual(PARTIALDECOMP*))
Returns
scip return code
Parameters
otherpartialdecother partialdec
isequalpointer to store whether partialdecs are identical
sortpartialdecsshould conss and vars be sorted before comparing the partialdecs?

Definition at line 4539 of file class_partialdecomp.cpp.

References sort().

Referenced by detectIsomorph(), and gcg::DETPROBDATA::partialdecIsNoDuplicateOfPartialdecs().

◆ isEqual() [2/2]

bool gcg::PARTIALDECOMP::isEqual ( PARTIALDECOMP other)

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

Returns
true iff partialdecs are equal
Parameters
otherother partialdec to check equality with

Definition at line 4557 of file class_partialdecomp.cpp.

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

◆ isPropagatedBy()

bool gcg::PARTIALDECOMP::isPropagatedBy ( DEC_DETECTOR detector)

Gets whether this partialdec was propagated by specified detector.

Parameters
detectorpointer to detector to check for
Returns
true iff this partialdec was propagated by detectorID

Definition at line 4649 of file class_partialdecomp.cpp.

Referenced by detect().

◆ isTrivial()

bool gcg::PARTIALDECOMP::isTrivial ( )

Gets whether this partialdec is considered to be trivial.

PARTIALDECOMP is considered trivial if 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 partialdec is considered to be trivial

Definition at line 4659 of file class_partialdecomp.cpp.

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

Referenced by GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), and GCGconshdlrDecompCalcSetPartForWhiteAggScore().

◆ isVarBlockvarOfBlock()

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

Checks whether 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

Definition at line 4683 of file class_partialdecomp.cpp.

Referenced by checkConsistency(), completeGreedily(), considerImplicits(), createGraphNewDetection(), and GCGconshdlrDecompCalcClassicScore().

◆ isVarLinkingvar()

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

Checks whether the var is a linking var.

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

Definition at line 4708 of file class_partialdecomp.cpp.

Referenced by assignSmallestComponentsButOneConssAdjacency(), checkConsistency(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), fixVarToBlock(), GCGconshdlrDecompCalcBendersScore(), and GCGconshdlrDecompCalcClassicScore().

◆ isVarMastervar()

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

Checks whether the var is a master var.

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

Definition at line 4699 of file class_partialdecomp.cpp.

Referenced by assignSmallestComponentsButOneConssAdjacency(), completeByConnectedConssAdjacency(), considerImplicits(), DEC_DECL_POSTPROCESSPARTIALDEC(), GCGconshdlrDecompCalcBendersScore(), and GCGconshdlrDecompCalcClassicScore().

◆ isVarOpenvar()

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

Checks whether the var is an open var.

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

Definition at line 4721 of file class_partialdecomp.cpp.

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

◆ isVarStairlinkingvar()

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

Checks whether the var is a stairlinking var.

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

Definition at line 4730 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp(), and GCGconshdlrDecompCalcClassicScore().

◆ isVarStairlinkingvarOfBlock()

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

Checks whether the var is a stairlinkingvar of a specified 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 specified block

Definition at line 4744 of file class_partialdecomp.cpp.

Referenced by checkConsistency(), and completeGreedily().

◆ printPartitionInformation()

void gcg::PARTIALDECOMP::printPartitionInformation ( SCIP *  givenscip,
FILE *  file 
)

prints partition information as described in

See also
cls reader
Parameters
givenscipscip data structure
fileoutput file

Definition at line 4767 of file class_partialdecomp.cpp.

Referenced by GCGprintDecompInformation().

◆ refineToBlocks()

void gcg::PARTIALDECOMP::refineToBlocks ( )

refine partialdec with focus on blocks

strategy: assigns open conss and vars if they can be found in blocks (without respect to open vars and conss

See also
assignHittingOpenconss(),
assignHittingOpenvars())
Note
partialdec might be not complete

Definition at line 4841 of file class_partialdecomp.cpp.

References sort().

Referenced by complete(), DEC_DECL_FINISHPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), and detection().

◆ refineToMaster()

void gcg::PARTIALDECOMP::refineToMaster ( )

refine partialdec with focus on master

strategy: do obvious (

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

Definition at line 4852 of file class_partialdecomp.cpp.

References considerImplicits().

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

◆ setConsPartitionStatistics()

void gcg::PARTIALDECOMP::setConsPartitionStatistics ( int  detectorchainindex,
ConsPartition partition,
std::vector< int > &  consclassesmaster 
)

registers statistics for a used conspartition

Parameters
detectorchainindexindex of the detector in the detectorchain
partitionthe used conspartition
consclassesmastervector of classindices that were assigned to master

Definition at line 4860 of file class_partialdecomp.cpp.

References partition().

Referenced by DEC_DECL_PROPAGATEPARTIALDEC().

◆ setConsToBlock()

void gcg::PARTIALDECOMP::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

Definition at line 4879 of file class_partialdecomp.cpp.

Referenced by assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), considerImplicits(), DEC_DECL_POSTPROCESSPARTIALDEC(), filloutPartialdecFromConstoblock(), and fixConsToBlock().

◆ fixConsToBlock() [1/2]

void gcg::PARTIALDECOMP::fixConsToBlock ( int  cons,
int  block 
)

adds a constraint to a block

Parameters
consid of cons to add
blockid of block to add

Definition at line 4894 of file class_partialdecomp.cpp.

References deleteOpencons(), setConsToBlock(), and setNBlocks().

Referenced by assignSmallestComponentsButOneConssAdjacency(), completeGreedily(), createPartialdecFromDecomp(), fixConsToBlock(), fixConsToBlockByName(), and GCGconshdlrDecompAddMatrixPartialdec().

◆ fixConsToBlock() [2/2]

bool gcg::PARTIALDECOMP::fixConsToBlock ( SCIP_CONS *  cons,
int  block 
)

adds a constraint to a block

Parameters
conspointer of cons to add
blockid of block to add
Returns
true iff successful
Parameters
conspointer of the constraint
blockblock index (counting from 0)

Definition at line 4910 of file class_partialdecomp.cpp.

References fixConsToBlock(), getDetprobdata(), and gcg::DETPROBDATA::getIndexForCons().

◆ setConsToMaster()

void gcg::PARTIALDECOMP::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

Definition at line 4926 of file class_partialdecomp.cpp.

Referenced by assignBorderFromConstoblock(), assignOpenConssToMaster(), assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), complete(), completeGreedily(), considerImplicits(), filloutBorderFromConstoblock(), filloutPartialdecFromConstoblock(), and fixConsToMaster().

◆ fixConsToMaster() [1/3]

std::vector< int >::const_iterator gcg::PARTIALDECOMP::fixConsToMaster ( std::vector< int >::const_iterator  itr)

fixes a constraint to the master constraints

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openconss
Returns
iterator that points to the next element of PARTIALDECOMP::openconss
Warning
This method modifies the vector PARTIALDECOMP::openconss! Hence, any kind of iterator might be invalid afterwards!

Definition at line 4938 of file class_partialdecomp.cpp.

References deleteOpencons(), and setConsToMaster().

Referenced by considerImplicits(), createPartialdecFromDecomp(), DEC_DECL_PROPAGATEPARTIALDEC(), fixConsToMaster(), fixConsToMasterByName(), GCGconshdlrDecompAddPreexisitingPartialDec(), and readMasterconss().

◆ fixConsToMaster() [2/3]

void gcg::PARTIALDECOMP::fixConsToMaster ( int  cons)

fixes a constraint to the master constraints

Parameters
consid of cons to add
Warning
This method modifies the vector PARTIALDECOMP::openconss! Hence, any kind of iterator might be invalid afterwards!

Definition at line 4949 of file class_partialdecomp.cpp.

References deleteOpencons(), and setConsToMaster().

◆ fixConsToMaster() [3/3]

bool gcg::PARTIALDECOMP::fixConsToMaster ( SCIP_CONS *  cons)

fixes a constraint to the master constraints

Parameters
conspointer of cons to add
Warning
This method modifies the vector PARTIALDECOMP::openconss! Hence, any kind of iterator might be invalid afterwards!
Returns
true iff successful
Parameters
conspointer of cons to fix as master cons

Definition at line 4960 of file class_partialdecomp.cpp.

References fixConsToMaster(), getDetprobdata(), and gcg::DETPROBDATA::getIndexForCons().

◆ setDetectorchain()

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

sets the detectorchain with the given vector of detector pointers

Parameters
givenDetectorChainvector of detector pointers

Definition at line 4974 of file class_partialdecomp.cpp.

◆ setDetectorPropagated()

void gcg::PARTIALDECOMP::setDetectorPropagated ( DEC_DETECTOR detector)

sets partialdec to be propagated by a detector

Parameters
detectorpointer to detector that is registered for this partialdec

Definition at line 4982 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp(), and detect().

◆ setDetectorFinished()

void gcg::PARTIALDECOMP::setDetectorFinished ( DEC_DETECTOR detector)

sets detector that finished the partialdec

Parameters
detectorpointer to detector that has finished this partialdecs

Definition at line 4991 of file class_partialdecomp.cpp.

Referenced by detect().

◆ setDetectorFinishedOrig()

void gcg::PARTIALDECOMP::setDetectorFinishedOrig ( DEC_DETECTOR detectorID)

sets detector that finished the partialdec in the original problem

Parameters
detectorIDpointer to detector that has finished this partialdecs
Note
does not add the detector to the detectorchain and does not modify partition statistics

Definition at line 5001 of file class_partialdecomp.cpp.

◆ setFinishedByFinisher()

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

sets whether this partialdec was finished by a finishing detector

Parameters
finishedis this partialdecs finished by a finishing detector

Definition at line 5009 of file class_partialdecomp.cpp.

Referenced by detect().

◆ setFinishedByFinisherOrig()

void gcg::PARTIALDECOMP::setFinishedByFinisherOrig ( bool  finished)

sets whether this partialdec was finished by a finishing detector in the original problem

(in case this partialdec was translated)

Parameters
finishedwas this partialdecs finished by a finishing detector in orig

Definition at line 5017 of file class_partialdecomp.cpp.

◆ setNBlocks()

void gcg::PARTIALDECOMP::setNBlocks ( int  nblocks)

◆ setSelected()

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

set the selection status of this partialdecs

Parameters
selectedwhether the partialdec is selected

Definition at line 5047 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompAddDecomp(), GCGconshdlrDecompSelectPartialdec(), and gcg::GCGdialogSelect().

◆ setStemsFromOrig()

void gcg::PARTIALDECOMP::setStemsFromOrig ( bool  fromorig)

sets whether this partialdec stems from an orig problem partialdec

Parameters
fromorighas this partialdec ancestors from the orig problem

Definition at line 5055 of file class_partialdecomp.cpp.

◆ setUsergiven()

void gcg::PARTIALDECOMP::setUsergiven ( USERGIVEN  usergiven)

sets whether this partialdec is user given

Parameters
usergivenis this partialdec user given

Definition at line 5063 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompAddPreexisitingPartialDec(), readBLKFile(), and readDECFile().

◆ setVarPartitionStatistics()

void gcg::PARTIALDECOMP::setVarPartitionStatistics ( int  detectorchainindex,
VarPartition partition,
std::vector< int > &  varclasseslinking,
std::vector< int > &  varclassesmaster 
)

registers statistics for a used varpartition

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

Definition at line 5071 of file class_partialdecomp.cpp.

References partition().

Referenced by DEC_DECL_PROPAGATEPARTIALDEC().

◆ setVarToBlock()

void gcg::PARTIALDECOMP::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

Definition at line 5094 of file class_partialdecomp.cpp.

Referenced by completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), considerImplicits(), filloutPartialdecFromConstoblock(), and fixVarToBlock().

◆ fixVarToBlock() [1/2]

void gcg::PARTIALDECOMP::fixVarToBlock ( int  var,
int  block 
)

adds a variable to the linking variables

Parameters
varid of var to be added
blockid of block to be added

Definition at line 5109 of file class_partialdecomp.cpp.

References deleteOpenvar(), isVarLinkingvar(), and setVarToBlock().

Referenced by assignSmallestComponentsButOneConssAdjacency(), createPartialdecFromDecomp(), deleteEmptyBlocks(), fixVarToBlockByName(), and GCGconshdlrDecompAddMatrixPartialdec().

◆ fixVarToBlock() [2/2]

std::vector< int >::const_iterator gcg::PARTIALDECOMP::fixVarToBlock ( std::vector< int >::const_iterator  itr,
int  block 
)

adds a variable to the linking variables

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openvars
blockid of block to be added
Returns
iterator that points to the next element of PARTIALDECOMP::openvars
Warning
This method modifies the vector PARTIALDECOMP::openvars! Hence, any kind of iterator might be invalid afterwards!

Definition at line 5126 of file class_partialdecomp.cpp.

References deleteOpenvar(), isVarLinkingvar(), and setVarToBlock().

◆ setVarToLinking()

void gcg::PARTIALDECOMP::setVarToLinking ( int  varToLinking)

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

Parameters
varToLinkingvar to be set to linking

Definition at line 5143 of file class_partialdecomp.cpp.

Referenced by completeGreedily(), considerImplicits(), filloutPartialdecFromConstoblock(), and fixVarToLinking().

◆ fixVarToLinking() [1/2]

void gcg::PARTIALDECOMP::fixVarToLinking ( int  var)

adds a variable to the linking variables

Parameters
varvar to be set to linking

Definition at line 5154 of file class_partialdecomp.cpp.

References deleteOpenvar(), and setVarToLinking().

Referenced by createPartialdecFromDecomp(), DEC_DECL_PROPAGATEPARTIALDEC(), and fixVarToLinkingByName().

◆ fixVarToLinking() [2/2]

std::vector< int >::const_iterator gcg::PARTIALDECOMP::fixVarToLinking ( std::vector< int >::const_iterator  itr)

adds a variable to the linking variables

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openvars
Returns
iterator that points to the next element of PARTIALDECOMP::openvars
Warning
This method modifies the vector PARTIALDECOMP::openvars! Hence, any kind of iterator might be invalid afterwards!

Definition at line 5176 of file class_partialdecomp.cpp.

References deleteOpenvar(), and setVarToLinking().

◆ setVarToMaster()

void gcg::PARTIALDECOMP::setVarToMaster ( int  varToMaster)

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

master variables hit only constraints in the master

Parameters
varToMastervar to be set to master

Definition at line 5198 of file class_partialdecomp.cpp.

Referenced by complete(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), considerImplicits(), filloutPartialdecFromConstoblock(), and fixVarToMaster().

◆ fixVarToMaster() [1/2]

void gcg::PARTIALDECOMP::fixVarToMaster ( int  var)

adds a variable to the master variables

master variables hit only constraints in the master

Parameters
varvar to be set to master

Definition at line 5210 of file class_partialdecomp.cpp.

References deleteOpenvar(), and setVarToMaster().

Referenced by createPartialdecFromDecomp(), DEC_DECL_PROPAGATEPARTIALDEC(), and fixVarToMasterByName().

◆ fixVarToMaster() [2/2]

std::vector< int >::const_iterator gcg::PARTIALDECOMP::fixVarToMaster ( std::vector< int >::const_iterator  itr)

adds a variable to the master variables

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openvars
Returns
iterator that points to the next element of PARTIALDECOMP::openvars
Warning
This method modifies the vector PARTIALDECOMP::openvars! Hence, any kind of iterator might be invalid afterwards!
Parameters
itrvar to be set to master

Definition at line 5222 of file class_partialdecomp.cpp.

References deleteOpenvar(), and setVarToMaster().

◆ setVarToStairlinking()

void gcg::PARTIALDECOMP::setVarToStairlinking ( int  varToStairLinking,
int  block1,
int  block2 
)

adds a variable to the stairlinking variables, 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 smaller index

Definition at line 5234 of file class_partialdecomp.cpp.

Referenced by assignCurrentStairlinking(), completeGreedily(), filloutPartialdecFromConstoblock(), findVarsLinkingToStairlinking(), and fixVarToStairlinking().

◆ fixVarToStairlinking() [1/2]

void gcg::PARTIALDECOMP::fixVarToStairlinking ( int  var,
int  firstblock 
)

adds a variable to the stairlinking variables

Parameters
varid of variable to be added
firstblockstairlinking variables hit exactly two consecutive blocks, this is the index of the first of these blocks
Note
stairlinking variables are only registered in block with smaller index

Definition at line 5255 of file class_partialdecomp.cpp.

References deleteOpenvar(), and setVarToStairlinking().

Referenced by createPartialdecFromDecomp().

◆ fixVarToStairlinking() [2/2]

std::vector< int >::const_iterator gcg::PARTIALDECOMP::fixVarToStairlinking ( std::vector< int >::const_iterator  itr,
int  firstblock 
)

adds a variable to the stairlinking variables

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openvars
firstblockstairlinking variables hit exactly two consecutive blocks, this is the index of the first of these blocks
Returns
iterator that points to the next element of PARTIALDECOMP::openvars
Warning
This method modifies the vector PARTIALDECOMP::openvars! Hence, any kind of iterator might be invalid afterwards!
Note
stairlinking variables are only registered in block with smaller index

Definition at line 5269 of file class_partialdecomp.cpp.

References setVarToStairlinking().

◆ fixConsToBlockByName()

bool gcg::PARTIALDECOMP::fixConsToBlockByName ( const char *  consname,
int  blockid 
)

assigns a constraint by name to a block

See also
fixConsToBlock
Returns
true iff successful
Parameters
consnamename of the constraint
blockidblock index (counting from 0)

Definition at line 5283 of file class_partialdecomp.cpp.

References fixConsToBlock(), getDetprobdata(), and gcg::DETPROBDATA::getIndexForCons().

Referenced by fillDecompStruct(), and readBlockconss().

◆ fixVarToBlockByName()

bool gcg::PARTIALDECOMP::fixVarToBlockByName ( const char *  varname,
int  blockid 
)

assigns a variable by name to a block

See also
fixVarToBlock
Returns
true iff successful
Parameters
varnamename of the variable
blockidblock index (counting from 0)

Definition at line 5299 of file class_partialdecomp.cpp.

References fixVarToBlock(), getDetprobdata(), and gcg::DETPROBDATA::getIndexForVar().

Referenced by readBlock(), and readBlockvars().

◆ fixConsToMasterByName()

bool gcg::PARTIALDECOMP::fixConsToMasterByName ( const char *  consname)

assgins a constraint by name as master

See also
fixConsToMaster
Returns
true iff successful
Parameters
consnamename of cons to fix as master cons

Definition at line 5317 of file class_partialdecomp.cpp.

References fixConsToMaster(), getDetprobdata(), and gcg::DETPROBDATA::getIndexForCons().

Referenced by fillDecompStruct(), and readMasterconss().

◆ fixVarToMasterByName()

bool gcg::PARTIALDECOMP::fixVarToMasterByName ( const char *  varname)

assigns a variable with given name as master

See also
fixVarToMaster
Returns
true iff successful
Parameters
varnamename of the variable

Definition at line 5331 of file class_partialdecomp.cpp.

References fixVarToMaster(), getDetprobdata(), and gcg::DETPROBDATA::getIndexForVar().

Referenced by fillDecompStruct(), and readMastervars().

◆ fixVarToLinkingByName()

bool gcg::PARTIALDECOMP::fixVarToLinkingByName ( const char *  varname)

assigns a variable by name to the linking variables

See also
fixVarToLinking
Returns
true iff successful
Parameters
varnamename of the variable

Definition at line 5345 of file class_partialdecomp.cpp.

References fixVarToLinking(), getDetprobdata(), and gcg::DETPROBDATA::getIndexForVar().

Referenced by readBlock(), and readLinkingvars().

◆ showVisualization()

void gcg::PARTIALDECOMP::showVisualization ( )

generates and opens a gp visualization of the partialdec

See also
visual/pdfreader and
Note
linux only

Definition at line 5359 of file class_partialdecomp.cpp.

References GCGgetVisualizationFilename(), GCGVisuGetPdfReader(), and generateVisualization().

Referenced by gcg::GCGdialogSelectVisualize().

◆ generateVisualization()

void gcg::PARTIALDECOMP::generateVisualization ( char *  filename,
char *  outname,
GP_OUTPUT_FORMAT  outputformat = GP_OUTPUT_FORMAT_PDF 
)

generates a visualization of the partialdec using gnuplot

Parameters
filenamePath where to store the gp file
outnamePath at which gnuplot will output its result
outputformatThe format of the gnuplot output. Should match the file extension of outname
Note
linux only, requires gnuplot

Definition at line 5389 of file class_partialdecomp.cpp.

References writeVisualizationFile().

Referenced by showVisualization().

◆ writeVisualizationFile()

void gcg::PARTIALDECOMP::writeVisualizationFile ( char *  filename,
char *  outname,
GP_OUTPUT_FORMAT  outputformat = GP_OUTPUT_FORMAT_PDF 
)

writes a gp visualization of the partialdec to a file

Parameters
filenamePath where to store the gp file
outnamePath at which gnuplot will output its result
outputformatThe format of the gnuplot output. Should match the file extension of outname

Definition at line 5416 of file class_partialdecomp.cpp.

References GCGwriteGpVisualizationFormat(), and getID().

Referenced by generateVisualization().

◆ exportVisualization()

void gcg::PARTIALDECOMP::exportVisualization ( )

generates a gp visualization of the partialdec without compilation or opening

Definition at line 5427 of file class_partialdecomp.cpp.

References GCGgetVisualizationFilename(), GCGwriteGpVisualization(), and getID().

Referenced by gcg::GCGdialogSelectVisualize().

◆ shouldCompletedByConsToMaster()

SCIP_Bool gcg::PARTIALDECOMP::shouldCompletedByConsToMaster ( )

Checks whether this partialdec is a userpartialdec that should be completed.

the completion should be done by setting unspecified constraints to master

Returns
TRUE iff this partialdec is a userpartialdec that should be completed

Definition at line 5439 of file class_partialdecomp.cpp.

References gcg::COMPLETED_CONSTOMASTER.

Referenced by GCGconshdlrDecompAddPreexisitingPartialDec(), and readDECFile().

◆ sort()

◆ setPctConssToBlockVector()

void gcg::PARTIALDECOMP::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

Definition at line 4384 of file class_partialdecomp.cpp.

◆ setPctConssFromFreeVector()

void gcg::PARTIALDECOMP::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

Definition at line 4438 of file class_partialdecomp.cpp.

◆ setPctConssToBorderVector()

void gcg::PARTIALDECOMP::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

Definition at line 4360 of file class_partialdecomp.cpp.

◆ setPctVarsToBorderVector()

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

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

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

Definition at line 4287 of file class_partialdecomp.cpp.

◆ setPctVarsToBlockVector()

void gcg::PARTIALDECOMP::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

Definition at line 4312 of file class_partialdecomp.cpp.

◆ setPctVarsFromFreeVector()

void gcg::PARTIALDECOMP::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

Definition at line 4336 of file class_partialdecomp.cpp.

◆ setDetectorClockTimes()

void gcg::PARTIALDECOMP::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

Definition at line 3675 of file class_partialdecomp.cpp.

◆ getClassicScore()

SCIP_Real gcg::PARTIALDECOMP::getClassicScore ( )

gets the classic score

Note
-1 iff not calculated yet,
See also
GCGconshdlrDecompCalcClassicScore
Returns
border area score

Definition at line 5505 of file class_partialdecomp.cpp.

◆ setClassicScore()

void gcg::PARTIALDECOMP::setClassicScore ( SCIP_Real  score)

set the classic score

Parameters
scorenew score value in [0,1]

Definition at line 5510 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcClassicScore().

◆ getBorderAreaScore()

SCIP_Real gcg::PARTIALDECOMP::getBorderAreaScore ( )

gets the border area score

Note
-1 iff not calculated yet,
See also
GCGconshdlrDecompCalcBorderAreaScore
Returns
border area score

Definition at line 5518 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcBendersScore(), and GCGconshdlrDecompCalcMaxWhiteScore().

◆ setBorderAreaScore()

void gcg::PARTIALDECOMP::setBorderAreaScore ( SCIP_Real  score)

set the border area score

Parameters
scorenew score value in [0,1]

Definition at line 5523 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcBorderAreaScore().

◆ getMaxWhiteScore()

SCIP_Real gcg::PARTIALDECOMP::getMaxWhiteScore ( )

gets the maximum white area score

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

Note
-1 iff not calculated yet,
See also
GCGconshdlrDecompCalcMaxWhiteScore
Returns
maximum white area score

Definition at line 5531 of file class_partialdecomp.cpp.

References getScore(), and MAX_WHITE.

Referenced by createDecompFromPartialdec(), and GCGprintDecompInformation().

◆ setMaxWhiteScore()

void gcg::PARTIALDECOMP::setMaxWhiteScore ( SCIP_Real  score)

set the maximum white area score

Parameters
scorenew score value in [0,1]

Definition at line 5536 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcMaxWhiteScore().

◆ getMaxForWhiteScore()

SCIP_Real gcg::PARTIALDECOMP::getMaxForWhiteScore ( )

gets the maximum foreseeing white area score

Note
-1 iff not calculated yet,
See also
GCGconshdlrDecompCalcMaxForseeingWhiteScore
Returns
maximum foreseeing white area score

Definition at line 5544 of file class_partialdecomp.cpp.

References getScore(), and MAX_FORESSEEING_WHITE.

Referenced by GCGconshdlrDecompCalcSetPartForseeingWhiteScore().

◆ setMaxForWhiteScore()

void gcg::PARTIALDECOMP::setMaxForWhiteScore ( SCIP_Real  score)

set the maximum foreseeing white area score

Parameters
scorenew score value in [0,1]

Definition at line 5549 of file class_partialdecomp.cpp.

◆ getSetPartForWhiteScore()

SCIP_Real gcg::PARTIALDECOMP::getSetPartForWhiteScore ( )

gets the setpartitioning maximum foreseeing white area score

Note
-1 iff not calculated yet,
See also
GGCGconshdlrDecompCalcSetPartForseeingWhiteScore
Returns
setpartitioning maximum foreseeing white area score

Definition at line 5557 of file class_partialdecomp.cpp.

◆ setSetPartForWhiteScore()

void gcg::PARTIALDECOMP::setSetPartForWhiteScore ( SCIP_Real  score)

set the setpartitioning maximum foreseeing white area score

Parameters
scorenew score value in [0,1]

Definition at line 5562 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcSetPartForseeingWhiteScore().

◆ getMaxForWhiteAggScore()

SCIP_Real gcg::PARTIALDECOMP::getMaxForWhiteAggScore ( )

gets the maximum foreseeing white area score with respect to aggregatable blocks

Note
-1 iff not calculated yet,
See also
GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore
Returns
maximum foreseeing white area score with respect to aggregatable blocks

Definition at line 5570 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcSetPartForWhiteAggScore().

◆ setMaxForWhiteAggScore()

void gcg::PARTIALDECOMP::setMaxForWhiteAggScore ( SCIP_Real  score)

set the maximum foreseeing white area score with respect to aggregatable blocks

Parameters
scorenew score value in [0,1]

Definition at line 5575 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore().

◆ getSetPartForWhiteAggScore()

SCIP_Real gcg::PARTIALDECOMP::getSetPartForWhiteAggScore ( )

gets the setpartitioning maximum foreseeing white area score with respect to aggregateable

Note
-1 iff not calculated yet,
See also
GCGconshdlrDecompCalcSetPartForWhiteAggScore
Returns
setpartitioning maximum foreseeing white area score with respect to aggregateable

Definition at line 5583 of file class_partialdecomp.cpp.

◆ setSetPartForWhiteAggScore()

void gcg::PARTIALDECOMP::setSetPartForWhiteAggScore ( SCIP_Real  score)

set the setpartitioning maximum foreseeing white area score with respect to aggregateable

Parameters
scorenew score value in [0,1]

Definition at line 5588 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcSetPartForWhiteAggScore().

◆ getBendersScore()

SCIP_Real gcg::PARTIALDECOMP::getBendersScore ( )

gets the benders score

Note
-1 iff not calculated yet,
See also
GCGconshdlrDecompCalcBendersScore
Returns
benders score

Definition at line 5595 of file class_partialdecomp.cpp.

◆ setBendersScore()

void gcg::PARTIALDECOMP::setBendersScore ( SCIP_Real  score)

set the benders score

Parameters
scorenew score value in [0,1]

Definition at line 5600 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcBendersScore().

◆ getStrongDecompScore()

SCIP_Real gcg::PARTIALDECOMP::getStrongDecompScore ( )

gets the strong decomposition score

Note
-1 iff not calculated yet,
See also
GCGconshdlrDecompCalcStrongDecompositionScore
Returns
strong decomposition score

Definition at line 5608 of file class_partialdecomp.cpp.

◆ setStrongDecompScore()

void gcg::PARTIALDECOMP::setStrongDecompScore ( SCIP_Real  score)

set the strong decomposition score

Parameters
scorenew score value in [0,1]

Definition at line 5613 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCalcStrongDecompositionScore().

◆ prepare()

void gcg::PARTIALDECOMP::prepare ( )

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

Returns
SCIP_OKAY if the result is consistent, SCIP_ERROR if there was an inconsistency

Definition at line 5621 of file class_partialdecomp.cpp.

References considerImplicits(), and deleteEmptyBlocks().

Referenced by assignSmallestComponentsButOneConssAdjacency(), complete(), completeByConnected(), completeByConnectedConssAdjacency(), createPartialdecFromDecomp(), DEC_DECL_POSTPROCESSPARTIALDEC(), detect(), detection(), GCGconshdlrDecompAddBasicPartialdec(), GCGconshdlrDecompAddPreexisitingPartialDec(), and readDECFile().

◆ aggInfoCalculated()

bool gcg::PARTIALDECOMP::aggInfoCalculated ( )

Checks if the aggregation information was already calculated.

Returns
true iff the aggregation information was already calculated

Definition at line 5634 of file class_partialdecomp.cpp.

References getNBlocks(), and getNReps().

Referenced by calcAggregationInformation(), and GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid().

◆ calcAggregationInformation()

void gcg::PARTIALDECOMP::calcAggregationInformation ( bool  ignoreDetectionLimits)

computes if aggregation of sub problems is possible

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

Parameters
ignoreDetectionLimitsSet to true if computation should ignore detection limits. This parameter is ignored if the patched bliss version is not present.

gets vector of indices of all constraints assigned to blocks

Note
conssforblocks[k] contains a vector of indices of all constraints assigned to block k
Returns
vector of a vector of indices for each block

Definition at line 1105 of file class_partialdecomp.cpp.

References aggInfoCalculated(), getNBlocks(), getNVarsForBlock(), and isComplete().

Referenced by GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid(), and GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore().

◆ getConssForBlocks()

std::vector< std::vector< int > > & gcg::PARTIALDECOMP::getConssForBlocks ( )

Definition at line 5629 of file class_partialdecomp.cpp.

◆ getTranslatedpartialdecid()

int gcg::PARTIALDECOMP::getTranslatedpartialdecid ( ) const

◆ setTranslatedpartialdecid()

void gcg::PARTIALDECOMP::setTranslatedpartialdecid ( int  decid)

Definition at line 5644 of file class_partialdecomp.cpp.

◆ buildDecChainString()

void gcg::PARTIALDECOMP::buildDecChainString ( char *  buffer)

creates a detector chain short string for this partialdec, is built from detector chain

Parameters
bufferwill contain string of detector chars in chronological order afterwards

Definition at line 5480 of file class_partialdecomp.cpp.

References gcg::COMPLETE, gcg::COMPLETED_CONSTOMASTER, DECdetectorGetChar(), getDetectorchain(), getNDetectors(), and gcg::PARTIAL.

Referenced by createDecompFromPartialdec(), GCGconshdlrDecompGetDetectorHistoryByPartialdecId(), GCGgetVisualizationFilename(), and GCGwriteTexReport().