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 2057 of file misc.c.

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

Referenced by applyOfins(), applyVbounds(), checkCurvature(), checkSystemGF2(), checkVarnames(), copyAndSolveComponent(), copyProb(), copyVars(), createCoveringProblem(), createStartingData(), createSubSCIP(), createTcliqueGraph(), initAlternativeLP(), initConflictgraph(), initData(), inithashmapandtable(), initImplGraphSOS1(), initPropdata(), nlrowSetupQuadVarsHash(), preprocessCliques(), presolRoundVarsSOS1(), presolveDisaggregate(), readPolynomial(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantConssAndNonzeros(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSTRANS(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEURINIT(), SCIP_DECL_PARAMCHGD(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyZeroobj(), SCIPcopy(), SCIPcopyConss(), SCIPcopyOrig(), SCIPcopyOrigConss(), SCIPcreateConsLinking(), SCIPcreateConsQuadratic(), SCIPcreateFiniteSolCopy(), SCIPcreateWorstCaseProfile(), SCIPexprgraphCreate(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPgetVarCopy(), SCIPnlpCreate(), SCIPvisualInit(), SCIPwriteCliqueGraph(), SCIPwriteLp(), searchEcAggrWithCliques(), 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 2094 of file misc.c.

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

Referenced by addAltLPColumn(), addCliqueDataEntry(), addConsToOccurList(), addKnapsackConstraints(), addLinearConstraints(), addLogicOrConstraints(), addNewGenVBound(), addSetppcConstraints(), addVarboundConstraints(), checkCurvature(), checkSystemGF2(), checkVarnames(), collectCliqueData(), createAndAddAndCons(), createCoveringProblem(), createSubSCIP(), createTcliqueGraph(), extractGates(), getEventData(), getNodeIdx(), getVariableIndex(), initConflictgraph(), initData(), initImplGraphSOS1(), nlpAddVars(), nlrowSetupQuadVarsHash(), presolRoundVarsSOS1(), presolveDisaggregateMarkComponent(), removeDoubleAndSingletonsAndPerformDualpresolve(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSTRANS(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIPapplyHeurDualval(), SCIPcreateConsLinking(), SCIPcreateConsPseudobooleanWithConss(), SCIPcreateConsQuadratic(), SCIPcreateWorstCaseProfile(), SCIPexprgraphAddVars(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPnlrowAddQuadVar(), SCIPvarCopy(), SCIPvisualNewChild(), SCIPwriteCliqueGraph(), searchEcAggrWithCliques(), 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 2116 of file misc.c.

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

Referenced by addAltLPColumn(), addCliqueDataEntry(), addCoefTerm(), addConsToOccurList(), addLocalBranchingConstraint(), applyOfins(), applyVbounds(), checkCons(), checkCurvature(), checkIISlocal(), checkSystemGF2(), collectCliqueData(), collectMinactImplicVar(), computeImpliedEst(), computeRanks(), consdataCreate(), consdataFree(), consdataPrint(), copyAndSolveComponent(), correctLocksAndCaptures(), createNewSol(), createNewSols(), createSolFromSubScipSol(), createSubSCIP(), extractGates(), findShortestOccurlist(), fixDiscreteVars(), freeMemory(), getEventData(), getGenVBound(), getLinVarsAndAndRess(), getNodeIdx(), getSOS1Implications(), getVariableIndex(), initConflictgraph(), initImplGraphSOS1(), maximalslack(), nlpSetupNlpiIndices(), nlpUpdateObjCoef(), nlpUpdateVarBounds(), nlrowExprtreeChanged(), nlrowLinearCoefChanged(), nlrowQuadElemChanged(), objimplicsCreate(), performImplicationGraphAnalysis(), preprocessCliques(), presolRoundVarsSOS1(), presolveDisaggregate(), presolveDisaggregateMarkComponent(), printColumnSection(), removeConsFromOccurList(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantNonZeros(), resetContributors(), SCIP_DECL_CONSGETNVARS(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIPaddToNlpiProblemQuadratic(), SCIPaddToNlpiProblemSOC(), SCIPapplyHeurDualval(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyZeroobj(), SCIPcreateConsQuadratic(), SCIPcreateFiniteSolCopy(), SCIPexprgraphFindVarNode(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSetVarBounds(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPgetConsCopy(), SCIPgetConsLinking(), SCIPgetVarCopy(), SCIPnlpChgVarBoundsDive(), SCIPnlpChgVarObjDive(), SCIPnlpChgVarsBoundsDive(), SCIPnlpDelVar(), SCIPnlpGetVarsNonlinearity(), SCIPnlrowSearchQuadVar(), SCIPvisualCutoffNode(), SCIPvisualFoundSolution(), SCIPvisualNewChild(), SCIPvisualSolvedNode(), SCIPvisualUpdateChild(), solveSubMIP(), solveSubproblem(), sortGenVBounds(), tightenVarsBoundsSOS1(), transformToOrig(), updateArcData(), 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 2137 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 2159 of file misc.c.

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

Referenced by addAltLPColumn(), addCliqueDataEntry(), addConsToOccurList(), checkCurvature(), checkIISlocal(), checkOrigPbCons(), checkSystemGF2(), checkVarnames(), chooseCoefVar(), chooseDoubleVar(), chooseFracVar(), chooseGuidedVar(), choosePscostVar(), chooseVeclenVar(), collectCliqueData(), collectMinactImplicVar(), computeImpliedLct(), consdataFree(), copyAndSolveComponent(), correctConshdlrdata(), correctLocksAndCaptures(), createAndAddAndCons(), createCoveringProblem(), findShortestOccurlist(), getEventData(), getLinVarsAndAndRess(), getNodeIdx(), getVariableIndex(), initConflictgraph(), initImplGraphSOS1(), liftCliqueVariables(), nlpAddNlRows(), nlpAddVars(), nlpRemoveFixedVar(), nlpSetupNlpiIndices(), nlpUpdateObjCoef(), nlpUpdateVarBounds(), nlrowExprtreeChanged(), nlrowLinearCoefChanged(), nlrowQuadElemChanged(), objimplicsCreate(), preprocessCliques(), presolRoundVarsSOS1(), presolveDisaggregate(), presolveDisaggregateMarkComponent(), printColumnSection(), removeConsFromOccurList(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantNonZeros(), resetContributors(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSTRANS(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_READERWRITE(), SCIPaddToNlpiProblemQuadratic(), SCIPcreateConsLinking(), SCIPcreateConsPseudobooleanWithConss(), SCIPcreateConsQuadratic(), SCIPexistsConsLinking(), SCIPexprgraphAddVars(), SCIPexprgraphFindVarNode(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSetVarBounds(), SCIPexprgraphSimplify(), SCIPexprtreeRemoveFixedVars(), SCIPnlpAddVar(), SCIPnlpChgVarBoundsDive(), SCIPnlpChgVarObjDive(), SCIPnlpChgVarsBoundsDive(), SCIPnlpDelVar(), SCIPnlpGetVarsNonlinearity(), SCIPnlrowSearchQuadVar(), SCIPvarCopy(), SCIPwriteCliqueGraph(), SCIPwriteLp(), searchEcAggrWithCliques(), separateIISRounding(), 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 2198 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 2241 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 2256 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 2271 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 2281 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 2294 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 2307 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 2317 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 2327 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 2337 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().