47 SCIP_Real* priorities,
49 unsigned int initseed,
60 SCIPerrorMessage(
"Cannot create bandit selector with %d <= 0 actions\n", nactions);
68 banditptr->
vtable = banditvtable;
69 banditptr->
data = banditdata;
91 vtable = banditptr->
vtable;
95 if( vtable->banditfree !=
NULL )
97 SCIP_CALL( vtable->banditfree(blkmem, banditptr) );
112 SCIP_Real* priorities,
126 if( priorities !=
NULL )
134 if( priorities[
i] < 0 )
147 SCIP_CALL( vtable->banditreset(bufmem, bandit, priorities) );
207 bandit->
data = banditdata;
235 banditvtableptr = *banditvtable;
236 banditvtableptr->banditfree = banditfree;
237 banditvtableptr->banditselect = banditselect;
238 banditvtableptr->banditupdate = banditupdate;
239 banditvtableptr->banditreset = banditreset;
274 if( *banditvtable ==
NULL )
288 return banditvtable->
name;
SCIP_RETCODE SCIPbanditFree(BMS_BLKMEM *blkmem, SCIP_BANDIT **bandit)
void SCIPbanditSetData(SCIP_BANDIT *bandit, SCIP_BANDITDATA *banditdata)
void SCIPbanditvtableFree(SCIP_BANDITVTABLE **banditvtable)
SCIP_RETCODE SCIPbanditReset(BMS_BUFMEM *bufmem, SCIP_BANDIT *bandit, SCIP_Real *priorities, unsigned int seed)
SCIP_RETCODE SCIPbanditCreate(SCIP_BANDIT **bandit, SCIP_BANDITVTABLE *banditvtable, BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem, SCIP_Real *priorities, int nactions, unsigned int initseed, SCIP_BANDITDATA *banditdata)
SCIP_RETCODE SCIPbanditvtableCreate(SCIP_BANDITVTABLE **banditvtable, const char *name, SCIP_DECL_BANDITFREE((*banditfree)), SCIP_DECL_BANDITSELECT((*banditselect)), SCIP_DECL_BANDITUPDATE((*banditupdate)),)
SCIP_BANDITDATA * SCIPbanditGetData(SCIP_BANDIT *bandit)
static SCIP_RETCODE doBanditvtableCreate(SCIP_BANDITVTABLE **banditvtable, const char *name, SCIP_DECL_BANDITFREE((*banditfree)), SCIP_DECL_BANDITSELECT((*banditselect)), SCIP_DECL_BANDITUPDATE((*banditupdate)),)
internal methods for bandit algorithms
#define SCIP_CALL_FINALLY(x, y)
SCIP_RETCODE SCIPbanditUpdate(SCIP_BANDIT *bandit, int action, SCIP_Real score)
int SCIPbanditGetNActions(SCIP_BANDIT *bandit)
SCIP_RANDNUMGEN * SCIPbanditGetRandnumgen(SCIP_BANDIT *bandit)
SCIP_RETCODE SCIPbanditSelect(SCIP_BANDIT *bandit, int *action)
const char * SCIPbanditvtableGetName(SCIP_BANDITVTABLE *banditvtable)
assert(minobj< SCIPgetCutoffbound(scip))
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSclearMemory(ptr)
struct BMS_BlkMem BMS_BLKMEM
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
void SCIPrandomFree(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPrandomCreate(SCIP_RANDNUMGEN **randnumgen, BMS_BLKMEM *blkmem, unsigned int initialseed)
void SCIPrandomSetSeed(SCIP_RANDNUMGEN *randnumgen, unsigned int initseed)
public methods for bandit algorithms
internal methods for global SCIP settings
SCIP_BANDITVTABLE * vtable
data structures for bandit selection algorithms
datastructures for global SCIP settings
#define SCIP_DECL_BANDITUPDATE(x)
#define SCIP_DECL_BANDITFREE(x)
struct SCIP_BanditData SCIP_BANDITDATA
#define SCIP_DECL_BANDITSELECT(x)
#define SCIP_DECL_BANDITRESET(x)
enum SCIP_Retcode SCIP_RETCODE