Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

the interface of the boundstore structure

Author
Leona Gottwald

Definition in file boundstore.h.

#include "scip/def.h"
#include "scip/type_syncstore.h"
#include "scip/type_scip.h"
#include "scip/type_lp.h"
#include "scip/type_retcode.h"

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 datastructure
boundstorepointer to store the bound store datastructure
nvarsnumber of variables for which bounds may be stored

Definition at line 30 of file boundstore.c.

References NULL, 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 datastructure
boundstorepointer to the bound store datastructure

Definition at line 51 of file boundstore.c.

References 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 datastructure
boundstorethe bound store datastructure
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 66 of file boundstore.c.

References SCIP_BoundStore::bndchg, SCIP_BoundStore::bndchgsize, SCIP_BoundStore::bndpos, BoundChg::boundtype, SCIP_BoundStore::nbndchg, BoundChg::newbound, NULL, BoundPos::pos, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIPensureBlockMemoryArray, and BoundChg::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 datastructure for target boundstore
targetthe bound store datastructure where the bounds get merged in
sourcethe bound store datastructure from which the bounds get merged in

Definition at line 115 of file boundstore.c.

References SCIP_BoundStore::bndchg, BoundChg::boundtype, SCIP_BoundStore::nbndchg, BoundChg::newbound, NULL, 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 datastructure

Definition at line 137 of file boundstore.c.

References 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 datastructure
ithe index of the bound change

Definition at line 152 of file boundstore.c.

References SCIP_BoundStore::bndchg, 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 datastructure
ithe index of the bound change

Definition at line 164 of file boundstore.c.

References SCIP_BoundStore::bndchg, BoundChg::boundtype, 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 datastructure
ithe index of the bound change

Definition at line 176 of file boundstore.c.

References SCIP_BoundStore::bndchg, BoundChg::newbound, and NULL.

Referenced by SCIP_DECL_CONCSOLVERSYNCREAD().

◆ SCIPboundstoreGetNChgs()

int SCIPboundstoreGetNChgs ( SCIP_BOUNDSTORE boundstore)

gets the number of stored bound changes

Parameters
boundstorethe bound store datastructure

Definition at line 188 of file boundstore.c.

References SCIP_BoundStore::nbndchg, and NULL.

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