Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

Functions

SCIP_RETCODE SCIPhashmapCreate (SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
 
void SCIPhashmapFree (SCIP_HASHMAP **hashmap)
 
SCIP_RETCODE SCIPhashmapInsert (SCIP_HASHMAP *hashmap, void *origin, void *image)
 
void * SCIPhashmapGetImage (SCIP_HASHMAP *hashmap, void *origin)
 
SCIP_RETCODE SCIPhashmapSetImage (SCIP_HASHMAP *hashmap, void *origin, void *image)
 
SCIP_Bool SCIPhashmapExists (SCIP_HASHMAP *hashmap, void *origin)
 
SCIP_RETCODE SCIPhashmapRemove (SCIP_HASHMAP *hashmap, void *origin)
 
void SCIPhashmapPrintStatistics (SCIP_HASHMAP *hashmap, SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_Bool SCIPhashmapIsEmpty (SCIP_HASHMAP *hashmap)
 
int SCIPhashmapGetNEntries (SCIP_HASHMAP *hashmap)
 
int SCIPhashmapGetNLists (SCIP_HASHMAP *hashmap)
 
SCIP_HASHMAPLISTSCIPhashmapGetList (SCIP_HASHMAP *hashmap, int listindex)
 
int SCIPhashmapListGetNEntries (SCIP_HASHMAPLIST *hashmaplist)
 
void * SCIPhashmapListGetOrigin (SCIP_HASHMAPLIST *hashmaplist)
 
void * SCIPhashmapListGetImage (SCIP_HASHMAPLIST *hashmaplist)
 
SCIP_HASHMAPLISTSCIPhashmapListGetNext (SCIP_HASHMAPLIST *hashmaplist)
 
SCIP_RETCODE SCIPhashmapRemoveAll (SCIP_HASHMAP *hashmap)
 

Function Documentation

SCIP_RETCODE SCIPhashmapCreate ( SCIP_HASHMAP **  hashmap,
BMS_BLKMEM blkmem,
int  mapsize 
)

creates a hash map mapping pointers to pointers

creates a hash map mapping pointers to pointers

Note
if possible always use a blkmem pointer instead of NULL, otherwise it could slow down the map
Parameters
hashmappointer to store the created hash map
blkmemblock memory used to store hash map entries, or NULL
mapsizesize of the hash map

Definition at line 1864 of file misc.c.

References BMSallocClearMemoryArray, BMSallocMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by applyVbounds(), checkCurvature(), checkSystemGF2(), checkVarnames(), copyAndSolveComponent(), copyProb(), copyVars(), createCoveringProblem(), createStartingData(), createSubSCIP(), createTcliqueGraph(), initAlternativeLP(), initData(), inithashmapandtable(), initPropdata(), nlrowSetupQuadVarsHash(), preprocessCliques(), presolveDisaggregate(), propdataInit(), readPolynomial(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantConssAndNonzeros(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEURINIT(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPapplyProximity(), SCIPapplyZeroobj(), SCIPcopy(), SCIPcopyConss(), SCIPcopyOrig(), SCIPcopyOrigConss(), SCIPcreateConsLinking(), SCIPcreateConsQuadratic(), SCIPcreateFiniteSolCopy(), SCIPcreateWorstCaseProfile(), SCIPexprgraphCreate(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPgetVarCopy(), SCIPnlpCreate(), SCIPvbcInit(), SCIPwriteCliqueGraph(), SCIPwriteLp(), setUpEvents(), setupProbingSCIP(), solveSubMIP(), solveSubproblem(), splitProblem(), and writeOpbConstraints().

SCIP_RETCODE SCIPhashmapInsert ( SCIP_HASHMAP hashmap,
void *  origin,
void *  image 
)

inserts new origin->image pair in hash map (must not be called for already existing origins!)

Parameters
hashmaphash map
originorigin to set image for
imagenew image for origin

Definition at line 1901 of file misc.c.

References SCIP_HashMap::blkmem, hashmaplistAppend(), SCIP_HashMap::lists, SCIP_HashMap::nlists, NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by addAltLPConstraint(), addAltLPRow(), addCliqueDataEntry(), addConsToOccurList(), addKnapsackConstraints(), addLinearConstraints(), addLogicOrConstraints(), addNewGenVBound(), addSetppcConstraints(), addVarboundConstraints(), checkCurvature(), checkSystemGF2(), checkVarnames(), collectCliqueData(), createAndAddAndCons(), createCoveringProblem(), createSubSCIP(), createTcliqueGraph(), depthFirstSearch(), extractGates(), getEventData(), getNodeIdx(), getVariableIndex(), initData(), nlpAddVars(), nlrowSetupQuadVarsHash(), presolveDisaggregateMarkComponent(), propdataInit(), removeDoubleAndSingletonsAndPerformDualpresolve(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSTRANS(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIP_DECL_SEPAEXECLP(), SCIPapplyHeurDualval(), SCIPcreateConsLinking(), SCIPcreateConsPseudobooleanWithConss(), SCIPcreateConsQuadratic(), SCIPcreateWorstCaseProfile(), SCIPexprgraphAddVars(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPnlrowAddQuadVar(), SCIPvarCopy(), SCIPvbcNewChild(), SCIPwriteCliqueGraph(), and writeOpbConstraints().

void* SCIPhashmapGetImage ( SCIP_HASHMAP hashmap,
void *  origin 
)

retrieves image of given origin from the hash map, or NULL if no image exists

Parameters
hashmaphash map
originorigin to retrieve image for

Definition at line 1923 of file misc.c.

References hashmaplistGetImage(), SCIP_HashMap::lists, SCIP_HashMap::nlists, and NULL.

Referenced by addAltLPConstraint(), addAltLPRow(), addCliqueDataEntry(), addCoefTerm(), addConsToOccurList(), addLocalBranchingConstraint(), applyVbounds(), checkCurvature(), checkIISlocal(), checkSystemGF2(), collectCliqueData(), collectMinactImplicVar(), computeImpliedEst(), computeRanks(), consdataCreate(), consdataFree(), consdataPrint(), copyAndSolveComponent(), correctLocksAndCaptures(), createNewSol(), createNewSols(), createSolFromSubScipSol(), createSubSCIP(), deleteCliqueDataEntry(), extractGates(), findShortestOccurlist(), fixDiscreteVars(), freeMemory(), getEventData(), getGenVBound(), getLinVarsAndAndRess(), getNodeIdx(), getVariableIndex(), maximalslack(), nlpSetupNlpiIndices(), nlpUpdateObjCoef(), nlpUpdateVarBounds(), nlrowExprtreeChanged(), nlrowLinearCoefChanged(), nlrowQuadElemChanged(), objimplicsCreate(), preprocessCliques(), presolveDisaggregate(), presolveDisaggregateMarkComponent(), printColumnSection(), removeConsFromOccurList(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantNonZeros(), resetContributors(), SCIP_DECL_CONSGETNVARS(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIP_DECL_SEPAEXECLP(), SCIPaddToNlpiProblemQuadratic(), SCIPaddToNlpiProblemSOC(), SCIPapplyHeurDualval(), SCIPapplyProximity(), SCIPapplyZeroobj(), SCIPcreateConsQuadratic(), SCIPcreateFiniteSolCopy(), SCIPexprgraphFindVarNode(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSetVarBounds(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPgetConsLinking(), SCIPgetVarCopy(), SCIPnlpChgVarBoundsDive(), SCIPnlpChgVarObjDive(), SCIPnlpChgVarsBoundsDive(), SCIPnlpDelVar(), SCIPnlpGetVarsNonlinearity(), SCIPnlrowSearchQuadVar(), SCIPvbcCutoffNode(), SCIPvbcNewChild(), SCIPvbcSolvedNode(), SCIPvbcUpdateChild(), solveSubMIP(), solveSubproblem(), sortGenVBounds(), transformToOrig(), updateFirstRow(), updateFirstRowGlobal(), varGetLbIndex(), varGetUbIndex(), vbcSetColor(), writeExpandedSolutions(), and writeOpbConstraints().

SCIP_RETCODE SCIPhashmapSetImage ( SCIP_HASHMAP hashmap,
void *  origin,
void *  image 
)

sets image for given origin in the hash map, either by modifying existing origin->image pair or by appending a new origin->image pair

Parameters
hashmaphash map
originorigin to set image for
imagenew image for origin

Definition at line 1944 of file misc.c.

References SCIP_HashMap::blkmem, hashmaplistSetImage(), SCIP_HashMap::lists, SCIP_HashMap::nlists, NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by exprgraphRemoveVar(), nlpMoveVar(), nlrowRemoveFixedQuadVars(), and SCIPwriteLp().

SCIP_Bool SCIPhashmapExists ( SCIP_HASHMAP hashmap,
void *  origin 
)

checks whether an image to the given origin exists in the hash map

Parameters
hashmaphash map
originorigin to search for

Definition at line 1966 of file misc.c.

References hashmaplistFind(), SCIP_HashMap::lists, SCIP_HashMap::nlists, and NULL.

Referenced by addAltLPConstraint(), addAltLPRow(), addCliqueDataEntry(), addConsToOccurList(), checkCurvature(), checkIISlocal(), checkOrigPbCons(), checkSystemGF2(), checkVarnames(), chooseCoefVar(), chooseDoubleVar(), chooseFracVar(), chooseGuidedVar(), choosePscostVar(), chooseVeclenVar(), collectCliqueData(), collectMinactImplicVar(), computeImpliedLct(), consdataFree(), copyAndSolveComponent(), correctConshdlrdata(), createAndAddAndCons(), createCoveringProblem(), depthFirstSearch(), findShortestOccurlist(), getEventData(), getLinVarsAndAndRess(), getNodeIdx(), getVariableIndex(), liftCliqueVariables(), nlpAddNlRows(), nlpAddVars(), nlpRemoveFixedVar(), nlpSetupNlpiIndices(), nlpUpdateObjCoef(), nlpUpdateVarBounds(), nlrowExprtreeChanged(), nlrowLinearCoefChanged(), nlrowQuadElemChanged(), objimplicsCreate(), preprocessCliques(), presolveDisaggregate(), presolveDisaggregateMarkComponent(), printColumnSection(), removeConsFromOccurList(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantNonZeros(), resetContributors(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PROPEXITPRE(), SCIP_DECL_READERWRITE(), SCIPaddToNlpiProblemQuadratic(), SCIPcreateConsLinking(), SCIPcreateConsPseudobooleanWithConss(), SCIPcreateConsQuadratic(), SCIPexistsConsLinking(), SCIPexprgraphAddVars(), SCIPexprgraphFindVarNode(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSetVarBounds(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPnlpAddVar(), SCIPnlpChgVarBoundsDive(), SCIPnlpChgVarObjDive(), SCIPnlpChgVarsBoundsDive(), SCIPnlpDelVar(), SCIPnlpGetVarsNonlinearity(), SCIPnlrowSearchQuadVar(), SCIPvarCopy(), SCIPwriteCliqueGraph(), SCIPwriteLp(), sortGenVBounds(), strengthenConss(), transformToOrig(), updateConsanddataUses(), updateFirstRow(), updateFirstRowGlobal(), varGetLbIndex(), varGetUbIndex(), and writeExpandedSolutions().

SCIP_RETCODE SCIPhashmapRemove ( SCIP_HASHMAP hashmap,
void *  origin 
)
void SCIPhashmapPrintStatistics ( SCIP_HASHMAP hashmap,
SCIP_MESSAGEHDLR messagehdlr 
)

prints statistics about hash map usage

Parameters
hashmaphash map
messagehdlrmessage handler

Definition at line 2005 of file misc.c.

References SCIP_HashMap::lists, MAX, SCIP_HashMapList::next, SCIP_HashMap::nlists, NULL, SCIP_Real, and SCIPmessagePrintInfo().

Referenced by SCIP_DECL_CONSEXITSOL().

SCIP_Bool SCIPhashmapIsEmpty ( SCIP_HASHMAP hashmap)

indicates whether a hash map has no entries

Parameters
hashmaphash map

Definition at line 2048 of file misc.c.

References FALSE, SCIP_HashMap::lists, SCIP_HashMap::nlists, NULL, and TRUE.

int SCIPhashmapGetNEntries ( SCIP_HASHMAP hashmap)

gives the number of entries in a hash map

Parameters
hashmaphash map

Definition at line 2063 of file misc.c.

References SCIP_HashMap::lists, SCIP_HashMap::nlists, NULL, and SCIPhashmapListGetNEntries().

int SCIPhashmapGetNLists ( SCIP_HASHMAP hashmap)

gives the number of lists (buckets) in a hash map

Parameters
hashmaphash map

Definition at line 2078 of file misc.c.

References SCIP_HashMap::nlists, and NULL.

Referenced by createSubSCIP(), releaseHashmapEntries(), and releaseHashmapNLPRows().

SCIP_HASHMAPLIST* SCIPhashmapGetList ( SCIP_HASHMAP hashmap,
int  listindex 
)

gives a specific list (bucket) in a hash map

Parameters
hashmaphash map
listindexindex of hash map list

Definition at line 2088 of file misc.c.

References SCIP_HashMap::lists, and NULL.

Referenced by createSubSCIP(), releaseHashmapEntries(), and releaseHashmapNLPRows().

int SCIPhashmapListGetNEntries ( SCIP_HASHMAPLIST hashmaplist)

gives the number of entries in a list of a hash map

Parameters
hashmaplisthash map list, can be NULL

Definition at line 2101 of file misc.c.

References SCIP_HashMapList::next.

Referenced by SCIPhashmapGetNEntries().

void* SCIPhashmapListGetOrigin ( SCIP_HASHMAPLIST hashmaplist)

retrieves origin of given entry in a hash map

Parameters
hashmaplisthash map list

Definition at line 2114 of file misc.c.

References NULL, and SCIP_HashMapList::origin.

Referenced by createSubSCIP().

void* SCIPhashmapListGetImage ( SCIP_HASHMAPLIST hashmaplist)

retrieves image of given entry in a hash map

Parameters
hashmaplisthash map list

Definition at line 2124 of file misc.c.

References SCIP_HashMapList::image, and NULL.

Referenced by createSubSCIP(), releaseHashmapEntries(), and releaseHashmapNLPRows().

SCIP_HASHMAPLIST* SCIPhashmapListGetNext ( SCIP_HASHMAPLIST hashmaplist)

retrieves next entry from given entry in a hash map list, or NULL if at end of list.

Parameters
hashmaplisthash map list

Definition at line 2134 of file misc.c.

References SCIP_HashMapList::next, and NULL.

Referenced by createSubSCIP(), releaseHashmapEntries(), and releaseHashmapNLPRows().

SCIP_RETCODE SCIPhashmapRemoveAll ( SCIP_HASHMAP hashmap)

removes all entries in a hash map.

Parameters
hashmaphash map

Definition at line 2144 of file misc.c.

References SCIP_HashMap::blkmem, hashmaplistFree(), SCIP_HashMap::lists, SCIP_HashMap::nlists, NULL, and SCIP_OKAY.

Referenced by createSubSCIP(), freeMemory(), resetLocalStartingData(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXIT(), and SCIPapplyHeurDualval().