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-2024 Zuse Institute Berlin (ZIB) */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file struct_paramset.h
26  * @ingroup INTERNALAPI
27  * @brief datastructures for handling parameter settings
28  * @author Tobias Achterberg
29  * @author Timo Berthold
30  */
31 
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33 
34 #ifndef __SCIP_STRUCT_PARAMSET_H__
35 #define __SCIP_STRUCT_PARAMSET_H__
36 
37 
38 #include "scip/def.h"
39 #include "scip/type_misc.h"
40 #include "scip/type_paramset.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /** data for SCIP_Bool parameters */
48 {
49  SCIP_Bool* valueptr; /**< pointer to store the current parameter value, or NULL */
50  SCIP_Bool curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
51  SCIP_Bool defaultvalue; /**< default value of the parameter */
52 };
54 
55 /** data for int parameters */
57 {
58  int* valueptr; /**< pointer to store the current parameter value, or NULL */
59  int curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
60  int defaultvalue; /**< default value of the parameter */
61  int minvalue; /**< minimum value for parameter */
62  int maxvalue; /**< maximum value for parameter */
63 };
65 
66 /** data for SCIP_Longint parameters */
68 {
69  SCIP_Longint curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
70  SCIP_Longint defaultvalue; /**< default value of the parameter */
71  SCIP_Longint minvalue; /**< minimum value for parameter */
72  SCIP_Longint maxvalue; /**< maximum value for parameter */
73  SCIP_Longint* valueptr; /**< pointer to store the current parameter value, or NULL */
74 };
76 
77 /** data for SCIP_Real parameters */
79 {
80  SCIP_Real curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
81  SCIP_Real defaultvalue; /**< default value of the parameter */
82  SCIP_Real minvalue; /**< minimum value for parameter */
83  SCIP_Real maxvalue; /**< maximum value for parameter */
84  SCIP_Real* valueptr; /**< pointer to store the current parameter value, or NULL */
85 };
87 
88 /** data for char parameters */
90 {
91  char* valueptr; /**< pointer to store the current parameter value, or NULL */
92  char* allowedvalues; /**< array with possible parameter values, or NULL if not restricted */
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 /** data for char* parameters */
100 {
101  char** valueptr; /**< pointer to store the current parameter value, or NULL */
102  char* curvalue; /**< stores the current parameter value if it is not stored in *valueptr */
103  char* defaultvalue; /**< default value of the parameter */
104 };
106 
107 /** single parameter */
109 {
110  union
111  {
112  SCIP_BOOLPARAM boolparam; /**< data for SCIP_Bool parameters */
113  SCIP_INTPARAM intparam; /**< data for int parameters */
114  SCIP_LONGINTPARAM longintparam; /**< data for SCIP_Longint parameters */
115  SCIP_REALPARAM realparam; /**< data for SCIP_Real parameters */
116  SCIP_CHARPARAM charparam; /**< data for char parameters */
117  SCIP_STRINGPARAM stringparam; /**< data for char* parameters */
118  } data;
119  char* name; /**< name of the parameter */
120  char* desc; /**< description of the parameter */
121  SCIP_DECL_PARAMCHGD ((*paramchgd)); /**< change information method of parameter */
122  SCIP_PARAMDATA* paramdata; /**< locally defined parameter specific data */
123  unsigned int isadvanced:1; /**< is this parameter an advanced parameter? */
124  unsigned int isfixed:1; /**< is this parameter fixed? */
125  SCIP_PARAMTYPE paramtype; /**< type of this parameter */
126 };
127 
128 /** set of parameters */
130 {
131  SCIP_HASHTABLE* hashtable; /**< hash table to store the parameters */
132  SCIP_PARAM** params; /**< array with parameters */
133  int nparams; /**< number of parameters */
134  int paramssize; /**< size of params array */
135 };
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif
SCIP_INTPARAM intparam
enum SCIP_ParamType SCIP_PARAMTYPE
Definition: type_paramset.h:54
SCIP_PARAM ** params
type definitions for miscellaneous datastructures
SCIP_Longint defaultvalue
SCIP_HASHTABLE * hashtable
struct SCIP_ParamData SCIP_PARAMDATA
Definition: type_paramset.h:87
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)
SCIP_Real maxvalue
#define SCIP_Bool
Definition: def.h:91
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:173
SCIP_Longint maxvalue
#define SCIP_Longint
Definition: def.h:158
common defines and data types used in all packages of SCIP
SCIP_REALPARAM realparam
SCIP_Real minvalue