Scippy

SCIP

Solving Constraint Integer Programs

struct_paramset.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 struct_paramset.h
17  * @ingroup INTERNALAPI
18  * @brief datastructures for handling parameter settings
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_STRUCT_PARAMSET_H__
26 #define __SCIP_STRUCT_PARAMSET_H__
27 
28 
29 #include "scip/def.h"
30 #include "scip/type_misc.h"
31 #include "scip/type_paramset.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /** data for SCIP_Bool parameters */
39 {
40  SCIP_Bool* valueptr; /**< pointer to store the current parameter value, or NULL */
41  SCIP_Bool curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
42  SCIP_Bool defaultvalue; /**< default value of the parameter */
43 };
45 
46 /** data for int parameters */
48 {
49  int* valueptr; /**< pointer to store the current parameter value, or NULL */
50  int curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
51  int defaultvalue; /**< default value of the parameter */
52  int minvalue; /**< minimum value for parameter */
53  int maxvalue; /**< maximum value for parameter */
54 };
56 
57 /** data for SCIP_Longint parameters */
59 {
60  SCIP_Longint curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
61  SCIP_Longint defaultvalue; /**< default value of the parameter */
62  SCIP_Longint minvalue; /**< minimum value for parameter */
63  SCIP_Longint maxvalue; /**< maximum value for parameter */
64  SCIP_Longint* valueptr; /**< pointer to store the current parameter value, or NULL */
65 };
67 
68 /** data for SCIP_Real parameters */
70 {
71  SCIP_Real curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
72  SCIP_Real defaultvalue; /**< default value of the parameter */
73  SCIP_Real minvalue; /**< minimum value for parameter */
74  SCIP_Real maxvalue; /**< maximum value for parameter */
75  SCIP_Real* valueptr; /**< pointer to store the current parameter value, or NULL */
76 };
78 
79 /** data for char parameters */
81 {
82  char* valueptr; /**< pointer to store the current parameter value, or NULL */
83  char* allowedvalues; /**< array with possible parameter values, or NULL if not restricted */
84  char curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
85  char defaultvalue; /**< default value of the parameter */
86 };
88 
89 /** data for char* parameters */
91 {
92  char** valueptr; /**< pointer to store the current parameter value, or NULL */
93  char* curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
94  char* defaultvalue; /**< default value of the parameter */
95 };
97 
98 /** single parameter */
99 struct SCIP_Param
100 {
101  union
102  {
103  SCIP_BOOLPARAM boolparam; /**< data for SCIP_Bool parameters */
104  SCIP_INTPARAM intparam; /**< data for int parameters */
105  SCIP_LONGINTPARAM longintparam; /**< data for SCIP_Longint parameters */
106  SCIP_REALPARAM realparam; /**< data for SCIP_Real parameters */
107  SCIP_CHARPARAM charparam; /**< data for char parameters */
108  SCIP_STRINGPARAM stringparam; /**< data for char* parameters */
109  } data;
110  char* name; /**< name of the parameter */
111  char* desc; /**< description of the parameter */
112  SCIP_DECL_PARAMCHGD ((*paramchgd)); /**< change information method of parameter */
113  SCIP_PARAMDATA* paramdata; /**< locally defined parameter specific data */
114  unsigned int isadvanced:1; /**< is this parameter an advanced parameter? */
115  unsigned int isfixed:1; /**< is this parameter fixed? */
116  SCIP_PARAMTYPE paramtype; /**< type of this parameter */
117 };
118 
119 /** set of parameters */
121 {
122  SCIP_HASHTABLE* hashtable; /**< hash table to store the parameters */
123  SCIP_PARAM** params; /**< array with parameters */
124  int nparams; /**< number of parameters */
125  int paramssize; /**< size of params array */
126 };
127 
128 #ifdef __cplusplus
129 }
130 #endif
131 
132 #endif
SCIP_INTPARAM intparam
enum SCIP_ParamType SCIP_PARAMTYPE
Definition: type_paramset.h:45
SCIP_PARAM ** params
type definitions for miscellaneous datastructures
SCIP_Longint defaultvalue
SCIP_HASHTABLE * hashtable
struct SCIP_ParamData SCIP_PARAMDATA
Definition: type_paramset.h:76
SCIP_Real curvalue
SCIP_BOOLPARAM boolparam
SCIP_Longint minvalue
SCIP_CHARPARAM charparam
SCIP_Longint curvalue
SCIP_LONGINTPARAM longintparam
SCIP_Longint * valueptr
SCIP_STRINGPARAM stringparam
SCIP_Bool curvalue
unsigned int isadvanced
SCIP_Bool * valueptr
#define SCIP_DECL_PARAMCHGD(x)
Definition: type_paramset.h:91
SCIP_Real maxvalue
#define SCIP_Bool
Definition: def.h:69
unsigned int isfixed
SCIP_Real * valueptr
SCIP_PARAMTYPE paramtype
SCIP_Bool defaultvalue
SCIP_PARAMDATA * paramdata
type definitions for handling parameter settings
SCIP_Real defaultvalue
#define SCIP_Real
Definition: def.h:157
SCIP_Longint maxvalue
#define SCIP_Longint
Definition: def.h:142
common defines and data types used in all packages of SCIP
SCIP_REALPARAM realparam
SCIP_Real minvalue