SCIP Doxygen Documentation
Loading...
Searching...
No Matches

Detailed Description

the implementation of the bound store data structure

Author
Leona Gottwald

Definition in file boundstore.c.

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPboundstoreCreate (SCIP *scip, SCIP_BOUNDSTORE **boundstore, int nvars)
void SCIPboundstoreFree (SCIP *scip, SCIP_BOUNDSTORE **boundstore)
SCIP_RETCODE SCIPboundstoreAdd (SCIP *scip, SCIP_BOUNDSTORE *boundstore, int varidx, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype)
SCIP_RETCODE SCIPboundstoreMerge (SCIP *scip, SCIP_BOUNDSTORE *target, SCIP_BOUNDSTORE *source)
void SCIPboundstoreClear (SCIP_BOUNDSTORE *boundstore)
int SCIPboundstoreGetChgVaridx (SCIP_BOUNDSTORE *boundstore, int i)
SCIP_BOUNDTYPE SCIPboundstoreGetChgType (SCIP_BOUNDSTORE *boundstore, int i)
SCIP_Real SCIPboundstoreGetChgVal (SCIP_BOUNDSTORE *boundstore, int i)
int SCIPboundstoreGetNChgs (SCIP_BOUNDSTORE *boundstore)

Function Documentation

◆ SCIPboundstoreCreate()

SCIP_RETCODE SCIPboundstoreCreate ( SCIP * scip,
SCIP_BOUNDSTORE ** boundstore,
int nvars )

create bound store data structure

Parameters
scipscip main data structure
boundstorepointer to store the bound store data structure
nvarsnumber of variables for which bounds may be stored

Definition at line 39 of file boundstore.c.

References assert(), NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPallocClearBlockMemoryArray, and SCIPallocMemory.

Referenced by SCIP_DECL_EVENTINIT(), and SCIPsyncstoreInit().

◆ SCIPboundstoreFree()

void SCIPboundstoreFree ( SCIP * scip,
SCIP_BOUNDSTORE ** boundstore )

free bound store data structure

Parameters
scipscip main data structure
boundstorepointer to the bound store data structure

Definition at line 60 of file boundstore.c.

References assert(), NULL, SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, and SCIPfreeMemory.

Referenced by SCIP_DECL_EVENTEXIT(), and SCIPsyncstoreExit().

◆ SCIPboundstoreAdd()

SCIP_RETCODE SCIPboundstoreAdd ( SCIP * scip,
SCIP_BOUNDSTORE * boundstore,
int varidx,
SCIP_Real newbound,
SCIP_BOUNDTYPE boundtype )

add bound change to bound store data structure

Parameters
scipscip main data structure
boundstorethe bound store data structure
varidxvariable index of bound change, must be smaller than the number of variables given during creation of bound store
newboundbound value of variable
boundtypetype of new bound

Definition at line 75 of file boundstore.c.

References assert(), SCIP_BoundStore::bndchg, SCIP_BoundStore::bndchgsize, SCIP_BoundStore::bndpos, BoundChg::boundtype, i, SCIP_BoundStore::nbndchg, BoundChg::newbound, NULL, SCIP_BoundStore::nvars, BoundPos::pos, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPensureBlockMemoryArray, BoundChg::varidx, and varidx.

Referenced by SCIP_DECL_EVENTEXEC(), and SCIPboundstoreMerge().

◆ SCIPboundstoreMerge()

SCIP_RETCODE SCIPboundstoreMerge ( SCIP * scip,
SCIP_BOUNDSTORE * target,
SCIP_BOUNDSTORE * source )

add all bound changes of source to target

Parameters
scipscip main data structure for target boundstore
targetthe bound store data structure where the bounds get merged in
sourcethe bound store data structure from which the bounds get merged in

Definition at line 129 of file boundstore.c.

References assert(), SCIP_BoundStore::bndchg, BoundChg::boundtype, i, SCIP_BoundStore::nbndchg, BoundChg::newbound, NULL, SCIP_BoundStore::nvars, SCIP_CALL, SCIP_OKAY, SCIPboundstoreAdd(), and BoundChg::varidx.

Referenced by SCIPsyncdataAddBoundChanges().

◆ SCIPboundstoreClear()

void SCIPboundstoreClear ( SCIP_BOUNDSTORE * boundstore)

remove all boundchanges from bound store

Parameters
boundstorethe bound store data structure

Definition at line 152 of file boundstore.c.

References assert(), BMSclearMemoryArray, SCIP_BoundStore::bndpos, SCIP_BoundStore::nbndchg, NULL, and SCIP_BoundStore::nvars.

Referenced by SCIPeventGlobalbndClearBoundChanges(), and SCIPsyncstoreStartSync().

◆ SCIPboundstoreGetChgVaridx()

int SCIPboundstoreGetChgVaridx ( SCIP_BOUNDSTORE * boundstore,
int i )

gets variable index of the i'th stored boundchange

Parameters
boundstorethe bound store data structure
ithe index of the bound change

Definition at line 167 of file boundstore.c.

References assert(), SCIP_BoundStore::bndchg, i, NULL, and BoundChg::varidx.

Referenced by SCIP_DECL_CONCSOLVERSYNCREAD().

◆ SCIPboundstoreGetChgType()

SCIP_BOUNDTYPE SCIPboundstoreGetChgType ( SCIP_BOUNDSTORE * boundstore,
int i )

gets the type of the i'th stored boundchange

Parameters
boundstorethe bound store data structure
ithe index of the bound change

Definition at line 179 of file boundstore.c.

References assert(), SCIP_BoundStore::bndchg, BoundChg::boundtype, i, and NULL.

Referenced by SCIP_DECL_CONCSOLVERSYNCREAD().

◆ SCIPboundstoreGetChgVal()

SCIP_Real SCIPboundstoreGetChgVal ( SCIP_BOUNDSTORE * boundstore,
int i )

gets the bound value of the i'th stored boundchange

Parameters
boundstorethe bound store data structure
ithe index of the bound change

Definition at line 191 of file boundstore.c.

References assert(), SCIP_BoundStore::bndchg, i, BoundChg::newbound, NULL, and SCIP_Real.

Referenced by SCIP_DECL_CONCSOLVERSYNCREAD().

◆ SCIPboundstoreGetNChgs()

int SCIPboundstoreGetNChgs ( SCIP_BOUNDSTORE * boundstore)

gets the number of stored bound changes

Parameters
boundstorethe bound store data structure

Definition at line 203 of file boundstore.c.

References assert(), SCIP_BoundStore::nbndchg, and NULL.

Referenced by SCIP_DECL_CONCSOLVERSYNCREAD(), SCIPconcsolverSync(), and SCIPsyncstoreGetLastNBounds().