Loading...
Searching...
No Matches
class_partialdecomp.cpp
Go to the documentation of this file.
37/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
84const int PARTIALDECOMP::primes[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,
85 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227,
86 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349};
105 PARTIALDECOMP* partialdec = new PARTIALDECOMP(newdetprobdata->getGcg(), newdetprobdata->isAssignedToOrigProb());
114 SCIPsnprintf(buffer, SCIP_MAXSTRLEN, "p%d_%s", probnr, SCIPconsGetName(parentdetprobdata->getCons(cons)));
122 SCIPsnprintf(buffer, SCIP_MAXSTRLEN, "pr%d_%s", probnr, SCIPvarGetName(parentdetprobdata->getVar(var)));
236 blockstructure->blockstructures.push_back(block->translateStructure(rowmapping, colmapping, translatesymmetry));
249 mastervars( 0 ), conssforblocks( 0 ), varsforblocks( 0 ), linkingvars( 0 ), linkingvarsforblocks(0), stairlinkingvars( 0 ),
253 masterconsssorted(true), hashvalue( 0 ), hvoutdated(true), isselected( false ), isagginfoalreadytoexpensive(false), isfinishedbyfinisher( false ),
254 nequivalenceclasses(0), eqclasstoblocks(std::vector<std::vector<int>>(0)), blockstoeqclasses(std::vector<int>(0) ), eqclassesvarmappings(std::vector<std::vector<std::vector<int> > >(0)),
256 pctvarstoblock( 0 ), pctvarsfromfree( 0 ), pctconsstoborder( 0 ), pctconsstoblock( 0 ), pctconssfromfree( 0 ),
257 nnewblocks( 0 ), usedpartition(0 ), classestomaster(0 ), classestolinking(0 ), listofancestorids(0 ),
258 usergiven( USERGIVEN::NOT ), stemsfromorig( false ), original( originalProblem ), translatedpartialdecid( -1 )
289 SCIP_CALL_EXC( SCIPhashmapSetImageReal(maptoscores, (void*)GCGconshdlrDecompGetScores(gcg)[i], SCIP_INVALID) );
371 SCIP_CALL_EXC( SCIPhashmapSetImageReal(maptoscores, (void*)GCGconshdlrDecompGetScores(gcg)[i], SCIP_INVALID) );
469 pctconssfromfree.push_back( getNConss() != 0 ? ( ancestor->getNOpenconss() - getNOpenconss() ) / (SCIP_Real) getNConss() : 0. );
470 pctvarsfromfree.push_back( getNVars() != 0 ? ( ancestor->getNOpenvars() - getNOpenvars() ) / (SCIP_Real) getNVars() : 0. );
472 ( - getNOpenconss() - getNMasterconss() + ancestor->getNOpenconss() + ancestor->getNMasterconss() ) / getNConss() : 0. );
473 pctvarstoblock.push_back( getNVars() != 0 ? ( - getNOpenvars() - getNMastervars() - getNLinkingvars() - getNTotalStairlinkingvars() + ancestor->getNOpenvars()
474 + ancestor->getNMastervars() + ancestor->getNLinkingvars() + ancestor->getNTotalStairlinkingvars() ) / getNVars() : 0. );
475 pctconsstoborder.push_back( getNConss() != 0 ? ( getNMasterconss() - ancestor->getNMasterconss() ) / (SCIP_Real) getNConss() : 0. );
476 pctvarstoborder.push_back( getNVars() != 0 ? ( getNMastervars() + getNLinkingvars() + getNTotalStairlinkingvars() - ancestor->getNMastervars()
477 - ancestor->getNLinkingvars() - ancestor->getNTotalStairlinkingvars() ) / (SCIP_Real) getNVars() : 0. );
579 if( (int) (size_t) SCIPhashmapGetImage( constoblock, (void*) (size_t) cons ) - 1 == givenNBlocks )
652 std::vector<int> blocksOfStairlinkingvars; /* first block of the stairlinkingvars which can be found in the conss */
689 std::vector<int>::iterator lb = lower_bound( stairlinkingvars[b].begin(), stairlinkingvars[b].end(), var2 );
1022 consblock = oldNBlocks + ( (int) (size_t) SCIPhashmapGetImage( constoblock, (void*) (size_t) cons ) - 1 );
1097 std::vector<int> varinblocks(nvars, -1); /* stores, in which block the variable can be found */
1253 SCIPdebugMessage("Checking if agg info is too expensive for blocks %d and %d, nconss: %d, nvars: %d . \n", b1, b2, getNConssForBlock(b2), getNVarsForBlock(b2) );
1256 SCIPdebugMessage("Calculating agg info is too expensive, nconss: %d, nvars: %d . \n", getNConssForBlock(b2), getNVarsForBlock(b2) );
1465 std::vector< std::pair< int, std::vector< int > > > blocksOfVars = findLinkingVarsPotentiallyStairlinking( );
1467 /* if there are no vars that are potentially stairlinking, return without further calculations */
1473 /* create block graph: every block is represented by a node and two nodes are adjacent if there exists a
1491 bool isstaircase = true; /* maintains information whether staircase structure is still possible */
1493 std::vector< bool > marks( getNBlocks() ); /* a node is marked if its degree is zero or it is reachable from a source */
1590 /* if the block is the source of an yet unconsidered path, assign whole path to ascending new block ids */
1735 SCIPwarningMessage(scip, "In (partialdec %d) nblocks %d and size of conssforblocks %ld are not identical! \n" , id, nblocks, conssforblocks.size() );
1742 SCIPwarningMessage(scip, "In (partialdec %d) nblocks %d and size of varsforblocks %ld are not identical! \n" , id, nblocks, varsforblocks.size() );
1763 SCIPwarningMessage(scip, "In (partialdec %d) linking variable with index %d is already assigned! \n" , id, * varIter );
1778 SCIPwarningMessage(scip, "In (partialdec %d) variable with index %d is already assigned but also assigned to block %d! \n" , id, * varIter, b );
1791 SCIPwarningMessage(scip, "In (partialdec %d) variable with index %d is already assigned but also assigned to master! \n" , id, * varIter);
1806 SCIPwarningMessage(scip, "In (partialdec %d) variable with index %d is already assigned but also assigned to stairlinking block %d! \n" , id, * varIter, b );
1814 SCIPwarningMessage(scip, "In (partialdec %d) variable with index %d is is as assigned as stairlinking var of last block! \n" , id, * varIter );
1825 SCIPwarningMessage(scip, "In (partialdec %d) variable with index %d is not assigned and not an open var! \n" , id, v );
1836 SCIPwarningMessage(scip, "In (partialdec %d) variable with index %d is an open var but assigned! \n" , id, openvars[i] );
1846 SCIPwarningMessage(scip, "In (partialdec %d) variable with index %d is causes asynchronity with isvaropen array ! \n" , id, openvars[i] );
1863 SCIPwarningMessage(scip, "In (partialdec %d) constraint with index %d is at least two times assigned as a master constraint! \n" , id, * consIter );
1877 SCIPwarningMessage(scip, "In (partialdec %d) constraint with index %d is already assigned but also assigned to block %d! \n" , id, * consIter, b );
1890 SCIPwarningMessage(scip, "In (partialdec %d) constraint with index %d is not assigned and not an open cons! \n" , id, v );
1901 SCIPwarningMessage(scip, "In (partialdec %d) constraint with index %d is an open cons but assigned! \n" , id, openconss[i] );
1915 SCIPwarningMessage(scip, "In (partialdec %d) variables of block %d are not sorted! \n" , id, b );
1929 SCIPwarningMessage(scip, "In (partialdec %d) stairlinking variables of block %d are not sorted! \n" , id, b );
1965 SCIPwarningMessage(scip, "In (partialdec %d) constraints of block %d are not sorted! \n" , id, b );
1994 if( !(isVarBlockvarOfBlock(varid, b) || (isVarLinkingvar(varid) && (linkingvarsforblocks.empty() || isVarLinkingvarOfBlock(varid, b)))
2002 "This should only happen during translation of (partial) decompositions from orginal to transformed problem, and means that translation has failed for this particaluar partial decomposition. Variable %d is not part of block %d or linking or open as constraint %d suggests! \n ", varid, b,
2036 if( getNDetectors() != (int) pctvarstoblock.size() || getNDetectors() != (int) pctvarstoborder.size()
2037 || getNDetectors() != (int) pctvarsfromfree.size() || getNDetectors() != (int) pctconsstoblock.size()
2038 || getNDetectors() != (int) pctconsstoborder.size() || getNDetectors() != (int) pctconssfromfree.size() )
2128 SCIPdebugMessage("--> obj differs for var %s and var %s!\n", SCIPvarGetName(var1), SCIPvarGetName(var2));
2133 SCIPdebugMessage("--> lb differs for var %s and var %s!\n", SCIPvarGetName(var1), SCIPvarGetName(var2));
2138 SCIPdebugMessage("--> ub differs for var %s and var %s!\n", SCIPvarGetName(var1), SCIPvarGetName(var2));
2143 SCIPdebugMessage("--> type differs for var %s and var %s!\n", SCIPvarGetName(var1), SCIPvarGetName(var2));
2150 if( !SCIPisEQ(scip, detprobdata->getVal(getMasterconss()[mc], getVarsForBlock(b1)[i]), detprobdata->getVal(getMasterconss()[mc], getVarsForBlock(b2)[i]) ))
2152 SCIPdebugMessage("--> master coefficients differ for var %s (%f) and var %s (%f) !\n", SCIPvarGetName(
2153 detprobdata->getVar(getVarsForBlock(b1)[i]) ), detprobdata->getVal(getMasterconss()[mc], getVarsForBlock(b1)[i]), SCIPvarGetName(
2154 detprobdata->getVar(getVarsForBlock(b2)[i])), detprobdata->getVal(getMasterconss()[mc], getVarsForBlock(b2)[i]) );
2185 SCIPdebugMessage("--> nvars differs for cons %s and cons %s!\n", SCIPconsGetName(cons1), SCIPconsGetName(cons2));
2191 SCIPdebugMessage("--> lhs differs for cons %s and cons %s!\n", SCIPconsGetName(cons1), SCIPconsGetName(cons2));
2197 SCIPdebugMessage("--> rhs differs for cons %s and cons %s!\n", SCIPconsGetName(cons1), SCIPconsGetName(cons2));
2210 SCIPdebugMessage("--> coefs differ for cons %s and cons %s!\n", SCIPconsGetName(cons1), SCIPconsGetName(cons2));
2218 if( tmpvarmap[detprobdata->getVarsForCons(cons2id)[v]] != detprobdata->getVarsForCons(cons1id)[v])
2222 SCIPdebugMessage("--> vars differ for cons %s and cons %s!\n", SCIPconsGetName(cons1), SCIPconsGetName(cons2));
2579 if( varinblocks.size() == 1 ) /* if the variable can be found in one block set the variable to a variable of the block*/
2585 else if( varinblocks.size() == 2 ) /* if the variable can be found in two blocks check if it is a linking var or a stairlinking var*/
2600 else if( varinblocks.size() > 2 ) /* if the variable can be found in more than two blocks it is a linking var */
2670 /* check if all vars of the constraint are a block var of the current block, an open var, a linkingvar or a mastervar*/
2678 || ( j != 0 && isVarStairlinkingvarOfBlock( detprobdata->getVarsForCons( openconss[i] )[k], j - 1 ) ) )
2688 consGotBlockcons = false; /* the constraint can't be constraint of the block, check the next block */
3188 std::cout << " PARTIALDECOMP is for the " << (original ? "original" : "presolved" ) << " problem and "
3198 std::cout << " PARTIALDECOMP stems from the " << ( stemsfromorig ? "original" : "presolved" ) << " problem." << std::endl;
3209 std::cout << " " << getNDetectors() << " detector" << ( getNDetectors() > 1 ? "s" : "" ) << " worked on this partialdec:";
3435 std::cout << " cons with name " << SCIPconsGetName(detprobdata->getCons(consid)) << " is no setppccard constraint." << std::endl;
3557 assert( (int) (size_t) SCIPhashmapGetImage( constoblock, (void*) (size_t) c ) - 1 <= nblocks );
3592 for( int l = 0; l < detprobdata->getNVarsForCons( conssforblocks[b][k] ) && ! varInBlock; ++ l )
3602 if( varinblocks.size() == 1 ) /* if the var can be found in one block set the var to block var */
3604 else if( varinblocks.size() == 2 ) /* if the variable can be found in two blocks check if it is a linking var or a stairlinking var*/
3754 auto it = std::lower_bound(linkingvarsforblocks[block1].begin(), linkingvarsforblocks[block1].end(), lvars[i]);
3757 it = std::lower_bound(linkingvarsforblocks[block2].begin(), linkingvarsforblocks[block2].end(), lvars[i]);
3801std::vector< std::pair< int, std::vector< int > > > PARTIALDECOMP::findLinkingVarsPotentiallyStairlinking(
3992 output << " % newly assigned constraints: " << getPctConssFromFree( detectorchainindex ) << std::endl;
3994 output << " % constraints the detector assigned to border: " << getPctConssToBorder( detectorchainindex ) << std::endl;
3996 output << " % constraints the detector assigned to blocks: " << getPctConssToBlock( detectorchainindex ) << std::endl;
3998 output << " % newly assigned variables: " << getPctVarsFromFree( detectorchainindex ) << std::endl;
4000 output << " % variables the detector assigned to border: " << getPctVarsToBorder( detectorchainindex ) << std::endl;
4002 output << " % variables the detector assigned to blocks: " << getPctVarsToBlock( detectorchainindex ) << std::endl;
4276 SCIPerrorMessage("Information about linking var blocks is not available for partialdec %d.", getID());
4399 blockarea += (unsigned long) this->getNConssForBlock(i) * ( (unsigned long) this->getNVarsForBlock(i) );
4720 assert(eqclassesvarmappings[eqclass][eqclassblock].size() == getVarsForBlock(getBlocksForEqClass(eqclass).at(eqclassblock)).size());
4809 std::vector<int>::iterator lb = lower_bound( conssforblocks[block].begin(), conssforblocks[block].end(), cons );
4869 if( getNMasterconss() != other->getNMasterconss() || getNMastervars() != other->getNMastervars()
5038 SCIPerrorMessage("Information about linking var blocks is not available for partialdec %d.", getID());
5044 return std::binary_search(linkingvarsforblocks[block].begin(), linkingvarsforblocks[block].end(), var);
5078 std::vector<int>::iterator lb = lower_bound(stairlinkingvars[block].begin(), stairlinkingvars[block].end(), var);
5133 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%s\n", usedpartition[i]->getClassName(classid));
5152 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%s : %s\n", usedpartition[i]->getClassName(classid), usedpartition[i]->getClassDescription(classid));
5159 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "%s : %s\n", usedpartition[i]->getClassName(classid), usedpartition[i]->getClassDescription(classid));
5748 SCIPinfoMessage(scip, NULL, "Please note that the generated pdf file was not deleted automatically! \n");
SCIP_RETCODE cmpGraphPair(SCIP *scip, gcg::PARTIALDECOMP *partialdec, int block1, int block2, SCIP_RESULT *result, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, unsigned int searchnodelimit, unsigned int generatorlimit)
Definition automorphism.cpp:845
automorphism recognition of SCIPs
automorphism recognition (C++ interface)
SCIP_VAR * w
SCIP_VAR * a
SCIP_VAR ** b
class storing partialdecs and the problem matrix
class storing (potentially incomplete) decompositions
Definition class_conspartition.h:60
GCG_EXPORT int getClassOfCons(int consindex)
Definition class_conspartition.cpp:133
Definition class_detprobdata.h:110
GCG_EXPORT std::vector< int > & getConssForVar(int varIndex)
returns the constraint indices of the coefficient matrix for a variable
Definition class_detprobdata.cpp:762
GCG_EXPORT int getIndexForCons(SCIP_CONS *cons)
returns the constraint index related to a SCIP constraint
Definition class_detprobdata.cpp:792
GCG_EXPORT int getNConss()
returns the number of variables considered in the detprobdata
Definition class_detprobdata.cpp:850
GCG_EXPORT SCIP * getScip()
returns the corresponding scip data structure
Definition class_detprobdata.cpp:934
GCG_EXPORT int getNVarsForCons(int consIndex)
returns the number of variables for a given constraint
Definition class_detprobdata.cpp:908
GCG_EXPORT bool isConsCardinalityCons(int consindexd)
returns whether a constraint is a cardinality constraint, i.e. of the
Definition class_detprobdata.cpp:1031
GCG_EXPORT int getNVars()
return the number of variables considered in the detprobdata
Definition class_detprobdata.cpp:902
GCG_EXPORT bool isConsSetppc(int consindexd)
is cons with specified index partitioning packing, or covering constraint?
Definition class_detprobdata.cpp:1051
GCG_EXPORT int getNConssForVar(int varIndex)
returns the number of constraints for a given variable where the var has a nonzero entry in
Definition class_detprobdata.cpp:864
GCG_EXPORT std::vector< int > & getConssForCons(int consIndex)
return array of constraint indices that have a common variable with the given constraint
Definition class_detprobdata.cpp:754
GCG_EXPORT SCIP_VAR * getVar(int varIndex)
returns SCIP variable related to a variable index
Definition class_detprobdata.cpp:1015
GCG_EXPORT GCG * getGcg()
returns the corresponding gcg data structure
Definition class_detprobdata.cpp:940
GCG_EXPORT void createConssAdjacency()
create the constraint adjacency datastructure that is used (if created) for some methods to faster ac...
Definition class_detprobdata.cpp:689
GCG_EXPORT SCIP_Bool isConssAdjInitialized()
determines whether or not the constraint-constraint adjacency data structure is initilized
Definition class_detprobdata.cpp:1045
GCG_EXPORT SCIP_Real getVal(int row, int col)
returns a coefficient from the coefficient matrix
Definition class_detprobdata.cpp:976
GCG_EXPORT int getIndexForVar(SCIP_VAR *var)
returns the variable index related to a SCIP variable
Definition class_detprobdata.cpp:829
GCG_EXPORT bool isConsSetpp(int consindexd)
is cons with specified indec partitioning, or packing covering constraint?
Definition class_detprobdata.cpp:1095
GCG_EXPORT std::vector< int > & getVarsForCons(int consIndex)
returns the variable indices of the coefficient matrix for a constraint
Definition class_detprobdata.cpp:1023
GCG_EXPORT SCIP_CONS * getCons(int consIndex)
returns the SCIP constraint related to a constraint index
Definition class_detprobdata.cpp:746
GCG_EXPORT SCIP_Bool isAssignedToOrigProb()
returns true if the matrix structure corresponds to the presolved problem
Definition class_detprobdata.cpp:1155
Definition graph_gcg.h:59
virtual double getEdgeWeight(int node_i, int node_j)
Definition graph_gcg.cpp:705
virtual std::vector< int > getNeighbors(int node)
Definition graph_gcg.cpp:476
virtual SCIP_RETCODE setEdge(int node_i, int node_j, double weight)
Definition graph_gcg.cpp:658
GCG_EXPORT const char * getClassName(int classindex)
Definition class_indexpartition.cpp:201
GCG_EXPORT const char * getName()
Definition class_indexpartition.cpp:234
GCG_EXPORT const char * getClassDescription(int classindex)
Definition class_indexpartition.cpp:193
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsToBorderVector()
Gets fraction of variables assigned to the border for detectors in detectorchain.
Definition class_partialdecomp.cpp:4580
GCG_EXPORT SCIP_Real getDetectorClockTime(int detectorchainindex)
returns the time that the detector related to the given detectorchainindex needed for detecting
Definition class_partialdecomp.cpp:3921
GCG_EXPORT int getNMasterconss()
Gets size of the vector containing master conss.
Definition class_partialdecomp.cpp:4481
GCG_EXPORT bool fixVarToMasterByName(const char *varname)
assigns a variable with given name as master
Definition class_partialdecomp.cpp:5687
GCG_EXPORT SCIP_Bool shouldCompletedByConsToMaster()
Checks whether this partialdec is a userpartialdec that should be completed.
Definition class_partialdecomp.cpp:5801
GCG_EXPORT SCIP_Bool hasSetppcMaster()
checks iff all master constraints set partitioning, set packing, or set cover constraints
Definition class_partialdecomp.cpp:3444
GCG_EXPORT bool isVarStairlinkingvarOfBlock(int var, int block)
Checks whether the var is a stairlinkingvar of a specified block.
Definition class_partialdecomp.cpp:5071
GCG_EXPORT bool fixConsToMasterByName(const char *consname)
assgins a constraint by name as master
Definition class_partialdecomp.cpp:5673
GCG_EXPORT std::vector< GCG_DETECTOR * > & getDetectorchain()
returns detector chain as vector of detector pointers
Definition class_partialdecomp.cpp:3977
GCG_EXPORT void fixVarToStairlinking(int var, int firstblock)
adds a variable to the stairlinking variables
Definition class_partialdecomp.cpp:5611
GCG_EXPORT int getNEquivalenceClasses()
Gets the number of blockrepresentatives.
Definition class_partialdecomp.cpp:4515
GCG_EXPORT void assignSmallestComponentsButOneConssAdjacency()
computes components by connectedness of conss and vars
Definition class_partialdecomp.cpp:1094
GCG_EXPORT bool isConsMastercons(int cons)
Gets whether the cons is a master cons.
Definition class_partialdecomp.cpp:4817
GCG_EXPORT SCIP_RETCODE filloutBorderFromConstoblock(SCIP_HASHMAP *constoblock, int givenNBlocks)
every constraint is either assigned to master or open
Definition class_partialdecomp.cpp:3492
GCG_EXPORT std::vector< int > & getStairlinkingvars(int block)
Gets vector containing stairlinking vars,.
Definition class_partialdecomp.cpp:4747
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
Definition class_partialdecomp.cpp:5442
GCG_EXPORT void setAncestorList(std::vector< int > &newlist)
Definition class_partialdecomp.cpp:3883
GCG_EXPORT SCIP_Real getScore(GCG_SCORE *score)
returns the score of the partialdec
Definition class_partialdecomp.cpp:4347
GCG_EXPORT void completeByConnectedConssAdjacency()
assigns all open constraints and open variables
Definition class_partialdecomp.cpp:2437
GCG_EXPORT void setTranslatedpartialdecid(int decid)
Definition class_partialdecomp.cpp:5912
GCG_EXPORT void setPctVarsToBlockVector(std::vector< SCIP_Real > &newvector)
set statistical vector of fractions of variables assigned to a block per involved detector
Definition class_partialdecomp.cpp:4611
GCG_EXPORT void refineToMaster()
refine partialdec with focus on master
Definition class_partialdecomp.cpp:5178
GCG_EXPORT int getAncestorID(int ancestorindex)
gets partialdec id of given ancestor id
Definition class_partialdecomp.cpp:3853
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
Definition class_partialdecomp.cpp:5590
GCG_EXPORT SCIP_Real getPctConssToBorder(int detectorchainindex)
Gets fraction of constraints assigned to the border for a detector.
Definition class_partialdecomp.cpp:4643
GCG_EXPORT void setVarToLinking(int varToLinking)
adds a variable to the linking variables, does not delete this var from list of open vars
Definition class_partialdecomp.cpp:5491
GCG_EXPORT bool checkConsistency()
Checks whether the assignments in the partialdec are consistent.
Definition class_partialdecomp.cpp:1722
GCG_EXPORT void setSelected(bool selected)
set the selection status of this partialdecs
Definition class_partialdecomp.cpp:5395
GCG_EXPORT void setPctVarsToBorderVector(std::vector< SCIP_Real > &newvector)
set statistical vector of fraction of variables assigned to the border per involved detector
Definition class_partialdecomp.cpp:4586
GCG_EXPORT void addAncestorID(int ancestor)
Definition class_partialdecomp.cpp:3891
GCG_EXPORT SCIP_Real getPctVarsToBorder(int detectorchainindex)
Gets fraction of variables assigned to the border for a detector.
Definition class_partialdecomp.cpp:4570
GCG_EXPORT int getNStairlinkingvars(int block)
Gets size of the vector containing stairlinking vars.
Definition class_partialdecomp.cpp:4521
GCG_EXPORT void exportVisualization()
generates a gp visualization of the partialdec without compilation or opening
Definition class_partialdecomp.cpp:5789
GCG_EXPORT bool fixConsToBlockByName(const char *consname, int blockid)
assigns a constraint by name to a block
Definition class_partialdecomp.cpp:5639
GCG_EXPORT std::vector< SCIP_Real > & getPctConssToBlockVector()
Gets fraction of constraints assigned to a block for detectors in detectorchain.
Definition class_partialdecomp.cpp:4677
GCG_EXPORT USERGIVEN getUsergiven()
Gets the USERGIVEN status of this partialdecs.
Definition class_partialdecomp.cpp:4408
GCG_EXPORT void setNBlocks(int nblocks)
sets number of blocks, only increasing number allowed
Definition class_partialdecomp.cpp:5350
GCG_EXPORT std::vector< SCIP_Real > & getDetectorClockTimes()
returns a vector of the clock times that each detector needed that was involved in this partialdec
Definition class_partialdecomp.cpp:3931
GCG_EXPORT bool isAssignedToPresolvedProb()
Gets whether the partialdec is from the presolved problem.
Definition class_partialdecomp.cpp:4841
GCG_EXPORT bool fixVarToLinkingByName(const char *varname)
assigns a variable by name to the linking variables
Definition class_partialdecomp.cpp:5701
std::vector< BLOCK_STRUCTURE * > & getBlockStructures()
Returns the structure information of all blocks.
Definition class_partialdecomp.cpp:4328
GCG_EXPORT void fixConsToBlock(int cons, int block)
adds a constraint to a block
Definition class_partialdecomp.cpp:5220
GCG_EXPORT int getNOpenvars()
Gets size of vector containing variables not assigned yet.
Definition class_partialdecomp.cpp:4509
GCG_EXPORT void displayInfo(int detailLevel)
displays the relevant information of the partialdec
Definition class_partialdecomp.cpp:3163
GCG_EXPORT bool isVarLinkingvar(int var)
Checks whether the var is a linking var.
Definition class_partialdecomp.cpp:5018
GCG_EXPORT int getNCoeffsForBlock(int blockid)
Gets the number of nonzero coeffs in a certain block.
Definition class_partialdecomp.cpp:4298
GCG_EXPORT bool fixVarToBlockByName(const char *varname, int blockid)
assigns a variable by name to a block
Definition class_partialdecomp.cpp:5655
GCG_EXPORT void removeAncestorID(int ancestorid)
Definition class_partialdecomp.cpp:3900
GCG_EXPORT int getVarProbindexForBlock(int varid, int block)
Gets the index of a variable in the vector returned by PARTIALDECOMP::getVarsForBlock.
Definition class_partialdecomp.cpp:4780
GCG_EXPORT bool setSymmetryInformation(std::function< int(int)> blockmapping, std::function< int(int, int)> varmapping)
sets symmetry information
Definition class_partialdecomp.cpp:5929
GCG_EXPORT unsigned long getHashValue()
returns the calculated hash value of this partialdec
Definition class_partialdecomp.cpp:4248
GCG_EXPORT std::vector< int > & getMasterconss()
Gets array containing all master conss indices.
Definition class_partialdecomp.cpp:4286
GCG_EXPORT PARTIALDECOMP(GCG *gcgstruct, bool originalProblem)
Standard constructor, creates empty partialdec with unique id.
Definition class_partialdecomp.cpp:244
GCG_EXPORT bool checkAllConssAssigned()
checks if all conss are assigned
Definition class_partialdecomp.cpp:1687
GCG_EXPORT void addPctVarsToBorder(SCIP_Real pct)
adds percentage of variables assigned to border
Definition class_partialdecomp.cpp:549
GCG_EXPORT int getNDetectors()
Gets the number of detectors the partialdec is propagated by.
Definition class_partialdecomp.cpp:4447
GCG_EXPORT void completeGreedily()
assigns all open constraints and open variables
Definition class_partialdecomp.cpp:2537
GCG_EXPORT std::string buildDecChainString()
creates a detector chain short string for this partialdec, is built from detector chain
Definition class_partialdecomp.cpp:5865
GCG_EXPORT bool alreadyAssignedConssToBlocks()
method to check if at least one constraint is assigned to some block
Definition class_partialdecomp.cpp:557
GCG_EXPORT std::vector< int > & getConssForBlock(int block)
returns array containing constraints assigned to a block
Definition class_partialdecomp.cpp:3968
GCG_EXPORT const std::vector< int > & getBlocksForEqClass(int eqclass)
get a vector of block ids that are contained in the equivalence class eqclass
Definition class_partialdecomp.cpp:3868
GCG_EXPORT void setVarToMaster(int varToMaster)
adds a variable to the master variables, does not delete this var from list of open vars
Definition class_partialdecomp.cpp:5554
GCG_EXPORT void buildDecChainString(char *buffer)
creates a detector chain short string for this partialdec, is built from detector chain
Definition class_partialdecomp.cpp:5842
GCG_EXPORT void addDetectorChainInfo(const char *decinfo)
add information about the detector chain
Definition class_partialdecomp.cpp:482
GCG_EXPORT void removeMastercons(int consid)
removes the given cons from master
Definition class_partialdecomp.cpp:2784
void setBlockStructure(int block, BLOCK_STRUCTURE *blockstructure)
sets structure information of a specific block
Definition class_partialdecomp.cpp:5378
GCG_EXPORT DETPROBDATA * getDetprobdata()
Gets the corresponding detprobdata.
Definition class_partialdecomp.cpp:4725
GCG_EXPORT bool isComplete()
Gets whether this partialdec is complete, i.e. it has no more open constraints and variables.
Definition class_partialdecomp.cpp:4796
GCG_EXPORT void setFinishedByFinisher(bool finished)
sets whether this partialdec was finished by a finishing detector
Definition class_partialdecomp.cpp:5334
GCG_EXPORT void setPctConssFromFreeVector(std::vector< SCIP_Real > &newvector)
set statistical vector of fractions of constraints that are not longer open per involved detector
Definition class_partialdecomp.cpp:4739
GCG_EXPORT void addPctVarsFromFree(SCIP_Real pct)
adds percentage of closed variables
Definition class_partialdecomp.cpp:533
int getNVarsOfBlockInMasterCons(int masterconsindex, int block)
returns the number of block vars contained in a master constraint
Definition class_partialdecomp.cpp:5919
GCG_EXPORT SCIP_Real getPctVarsToBlock(int detectorchainindex)
Gets fraction of variables assigned to a block for a detector.
Definition class_partialdecomp.cpp:4594
GCG_EXPORT bool isVarMastervar(int var)
Checks whether the var is a master var.
Definition class_partialdecomp.cpp:5009
GCG_EXPORT int getNOpenconss()
Gets size of vector containing constraints not assigned yet.
Definition class_partialdecomp.cpp:4503
GCG_EXPORT void calcAggregationInformation(bool ignoreDetectionLimits)
computes if aggregation of sub problems is possible
Definition class_partialdecomp.cpp:1270
bool isNested()
Checks whether this is a nested decomposition.
Definition class_partialdecomp.cpp:4957
GCG_EXPORT int getNVarsForBlock(int block)
Gets size of the vector containing vars assigned to a block.
Definition class_partialdecomp.cpp:4537
GCG_EXPORT bool isVarOpenvar(int var)
Checks whether the var is an open var.
Definition class_partialdecomp.cpp:5048
GCG_EXPORT void setDetectorFinished(GCG_DETECTOR *detector)
sets detector that finished the partialdec
Definition class_partialdecomp.cpp:5317
GCG_EXPORT void fixVarToLinking(int var)
adds a variable to the linking variables
Definition class_partialdecomp.cpp:5502
GCG_EXPORT bool aggInfoCalculated()
Checks if the aggregation information was already calculated.
Definition class_partialdecomp.cpp:5902
GCG_EXPORT std::vector< int > & getLinkingvars()
returns array containing all linking vars indices
Definition class_partialdecomp.cpp:4261
SCIP_Real calcBlockAreaScore()
gets an intermediate score value for the blocks of a partialdec
Definition class_partialdecomp.cpp:4388
GCG_EXPORT void fixVarToMaster(int var)
adds a variable to the master variables
Definition class_partialdecomp.cpp:5566
GCG_EXPORT void addPctConssToBorder(SCIP_Real pct)
adds percentage of constraints assigned to border
Definition class_partialdecomp.cpp:525
GCG_EXPORT void assignOpenConssToMaster()
assigns open conss to master
Definition class_partialdecomp.cpp:847
GCG_EXPORT int getEqClassForBlock(int blockid)
Gets index of the representative block for a block, this might be blockid itself.
Definition class_partialdecomp.cpp:4707
GCG_EXPORT SCIP_Bool hasSetppccardMaster()
checks if all master constraints set partitioning, set packing, set cover, or cardinality constraints
Definition class_partialdecomp.cpp:3415
GCG_EXPORT bool isAssignedToOrigProb()
Gets whether the partialdec is from the original problem.
Definition class_partialdecomp.cpp:4835
GCG_EXPORT void setDetectorPropagated(GCG_DETECTOR *detector)
sets partialdec to be propagated by a detector
Definition class_partialdecomp.cpp:5308
GCG_EXPORT SCIP_Real getScore()
returns the score of the partialdec (depending on enabled score)
Definition class_partialdecomp.cpp:4381
GCG_EXPORT void addPctConssToBlock(SCIP_Real pct)
adds percentage of constraints assigned to blocks
Definition class_partialdecomp.cpp:517
GCG_EXPORT void completeByConnected()
assigns all open constraints and open variables
Definition class_partialdecomp.cpp:2327
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 (
Definition class_partialdecomp.cpp:4847
GCG_EXPORT std::vector< int > & getMastervars()
Gets array containing all master vars indices.
Definition class_partialdecomp.cpp:4292
GCG_EXPORT void setStemsFromOrig(bool fromorig)
sets whether this partialdec stems from an orig problem partialdec
Definition class_partialdecomp.cpp:5403
GCG_EXPORT void setUsergiven(USERGIVEN usergiven)
sets whether this partialdec is user given
Definition class_partialdecomp.cpp:5411
GCG_EXPORT std::vector< SCIP_Real > & getPctConssToBorderVector()
Gets fraction of constraints assigned to the border for detectors in detectorchain.
Definition class_partialdecomp.cpp:4653
GCG_EXPORT SCIP_RETCODE assignPartialdecFromConstoblock(SCIP_HASHMAP *constoblock, int additionalNBlocks)
assigns conss structure according to given hashmap
Definition class_partialdecomp.cpp:1001
GCG_EXPORT void setDetectorFinishedOrig()
sets detector that finished the partialdec in the original problem
Definition class_partialdecomp.cpp:5327
GCG_EXPORT SCIP_Real getPctConssToBlock(int detectorchainindex)
Gets fraction of constraints assigned to a block for a detector.
Definition class_partialdecomp.cpp:4667
GCG_EXPORT int getNLinkingvars()
Gets size of the vector containing linking vars.
Definition class_partialdecomp.cpp:4459
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsFromFreeVector()
Gets fraction of variables that are not longer open for detectors in detectorchain.
Definition class_partialdecomp.cpp:4629
GCG_EXPORT void deleteEmptyBlocks(bool variables)
deletes empty blocks and sets nblocks accordingly
Definition class_partialdecomp.cpp:3019
GCG_EXPORT void refineToBlocks()
refine partialdec with focus on blocks
Definition class_partialdecomp.cpp:5167
GCG_EXPORT SCIP_Real getMaxWhiteScore()
gets the maximum white area score
Definition class_partialdecomp.cpp:5874
GCG_EXPORT SCIP_Real getPctVarsFromFree(int detectorchainindex)
Gets fraction of variables that are not longer open for a detector.
Definition class_partialdecomp.cpp:4619
GCG_EXPORT void setVarPartitionStatistics(int detectorchainindex, VarPartition *partition, std::vector< int > &varclasseslinking, std::vector< int > &varclassesmaster)
registers statistics for a used varpartition
Definition class_partialdecomp.cpp:5419
GCG_EXPORT void setConsToBlock(int consToBlock, int block)
adds a constraint to a block, does not delete this cons from list of open conss
Definition class_partialdecomp.cpp:5205
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 probva...
Definition class_partialdecomp.cpp:4715
GCG_EXPORT void setDetectorClockTimes(std::vector< SCIP_Real > &newvector)
set statistical vector of the times that the detectors needed for detecting per involved detector
Definition class_partialdecomp.cpp:3950
void setScore(GCG_SCORE *score, SCIP_Real scorevalue)
sets the scorevalue of score
Definition class_partialdecomp.cpp:4334
GCG_EXPORT void deleteOpencons(int opencons)
deletes a cons from list of open conss
Definition class_partialdecomp.cpp:3090
GCG_EXPORT SCIP_RETCODE assignPartialdecFromConstoblockVector(std::vector< int > constoblock, int additionalNBlocks)
assigns conss structure according to given vector
Definition class_partialdecomp.cpp:1047
GCG_EXPORT SCIP_RETCODE filloutPartialdecFromConstoblock(SCIP_HASHMAP *constoblock, int givenNBlocks)
assigns all conss to master or a block
Definition class_partialdecomp.cpp:3531
GCG_EXPORT void generateVisualization(char *filename, char *outname, GP_OUTPUT_FORMAT outputformat=GP_OUTPUT_FORMAT_PDF)
generates a visualization of the partialdec using gnuplot
Definition class_partialdecomp.cpp:5751
GCG_EXPORT void setDetectorchain(std::vector< GCG_DETECTOR * > &givenDetectorChain)
sets the detectorchain with the given vector of detector pointers
Definition class_partialdecomp.cpp:5300
GCG_EXPORT void addNNewBlocks(int nnewblocks)
adds how many new blocks were introduced
Definition class_partialdecomp.cpp:501
GCG_EXPORT void findVarsLinkingToMaster()
reassigns linking variables to master if appropriate
Definition class_partialdecomp.cpp:3631
GCG_EXPORT bool isVarLinkingvarOfBlock(int var, int block)
Checks whether the var is a linking var contained by the block.
Definition class_partialdecomp.cpp:5027
GCG_EXPORT int getNAncestors()
Gets number of ancestor partialdecs.
Definition class_partialdecomp.cpp:4414
GCG_EXPORT SCIP_RETCODE assignBorderFromConstoblock(SCIP_HASHMAP *constoblock, int givenNBlocks)
assigns open conss to master
Definition class_partialdecomp.cpp:566
GCG_EXPORT std::vector< SCIP_Real > & getPctConssFromFreeVector()
Gets fraction of constraints that are not longer open for detectors in detectorchain.
Definition class_partialdecomp.cpp:4701
GCG_EXPORT bool getFinishedByFinisher()
returns true iff this partialdec was finished by finishPartialdec() method of a detector
Definition class_partialdecomp.cpp:4242
GCG_EXPORT int getReprBlockForEqClass(int eqclass)
get the representative block of the given equivalence class
Definition class_partialdecomp.cpp:3875
GCG_EXPORT void considerImplicits()
: assigns every open cons/var
Definition class_partialdecomp.cpp:2806
GCG_EXPORT int getNNewBlocks(int detectorchainindex)
Gets number of blocks a detector added.
Definition class_partialdecomp.cpp:4465
GCG_EXPORT std::vector< std::vector< int > > & getConssForBlocks()
gets vector of indices of all constraints assigned to blocks
Definition class_partialdecomp.cpp:5897
GCG_EXPORT int getNCoeffsForMaster()
Definition class_partialdecomp.cpp:4309
GCG_EXPORT int getNTotalStairlinkingvars()
Gets total number of stairlinking vars.
Definition class_partialdecomp.cpp:4493
GCG_EXPORT int getNMastervars()
Gets size of the vector containing master vars.
Definition class_partialdecomp.cpp:4487
GCG_EXPORT int getNConssForBlock(int block)
Gets size of the vector containing conss assigned to a block.
Definition class_partialdecomp.cpp:4432
GCG_EXPORT void showVisualization()
generates and opens a gp visualization of the partialdec
Definition class_partialdecomp.cpp:5715
GCG_EXPORT void addDecChangesFromAncestor(PARTIALDECOMP *ancestor)
adds the statistical differences to an ancestor
Definition class_partialdecomp.cpp:461
GCG_EXPORT void addPctConssFromFree(SCIP_Real pct)
adds percentage of closed constraints
Definition class_partialdecomp.cpp:509
GCG_EXPORT void setConsPartitionStatistics(int detectorchainindex, ConsPartition *partition, std::vector< int > &consclassesmaster)
registers statistics for a used conspartition
Definition class_partialdecomp.cpp:5186
GCG_EXPORT void setFinishedByFinisherOrig(bool finished)
sets whether this partialdec was finished by a finishing detector in the original problem
Definition class_partialdecomp.cpp:5342
GCG_EXPORT bool isVarBlockvarOfBlock(int var, int block)
Checks whether the var is assigned to the block.
Definition class_partialdecomp.cpp:4997
GCG_EXPORT int getID()
returns the unique id of the partialdec
Definition class_partialdecomp.cpp:4255
GCG_EXPORT void addClockTime(SCIP_Real clocktime)
adds detection time of one detector
Definition class_partialdecomp.cpp:453
GCG_EXPORT int getTranslatedpartialdecid() const
Definition class_partialdecomp.cpp:5907
GCG_EXPORT SCIP_Real getPctConssFromFree(int detectorchainindex)
Gets fraction of constraints that are not longer open for a detector.
Definition class_partialdecomp.cpp:4691
GCG_EXPORT void setPctVarsFromFreeVector(std::vector< SCIP_Real > &newvector)
set statistical vector of variables that are not longer open per involved detector
Definition class_partialdecomp.cpp:4635
GCG_EXPORT SCIP_Bool hasSetppMaster()
checks iff all master constraints set partitioning, or set packing constraints
Definition class_partialdecomp.cpp:3468
GCG_EXPORT std::vector< int > & getOpenconss()
Gets vector containing constraints not assigned yet.
Definition class_partialdecomp.cpp:4558
GCG_EXPORT std::vector< std::string > & getDetectorchainInfo()
Gets the detectorchain info vector.
Definition class_partialdecomp.cpp:4441
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
Definition class_partialdecomp.cpp:5778
GCG_EXPORT void copyPartitionStatistics(const PARTIALDECOMP *otherpartialdec)
copies the given partialdec's partition statistics
Definition class_partialdecomp.cpp:3009
GCG_EXPORT bool isConsOpencons(int cons)
Gets whether the cons is an open cons.
Definition class_partialdecomp.cpp:4826
GCG_EXPORT void findVarsLinkingToStairlinking()
reassigns variables classified as linking to stairlinking if appropriate
Definition class_partialdecomp.cpp:3685
GCG_EXPORT int getNVarsForBlocks()
Gets overall number of vars assigned to a block.
Definition class_partialdecomp.cpp:4546
GCG_EXPORT void reorderBlocksForStairlinkingVars()
reorders blocks for making a maximum number of linking vars stairlinking
Definition class_partialdecomp.cpp:1459
GCG_EXPORT void printPartitionInformation(FILE *file)
prints partition information as described in
Definition class_partialdecomp.cpp:5094
GCG_EXPORT std::vector< SCIP_Real > & getPctVarsToBlockVector()
returns fraction of variables assigned to a block for detectors in detectorchain
Definition class_partialdecomp.cpp:4604
GCG_EXPORT std::vector< int >::const_iterator fixConsToMaster(std::vector< int >::const_iterator itr)
fixes a constraint to the master constraints
Definition class_partialdecomp.cpp:5264
GCG_EXPORT void deleteOpenvar(int openvar)
deletes a var from the list of open vars
Definition class_partialdecomp.cpp:3114
GCG_EXPORT bool isTrivial()
Gets whether this partialdec is considered to be trivial.
Definition class_partialdecomp.cpp:4973
GCG_EXPORT void setPctConssToBlockVector(std::vector< SCIP_Real > &newvector)
set statistical vector of fractions of constraints set to blocks per involved detector
Definition class_partialdecomp.cpp:4683
GCG_EXPORT bool sort()
sorts the vars and conss data structures by their indices
Definition class_partialdecomp.cpp:5807
GCG_EXPORT bool isVarStairlinkingvar(int var)
Checks whether the var is a stairlinking var.
Definition class_partialdecomp.cpp:5057
BLOCK_STRUCTURE * getBlockStructure(int block)
Returns the structure information of a specific block.
Definition class_partialdecomp.cpp:4319
GCG_EXPORT std::vector< int > getNNewBlocksVector()
gets number of blocks the detectors in the detectorchain added
Definition class_partialdecomp.cpp:4475
GCG_EXPORT std::vector< int > & getOpenvars()
Gets vector containing variables not assigned yet.
Definition class_partialdecomp.cpp:4564
GCG_EXPORT std::vector< int > & getVarsForBlock(int block)
Gets array containing vars of a block.
Definition class_partialdecomp.cpp:4771
GCG_EXPORT void addPctVarsToBlock(SCIP_Real pct)
adds percentage of variables assigned to blocks
Definition class_partialdecomp.cpp:541
GCG_EXPORT void complete()
assigns all open constraints and open variables trivially
Definition class_partialdecomp.cpp:2301
GCG_EXPORT bool isPropagatedBy(GCG_DETECTOR *detector)
Gets whether this partialdec was propagated by specified detector.
Definition class_partialdecomp.cpp:4963
GCG_EXPORT void setPctConssToBorderVector(std::vector< SCIP_Real > &newvector)
set statistical vector of fractions of constraints assigned to the border per involved detector
Definition class_partialdecomp.cpp:4659
GCG_EXPORT bool assignCurrentStairlinking()
assigns open vars to stairlinking if appropriate
Definition class_partialdecomp.cpp:596
GCG_EXPORT void fixVarToBlock(int var, int block)
adds a variable to the linking variables
Definition class_partialdecomp.cpp:5457
GCG_EXPORT void setConsToMaster(int consToMaster)
adds a constraint to the master constraints, does not delete this cons from list of open conss
Definition class_partialdecomp.cpp:5252
GCG_EXPORT std::vector< int > & getAncestorList()
get ancestor ids as vector
Definition class_partialdecomp.cpp:3863
GCG_EXPORT std::vector< int > & getLinkingvarsForBlock(int block)
returns vector of all linking var indices contained by the block
Definition class_partialdecomp.cpp:4267
Definition class_varpartition.h:61
GCG_EXPORT int getClassOfVar(int varindex)
Definition class_varpartition.cpp:140
const char * GCGdetectorGetName(GCG_DETECTOR *detector)
returns the name of the provided detector
Definition cons_decomp.cpp:2084
GCG_SCORE ** GCGconshdlrDecompGetScores(GCG *gcg)
Gets an array of all scores.
Definition cons_decomp.cpp:3928
int GCGconshdlrDecompGetNextPartialdecID(GCG *gcg)
Gets the next partialdec id managed by cons_decomp.
Definition cons_decomp.cpp:4102
void GCGconshdlrDecompRegisterPartialdec(GCG *gcg, PARTIALDECOMP *partialdec)
registers a partialdec in the conshdlr
Definition cons_decomp.cpp:4568
void GCGconshdlrDecompDeregisterPartialdec(GCG *gcg, PARTIALDECOMP *partialdec)
deregisters a partialdec in the conshdlr
Definition cons_decomp.cpp:3774
GCG_SCORE * GCGgetCurrentScore(GCG *gcg)
Gets the currently enabled score.
Definition cons_decomp.cpp:2796
DETPROBDATA * GCGconshdlrDecompGetDetprobdataPresolved(GCG *gcg)
help method to access detprobdata for transformed problem
Definition cons_decomp.cpp:3976
DETPROBDATA * GCGconshdlrDecompGetDetprobdataOrig(GCG *gcg)
help method to access detprobdata for unpresolved problem
Definition cons_decomp.cpp:3962
char GCGdetectorGetChar(GCG_DETECTOR *detector)
Gets the character of the detector.
Definition cons_decomp.cpp:2064
int GCGconshdlrDecompGetNScores(GCG *gcg)
Gets the number of all scores.
Definition cons_decomp.cpp:4091
SCIP_CLOCK * GCGconshdlrDecompGetScoreClock(GCG *gcg)
gets the clock tracking the score computation time
Definition cons_decomp.cpp:3245
SCIP_RETCODE GCGconshdlrDecompAddPreexisitingPartialDec(GCG *gcg, PARTIALDECOMP *partialdec)
adds a preexisting partial dec to be considered at the beginning of the detection
Definition cons_decomp.cpp:3133
GCG_SCORE * GCGconshdlrDecompFindScore(GCG *gcg, const char *name)
searches for the score with the given name and returns it or NULL if score is not found
Definition cons_decomp.cpp:2357
constraint handler for structure detection
C++ interface of cons_decomp.
#define SCIP_MAXSTRLEN
#define SCIP_INVALID
#define SCIP_Bool
#define SCIP_Real
#define SCIP_CALL_ABORT(x)
#define TRUE
#define FALSE
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
SCIP_Real SCIPhashmapGetImageReal(SCIP_HASHMAP *hashmap, void *origin)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapSetImageReal(SCIP_HASHMAP *hashmap, void *origin, SCIP_Real image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE GCGconsGetVals(SCIP *scip, SCIP_CONS *cons, SCIP_Real *vals, int nvals)
Definition scip_misc.c:618
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
const char * SCIPconsGetName(SCIP_CONS *cons)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPstopClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
static assert(heur !=NULL)
SCIPdebugMessage("feasibility pump finished [%d iterations done].\n", nloops)
SCIPfreeBufferArray(scip, &cycles)
#define NULL
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
void GCGgetVisualizationFilename(GCG *gcg, PARTIALDECOMP *partialdec, const char *extension, char *filename)
Definition miscvisualization.cpp:61
miscellaneous methods for visualizations
Definition class_conspartition.cpp:44
static SCIP_Bool realArraysAreEqual(SCIP *scip, SCIP_Real *array1, int array1length, SCIP_Real *array2, int array2length)
checks whether two arrays of SCIP_Real's are identical
Definition class_partialdecomp.cpp:392
USERGIVEN
enumeration to display if a decomposition was given by the user and if so, how it was processed after...
Definition class_partialdecomp.h:68
static bool compare_blocks(std::pair< int, int > const &a, std::pair< int, int > const &b)
Definition class_partialdecomp.cpp:424
#define SCIPerrorMessage
SCIP_RETCODE GCGwriteGpVisualization(GCG *gcg, const char *filename, const char *outputname, int partialdecid)
Definition reader_gp.cpp:510
SCIP_RETCODE GCGwriteGpVisualizationFormat(GCG *gcg, const char *filename, const char *outputname, int partialdecid, GP_OUTPUT_FORMAT outputformat)
Definition reader_gp.cpp:476
GP file reader writing decompositions to gnuplot files.
various SCIP helper methods
structure information for decomposition information in GCG projects
data structures for detectors
data structures for score
Definition class_partialdecomp.h:82
BLOCK_STRUCTURE * translateStructure(std::vector< int > &rowmapping, std::vector< int > &colmapping, SCIP_Bool translatesymmetry)
Definition class_partialdecomp.cpp:193
std::vector< std::vector< int > > blockconss
Definition class_partialdecomp.h:104
std::unordered_map< int, int > symmetryvardata
Definition class_partialdecomp.h:107
std::vector< int > symmetricalblocks
Definition class_partialdecomp.h:106
PARTIALDECOMP * createPartialdec(DETPROBDATA *parentdetprobdata, DETPROBDATA *newdetprobdata, int probnr)
Definition class_partialdecomp.cpp:99
std::vector< BLOCK_STRUCTURE * > blockstructures
Definition class_partialdecomp.h:105
struct SCIP_Clock SCIP_CLOCK
struct SCIP_Cons SCIP_CONS
SCIP_VERBLEVEL_FULL
struct SCIP_HashMap SCIP_HASHMAP
SCIP_Result
SCIP_SUCCESS
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
struct SCIP_Var SCIP_VAR