GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
gcg::PARTIALDECOMP Class Reference

Detailed Description

class to manage partial decompositions

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

Definition at line 118 of file class_partialdecomp.h.

class to manage partial decompositions More...

#include <class_partialdecomp.h>

Public Member Functions

GCG_EXPORT PARTIALDECOMP (GCG *gcgstruct, bool originalProblem)
 Standard constructor, creates empty partialdec with unique id.
GCG_EXPORT PARTIALDECOMP (const PARTIALDECOMP *partialdecToCopy)
 copy constructor
GCG_EXPORT ~PARTIALDECOMP ()
GCG_EXPORT int addBlock ()
 adds a block
GCG_EXPORT void addClockTime (SCIP_Real clocktime)
 adds detection time of one detector
GCG_EXPORT void addDecChangesFromAncestor (PARTIALDECOMP *ancestor)
 adds the statistical differences to an ancestor
GCG_EXPORT void addDetectorChainInfo (const char *decinfo)
 add information about the detector chain
GCG_EXPORT void addNNewBlocks (int nnewblocks)
 adds how many new blocks were introduced
GCG_EXPORT void addPctConssFromFree (SCIP_Real pct)
 adds percentage of closed constraints
GCG_EXPORT void addPctConssToBlock (SCIP_Real pct)
 adds percentage of constraints assigned to blocks
GCG_EXPORT void addPctConssToBorder (SCIP_Real pct)
 adds percentage of constraints assigned to border
GCG_EXPORT void addPctVarsFromFree (SCIP_Real pct)
 adds percentage of closed variables
GCG_EXPORT void addPctVarsToBlock (SCIP_Real pct)
 adds percentage of variables assigned to blocks
GCG_EXPORT void addPctVarsToBorder (SCIP_Real pct)
 adds percentage of variables assigned to border
GCG_EXPORT bool alreadyAssignedConssToBlocks ()
 method to check if at least one constraint is assigned to some block
GCG_EXPORT SCIP_RETCODE assignBorderFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 assigns open conss to master
GCG_EXPORT bool assignCurrentStairlinking ()
 assigns open vars to stairlinking if appropriate
GCG_EXPORT void assignOpenConssToMaster ()
 assigns open conss to master
GCG_EXPORT SCIP_RETCODE assignPartialdecFromConstoblock (SCIP_HASHMAP *constoblock, int additionalNBlocks)
 assigns conss structure according to given hashmap
GCG_EXPORT SCIP_RETCODE assignPartialdecFromConstoblockVector (std::vector< int > constoblock, int additionalNBlocks)
 assigns conss structure according to given vector
GCG_EXPORT void assignSmallestComponentsButOneConssAdjacency ()
 computes components by connectedness of conss and vars
GCG_EXPORT void reorderBlocksForStairlinkingVars ()
 reorders blocks for making a maximum number of linking vars stairlinking
GCG_EXPORT bool checkAllConssAssigned ()
 checks if all conss are assigned
GCG_EXPORT bool checkConsistency ()
 Checks whether the assignments in the partialdec are consistent.
GCG_EXPORT void complete ()
 assigns all open constraints and open variables trivially
GCG_EXPORT void completeByConnected ()
 assigns all open constraints and open variables
GCG_EXPORT void completeByConnectedConssAdjacency ()
 assigns all open constraints and open variables
GCG_EXPORT void completeGreedily ()
 assigns all open constraints and open variables
GCG_EXPORT void removeMastercons (int consid)
 removes the given cons from master
GCG_EXPORT void considerImplicits ()
 : assigns every open cons/var
GCG_EXPORT void copyPartitionStatistics (const PARTIALDECOMP *otherpartialdec)
 copies the given partialdec's partition statistics
GCG_EXPORT void deleteEmptyBlocks (bool variables)
 deletes empty blocks and sets nblocks accordingly
GCG_EXPORT void deleteOpencons (int opencons)
 deletes a cons from list of open conss
GCG_EXPORT std::vector< int >::const_iterator deleteOpencons (std::vector< int >::const_iterator itr)
 deletes a cons from list of open conss
GCG_EXPORT void deleteOpenvar (int openvar)
 deletes a var from the list of open vars
GCG_EXPORT std::vector< int >::const_iterator deleteOpenvar (std::vector< int >::const_iterator itr)
 deletes a var from the list of open vars
GCG_EXPORT void displayInfo (int detailLevel)
 displays the relevant information of the partialdec
GCG_EXPORT SCIP_RETCODE filloutBorderFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 every constraint is either assigned to master or open
GCG_EXPORT SCIP_RETCODE filloutPartialdecFromConstoblock (SCIP_HASHMAP *constoblock, int givenNBlocks)
 assigns all conss to master or a block
GCG_EXPORT void findVarsLinkingToMaster ()
 reassigns linking variables to master if appropriate
GCG_EXPORT void findVarsLinkingToStairlinking ()
 reassigns variables classified as linking to stairlinking if appropriate
GCG_EXPORT int getAncestorID (int ancestorindex)
 gets partialdec id of given ancestor id
GCG_EXPORT std::vector< int > & getAncestorList ()
 get ancestor ids as vector
GCG_EXPORT void setAncestorList (std::vector< int > &newlist)
GCG_EXPORT void removeAncestorID (int ancestorid)
GCG_EXPORT void addAncestorID (int ancestor)
GCG_EXPORT const std::vector< int > & getBlocksForEqClass (int eqclass)
 get a vector of block ids that are contained in the equivalence class eqclass
GCG_EXPORT int getReprBlockForEqClass (int eqclass)
 get the representative block of the given equivalence class
GCG_EXPORT SCIP_Real getDetectorClockTime (int detectorchainindex)
 returns the time that the detector related to the given detectorchainindex needed for detecting
GCG_EXPORT std::vector< SCIP_Real > & getDetectorClockTimes ()
 returns a vector of the clock times that each detector needed that was involved in this partialdec
GCG_EXPORT std::vector< int > & getConssForBlock (int block)
 returns array containing constraints assigned to a block
GCG_EXPORT std::vector< GCG_DETECTOR * > & getDetectorchain ()
 returns detector chain as vector of detector pointers
GCG_EXPORT bool getFinishedByFinisher ()
 returns true iff this partialdec was finished by finishPartialdec() method of a detector
GCG_EXPORT unsigned long getHashValue ()
 returns the calculated hash value of this partialdec
GCG_EXPORT int getID ()
 returns the unique id of the partialdec
GCG_EXPORT std::vector< int > & getLinkingvars ()
 returns array containing all linking vars indices
GCG_EXPORT std::vector< int > & getLinkingvarsForBlock (int block)
 returns vector of all linking var indices contained by the block
GCG_EXPORT std::vector< int > & getMasterconss ()
 Gets array containing all master conss indices.
GCG_EXPORT std::vector< int > & getMastervars ()
 Gets array containing all master vars indices.
GCG_EXPORT int getNCoeffsForBlock (int blockid)
 Gets the number of nonzero coeffs in a certain block.
GCG_EXPORT int getNCoeffsForMaster ()
GCG_EXPORT SCIP_Real getScore (GCG_SCORE *score)
 returns the score of the partialdec
GCG_EXPORT SCIP_Real getScore ()
 returns the score of the partialdec (depending on enabled score)
SCIP_Real calcBlockAreaScore ()
 gets an intermediate score value for the blocks of a partialdec
void setScore (GCG_SCORE *score, SCIP_Real scorevalue)
 sets the scorevalue of score
GCG_EXPORT SCIP_Bool hasSetppccardMaster ()
 checks if all master constraints set partitioning, set packing, set cover, or cardinality constraints
GCG_EXPORT SCIP_Bool hasSetppcMaster ()
 checks iff all master constraints set partitioning, set packing, or set cover constraints
GCG_EXPORT SCIP_Bool hasSetppMaster ()
 checks iff all master constraints set partitioning, or set packing constraints
GCG_EXPORT USERGIVEN getUsergiven ()
 Gets the USERGIVEN status of this partialdecs.
GCG_EXPORT int getNAncestors ()
 Gets number of ancestor partialdecs.
GCG_EXPORT int getNBlocks ()
 Gets the number of blocks.
GCG_EXPORT int getNConss ()
 Gets the number of constraints.
GCG_EXPORT int getNConssForBlock (int block)
 Gets size of the vector containing conss assigned to a block.
GCG_EXPORT std::vector< std::string > & getDetectorchainInfo ()
 Gets the detectorchain info vector.
GCG_EXPORT int getNDetectors ()
 Gets the number of detectors the partialdec is propagated by.
BLOCK_STRUCTURE * getBlockStructure (int block)
 Returns the structure information of a specific block.
std::vector< BLOCK_STRUCTURE * > & getBlockStructures ()
 Returns the structure information of all blocks.
GCG_EXPORT int getNLinkingvars ()
 Gets size of the vector containing linking vars.
GCG_EXPORT int getNMasterconss ()
 Gets size of the vector containing master conss.
GCG_EXPORT int getNMastervars ()
 Gets size of the vector containing master vars.
GCG_EXPORT int getNNewBlocks (int detectorchainindex)
 Gets number of blocks a detector added.
GCG_EXPORT std::vector< int > getNNewBlocksVector ()
 gets number of blocks the detectors in the detectorchain added
GCG_EXPORT int getNTotalStairlinkingvars ()
 Gets total number of stairlinking vars.
GCG_EXPORT int getNOpenconss ()
 Gets size of vector containing constraints not assigned yet.
GCG_EXPORT int getNOpenvars ()
 Gets size of vector containing variables not assigned yet.
GCG_EXPORT int getNEquivalenceClasses ()
 Gets the number of blockrepresentatives.
GCG_EXPORT int getNStairlinkingvars (int block)
 Gets size of the vector containing stairlinking vars.
GCG_EXPORT int getNVars ()
 Gets number of vars.
GCG_EXPORT int getNVarsForBlock (int block)
 Gets size of the vector containing vars assigned to a block.
GCG_EXPORT int getNVarsForBlocks ()
 Gets overall number of vars assigned to a block.
GCG_EXPORT std::vector< int > & getOpenconss ()
 Gets vector containing constraints not assigned yet.
GCG_EXPORT std::vector< int > & getOpenvars ()
 Gets vector containing variables not assigned yet.
GCG_EXPORT SCIP_Real getPctVarsToBorder (int detectorchainindex)
 Gets fraction of variables assigned to the border for a detector.
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsToBorderVector ()
 Gets fraction of variables assigned to the border for detectors in detectorchain.
GCG_EXPORT SCIP_Real getPctVarsToBlock (int detectorchainindex)
 Gets fraction of variables assigned to a block for a detector.
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsToBlockVector ()
 returns fraction of variables assigned to a block for detectors in detectorchain
GCG_EXPORT SCIP_Real getPctVarsFromFree (int detectorchainindex)
 Gets fraction of variables that are not longer open for a detector.
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsFromFreeVector ()
 Gets fraction of variables that are not longer open for detectors in detectorchain.
GCG_EXPORT SCIP_Real getPctConssToBorder (int detectorchainindex)
 Gets fraction of constraints assigned to the border for a detector.
GCG_EXPORT std::vector< SCIP_Real > & getPctConssToBorderVector ()
 Gets fraction of constraints assigned to the border for detectors in detectorchain.
GCG_EXPORT SCIP_Real getPctConssToBlock (int detectorchainindex)
 Gets fraction of constraints assigned to a block for a detector.
GCG_EXPORT std::vector< SCIP_Real > & getPctConssToBlockVector ()
 Gets fraction of constraints assigned to a block for detectors in detectorchain.
GCG_EXPORT SCIP_Real getPctConssFromFree (int detectorchainindex)
 Gets fraction of constraints that are not longer open for a detector.
GCG_EXPORT std::vector< SCIP_Real > & getPctConssFromFreeVector ()
 Gets fraction of constraints that are not longer open for detectors in detectorchain.
GCG_EXPORT int getEqClassForBlock (int blockid)
 Gets index of the representative block for a block, this might be blockid itself.
GCG_EXPORT std::vector< int > & getRepVarmap (int eqclass, int eqclassblock)
 Returns a vector that maps probvar indices of a block contained in an equivalence class to the probvar indices of the representative block of the class.
GCG_EXPORT DETPROBDATA * getDetprobdata ()
 Gets the corresponding detprobdata.
GCG_EXPORT std::vector< int > & getStairlinkingvars (int block)
 Gets vector containing stairlinking vars,.
GCG_EXPORT std::vector< int > & getVarsForBlock (int block)
 Gets array containing vars of a block.
GCG_EXPORT int getVarProbindexForBlock (int varid, int block)
 Gets the index of a variable in the vector returned by PARTIALDECOMP::getVarsForBlock.
GCG_EXPORT bool isComplete ()
 Gets whether this partialdec is complete, i.e. it has no more open constraints and variables.
GCG_EXPORT bool isConsMastercons (int cons)
 Gets whether the cons is a master cons.
GCG_EXPORT bool isConsOpencons (int cons)
 Gets whether the cons is an open cons.
GCG_EXPORT bool isAssignedToOrigProb ()
 Gets whether the partialdec is from the original problem.
GCG_EXPORT bool isAssignedToPresolvedProb ()
 Gets whether the partialdec is from the presolved problem.
GCG_EXPORT bool isSelected ()
GCG_EXPORT SCIP_RETCODE isEqual (PARTIALDECOMP *otherpartialdec, SCIP_Bool *isequal, bool sortpartialdecs)
 method to check whether this partialdec is equal to a given other partialdec (
GCG_EXPORT bool isEqual (PARTIALDECOMP *other)
 method to check whether this partialdec is equal to a given other partialdec
bool isNested ()
 Checks whether this is a nested decomposition.
GCG_EXPORT bool isPropagatedBy (GCG_DETECTOR *detector)
 Gets whether this partialdec was propagated by specified detector.
GCG_EXPORT bool isTrivial ()
 Gets whether this partialdec is considered to be trivial.
GCG_EXPORT bool isVarBlockvarOfBlock (int var, int block)
 Checks whether the var is assigned to the block.
GCG_EXPORT bool isVarLinkingvar (int var)
 Checks whether the var is a linking var.
GCG_EXPORT bool isVarLinkingvarOfBlock (int var, int block)
 Checks whether the var is a linking var contained by the block.
GCG_EXPORT bool isVarMastervar (int var)
 Checks whether the var is a master var.
GCG_EXPORT bool isVarOpenvar (int var)
 Checks whether the var is an open var.
GCG_EXPORT bool isVarStairlinkingvar (int var)
 Checks whether the var is a stairlinking var.
GCG_EXPORT bool isVarStairlinkingvarOfBlock (int var, int block)
 Checks whether the var is a stairlinkingvar of a specified block.
GCG_EXPORT void printPartitionInformation (FILE *file)
 prints partition information as described in
GCG_EXPORT void refineToBlocks ()
 refine partialdec with focus on blocks
GCG_EXPORT void refineToMaster ()
 refine partialdec with focus on master
GCG_EXPORT void setConsPartitionStatistics (int detectorchainindex, ConsPartition *partition, std::vector< int > &consclassesmaster)
 registers statistics for a used conspartition
GCG_EXPORT void setConsToBlock (int consToBlock, int block)
 adds a constraint to a block, does not delete this cons from list of open conss
GCG_EXPORT void fixConsToBlock (int cons, int block)
 adds a constraint to a block
GCG_EXPORT bool fixConsToBlock (SCIP_CONS *cons, int block)
 adds a constraint to a block
GCG_EXPORT void setConsToMaster (int consToMaster)
 adds a constraint to the master constraints, does not delete this cons from list of open conss
GCG_EXPORT std::vector< int >::const_iterator fixConsToMaster (std::vector< int >::const_iterator itr)
 fixes a constraint to the master constraints
GCG_EXPORT void fixConsToMaster (int cons)
 fixes a constraint to the master constraints
GCG_EXPORT bool fixConsToMaster (SCIP_CONS *cons)
 fixes a constraint to the master constraints
GCG_EXPORT void setDetectorchain (std::vector< GCG_DETECTOR * > &givenDetectorChain)
 sets the detectorchain with the given vector of detector pointers
GCG_EXPORT void setDetectorPropagated (GCG_DETECTOR *detector)
 sets partialdec to be propagated by a detector
GCG_EXPORT void setDetectorFinished (GCG_DETECTOR *detector)
 sets detector that finished the partialdec
GCG_EXPORT void setDetectorFinishedOrig ()
 sets detector that finished the partialdec in the original problem
GCG_EXPORT void setFinishedByFinisher (bool finished)
 sets whether this partialdec was finished by a finishing detector
GCG_EXPORT void setFinishedByFinisherOrig (bool finished)
 sets whether this partialdec was finished by a finishing detector in the original problem
GCG_EXPORT void setNBlocks (int nblocks)
 sets number of blocks, only increasing number allowed
void setBlockStructure (int block, BLOCK_STRUCTURE *blockstructure)
 sets structure information of a specific block
GCG_EXPORT void setSelected (bool selected)
 set the selection status of this partialdecs
GCG_EXPORT void setStemsFromOrig (bool fromorig)
 sets whether this partialdec stems from an orig problem partialdec
GCG_EXPORT void setUsergiven (USERGIVEN usergiven)
 sets whether this partialdec is user given
GCG_EXPORT void setVarPartitionStatistics (int detectorchainindex, VarPartition *partition, std::vector< int > &varclasseslinking, std::vector< int > &varclassesmaster)
 registers statistics for a used varpartition
GCG_EXPORT void setVarToBlock (int varToBlock, int block)
 adds a variable to the linking variables, does not delete this var from list of open vars
GCG_EXPORT void fixVarToBlock (int var, int block)
 adds a variable to the linking variables
GCG_EXPORT std::vector< int >::const_iterator fixVarToBlock (std::vector< int >::const_iterator itr, int block)
 adds a variable to the linking variables
GCG_EXPORT void setVarToLinking (int varToLinking)
 adds a variable to the linking variables, does not delete this var from list of open vars
GCG_EXPORT void fixVarToLinking (int var)
 adds a variable to the linking variables
GCG_EXPORT std::vector< int >::const_iterator fixVarToLinking (std::vector< int >::const_iterator itr)
 adds a variable to the linking variables
GCG_EXPORT void setVarToMaster (int varToMaster)
 adds a variable to the master variables, does not delete this var from list of open vars
GCG_EXPORT void fixVarToMaster (int var)
 adds a variable to the master variables
GCG_EXPORT std::vector< int >::const_iterator fixVarToMaster (std::vector< int >::const_iterator itr)
 adds a variable to the master variables
GCG_EXPORT 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
GCG_EXPORT void fixVarToStairlinking (int var, int firstblock)
 adds a variable to the stairlinking variables
GCG_EXPORT std::vector< int >::const_iterator fixVarToStairlinking (std::vector< int >::const_iterator itr, int firstblock)
 adds a variable to the stairlinking variables
GCG_EXPORT bool fixConsToBlockByName (const char *consname, int blockid)
 assigns a constraint by name to a block
GCG_EXPORT bool fixVarToBlockByName (const char *varname, int blockid)
 assigns a variable by name to a block
GCG_EXPORT bool fixConsToMasterByName (const char *consname)
 assgins a constraint by name as master
GCG_EXPORT bool fixVarToMasterByName (const char *varname)
 assigns a variable with given name as master
GCG_EXPORT bool fixVarToLinkingByName (const char *varname)
 assigns a variable by name to the linking variables
GCG_EXPORT void showVisualization ()
 generates and opens a gp visualization of the partialdec
GCG_EXPORT void generateVisualization (char *filename, char *outname, GP_OUTPUT_FORMAT outputformat=GP_OUTPUT_FORMAT_PDF)
 generates a visualization of the partialdec using gnuplot
GCG_EXPORT void writeVisualizationFile (char *filename, char *outname, GP_OUTPUT_FORMAT outputformat=GP_OUTPUT_FORMAT_PDF)
 writes a gp visualization of the partialdec to a file
GCG_EXPORT void exportVisualization ()
 generates a gp visualization of the partialdec without compilation or opening
GCG_EXPORT SCIP_Bool shouldCompletedByConsToMaster ()
 Checks whether this partialdec is a userpartialdec that should be completed.
GCG_EXPORT bool sort ()
 sorts the vars and conss data structures by their indices
GCG_EXPORT void setPctConssToBlockVector (std::vector< SCIP_Real > &newvector)
 set statistical vector of fractions of constraints set to blocks per involved detector
GCG_EXPORT void setPctConssFromFreeVector (std::vector< SCIP_Real > &newvector)
 set statistical vector of fractions of constraints that are not longer open per involved detector
GCG_EXPORT void setPctConssToBorderVector (std::vector< SCIP_Real > &newvector)
 set statistical vector of fractions of constraints assigned to the border per involved detector
GCG_EXPORT void setPctVarsToBorderVector (std::vector< SCIP_Real > &newvector)
 set statistical vector of fraction of variables assigned to the border per involved detector
GCG_EXPORT void setPctVarsToBlockVector (std::vector< SCIP_Real > &newvector)
 set statistical vector of fractions of variables assigned to a block per involved detector
GCG_EXPORT void setPctVarsFromFreeVector (std::vector< SCIP_Real > &newvector)
 set statistical vector of variables that are not longer open per involved detector
GCG_EXPORT void setDetectorClockTimes (std::vector< SCIP_Real > &newvector)
 set statistical vector of the times that the detectors needed for detecting per involved detector
GCG_EXPORT SCIP_Real getMaxWhiteScore ()
 gets the maximum white area score
GCG_EXPORT void prepare ()
GCG_EXPORT bool aggInfoCalculated ()
 Checks if the aggregation information was already calculated.
GCG_EXPORT void calcAggregationInformation (bool ignoreDetectionLimits)
 computes if aggregation of sub problems is possible
GCG_EXPORT std::vector< std::vector< int > > & getConssForBlocks ()
 gets vector of indices of all constraints assigned to blocks
GCG_EXPORT int getTranslatedpartialdecid () const
GCG_EXPORT void setTranslatedpartialdecid (int decid)
GCG_EXPORT void buildDecChainString (char *buffer)
 creates a detector chain short string for this partialdec, is built from detector chain
int getNVarsOfBlockInMasterCons (int masterconsindex, int block)
 returns the number of block vars contained in a master constraint
GCG_EXPORT std::string buildDecChainString ()
 creates a detector chain short string for this partialdec, is built from detector chain
GCG_EXPORT bool setSymmetryInformation (std::function< int(int)> blockmapping, std::function< int(int, int)> varmapping)
 sets symmetry information

Constructor & Destructor Documentation

◆ PARTIALDECOMP() [1/2]

◆ PARTIALDECOMP() [2/2]

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

◆ ~PARTIALDECOMP()

gcg::PARTIALDECOMP::~PARTIALDECOMP ( )

Standard destructor

Definition at line 380 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 433 of file class_partialdecomp.cpp.

References assert().

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

◆ addClockTime()

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

adds detection time of one detector

incorporates the needed time of some detector in the detector chain

Parameters
clocktimetime to be added

Definition at line 453 of file class_partialdecomp.cpp.

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

◆ addDecChangesFromAncestor()

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

adds the statistical differences to an ancestor

incorporates the changes from ancestor partialdec into the statistical data structures

Parameters
ancestorpartialdec whose propagation yielded to the current partialdec

Definition at line 461 of file class_partialdecomp.cpp.

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

Referenced by detect().

◆ addDetectorChainInfo()

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

add information about the detector chain

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

Parameters
decinfoinformation string (about the detector call) to add

Definition at line 482 of file class_partialdecomp.cpp.

Referenced by blocking(), detection(), detection(), detection(), detection(), detection(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), and GCG_DECL_PROPAGATEPARTIALDEC().

◆ addNNewBlocks()

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

adds how many new blocks were introduced

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

Parameters
nnewblocksnumber of new added blocks by latest detector call

Definition at line 501 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctConssFromFree()

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

adds percentage of closed constraints

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

Parameters
pctfraction of constraints that are not longer open

Definition at line 509 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctConssToBlock()

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

adds percentage of constraints assigned to blocks

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

Parameters
pctfraction of constraints assigned to a block

Definition at line 517 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctConssToBorder()

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

adds percentage of constraints assigned to border

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

Parameters
pctfraction constraints assigned to the border

Definition at line 525 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctVarsFromFree()

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

adds percentage of closed variables

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

Parameters
pctfraction of variables that are not longer open

Definition at line 533 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctVarsToBlock()

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

adds percentage of variables assigned to blocks

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

Parameters
pctfraction of variables assigned to a block

Definition at line 541 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp().

◆ addPctVarsToBorder()

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

adds percentage of variables assigned to border

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

Parameters
pctfraction of variables assigned to the border

Definition at line 549 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 557 of file class_partialdecomp.cpp.

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

◆ assignBorderFromConstoblock()

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

assigns open conss to master

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

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

Definition at line 566 of file class_partialdecomp.cpp.

References assert(), c, checkConsistency(), deleteOpencons(), getNOpenconss(), i, 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 596 of file class_partialdecomp.cpp.

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

Referenced by blocking(), and detection().

◆ assignOpenConssToMaster()

void gcg::PARTIALDECOMP::assignOpenConssToMaster ( )

assigns open conss to master

Definition at line 847 of file class_partialdecomp.cpp.

References setConsToMaster().

Referenced by GCGconshdlrDecompAddBasicPartialdec().

◆ assignPartialdecFromConstoblock()

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

assigns conss structure according to given hashmap

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

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

Definition at line 1001 of file class_partialdecomp.cpp.

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

Referenced by blocking(), and detection().

◆ assignPartialdecFromConstoblockVector()

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

assigns conss structure according to given vector

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

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

Definition at line 1047 of file class_partialdecomp.cpp.

References addBlock(), assert(), c, checkConsistency(), deleteEmptyBlocks(), deleteOpencons(), getNOpenconss(), i, 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 1094 of file class_partialdecomp.cpp.

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

Referenced by GCG_DECL_FINISHPARTIALDEC(), GCG_DECL_FINISHPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), and GCG_DECL_PROPAGATEPARTIALDEC().

◆ reorderBlocksForStairlinkingVars()

void gcg::PARTIALDECOMP::reorderBlocksForStairlinkingVars ( )

reorders blocks for making a maximum number of linking vars stairlinking

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 call PARTIALDEC::findVarsLinkingToStairlinking afterwards (this is also done by PARTIALDEC::prepare())

Note
precondition: partialdec does not have any stairlinking vars

Definition at line 1459 of file class_partialdecomp.cpp.

References assert(), checkConsistency(), gcg::GraphGCG::getEdgeWeight(), getNBlocks(), gcg::GraphGCG::getNeighbors(), gcg::GraphGCG::getNNeighbors(), getNTotalStairlinkingvars(), gcg::GraphGCG::GraphGCG(), i, 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 1687 of file class_partialdecomp.cpp.

References i.

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

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

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

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

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

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

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

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

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

References assert(), 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(), setVarToMaster(), and var.

Referenced by GCG_DECL_FINISHPARTIALDEC().

◆ completeGreedily()

◆ removeMastercons()

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

removes the given cons from master

Parameters
considid of cons

Definition at line 2784 of file class_partialdecomp.cpp.

References assert().

Referenced by GCG_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 2806 of file class_partialdecomp.cpp.

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

Referenced by detection(), detection(), detection(), detection(), GCG_DECL_FINISHPARTIALDEC(), GCG_DECL_FINISHPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCGconshdlrDecompAddPreexisitingPartialDec(), prepare(), and refineToMaster().

◆ copyPartitionStatistics()

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

copies the given partialdec's partition statistics

Parameters
otherpartialdecpartialdec whose partition statistics are to be copied

Definition at line 3009 of file class_partialdecomp.cpp.

References PARTIALDECOMP().

◆ deleteEmptyBlocks()

void gcg::PARTIALDECOMP::deleteEmptyBlocks ( bool variables)

deletes empty blocks and sets nblocks accordingly

A block is considered to be empty if no constraint is assigned to it, variables in blocks with no constraints become open

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

Definition at line 3019 of file class_partialdecomp.cpp.

References assert(), fixVarToBlock(), j, and sort().

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

◆ deleteOpencons() [1/2]

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

◆ deleteOpencons() [2/2]

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

deletes a cons from list of open conss

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openconss

Definition at line 3105 of file class_partialdecomp.cpp.

◆ deleteOpenvar() [1/2]

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

deletes a var from the list of open vars

Parameters
openvarid of the var that is not considered open anymore

Definition at line 3114 of file class_partialdecomp.cpp.

References assert().

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

◆ deleteOpenvar() [2/2]

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

deletes a var from the list of open vars

Parameters
itrvalid iterator pointing to elements of PARTIALDECOMP::openvars

Definition at line 3130 of file class_partialdecomp.cpp.

References assert().

◆ displayInfo()

◆ filloutBorderFromConstoblock()

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

every constraint is either assigned to master or open

Assignment happens according to the cons assignment information given in constoblock hashmap, variables are set accordingly

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

Definition at line 3492 of file class_partialdecomp.cpp.

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

◆ filloutPartialdecFromConstoblock()

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

assigns all conss to master or a block

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

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

Definition at line 3531 of file class_partialdecomp.cpp.

References alreadyAssignedConssToBlocks(), assert(), c, checkConsistency(), deleteEmptyBlocks(), getDetprobdata(), gcg::DETPROBDATA::getNConss(), gcg::DETPROBDATA::getNVars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::DETPROBDATA::getVarsForCons(), i, 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 3631 of file class_partialdecomp.cpp.

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

Referenced by prepare().

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

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

Referenced by prepare().

◆ getAncestorID()

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

gets partialdec id of given ancestor id

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

Definition at line 3853 of file class_partialdecomp.cpp.

References assert().

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

◆ setAncestorList()

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

set ancestor list directly

Parameters
newlistnew list of ancestor ids

Definition at line 3883 of file class_partialdecomp.cpp.

◆ removeAncestorID()

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

removes ancestor id from list

Parameters
ancestoridid to remove

Definition at line 3900 of file class_partialdecomp.cpp.

References i.

◆ addAncestorID()

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

adds ancestor id to back of list

Parameters
ancestorid of ancestor that is to be added

Definition at line 3891 of file class_partialdecomp.cpp.

References assert().

◆ getBlocksForEqClass()

const std::vector< int > & gcg::PARTIALDECOMP::getBlocksForEqClass ( int eqclass)

get a vector of block ids that are contained in the equivalence class eqclass

Parameters
eqclassid of the equivalence class
Returns
vector of block ids

Definition at line 3868 of file class_partialdecomp.cpp.

References aggInfoCalculated(), and assert().

Referenced by GCG_DECL_SCORECALC(), GCGconshdlrDecompCreateVarmapForPartialdec(), GCGconshdlrDecompPartialdecGetBlocksForEqClass(), GCGconshdlrDecompPartialdecGetNBlocksForEqClass(), and getRepVarmap().

◆ getReprBlockForEqClass()

int gcg::PARTIALDECOMP::getReprBlockForEqClass ( int eqclass)

get the representative block of the given equivalence class

Parameters
eqclassid of the equivalence class
Returns
id of the representative block

Definition at line 3875 of file class_partialdecomp.cpp.

References aggInfoCalculated(), and assert().

Referenced by GCGconshdlrDecompPartialdecGetReprBlockForEqClass().

◆ getDetectorClockTime()

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

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

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

Definition at line 3921 of file class_partialdecomp.cpp.

References assert().

◆ 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 3931 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
blockid of the block the constraint indices are returned
Returns
array containing constraints assigned to a block

Definition at line 3968 of file class_partialdecomp.cpp.

References assert().

Referenced by checkConsistency(), completeGreedily(), createDecompFromPartialdec(), createGraphNewDetection(), createTestPricingprobConss(), displayInfo(), fhook(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), isEqual(), setuparraysnewdetection(), writeGpNonzeros(), writePartialdec(), and writeTikzNonzeros().

◆ getDetectorchain()

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

returns detector chain as vector of detector pointers

Returns
detector chain as array of detector pointers

Definition at line 3977 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 4242 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 4248 of file class_partialdecomp.cpp.

◆ getID()

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

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

◆ getLinkingvarsForBlock()

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

returns vector of all linking var indices contained by the block

Returns
vector of var indices
Note
when accessed the vector is supposed to be sorted

Definition at line 4267 of file class_partialdecomp.cpp.

References assert(), and getID().

Referenced by calcAggregationInformation(), and setSymmetryInformation().

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

Referenced by checkConsistency(), createDecompFromPartialdec(), createGraphNewDetection(), displayInfo(), GCG_DECL_POSTPROCESSPARTIALDEC(), GCG_DECL_SCORECALC(), 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 4292 of file class_partialdecomp.cpp.

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

◆ getNCoeffsForBlock()

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

Gets the number of nonzero coeffs in a certain block.

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

Definition at line 4298 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 4309 of file class_partialdecomp.cpp.

Referenced by cmpGraphPair().

◆ getScore() [1/2]

◆ getScore() [2/2]

SCIP_Real gcg::PARTIALDECOMP::getScore ( )

returns the score of the partialdec (depending on enabled score)

Returns
the score

Definition at line 4381 of file class_partialdecomp.cpp.

References GCGgetCurrentScore(), and getScore().

◆ calcBlockAreaScore()

SCIP_Real gcg::PARTIALDECOMP::calcBlockAreaScore ( )

gets an intermediate score value for the blocks of a partialdec

Used by several score calculations, computed as (1 - fraction of block area to complete area)

Returns
intermediate score value

Definition at line 4388 of file class_partialdecomp.cpp.

References getNBlocks(), getNConss(), getNConssForBlock(), getNVars(), getNVarsForBlock(), and i.

Referenced by GCG_DECL_SCORECALC(), and GCG_DECL_SCORECALC().

◆ setScore()

void gcg::PARTIALDECOMP::setScore ( GCG_SCORE * score,
SCIP_Real scorevalue )

sets the scorevalue of score

Parameters
scorethe score
scorevaluevalue of the score

Definition at line 4334 of file class_partialdecomp.cpp.

References assert().

Referenced by getScore().

◆ hasSetppccardMaster()

SCIP_Bool gcg::PARTIALDECOMP::hasSetppccardMaster ( )

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

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

Definition at line 3415 of file class_partialdecomp.cpp.

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

Referenced by displayInfo(), GCG_DECL_SCORECALC(), GCG_DECL_SCORECALC(), 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 3444 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 3468 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 4408 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 4414 of file class_partialdecomp.cpp.

Referenced by GCGconshdlrDecompCheckConsistency().

◆ getNBlocks()

◆ getNConss()

◆ getNConssForBlock()

int gcg::PARTIALDECOMP::getNConssForBlock ( int block)

◆ getDetectorchainInfo()

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

Gets the detectorchain info vector.

Returns
detectorchain info vector

Definition at line 4441 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 4447 of file class_partialdecomp.cpp.

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

◆ getBlockStructure()

BLOCK_STRUCTURE * gcg::PARTIALDECOMP::getBlockStructure ( int block)

Returns the structure information of a specific block.

Parameters
blockblock id

Definition at line 4319 of file class_partialdecomp.cpp.

References assert().

Referenced by buildProblem().

◆ getBlockStructures()

std::vector< BLOCK_STRUCTURE * > & gcg::PARTIALDECOMP::getBlockStructures ( )

Returns the structure information of all blocks.

Definition at line 4328 of file class_partialdecomp.cpp.

◆ getNLinkingvars()

◆ getNMasterconss()

◆ getNMastervars()

◆ getNNewBlocks()

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

Gets number of blocks a detector added.

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

Definition at line 4465 of file class_partialdecomp.cpp.

References assert().

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

Referenced by createDecompFromPartialdec().

◆ getNTotalStairlinkingvars()

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

Referenced by addDecChangesFromAncestor(), assignBorderFromConstoblock(), assignPartialdecFromConstoblock(), assignPartialdecFromConstoblockVector(), blocking(), blockingDynamic(), blockingStatic(), completeByConnected(), completeByConnectedConssAdjacency(), completeGreedily(), connected(), connected(), gcg::BipartiteGraph< T >::createFromPartialMatrix(), gcg::HypercolGraph< T >::createFromPartialMatrix(), gcg::HyperrowcolGraph< T >::createFromPartialMatrix(), gcg::HyperrowGraph< T >::createFromPartialMatrix(), gcg::RowGraphWeighted< T >::createFromPartialMatrix(), createGraph(), createGraphFromPartialMatrix(), createPartialdecFromMasterconss(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::RowGraph< T >::createPartialdecFromPartition(), createRowindexList(), detection(), detectIsomorph(), displayInfo(), fhookForPartialdecs(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCGconshdlrDecompPartialdecGetNOpenConss(), gcg::GCGdialogExecExplore(), graphCompletible(), graphCompletible(), indexmapInit(), initData(), isComplete(), isTrivial(), rankOrderClustering(), rankOrderClusteringIteration(), rowsWithConstriction(), setupArrays(), writeGpNonzeros(), writeGpPartialdec(), writeTexPartialdec(), and writeTikzNonzeros().

◆ getNOpenvars()

◆ getNEquivalenceClasses()

int gcg::PARTIALDECOMP::getNEquivalenceClasses ( )

Gets the number of blockrepresentatives.

Returns
the number of blockrepresentatives

Definition at line 4515 of file class_partialdecomp.cpp.

Referenced by aggInfoCalculated(), GCG_DECL_SCORECALC(), and GCGconshdlrDecompPartialdecGetNEquivalenceClasses().

◆ getNStairlinkingvars()

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

Gets size of the vector containing stairlinking vars.

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

Definition at line 4521 of file class_partialdecomp.cpp.

References assert().

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

◆ getNVars()

◆ getNVarsForBlock()

◆ getNVarsForBlocks()

int gcg::PARTIALDECOMP::getNVarsForBlocks ( )

Gets overall number of vars assigned to a block.

Returns
number of vars that are assigned to any block

Definition at line 4546 of file class_partialdecomp.cpp.

◆ getOpenconss()

◆ getOpenvars()

◆ getPctVarsToBorder()

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

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

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

Definition at line 4570 of file class_partialdecomp.cpp.

References assert().

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

Referenced by createDecompFromPartialdec().

◆ getPctVarsToBlock()

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

Gets fraction of variables assigned to a block for a detector.

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

Definition at line 4594 of file class_partialdecomp.cpp.

References assert().

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

Referenced by createDecompFromPartialdec().

◆ getPctVarsFromFree()

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

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

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

Definition at line 4619 of file class_partialdecomp.cpp.

References assert().

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

Referenced by createDecompFromPartialdec().

◆ getPctConssToBorder()

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

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

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

Definition at line 4643 of file class_partialdecomp.cpp.

References assert().

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

Referenced by createDecompFromPartialdec().

◆ getPctConssToBlock()

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

Gets fraction of constraints assigned to a block for a detector.

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

Definition at line 4667 of file class_partialdecomp.cpp.

References assert().

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

Referenced by createDecompFromPartialdec().

◆ getPctConssFromFree()

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

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

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

Definition at line 4691 of file class_partialdecomp.cpp.

References assert().

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

Referenced by createDecompFromPartialdec().

◆ getEqClassForBlock()

int gcg::PARTIALDECOMP::getEqClassForBlock ( int blockid)

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

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

Definition at line 4707 of file class_partialdecomp.cpp.

References aggInfoCalculated(), and assert().

Referenced by GCGconshdlrDecompArePricingprobsIdenticalForPartialdec(), and GCGconshdlrDecompCreateVarmapForPartialdec().

◆ getRepVarmap()

std::vector< int > & gcg::PARTIALDECOMP::getRepVarmap ( int eqclass,
int eqclassblock )

Returns a vector that maps probvar indices of a block contained in an equivalence class to the probvar indices of the representative block of the class.

Parameters
eqclassid of the equivalence class
eqclassblockindex of block (with respect to eqclass)
Returns
probvar indices mapping

Definition at line 4715 of file class_partialdecomp.cpp.

References assert(), getBlocksForEqClass(), and getVarsForBlock().

Referenced by GCGconshdlrDecompCreateVarmapForPartialdec(), and GCGconshdlrDecompPartialdecGetRepVarMap().

◆ getDetprobdata()

◆ getStairlinkingvars()

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

Gets vector containing stairlinking vars,.

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

Definition at line 4747 of file class_partialdecomp.cpp.

References assert().

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

◆ getVarsForBlock()

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

◆ getVarProbindexForBlock()

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

Gets the index of a variable in the vector returned by PARTIALDECOMP::getVarsForBlock.

Parameters
varidthe id of the variable
blockthe corresponding block id
Returns
the index of the variable or -1 if var is not in block

Definition at line 4780 of file class_partialdecomp.cpp.

References assert().

Referenced by createGraphNewDetection(), gcg::BLOCK_STRUCTURE::createPartialdec(), GCGconshdlrDecompCreateVarmapForPartialdec(), and readJDec().

◆ isComplete()

◆ isConsMastercons()

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

Gets whether the cons is a master cons.

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

Definition at line 4817 of file class_partialdecomp.cpp.

References assert().

Referenced by assignSmallestComponentsButOneConssAdjacency(), completeByConnectedConssAdjacency(), completeGreedily(), considerImplicits(), GCG_DECL_POSTPROCESSPARTIALDEC(), GCG_DECL_SCORECALC(), and GCG_DECL_SCORECALC().

◆ isConsOpencons()

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

Gets whether the cons is an open cons.

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

Definition at line 4826 of file class_partialdecomp.cpp.

References assert().

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

◆ isAssignedToOrigProb()

bool gcg::PARTIALDECOMP::isAssignedToOrigProb ( )

◆ isAssignedToPresolvedProb()

bool gcg::PARTIALDECOMP::isAssignedToPresolvedProb ( )

Gets whether the partialdec is from the presolved problem.

Returns
true iff the partialdec is from the presolved problem

Definition at line 4841 of file class_partialdecomp.cpp.

Referenced by gcg::GCGdialogExecExplore().

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

Referenced by GCGconshdlrDecompIsSelected(), gcg::GCGdialogExecExplore(), and gcg::GCGdialogSelect().

◆ isEqual() [1/2]

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

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

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

Definition at line 4847 of file class_partialdecomp.cpp.

References isEqual(), PARTIALDECOMP(), and sort().

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

◆ isEqual() [2/2]

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

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

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

Definition at line 4865 of file class_partialdecomp.cpp.

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

◆ isNested()

bool gcg::PARTIALDECOMP::isNested ( )

Checks whether this is a nested decomposition.

Returns
true iff the decomposition is nested

Definition at line 4957 of file class_partialdecomp.cpp.

Referenced by buildProblem().

◆ isPropagatedBy()

bool gcg::PARTIALDECOMP::isPropagatedBy ( GCG_DETECTOR * detector)

Gets whether this partialdec was propagated by specified detector.

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

Definition at line 4963 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 4973 of file class_partialdecomp.cpp.

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

Referenced by GCG_DECL_SCORECALC(), and GCG_DECL_SCORECALC().

◆ isVarBlockvarOfBlock()

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

Checks whether the var is assigned to the block.

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

Definition at line 4997 of file class_partialdecomp.cpp.

References assert(), and var.

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

◆ isVarLinkingvar()

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

Checks whether the var is a linking var.

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

Definition at line 5018 of file class_partialdecomp.cpp.

References assert(), and var.

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

◆ isVarLinkingvarOfBlock()

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

Checks whether the var is a linking var contained by the block.

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

Definition at line 5027 of file class_partialdecomp.cpp.

References assert(), getID(), and var.

Referenced by checkConsistency().

◆ isVarMastervar()

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

Checks whether the var is a master var.

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

Definition at line 5009 of file class_partialdecomp.cpp.

References assert(), and var.

Referenced by assignSmallestComponentsButOneConssAdjacency(), completeByConnectedConssAdjacency(), considerImplicits(), GCG_DECL_POSTPROCESSPARTIALDEC(), GCG_DECL_SCORECALC(), and GCG_DECL_SCORECALC().

◆ isVarOpenvar()

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

Checks whether the var is an open var.

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

Definition at line 5048 of file class_partialdecomp.cpp.

References assert(), and var.

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

◆ isVarStairlinkingvar()

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

Checks whether the var is a stairlinking var.

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

Definition at line 5057 of file class_partialdecomp.cpp.

References var.

Referenced by createPartialdecFromDecomp(), GCG_DECL_POSTPROCESSPARTIALDEC(), and GCG_DECL_SCORECALC().

◆ isVarStairlinkingvarOfBlock()

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

Checks whether the var is a stairlinkingvar of a specified block.

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

Definition at line 5071 of file class_partialdecomp.cpp.

References assert(), and var.

Referenced by checkConsistency(), and completeGreedily().

◆ printPartitionInformation()

void gcg::PARTIALDECOMP::printPartitionInformation ( FILE * file)

prints partition information as described in

See also
cls reader
Parameters
fileoutput file

Definition at line 5094 of file class_partialdecomp.cpp.

References i.

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

References sort(), and success.

Referenced by complete(), detection(), detection(), detection(), detection(), GCG_DECL_FINISHPARTIALDEC(), GCG_DECL_FINISHPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), and GCG_DECL_PROPAGATEPARTIALDEC().

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

References considerImplicits().

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

◆ setConsPartitionStatistics()

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

registers statistics for a used conspartition

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

Definition at line 5186 of file class_partialdecomp.cpp.

References assert().

Referenced by GCG_DECL_PROPAGATEPARTIALDEC().

◆ setConsToBlock()

void gcg::PARTIALDECOMP::setConsToBlock ( int consToBlock,
int block )

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

Parameters
consToBlockid of cons to add
blockid of block to add

Definition at line 5205 of file class_partialdecomp.cpp.

References assert().

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

◆ fixConsToBlock() [1/2]

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

◆ fixConsToBlock() [2/2]

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

adds a constraint to a block

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

Definition at line 5236 of file class_partialdecomp.cpp.

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

◆ setConsToMaster()

void gcg::PARTIALDECOMP::setConsToMaster ( int consToMaster)

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

Parameters
consToMasterid of cons to add

Definition at line 5252 of file class_partialdecomp.cpp.

References assert().

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

◆ fixConsToMaster() [1/3]

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

fixes a constraint to the master constraints

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

Definition at line 5264 of file class_partialdecomp.cpp.

References assert(), deleteOpencons(), and setConsToMaster().

Referenced by considerImplicits(), gcg::BLOCK_STRUCTURE::createPartialdec(), createPartialdecFromDecomp(), fixConsToMaster(), fixConsToMasterByName(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCG_DECL_PROPAGATEPARTIALDEC(), GCGconshdlrDecompAddPreexisitingPartialDec(), and readMasterconss().

◆ fixConsToMaster() [2/3]

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

fixes a constraint to the master constraints

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

Definition at line 5275 of file class_partialdecomp.cpp.

References assert(), deleteOpencons(), and setConsToMaster().

◆ fixConsToMaster() [3/3]

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

fixes a constraint to the master constraints

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

Definition at line 5286 of file class_partialdecomp.cpp.

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

◆ setDetectorchain()

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

sets the detectorchain with the given vector of detector pointers

Parameters
givenDetectorChainvector of detector pointers

Definition at line 5300 of file class_partialdecomp.cpp.

◆ setDetectorPropagated()

void gcg::PARTIALDECOMP::setDetectorPropagated ( GCG_DETECTOR * detector)

sets partialdec to be propagated by a detector

Parameters
detectorpointer to detector that is registered for this partialdec

Definition at line 5308 of file class_partialdecomp.cpp.

Referenced by createPartialdecFromDecomp(), and detect().

◆ setDetectorFinished()

void gcg::PARTIALDECOMP::setDetectorFinished ( GCG_DETECTOR * detector)

sets detector that finished the partialdec

Parameters
detectorpointer to detector that has finished this partialdecs

Definition at line 5317 of file class_partialdecomp.cpp.

Referenced by detect().

◆ setDetectorFinishedOrig()

void gcg::PARTIALDECOMP::setDetectorFinishedOrig ( )

sets detector that finished the partialdec in the original problem

Note
does not add the detector to the detectorchain and does not modify partition statistics

Definition at line 5327 of file class_partialdecomp.cpp.

◆ setFinishedByFinisher()

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

sets whether this partialdec was finished by a finishing detector

Parameters
finishedis this partialdecs finished by a finishing detector

Definition at line 5334 of file class_partialdecomp.cpp.

Referenced by detect().

◆ setFinishedByFinisherOrig()

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

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

(in case this partialdec was translated)

Parameters
finishedwas this partialdecs finished by a finishing detector in orig

Definition at line 5342 of file class_partialdecomp.cpp.

◆ setNBlocks()

◆ setBlockStructure()

void gcg::PARTIALDECOMP::setBlockStructure ( int block,
BLOCK_STRUCTURE * blockstructure )

sets structure information of a specific block

Parameters
blockblock id
blockstructurestructure information

Definition at line 5378 of file class_partialdecomp.cpp.

References assert(), and setNBlocks().

Referenced by gcg::BLOCK_STRUCTURE::createPartialdec(), and readJDec().

◆ setSelected()

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

set the selection status of this partialdecs

Parameters
selectedwhether the partialdec is selected

Definition at line 5395 of file class_partialdecomp.cpp.

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

◆ setStemsFromOrig()

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

sets whether this partialdec stems from an orig problem partialdec

Parameters
fromorighas this partialdec ancestors from the orig problem

Definition at line 5403 of file class_partialdecomp.cpp.

◆ setUsergiven()

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

sets whether this partialdec is user given

Parameters
usergivenis this partialdec user given

Definition at line 5411 of file class_partialdecomp.cpp.

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

◆ setVarPartitionStatistics()

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

registers statistics for a used varpartition

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

Definition at line 5419 of file class_partialdecomp.cpp.

References assert().

Referenced by GCG_DECL_PROPAGATEPARTIALDEC().

◆ setVarToBlock()

void gcg::PARTIALDECOMP::setVarToBlock ( int varToBlock,
int block )

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

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

Definition at line 5442 of file class_partialdecomp.cpp.

References assert().

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

◆ fixVarToBlock() [1/2]

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

adds a variable to the linking variables

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

Definition at line 5457 of file class_partialdecomp.cpp.

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

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

◆ fixVarToBlock() [2/2]

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

adds a variable to the linking variables

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

Definition at line 5474 of file class_partialdecomp.cpp.

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

◆ setVarToLinking()

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

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

Parameters
varToLinkingvar to be set to linking

Definition at line 5491 of file class_partialdecomp.cpp.

References assert().

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

◆ fixVarToLinking() [1/2]

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

adds a variable to the linking variables

Parameters
varvar to be set to linking

Definition at line 5502 of file class_partialdecomp.cpp.

References assert(), deleteOpenvar(), setVarToLinking(), and var.

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

◆ fixVarToLinking() [2/2]

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

adds a variable to the linking variables

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

Definition at line 5528 of file class_partialdecomp.cpp.

References assert(), deleteOpenvar(), and setVarToLinking().

◆ setVarToMaster()

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

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

master variables hit only constraints in the master

Parameters
varToMastervar to be set to master

Definition at line 5554 of file class_partialdecomp.cpp.

References assert().

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

◆ fixVarToMaster() [1/2]

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

adds a variable to the master variables

master variables hit only constraints in the master

Parameters
varvar to be set to master

Definition at line 5566 of file class_partialdecomp.cpp.

References assert(), deleteOpenvar(), setVarToMaster(), and var.

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

◆ fixVarToMaster() [2/2]

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

adds a variable to the master variables

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

Definition at line 5578 of file class_partialdecomp.cpp.

References assert(), deleteOpenvar(), and setVarToMaster().

◆ setVarToStairlinking()

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

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

Parameters
varToStairLinkingid of variable to be added
block1id of block one
block2id of block two
Note
stairlinking variables are only registered in block with smaller index

Definition at line 5590 of file class_partialdecomp.cpp.

References assert().

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

◆ fixVarToStairlinking() [1/2]

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

adds a variable to the stairlinking variables

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

Definition at line 5611 of file class_partialdecomp.cpp.

References assert(), deleteOpenvar(), setVarToStairlinking(), and var.

Referenced by createPartialdecFromDecomp().

◆ fixVarToStairlinking() [2/2]

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

adds a variable to the stairlinking variables

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

Definition at line 5625 of file class_partialdecomp.cpp.

References assert(), and setVarToStairlinking().

◆ fixConsToBlockByName()

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

assigns a constraint by name to a block

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

Definition at line 5639 of file class_partialdecomp.cpp.

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

Referenced by fillDecompStruct(), readBlockconss(), and readJDec().

◆ fixVarToBlockByName()

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

assigns a variable by name to a block

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

Definition at line 5655 of file class_partialdecomp.cpp.

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

Referenced by readBlock(), and readBlockvars().

◆ fixConsToMasterByName()

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

assgins a constraint by name as master

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

Definition at line 5673 of file class_partialdecomp.cpp.

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

Referenced by fillDecompStruct(), readJDec(), and readMasterconss().

◆ fixVarToMasterByName()

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

assigns a variable with given name as master

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

Definition at line 5687 of file class_partialdecomp.cpp.

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

Referenced by fillDecompStruct(), and readMastervars().

◆ fixVarToLinkingByName()

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

assigns a variable by name to the linking variables

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

Definition at line 5701 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 5715 of file class_partialdecomp.cpp.

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

Referenced by gcg::GCGdialogSelectVisualize().

◆ generateVisualization()

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

generates a visualization of the partialdec using gnuplot

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

Definition at line 5751 of file class_partialdecomp.cpp.

References writeVisualizationFile().

Referenced by showVisualization().

◆ writeVisualizationFile()

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

writes a gp visualization of the partialdec to a file

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

Definition at line 5778 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 5789 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 5801 of file class_partialdecomp.cpp.

References gcg::COMPLETED_CONSTOMASTER.

Referenced by GCGconshdlrDecompAddPreexisitingPartialDec().

◆ sort()

◆ setPctConssToBlockVector()

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

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

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

Definition at line 4683 of file class_partialdecomp.cpp.

◆ setPctConssFromFreeVector()

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

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

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

Definition at line 4739 of file class_partialdecomp.cpp.

◆ setPctConssToBorderVector()

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

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

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

Definition at line 4659 of file class_partialdecomp.cpp.

◆ setPctVarsToBorderVector()

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

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

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

Definition at line 4586 of file class_partialdecomp.cpp.

◆ setPctVarsToBlockVector()

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

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

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

Definition at line 4611 of file class_partialdecomp.cpp.

◆ setPctVarsFromFreeVector()

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

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

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

Definition at line 4635 of file class_partialdecomp.cpp.

◆ setDetectorClockTimes()

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

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

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

Definition at line 3950 of file class_partialdecomp.cpp.

◆ getMaxWhiteScore()

SCIP_Real gcg::PARTIALDECOMP::getMaxWhiteScore ( )

gets the maximum white area score

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

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

Definition at line 5874 of file class_partialdecomp.cpp.

References assert(), GCGconshdlrDecompFindScore(), and getScore().

Referenced by createDecompFromPartialdec(), and GCGprintDecompInformation().

◆ prepare()

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

References getNBlocks(), and getNEquivalenceClasses().

Referenced by calcAggregationInformation(), gcg::BLOCK_STRUCTURE::createPartialdec(), GCGconshdlrDecompArePricingprobsIdenticalForPartialdec(), GCGconshdlrDecompPartialdecAggregationInformationCalculated(), getBlocksForEqClass(), getEqClassForBlock(), and getReprBlockForEqClass().

◆ calcAggregationInformation()

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

computes if aggregation of sub problems is possible

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

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

Definition at line 1270 of file class_partialdecomp.cpp.

References aggInfoCalculated(), getLinkingvarsForBlock(), getNBlocks(), getNVarsForBlock(), i, isComplete(), and SCIPdebugMessage().

Referenced by GCG_DECL_SCORECALC(), GCGconshdlrDecompArePricingprobsIdenticalForPartialdec(), and GCGconshdlrDecompPartialdecCalcAggregationInformation().

◆ getConssForBlocks()

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

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

◆ getTranslatedpartialdecid()

int gcg::PARTIALDECOMP::getTranslatedpartialdecid ( ) const

◆ setTranslatedpartialdecid()

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

Definition at line 5912 of file class_partialdecomp.cpp.

◆ buildDecChainString() [1/2]

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

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

Parameters
bufferwill contain string of detector chars in chronological order afterwards

Definition at line 5842 of file class_partialdecomp.cpp.

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

Referenced by buildDecChainString(), createDecompFromPartialdec(), GCGconshdlrDecompPartialdecGetDetectorHistory(), gcg::GCGdialogExecExplore(), GCGgetVisualizationFilename(), and GCGwriteTexReport().

◆ getNVarsOfBlockInMasterCons()

int gcg::PARTIALDECOMP::getNVarsOfBlockInMasterCons ( int masterconsindex,
int block )

returns the number of block vars contained in a master constraint

Parameters
masterconsindexindex of master constraint
blockblock id

Definition at line 5919 of file class_partialdecomp.cpp.

Referenced by createGraphNewDetection().

◆ buildDecChainString() [2/2]

std::string gcg::PARTIALDECOMP::buildDecChainString ( )

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

Definition at line 5865 of file class_partialdecomp.cpp.

References buildDecChainString().

◆ setSymmetryInformation()

bool gcg::PARTIALDECOMP::setSymmetryInformation ( std::function< int(int)> blockmapping,
std::function< int(int, int)> varmapping )

sets symmetry information

Each block b must be mapped to its representative block rb with rb <= b. Furthermore, rb must be mapped to itself. It is assumed that a variable assigned to a representative block is mapped to itself (varmapping does not have to cover this case).

Parameters
blockmappingfunction that maps block ids to the ids of the representative blocks
varmappingfunction that maps tuples (block, variable index (in the block)) to the indices of the representative variables (in their blocks)
Returns
true iff symmetry information was stored successfully

Definition at line 5929 of file class_partialdecomp.cpp.

References assert(), getDetprobdata(), getLinkingvarsForBlock(), getNBlocks(), getNVarsForBlock(), i, isComplete(), SCIPdebugMessage(), and success.

Referenced by gcg::BLOCK_STRUCTURE::createPartialdec(), and readJDec().