Scippy

UG

Ubiquity Generator framework

scipParaParamSet.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and software framework */
4 /* UG --- Ubquity Generator Framework */
5 /* */
6 /* Copyright Written by Yuji Shinano <shinano@zib.de>, */
7 /* Copyright (C) 2021 by Zuse Institute Berlin, */
8 /* licensed under LGPL version 3 or later. */
9 /* Commercial licenses are available through <licenses@zib.de> */
10 /* */
11 /* This code is free software; you can redistribute it and/or */
12 /* modify it under the terms of the GNU Lesser General Public License */
13 /* as published by the Free Software Foundation; either version 3 */
14 /* of the License, or (at your option) any later version. */
15 /* */
16 /* This program is distributed in the hope that it will be useful, */
17 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19 /* GNU Lesser General Public License for more details. */
20 /* */
21 /* You should have received a copy of the GNU Lesser General Public License */
22 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 /* */
24 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
25 
26 /**@file paraParamSet.h
27  * @brief Parameter set for UG framework.
28  * @author Yuji Shinano
29  *
30  *
31  *
32  */
33 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 
37 #ifndef __SCIP_PARA_PARAM_SET_H__
38 #define __SCIP_PARA_PARAM_SET_H__
39 #include <algorithm>
40 #include <string>
41 #include <iostream>
42 #include <map>
43 #include <cmath>
44 #include "ug_bb/bbParaComm.h"
45 #include "ug_bb/bbParaParamSet.h"
46 
47 namespace ParaSCIP
48 {
49 
50 #define SCIP_PRESOLVIG_MEMORY_FACTOR 1.5 /// This could be changed SCIP version used
51 #define SCIP_FIXED_MEMORY_FACTOR 0.1 /// This could be changed SCIP version used
52 #define SCIP_MEMORY_COPY_FACTOR 0.15 /// This could be changed SCIP version used
53 
54 ///
55 /// Bool parameters
56 ///
59 //-------------------------------------------------------------------------
60 static const int RootNodeSolvabilityCheck = ScipParaParamsBoolFirst + 0;
61 static const int CustomizedToSharedMemory = ScipParaParamsBoolFirst + 1;
62 static const int LocalBranching = ScipParaParamsBoolFirst + 2;
63 //-------------------------------------------------------------------------
64 static const int ScipParaParamsBoolLast = ScipParaParamsBoolFirst + 2;
65 static const int ScipParaParamsBoolN = ScipParaParamsBoolLast - ScipParaParamsBoolFirst + 1;
66 ///
67 /// Int parameters
68 ///
69 static const int ScipParaParamsIntFirst = ScipParaParamsBoolLast + 1;
70 //-------------------------------------------------------------------------
71 static const int AddDualBoundCons = ScipParaParamsIntFirst + 0;
72 //-------------------------------------------------------------------------
73 static const int ScipParaParamsIntLast = ScipParaParamsIntFirst + 0;
74 static const int ScipParaParamsIntN = ScipParaParamsIntLast - ScipParaParamsIntFirst + 1;
75 ///
76 /// Longint parameters
77 ///
78 static const int ScipParaParamsLongintFirst = ScipParaParamsIntLast + 1;
79 //-------------------------------------------------------------------------
80 //-------------------------------------------------------------------------
81 static const int ScipParaParamsLongintLast = ScipParaParamsLongintFirst - 1; // No params -1
82 static const int ScipParaParamsLongintN = ScipParaParamsLongintLast - ScipParaParamsLongintFirst + 1;
83 ///
84 /// Real parameters
85 ///
86 static const int ScipParaParamsRealFirst = ScipParaParamsLongintLast + 1;
87 //-------------------------------------------------------------------------
88 static const int MemoryLimit = ScipParaParamsRealFirst + 0;
89 //-------------------------------------------------------------------------
90 static const int ScipParaParamsRealLast = ScipParaParamsRealFirst + 0;
91 static const int ScipParaParamsRealN = ScipParaParamsRealLast - ScipParaParamsRealFirst + 1;
92 ///
93 /// Char parameters
94 ///
95 static const int ScipParaParamsCharFirst = ScipParaParamsRealLast + 1;
96 //-------------------------------------------------------------------------
97 //-------------------------------------------------------------------------
98 static const int ScipParaParamsCharLast = ScipParaParamsCharFirst - 1; // No params -1
99 static const int ScipParaParamsCharN = ScipParaParamsCharLast - ScipParaParamsCharFirst + 1;
100 ///
101 /// String parameters
102 ///
103 static const int ScipParaParamsStringFirst = ScipParaParamsCharLast +1;
104 //-------------------------------------------------------------------------
105 //-------------------------------------------------------------------------
106 static const int ScipParaParamsStringLast = ScipParaParamsStringFirst - 1; // No params -1
107 static const int ScipParaParamsStringN = ScipParaParamsStringLast - ScipParaParamsStringFirst + 1;
109 static const int ScipParaParamsSize = ScipParaParamsLast + 1;
110 
111 
112 class ParaComm;
113 ///
114 /// class BbParaParamSet
115 ///
116 class ScipParaParamSet : public UG::BbParaParamSet
117 {
118 
119 public:
120 
121  ///
122  /// constructor
123  ///
125  ) : ScipParaParamSet(ScipParaParamsSize)
126  {
127  }
128 
129  ///
130  /// constructor
131  ///
133  size_t inNParaParams
134  );
135 
136  ///
137  /// destructor
138  ///
140  )
141  {
142  }
143 
144  ///
145  /// get number of bool parameters
146  /// @return size of parameter table
147  ///
148  virtual size_t getNumBoolParams(
149  )
150  {
151  return (UG::ParaParamsBoolN + UG::BbParaParamsBoolN + ScipParaParamsBoolN);
152  }
153 
154  ///
155  /// get number of int parameters
156  /// @return size of parameter table
157  ///
158  virtual size_t getNumIntParams(
159  )
160  {
161  return (UG::ParaParamsIntN + UG::BbParaParamsIntN + ScipParaParamsIntN);
162  }
163 
164  ///
165  /// get number of longint parameters
166  /// @return size of parameter table
167  ///
168  virtual size_t getNumLongintParams(
169  )
170  {
171  return (UG::ParaParamsLongintN + UG::BbParaParamsLongintN + ScipParaParamsLongintN);
172  }
173 
174  ///
175  /// get number of real parameters
176  /// @return size of parameter table
177  ///
178  virtual size_t getNumRealParams(
179  )
180  {
181  return (UG::ParaParamsRealN + UG::BbParaParamsRealN + ScipParaParamsRealN);
182  }
183 
184  ///
185  /// get number of char parameters
186  /// @return size of parameter table
187  ///
188  virtual size_t getNumCharParams(
189  )
190  {
191  return (UG::ParaParamsCharN + UG::BbParaParamsCharN + ScipParaParamsCharN);
192  }
193 
194  ///
195  /// get number of string parameters
196  /// @return size of parameter table
197  ///
198  virtual size_t getNumStringParams(
199  )
200  {
201  return (UG::ParaParamsStringN + UG::BbParaParamsStringN + ScipParaParamsStringN);
202  }
203 
204  ///
205  /// initialize ParaParamSet object
206  ///
207 // void init(
208 // );
209 
210 
211 };
212 
213 }
214 
215 #endif // __SCIP_PARA_PARAM_SET_H__
static const int ScipParaParamsBoolFirst
static const int ScipParaParamsRealFirst
Real parameters.
static const int BbParaParamsLast
static const int AddDualBoundCons
static const int BbParaParamsIntN
virtual size_t getNumRealParams()
get number of real parameters
static const int ScipParaParamsRealLast
static const int ScipParaParamsStringLast
static const int ParaParamsBoolN
Definition: paraParamSet.h:81
static const int ParaParamsIntN
Definition: paraParamSet.h:91
static const int ParaParamsStringN
Definition: paraParamSet.h:134
static const int RootNodeSolvabilityCheck
static const int BbParaParamsBoolN
class BbParaParamSet
static const int BbParaParamsCharN
static const int ScipParaParamsStringFirst
String parameters.
virtual size_t getNumBoolParams()
get number of bool parameters
static const int ScipParaParamsCharFirst
Char parameters.
static const int ScipParaParamsSize
static const int ScipParaParamsLast
static const int BbParaParamsRealN
static const int CustomizedToSharedMemory
static const int ScipParaParamsStringN
static const int BbParaParamsLongintN
static const int ParaParamsLongintN
Definition: paraParamSet.h:99
static const int ScipParaParamsLongintFirst
Longint parameters.
static const int ScipParaParamsIntLast
static const int ScipParaParamsCharLast
static const int ScipParaParamsIntN
static const int ScipParaParamsBoolLast
virtual size_t getNumStringParams()
get number of string parameters
static const int ScipParaParamsRealN
static const int LocalBranching
virtual size_t getNumLongintParams()
get number of longint parameters
static const int MemoryLimit
virtual size_t getNumIntParams()
get number of int parameters
static const int ScipParaParamsBoolN
virtual ~ScipParaParamSet()
destructor
static const int ScipParaParamsCharN
static const int ScipParaParamsLongintLast
static const int ParaParamsRealN
Definition: paraParamSet.h:111
virtual size_t getNumCharParams()
get number of char parameters
static const int ScipParaParamsIntFirst
Int parameters.
static const int BbParaParamsStringN
static const int ParaParamsCharN
Definition: paraParamSet.h:119
static const int ScipParaParamsFirst
Bool parameters.
static const int ScipParaParamsLongintN