Scippy

SCIP

Solving Constraint Integer Programs

scip_bandit.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_bandit.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for bandit algorithms
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Robert Lion Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_BANDIT_H__
32 #define __SCIP_SCIP_BANDIT_H__
33 
34 
35 #include "blockmemshell/memory.h"
36 #include "scip/def.h"
37 #include "scip/type_bandit.h"
38 #include "scip/type_retcode.h"
39 #include "scip/type_scip.h"
40 
41 /* In debug mode, we include the SCIP's structure in scip.c, such that no one can access
42  * this structure except the interface methods in scip.c.
43  * In optimized mode, the structure is included in scip.h, because some of the methods
44  * are implemented as defines for performance reasons (e.g. the numerical comparisons).
45  * Additionally, the internal "set.h" is included, such that the defines in set.h are
46  * available in optimized mode.
47  */
48 #ifdef NDEBUG
49 #include "scip/struct_scip.h"
50 #include "scip/struct_stat.h"
51 #include "scip/set.h"
52 #include "scip/tree.h"
53 #include "scip/misc.h"
54 #include "scip/var.h"
55 #include "scip/cons.h"
56 #include "scip/solve.h"
57 #include "scip/debug.h"
58 #endif
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 /**@addtogroup PublicBanditMethods
65  *
66  * @{
67  */
68 
69 /** includes a bandit algorithm virtual function table */
70 extern
72  SCIP* scip, /**< SCIP data structure */
73  SCIP_BANDITVTABLE** banditvtable, /**< bandit algorithm virtual function table */
74  const char* name, /**< a name for the algorithm represented by this vtable */
75  SCIP_DECL_BANDITFREE ((*banditfree)), /**< callback to free bandit specific data structures */
76  SCIP_DECL_BANDITSELECT((*banditselect)), /**< selection callback for bandit selector */
77  SCIP_DECL_BANDITUPDATE((*banditupdate)), /**< update callback for bandit algorithms */
78  SCIP_DECL_BANDITRESET ((*banditreset)) /**< update callback for bandit algorithms */
79  );
80 
81 /** returns the bandit virtual function table of the given name, or NULL if not existing */
82 extern
84  SCIP* scip, /**< SCIP data structure */
85  const char* name /**< name of bandit algorithm virtual function table */
86  );
87 
88 /** calls destructor and frees memory of bandit algorithm */
89 extern
91  SCIP* scip, /**< SCIP data structure */
92  SCIP_BANDIT** bandit /**< pointer to bandit algorithm data structure */
93  );
94 
95 /** reset the bandit algorithm */
96 extern
98  SCIP* scip, /**< SCIP data structure */
99  SCIP_BANDIT* bandit, /**< pointer to bandit algorithm data structure */
100  SCIP_Real* priorities, /**< priorities for every action, or NULL if not needed */
101  unsigned int seed /**< initial random seed for bandit selection */
102  );
103 
104 /* @} */
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif
internal methods for branch and bound tree
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPfreeBandit(SCIP *scip, SCIP_BANDIT **bandit)
Definition: scip_bandit.c:91
type definitions for SCIP&#39;s main datastructure
#define SCIP_DECL_BANDITRESET(x)
Definition: type_bandit.h:73
SCIP_BANDITVTABLE * SCIPfindBanditvtable(SCIP *scip, const char *name)
Definition: scip_bandit.c:64
internal miscellaneous methods
type definitions for bandit selection algorithms
internal methods for global SCIP settings
SCIP main data structure.
internal methods for problem variables
SCIP_RETCODE SCIPincludeBanditvtable(SCIP *scip, SCIP_BANDITVTABLE **banditvtable, const char *name, SCIP_DECL_BANDITFREE((*banditfree)), SCIP_DECL_BANDITSELECT((*banditselect)), SCIP_DECL_BANDITUPDATE((*banditupdate)), SCIP_DECL_BANDITRESET((*banditreset)))
Definition: scip_bandit.c:32
methods for debugging
datastructures for problem statistics
internal methods for main solving loop and node processing
#define SCIP_DECL_BANDITFREE(x)
Definition: type_bandit.h:54
#define SCIP_Real
Definition: def.h:157
SCIP_RETCODE SCIPresetBandit(SCIP *scip, SCIP_BANDIT *bandit, SCIP_Real *priorities, unsigned int seed)
Definition: scip_bandit.c:75
internal methods for constraints and constraint handlers
#define SCIP_DECL_BANDITUPDATE(x)
Definition: type_bandit.h:66
#define SCIP_DECL_BANDITSELECT(x)
Definition: type_bandit.h:60
common defines and data types used in all packages of SCIP
memory allocation routines