Scippy

UG

Ubiquity Generator framework

bbParaParamSet.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-2024 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 bbParaParamSet.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 __BB_PARA_PARAM_SET_H__
38#define __BB_PARA_PARAM_SET_H__
39#include <algorithm>
40#include <string>
41#include <iostream>
42#include <map>
43#include <cmath>
44#include "ug/paraComm.h"
45#if defined(_COMM_PTH) || defined(_COMM_CPP11)
46#include "ug/paraParamSetTh.h"
47#endif
48#if defined(_COMM_MPI_WORLD)
49#include "ug/paraParamSetMpi.h"
50#endif
51
52#define OUTPUT_PARAM_VALUE_ERROR( msg1, msg2, msg3, msg4 ) \
53 std::cout << "[PARAM VALUE ERROR] Param type = " << msg1 << ", Param name = " << msg2 \
54 << ", Param value = " << msg3 << ": Param comment is as follows: " << std::endl \
55 << msg4 << std::endl; \
56 return (-1)
57
58namespace UG
59{
60
61///
62/// Bool parameters
63///
64static const int BbParaParamsFirst = ParaParamsLast + 1;
66//-------------------------------------------------------------------------
78static const int CollectOnce = BbParaParamsBoolFirst + 11;
79static const int ProvingRun = BbParaParamsBoolFirst + 12;
97static const int RestartRacing = BbParaParamsBoolFirst + 30;
100static const int CleanUp = BbParaParamsBoolFirst + 33;
110//-------------------------------------------------------------------------
113///
114/// Int parameters
115///
117//-------------------------------------------------------------------------
134static const int NStopBreaking = BbParaParamsIntFirst + 16;
137static const int NCollectOnce = BbParaParamsIntFirst + 19;
142static const int KeepNodesDepth = BbParaParamsIntFirst + 24;
157//-------------------------------------------------------------------------
160///
161/// Longint parameters
162///
164//-------------------------------------------------------------------------
165//-------------------------------------------------------------------------
166static const int BbParaParamsLongintLast = BbParaParamsLongintFirst - 1; // No params -1
168///
169/// Real parameters
170///
172//-------------------------------------------------------------------------
201//-------------------------------------------------------------------------
204///
205/// Char parameters
206///
208//-------------------------------------------------------------------------
209//-------------------------------------------------------------------------
210static const int BbParaParamsCharLast = BbParaParamsCharFirst - 1; // No params -1
212///
213/// String parameters
214///
216//-------------------------------------------------------------------------
221//-------------------------------------------------------------------------
225static const int BbParaParamsSize = BbParaParamsLast + 1;
226
227
228class ParaComm;
229///
230/// class BbParaParamSet
231///
232#if defined(_COMM_PTH) || defined(_COMM_CPP11)
234{
235
236public:
237
238 ///
239 /// constructor
240 ///
242 )
244 {
245 }
246
247 ///
248 /// constructor
249 ///
251 size_t inNParaParams
252 );
253//
254// : ParaParamSetTh(inNParaParams)
255// {
256// }
257
258#else // defined(_COMM_MPI_WORLD)
259class BbParaParamSet : public ParaParamSetMpi
260{
261
262public:
263
264 ///
265 /// constructor
266 ///
268 )
270 {
271 }
272
273 ///
274 /// constructor
275 ///
277 size_t inNParaParams
278 );
279// : ParaParamSetMpi(inNParaParams)
280// {
281// }
282
283#endif
284
285 ///
286 /// destructor
287 ///
289 )
290 {
291 }
292
293 ///
294 /// read ParaParams from file
295 ///
296 void read(
297 ParaComm *comm, ///< communicator used
298 const char* filename ///< reading file name
299 );
300
301 ///
302 /// get number of bool parameters
303 /// @return size of parameter table
304 ///
305 virtual size_t getNumBoolParams(
306 )
307 {
309 }
310
311 ///
312 /// get number of int parameters
313 /// @return size of parameter table
314 ///
315 virtual size_t getNumIntParams(
316 )
317 {
319 }
320
321 ///
322 /// get number of longint parameters
323 /// @return size of parameter table
324 ///
325 virtual size_t getNumLongintParams(
326 )
327 {
329 }
330
331 ///
332 /// get number of real parameters
333 /// @return size of parameter table
334 ///
335 virtual size_t getNumRealParams(
336 )
337 {
339 }
340
341 ///
342 /// get number of char parameters
343 /// @return size of parameter table
344 ///
345 virtual size_t getNumCharParams(
346 )
347 {
349 }
350
351 ///
352 /// get number of string parameters
353 /// @return size of parameter table
354 ///
355 virtual size_t getNumStringParams(
356 )
357 {
359 }
360
361};
362
363}
364
365#endif // __BB_PARA_PARAM_SET_H__
class BbParaParamSet
virtual size_t getNumIntParams()
get number of int parameters
virtual size_t getNumRealParams()
get number of real parameters
virtual size_t getNumBoolParams()
get number of bool parameters
virtual size_t getNumLongintParams()
get number of longint parameters
void read(ParaComm *comm, const char *filename)
read ParaParams from file
virtual ~BbParaParamSet()
destructor
BbParaParamSet()
constructor
virtual size_t getNumCharParams()
get number of char parameters
virtual size_t getNumStringParams()
get number of string parameters
Base class of communicator object.
Definition: paraComm.h:102
class ParaParamSetMpi
class ParaParamSetTh
static ScipParaCommTh * comm
Definition: fscip.cpp:73
static const int BreakFirstSubtree
static const int CleanUp
static const int NoAllBoundChangesTransferInRacing
static const int KeepRacingUntilToFindFirstSolution
static const int NoSolverPresolvingAtRootDefaultSet
static const int ProhibitCollectOnceMultiplier
static const int StopRacingTimeLimitMultiplier
static const int OutputPresolvedInstance
static const int NEagerToSolveAtRestart
static const int DualBoundGainTest
static const int TryNBranchingOrderInRacing
static const int LightWeightRootNodeProcess
static const int CollectingModeInterval
static const int BbParaParamsLongintFirst
Longint parameters.
static const int SolverOrderInCollectingMode
static const int NTransferLimitForBreaking
static const int BbParaParamsBoolLast
static const int MergeNodesAtRestart
static const int NumberOfNodesKeepingInRootSolver
static const int BbParaParamsBoolN
static const int NStopBreaking
static const int NodeTransferMode
static const int NMaxCanditatesForCollecting
static const int NSolverNodesStartBreaking
static const int BbParaParamsStringN
static const int MaxNumberOfCollectingModeSolvers
static const int TransferBendersCuts
static const int NoUpperBoundTransferInRacing
static const int TransferBranchStats
static const int RacingRampUpTerminationCriteria
static const int NMaxRacingBaseParameters
static const int BbParaParamsLast
static const int SolverSettingsExceptRootNode
static const int InitialNodesGeneration
static const int MinNumberOfCollectingModeSolvers
static const int UseRootNodeCuts
static const int StopRacingTimeLimit
static const int EventWeightedDeterministic
static const int TNodesTransferLogging
static const int TryNVariablegOrderInRacing
static const int LogSubtreeInfo
static const int BbParaParamsRealN
static const int NoAggressiveSeparatorInRacing
static const int HugeImbalanceThresholdTime
static const int EnhancedCheckpointStartTime
static const int BbParaParamsIntN
static const int ABgapForSwitchingToBestSolver
static const int BbParaParamsFirst
Bool parameters.
static const int MultiplierForBreakingTargetBound
static const int FinalCheckpointNSolvers
static const int ParaParamsBoolN
Definition: paraParamSet.h:81
static const int SolverSettingsForInitialPresolving
static const int BbParaParamsLongintLast
static const int ProvingRun
static const int TransferVarValueStats
static const int NBoundChangesForTransferNode
static const int BbParaParamsIntLast
static const int NNodesToKeepInCheckpointFile
static const int InstanceTransferMethod
static const int CollectOnce
static const int BbParaParamsStringFirst
String parameters.
static const int MaxNRacingParamSetSeed
static const int NBoundChangesOfMergeNode
static const int BbParaParamsBoolFirst
static const int TransferConflicts
static const int CheckFeasibilityInLC
static const int TransferConflictCuts
static const int CheckEffectOfRootNodePreprocesses
static const int RatioToApplyLightWeightRootProcess
static const int NChangeIntoCollectingModeNSolvers
static const int TimeStopSolvingMode
static const int NoPreprocessingInLC
static const int RestartInRampDownThresholdTime
static const int RandomNodeSelectionRatio
static const int TransferLocalCuts
static const int AggressivePresolveDepth
static const int BbParaParamsSize
static const int ControlCollectingModeOnSolverSide
static const int NoAlternateSolving
static const int BigDualGapSubtreeHandling
static const int AggressivePresolveStopDepth
static const int GenerateReducedCheckpointFiles
static const int SolverSettingsAtRacing
static const int BbParaParamsLongintN
static const int OmitInfeasibleTerminationInRacing
static const int TimeToIncreaseCMS
static const int EnhancedCheckpointInterval
static const int BbParaParamsRealFirst
Real parameters.
static const int BbParaParamsCharFirst
Char parameters.
static const int RampUpPhaseProcess
static const int RestartRacing
static const int ParaParamsLongintN
Definition: paraParamSet.h:99
static const int ParaParamsCharN
Definition: paraParamSet.h:119
static const int BbParaParamsCharN
static const int NNodesTransferLogging
static const int BgapStopSolvingMode
static const int BgapCollectingMode
static const int LightWeightNodePenartyInCollecting
static const int NCollectOnce
static const int NStopSolvingMode
static const int ParaParamsStringN
Definition: paraParamSet.h:134
static const int StopRacingNumberOfNodesLeftMultiplier
static const int BbParaParamsIntFirst
Int parameters.
static const int RacingStatBranching
static const int RestartInRampDownActiveSolverRatio
static const int AllowTreeSearchRestart
static const int DualBoundGainBranchRatio
static const int NIdleSolversToTerminate
static const int NChangeIntoCollectingMode
static const int MultiplierToDetermineThresholdValue
static const int SolverSettingsAtRootNode
static const int AllBoundChangesTransfer
static const int HugeImbalanceActiveSolverRatio
static const int NoTransferThresholdReductionRatio
static const int DeterministicTabularSolvingStatus
static const int OutputTabularSolvingStatus
static const int ParaParamsLast
Definition: paraParamSet.h:135
static const int OmitTerminationNSolutionsInRacing
static const int EnhancedFinalCheckpoint
static const int BbParaParamsRealLast
static const int BbParaParamsStringLast
static const int BbParaParamsCharLast
static const int ParaParamsIntN
Definition: paraParamSet.h:91
static const int NoSolverPresolvingAtRoot
static const int NEvaluationSolversToStopRacing
static const int TabularSolvingStatusInterval
static const int NumberOfInitialNodes
static const int WaitTerminationOfThreads
static const int DistributeBestPrimalSolution
static const int NMergingNodesAtRestart
static const int StopRacingNumberOfNodesLeft
static const int IterativeBreakDown
static const int MultiplierForBgapCollectingMode
static const int CountingSolverRatioInRacing
static const int KeepNodesDepth
static const int AllowableRegressionRatioInMerging
static const int SelfSplitTreeDepth
static const int MultiplierForCollectingMode
static const int FixedVariablesRatioInMerging
static const int SetAllDefaultsAfterRacing
static const int CommunicateTighterBoundsInRacing
Base class of communicator for UG Framework.
ParaParamSet extension for MPI communication.