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... | |
DETPROBDATA * | getDetprobdata () |
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
-
scip scip data structure originalProblem true 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
-
partialdecToCopy partialdec 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
-
clocktime time 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
-
ancestor partialdec 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
-
decinfo information 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
-
nnewblocks number 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
-
pct fraction 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
-
pct fraction 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
-
pct fraction 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
-
pct fraction 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
-
pct fraction 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
-
pct fraction 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
-
constoblock hashmap assigning cons indices (not SCIP_Cons*) to block indices givenNBlocks number 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
- Note
- master assignment is indicated by assigning cons to index additionalNBlocks
- Parameters
-
constoblock hashmap assigning cons indices (not SCIP_Cons*) to block indices additionalNBlocks number 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
- Note
- master is indicated by assigning cons to index additionalNBlocks
- Parameters
-
constoblock vector containing an assignment of conss to a block or to master additionalNBlocks number 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()
void gcg::PARTIALDECOMP::completeGreedily | ( | ) |
assigns all open constraints and open variables
strategy: assigns a cons (and related vars) to a new block if possible, if not to an existing block if possible (by means of prior var assignments) and finally to master, if there does not exist such a block
Definition at line 2382 of file class_partialdecomp.cpp.
References addBlock(), checkAllConssAssigned(), checkConsistency(), deleteOpencons(), deleteOpenvar(), fixConsToBlock(), getConssForBlock(), gcg::DETPROBDATA::getConssForVar(), getDetprobdata(), getNBlocks(), getNConssForBlock(), gcg::DETPROBDATA::getNConssForVar(), getNMasterconss(), getNOpenconss(), getNOpenvars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::DETPROBDATA::getVarsForCons(), isConsMastercons(), isVarBlockvarOfBlock(), isVarLinkingvar(), isVarOpenvar(), isVarStairlinkingvarOfBlock(), setConsToBlock(), setConsToMaster(), setVarToBlock(), setVarToLinking(), setVarToMaster(), setVarToStairlinking(), and sort().
Referenced by DEC_DECL_FINISHPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), and GCGconshdlrDecompTranslateNBestOrigPartialdecs().
◆ removeMastercons()
void gcg::PARTIALDECOMP::removeMastercons | ( | int | consid | ) |
removes the given cons from master
- Parameters
-
consid id 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
-
otherpartialdec partialdec 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
-
variables if 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 | ) |
deletes a cons from list of open conss
- Parameters
-
opencons id of the cons that is not considered open anymore
Definition at line 2865 of file class_partialdecomp.cpp.
Referenced by assignBorderFromConstoblock(), assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), considerImplicits(), filloutBorderFromConstoblock(), fixConsToBlock(), and fixConsToMaster().
◆ 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
-
itr valid 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
-
openvar id 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
-
itr valid iterator pointing to elements of PARTIALDECOMP::openvars
Definition at line 2900 of file class_partialdecomp.cpp.
◆ displayInfo()
void gcg::PARTIALDECOMP::displayInfo | ( | int | detailLevel | ) |
displays the relevant information of the partialdec
- Parameters
-
detailLevel pass a value that indicates how detailed the output should be: 0: brief overview 1: block and detector info 2: cons and var assignments
Definition at line 2933 of file class_partialdecomp.cpp.
References DECdetectorGetName(), gcg::DETPROBDATA::getCons(), getConssForBlock(), getDetprobdata(), getLinkingvars(), getMasterconss(), getMastervars(), getNConss(), getNConssForBlock(), getNDetectors(), getNLinkingvars(), getNMasterconss(), getNMastervars(), getNOpenconss(), getNOpenvars(), getNStairlinkingvars(), getNVars(), getNVarsForBlock(), getOpenconss(), getOpenvars(), getStairlinkingvars(), gcg::DETPROBDATA::getVar(), getVarsForBlock(), hasSetppccardMaster(), hasSetppcMaster(), and hasSetppMaster().
Referenced by gcg::GCGdialogInspectPartialdec().
◆ 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
-
constoblock hashmap assigning cons indices (not SCIP_Cons*) to block indices *< (master assignment is indicated by assigning cons to index additionalNBlocks) givenNBlocks number 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
-
constoblock hashmap assigning cons indices (not SCIP_Cons*) to block indices *< (master assignment is indicated by assigning cons to index additionalNBlocks) givenNBlocks number 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
-
ancestorindex index 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
-
newlist new 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
-
ancestorid id 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
-
ancestor id 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
-
repid id 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
-
detectorchainindex index 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 | ) |
returns array containing constraints assigned to a block
- Parameters
-
block id of the block the constraint indices are returned
- Returns
- array containing constraints assigned to a block
Definition at line 3693 of file class_partialdecomp.cpp.
Referenced by checkConsistency(), completeGreedily(), createDecompFromPartialdec(), createGraphNewDetection(), createTestPricingprobConss(), displayInfo(), fhook(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), isEqual(), setuparraysnewdetection(), writeGpNonzeros(), writePartialdec(), and writeTikzNonzeros().
◆ 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()
int gcg::PARTIALDECOMP::getID | ( | ) |
returns the unique id of the partialdec
- Returns
- the unique id of the partialdec
Definition at line 3980 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), createDecompFromPartialdec(), DEC_DECL_PROPAGATEPARTIALDEC(), detection(), exportVisualization(), GCGconshdlrDecompAddBasicPartialdec(), GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompCheckConsistency(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompDeregisterPartialdec(), GCGconshdlrDecompRegisterPartialdec(), GCGgetVisualizationFilename(), GCGwriteTexReport(), SCIP_DECL_READERWRITE(), and writeVisualizationFile().
◆ getLinkingvars()
std::vector< int > & gcg::PARTIALDECOMP::getLinkingvars | ( | ) |
returns array containing all linking vars indices
- Returns
- vector containing all linking vars indices
- Note
- when accessed it is supposed to be sorted
Definition at line 3986 of file class_partialdecomp.cpp.
Referenced by checkConsistency(), createDecompFromPartialdec(), displayInfo(), findVarsLinkingToMaster(), findVarsLinkingToStairlinking(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), isEqual(), writeGpNonzeros(), writePartialdec(), and writeTikzNonzeros().
◆ 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
-
blockid of 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()
SCIP_Real gcg::PARTIALDECOMP::getScore | ( | SCORETYPE | type | ) |
returns the score of the partialdec (depending on used scoretype)
- Parameters
-
type the scoretype
- Returns
- the score
- See also
- enum scoretype in cons_decomp.h
Definition at line 4025 of file class_partialdecomp.cpp.
References BENDERS, BORDER_AREA, CLASSIC, GCGconsGetType(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompCalcMaxWhiteScore(), GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), GCGconshdlrDecompCalcSetPartForWhiteAggScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), gcg::DETPROBDATA::getCons(), getDetprobdata(), getMasterconss(), getNMasterconss(), indicator, MAX_FORESEEING_AGG_WHITE, MAX_FORESSEEING_WHITE, MAX_WHITE, SETPART_AGG_FWHITE, SETPART_FWHITE, and STRONG_DECOMP.
Referenced by GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompGetScoreByPartialdecId(), GCGprintDecompInformation(), getMaxForWhiteScore(), getMaxWhiteScore(), and writeTexPartialdecStatistics().
◆ 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()
int gcg::PARTIALDECOMP::getNBlocks | ( | ) |
Gets the number of blocks.
- Returns
- number of blocks
Definition at line 4109 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), aggInfoCalculated(), assignSmallestComponentsButOneConssAdjacency(), calcAggregationInformation(), calcBlockAreaScore(), calcStairlinkingVars(), checkConsistency(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), createDecompFromPartialdec(), createPartialdecFromDecomp(), DEC_DECL_POSTPROCESSPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), detection(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompCalcSetPartForseeingWhiteScore(), GCGconshdlrDecompCalcSetPartForWhiteAggScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGconshdlrDecompGetNBlocksByPartialdecId(), GCGgetVisualizationFilename(), GCGprintDecompInformation(), GCGwriteTexReport(), getNTotalStairlinkingvars(), isEqual(), isTrivial(), writeGpNonzeros(), writeGpPartialdec(), writePartialdec(), writeTexPartialdec(), writeTexPartialdecStatistics(), and writeTikzNonzeros().
◆ getNConss()
int gcg::PARTIALDECOMP::getNConss | ( | ) |
Gets the number of constraints.
- Returns
- number of constraints
Definition at line 4115 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), calcBlockAreaScore(), createDecompFromPartialdec(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), gcg::RowGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), displayInfo(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), isTrivial(), writeGpNonzeros(), writeGpPartialdec(), writeTexPartialdec(), and writeTikzNonzeros().
◆ getNConssForBlock()
int gcg::PARTIALDECOMP::getNConssForBlock | ( | int | block | ) |
Gets size of the vector containing conss assigned to a block.
- Parameters
-
block id of the block the number of constraints is asked for
- Returns
- size of the vector containing conss assigned to a block
Definition at line 4121 of file class_partialdecomp.cpp.
Referenced by assignCurrentStairlinking(), calcBlockAreaScore(), checkConsistency(), cmpGraphPair(), completeGreedily(), createDecompFromPartialdec(), createGraphNewDetection(), createTestPricingprobConss(), displayInfo(), fhook(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGprintDecompInformation(), isEqual(), isTrivial(), setuparraysnewdetection(), writeGpNonzeros(), writeGpPartialdec(), writePartialdec(), writeTexPartialdec(), and writeTikzNonzeros().
◆ 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()
int gcg::PARTIALDECOMP::getNLinkingvars | ( | ) |
Gets size of the vector containing linking vars.
- Returns
- size of the vector containing linking vars
Definition at line 4148 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), assignSmallestComponentsButOneConssAdjacency(), checkConsistency(), completeByConnectedConssAdjacency(), createDecompFromPartialdec(), DEC_DECL_FINISHPARTIALDEC(), displayInfo(), findVarsLinkingToMaster(), findVarsLinkingToStairlinking(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompGetNLinkingVarsByPartialdecId(), GCGprintDecompInformation(), hasSetppccardMaster(), hasSetppcMaster(), hasSetppMaster(), isEqual(), isTrivial(), writeGpNonzeros(), writeGpPartialdec(), writePartialdec(), writeTexPartialdec(), writeTexPartialdecStatistics(), and writeTikzNonzeros().
◆ getNMasterconss()
int gcg::PARTIALDECOMP::getNMasterconss | ( | ) |
Gets size of the vector containing master conss.
- Returns
- size of the vector containing master conss
Definition at line 4170 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), checkConsistency(), cmpGraphPair(), completeGreedily(), createDecompFromPartialdec(), createGraphNewDetection(), DEC_DECL_POSTPROCESSPARTIALDEC(), displayInfo(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompGetNMasterConssByPartialdecId(), GCGprintDecompInformation(), getScore(), hasSetppccardMaster(), hasSetppcMaster(), hasSetppMaster(), isEqual(), isTrivial(), setuparraysnewdetection(), writeGpNonzeros(), writeGpPartialdec(), writePartialdec(), writeTexPartialdec(), writeTexPartialdecStatistics(), and writeTikzNonzeros().
◆ getNMastervars()
int gcg::PARTIALDECOMP::getNMastervars | ( | ) |
Gets size of the vector containing master vars.
master vars hit only constraints in the master
- Returns
- size of the vector containing master vars
Definition at line 4176 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), checkConsistency(), createDecompFromPartialdec(), displayInfo(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompGetNMasterVarsByPartialdecId(), GCGprintDecompInformation(), isEqual(), isTrivial(), writeGpNonzeros(), writeGpPartialdec(), writePartialdec(), writeTexPartialdec(), writeTexPartialdecStatistics(), and writeTikzNonzeros().
◆ getNNewBlocks()
int gcg::PARTIALDECOMP::getNNewBlocks | ( | int | detectorchainindex | ) |
Gets number of blocks a detector added.
- Returns
- number of blocks a detector added
- Parameters
-
detectorchainindex index 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()
int gcg::PARTIALDECOMP::getNTotalStairlinkingvars | ( | ) |
Gets total number of stairlinking vars.
- Returns
- total number of stairlinking vars
Definition at line 4182 of file class_partialdecomp.cpp.
References getNBlocks(), and getNStairlinkingvars().
Referenced by addDecChangesFromAncestor(), calcStairlinkingVars(), createDecompFromPartialdec(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompGetNStairlinkingVarsByPartialdecId(), GCGprintDecompInformation(), hasSetppccardMaster(), hasSetppcMaster(), hasSetppMaster(), and writeTexPartialdecStatistics().
◆ getNOpenconss()
int gcg::PARTIALDECOMP::getNOpenconss | ( | ) |
Gets size of vector containing constraints not assigned yet.
- Returns
- returns size of vector containing constraints not assigned yet
Definition at line 4192 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), assignBorderFromConstoblock(), assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), blocking(), blockingDynamic(), blockingStatic(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), connected(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphFromPartialMatrix(), createPartialdecFromMasterconss(), gcg::RowGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), createRowindexList(), DEC_DECL_PROPAGATEPARTIALDEC(), detection(), detectIsomorph(), displayInfo(), fhookForPartialdecs(), GCGconshdlrDecompGetNOpenConssByPartialdecId(), graphCompletible(), indexmapInit(), initData(), isComplete(), isTrivial(), rankOrderClustering(), rankOrderClusteringIteration(), rowsWithConstriction(), setupArrays(), writeGpNonzeros(), writeGpPartialdec(), writeTexPartialdec(), and writeTikzNonzeros().
◆ getNOpenvars()
int gcg::PARTIALDECOMP::getNOpenvars | ( | ) |
Gets size of vector containing variables not assigned yet.
- Returns
- size of vector containing variables not assigned yet
Definition at line 4198 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), assignCurrentStairlinking(), blocking(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), connected(), createColumnindexList(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), gcg::RowGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), DEC_DECL_PROPAGATEPARTIALDEC(), detection(), displayInfo(), GCGconshdlrDecompGetNOpenVarsByPartialdecId(), graphCompletible(), indexmapInit(), initData(), isComplete(), isTrivial(), rankOrderClustering(), rankOrderClusteringIteration(), writeGpNonzeros(), writeGpPartialdec(), writeTexPartialdec(), and writeTikzNonzeros().
◆ 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
-
block id 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()
int gcg::PARTIALDECOMP::getNVars | ( | ) |
Gets number of vars.
- Returns
- number of vars
Definition at line 4220 of file class_partialdecomp.cpp.
Referenced by addDecChangesFromAncestor(), calcBlockAreaScore(), createDecompFromPartialdec(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createPartialdecFromMasterconss(), DEC_DECL_POSTPROCESSPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), displayInfo(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcBorderAreaScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), isTrivial(), setupArrays(), writeGpNonzeros(), writeGpPartialdec(), writeTexPartialdec(), and writeTikzNonzeros().
◆ getNVarsForBlock()
int gcg::PARTIALDECOMP::getNVarsForBlock | ( | int | block | ) |
Gets size of the vector containing vars assigned to a block.
- Parameters
-
block id of the block the number of variables is asked for
- Returns
- size of the vector containing vars assigned to a block
Definition at line 4226 of file class_partialdecomp.cpp.
Referenced by calcAggregationInformation(), calcBlockAreaScore(), checkConsistency(), cmpGraphPair(), createDecompFromPartialdec(), createGraphNewDetection(), DEC_DECL_POSTPROCESSPARTIALDEC(), displayInfo(), fhook(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGprintDecompInformation(), isEqual(), setuparraysnewdetection(), writeGpNonzeros(), writeGpPartialdec(), writePartialdec(), writeTexPartialdec(), and writeTikzNonzeros().
◆ 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()
const int * gcg::PARTIALDECOMP::getOpenconss | ( | ) |
Gets array containing constraints not assigned yet.
- Returns
- array containing constraints not assigned yet
Definition at line 4247 of file class_partialdecomp.cpp.
Referenced by connected(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), createGraph(), createGraphFromPartialMatrix(), createPartialdecFromMasterconss(), gcg::RowGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), DEC_DECL_PROPAGATEPARTIALDEC(), detectIsomorph(), displayInfo(), fhookForPartialdecs(), graphCompletible(), indexmapInit(), setupArrays(), writeGpNonzeros(), and writeTikzNonzeros().
◆ 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()
const int * gcg::PARTIALDECOMP::getOpenvars | ( | ) |
Gets array containing variables not assigned yet.
- Returns
- returns array containing variables not assigned yet
Definition at line 4259 of file class_partialdecomp.cpp.
Referenced by connected(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), gcg::RowGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), displayInfo(), graphCompletible(), indexmapInit(), writeGpNonzeros(), and writeTikzNonzeros().
◆ 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
-
detectorchainindex index 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
-
detectorchainindex index 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
-
detectorchainindex index 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
-
detectorchainindex index 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
-
detectorchainindex index 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
-
detectorchainindex index 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
-
blockid id 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
-
repid id of representative blockrepid id 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()
DETPROBDATA * gcg::PARTIALDECOMP::getDetprobdata | ( | ) |
Gets the corresponding detprobdata.
- Returns
- corresponding detprobdata
Definition at line 4424 of file class_partialdecomp.cpp.
References GCGconshdlrDecompGetDetprobdataOrig(), and GCGconshdlrDecompGetDetprobdataPresolved().
Referenced by assignCurrentStairlinking(), assignSmallestComponentsButOneConssAdjacency(), checkConsistency(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), considerImplicits(), createDecompFromPartialdec(), createTestPricingprobConss(), displayInfo(), filloutBorderFromConstoblock(), filloutPartialdecFromConstoblock(), findVarsLinkingToMaster(), findVarsLinkingToStairlinking(), fixConsToBlock(), fixConsToBlockByName(), fixConsToMaster(), fixConsToMasterByName(), fixVarToBlockByName(), fixVarToLinkingByName(), fixVarToMasterByName(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcClassicScore(), GCGconshdlrDecompCalcMaxForeseeingWhiteAggScore(), GCGconshdlrDecompCalcMaxForseeingWhiteScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGconshdlrDecompCreateVarmapForPartialdecId(), GCGwriteGpVisualizationFormat(), getScore(), hasSetppccardMaster(), hasSetppcMaster(), hasSetppMaster(), PARTIALDECOMP(), readBlockconss(), readMasterconss(), writeGpNonzeros(), writePartialdec(), and writeTikzNonzeros().
◆ 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
-
block id 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 | ) |
Gets array containing vars of a block.
- Parameters
-
block id of the block the vars are requested for
- Returns
- returns array containing vars of a block
Definition at line 4470 of file class_partialdecomp.cpp.
Referenced by checkConsistency(), createDecompFromPartialdec(), createGraphNewDetection(), DEC_DECL_POSTPROCESSPARTIALDEC(), displayInfo(), fhook(), GCGconshdlrDecompCalcBendersScore(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGconshdlrDecompCreateVarmapForPartialdecId(), isEqual(), setuparraysnewdetection(), writeGpNonzeros(), writePartialdec(), and writeTikzNonzeros().
◆ getVarProbindexForBlock()
int gcg::PARTIALDECOMP::getVarProbindexForBlock | ( | int | varid, |
int | block | ||
) |
Gets index in variables array of a block for a variable.
- Parameters
-
varid the id of the variable the index block the 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()
bool gcg::PARTIALDECOMP::isComplete | ( | ) |
Gets whether this partialdec is complete, i.e. it has no more open constraints and variables.
- Returns
- TRUE iff this partialdec is complete
Definition at line 4494 of file class_partialdecomp.cpp.
References getNOpenconss(), and getNOpenvars().
Referenced by addPartialdec(), gcg::DETPROBDATA::addPartialdecToFinished(), calcAggregationInformation(), createPartialdecFromDecomp(), DECgetBestDecomp(), detect(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompArePricingprobsIdenticalForPartialdecid(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompCreateVarmapForPartialdecId(), GCGconshdlrDecompTranslateNBestOrigPartialdecs(), gcg::GCGdialogShowMenu(), readDECFile(), writeGpPartialdec(), and writePartialdec().
◆ isConsMastercons()
bool gcg::PARTIALDECOMP::isConsMastercons | ( | int | cons | ) |
Gets whether the cons is a master cons.
- Parameters
-
cons id 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
-
cons id 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()
bool gcg::PARTIALDECOMP::isAssignedToOrigProb | ( | ) |
Gets whether the partialdec is from the presolved problem.
- Returns
- true iff the partialdec is from the presolved problem
Definition at line 4533 of file class_partialdecomp.cpp.
Referenced by addPartialdec(), cmpGraphPair(), createDecompFromPartialdec(), DECgetBestDecomp(), DECwriteAllDecomps(), GCGconshdlrDecompAddPreexisitingPartialDec(), GCGconshdlrDecompCalcStrongDecompositionScore(), GCGconshdlrDecompChooseCandidatesFromSelected(), GCGconshdlrDecompDeregisterPartialdecs(), GCGconshdlrDecompIsPresolvedByPartialdecId(), gcg::GCGdialogShowMenu(), and writePartialdec().
◆ 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
-
otherpartialdec other partialdec isequal pointer to store whether partialdecs are identical sortpartialdecs should 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
-
other other 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
-
detector pointer 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
-
var id of var to check block id 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
-
var id 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
-
var id 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
-
var id 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
-
var id 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
-
var id of var to check if it is a stairlinking variable hitting specified block block id 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
-
givenscip scip data structure file output 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
-
detectorchainindex index of the detector in the detectorchain partition the used conspartition consclassesmaster vector 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
-
consToBlock id of cons to add block id 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
-
cons id of cons to add block id 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
-
cons pointer of cons to add block id of block to add
- Returns
- true iff successful
- Parameters
-
cons pointer of the constraint block block 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
-
consToMaster id 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
-
itr valid 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
-
cons id 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
-
cons pointer 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
-
cons pointer 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
-
givenDetectorChain vector 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
-
detector pointer 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
-
detector pointer 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
-
detectorID pointer 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
-
finished is 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
-
finished was 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 | ) |
sets number of blocks, only increasing number allowed
- Parameters
-
nblocks new number of blocks
Definition at line 5025 of file class_partialdecomp.cpp.
Referenced by assignSmallestComponentsButOneConssAdjacency(), completeByConnected(), completeByConnectedConssAdjacency(), createPartialdecFromDecomp(), fixConsToBlock(), GCGconshdlrDecompAddBasicPartialdec(), GCGconshdlrDecompAddMatrixPartialdec(), and readNBlocks().
◆ setSelected()
void gcg::PARTIALDECOMP::setSelected | ( | bool | selected | ) |
set the selection status of this partialdecs
- Parameters
-
selected whether 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
-
fromorig has 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
-
usergiven is 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
-
detectorchainindex index of the detector in the detectorchain partition the used varpartition varclasseslinking vector of classindices that were assigned to linking varclassesmaster vector 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
-
varToBlock id of var to be added block id 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
-
var id of var to be added block id 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
-
itr valid iterator pointing to elements of PARTIALDECOMP::openvars block id 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
-
varToLinking var 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
-
var var 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
-
itr valid 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
-
varToMaster var 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
-
var var 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
-
itr valid 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
-
itr var 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
-
varToStairLinking id of variable to be added block1 id of block one block2 id 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
-
var id of variable to be added firstblock stairlinking 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
-
itr valid iterator pointing to elements of PARTIALDECOMP::openvars firstblock stairlinking 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
-
consname name of the constraint blockid block 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
-
varname name of the variable blockid block 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
-
consname name 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
-
varname name 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
-
varname name 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
-
filename Path where to store the gp file outname Path at which gnuplot will output its result outputformat The 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
-
filename Path where to store the gp file outname Path at which gnuplot will output its result outputformat The 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()
bool gcg::PARTIALDECOMP::sort | ( | ) |
sorts the vars and conss data structures by their indices
- Returns
- true if the internal order of variables or constraints changed
Definition at line 5445 of file class_partialdecomp.cpp.
Referenced by assignBorderFromConstoblock(), assignCurrentStairlinking(), assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), completeGreedily(), considerImplicits(), createPartialdecFromDecomp(), DEC_DECL_POSTPROCESSPARTIALDEC(), DEC_DECL_PROPAGATEPARTIALDEC(), deleteEmptyBlocks(), detection(), filloutBorderFromConstoblock(), filloutPartialdecFromConstoblock(), findVarsLinkingToMaster(), findVarsLinkingToStairlinking(), GCGconshdlrDecompAddMatrixPartialdec(), GCGconshdlrDecompAddPreexisitingPartialDec(), isEqual(), readDECFile(), and refineToBlocks().
◆ setPctConssToBlockVector()
void gcg::PARTIALDECOMP::setPctConssToBlockVector | ( | std::vector< SCIP_Real > & | newvector | ) |
set statistical vector of fractions of constraints set to blocks per involved detector
- Parameters
-
newvector vector 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
-
newvector vector 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
-
newvector vector 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
-
newvector vector 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
-
newvector vector 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
-
newvector vector 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
-
newvector vector 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,
- 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
-
score new 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,
- 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
-
score new 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,
- 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
-
score new 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,
- 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
-
score new 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
-
score new 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,
- 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
-
score new 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,
- 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
-
score new 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,
- 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
-
score new 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,
- 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
-
score new 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
-
ignoreDetectionLimits Set 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 |
Definition at line 5639 of file class_partialdecomp.cpp.
Referenced by GCGconshdlrDecompChooseCandidatesFromSelected(), and PARTIALDECOMP().
◆ 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
-
buffer will 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().