Scippy

UG

Ubiquity Generator framework

bbParaParamSet.cpp
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.cpp
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#include <string>
38#include <map>
39#include <cstdio>
40#include <cstring>
41#include <fstream>
42#include <cfloat>
43#include <climits>
44#include <cassert>
45#include "ug/paraComm.h"
46#include "bbParaParamSet.h"
47
48using namespace UG;
49
50// ParaParam *BbParaParamSet::paraParams[ParaParamsSize];
51
52BbParaParamSet::BbParaParamSet(
53 size_t inNParaParams
54 )
55#ifdef _COMM_MPI_WORLD
56 : ParaParamSetMpi(inNParaParams)
57#else
58 : ParaParamSetTh(inNParaParams)
59#endif
60{
61
62 /** bool params */
63 paraParams[LogSubtreeInfo] = new ParaParamBool(
64 "LogSubtreeInfo",
65 "# Control output of subtree log [Default value: FALSE]",
66 false);
68 "OutputTabularSolvingStatus",
69 "# Control output of tabular solving statues [Default value: TRUE]",
70 true);
72 "DeterministicTabularSolvingStatus",
73 "# Control output of tabular solving status using deterministic time (only valid when Deterministic = TRUE) [Default value: FALSE]",
74 false);
75 paraParams[UseRootNodeCuts] = new ParaParamBool(
76 "UseRootNodeCuts",
77 "# Use root node cuts in ParaInstance, that is, the instance data for solvers has the root node cuts of the original problem. [Default value: FALSE]",
78 false);
79 paraParams[TransferLocalCuts] = new ParaParamBool(
80 "TransferLocalCuts",
81 "# Indicate if subproblem information (in ParaDiffSubproblem) includes local cuts generated by solvers or not. TRUE means it is included. [Default value: TRUE]",
82 true);
83 paraParams[TransferConflictCuts] = new ParaParamBool(
84 "TransferConflictCuts",
85 "# Indicate if subproblem information (in ParaDiffSubproblem) includes conflict cuts generated by a solver s or not. TRUE means it is included. [Default value: FALSE]",
86 false);
87 paraParams[TransferConflicts] = new ParaParamBool(
88 "TransferConflicts",
89 "# Indicate if subproblem information (in ParaDiffSubproblem) includes conflicts generated by a solver s or not. TRUE means it is included. [Default value: TRUE]",
90 true);
91 paraParams[TransferBranchStats] = new ParaParamBool(
92 "TransferBranchStats",
93 "# Indicate if subproblem information (in ParaDiffSubproblem) includes branching status generated by a solver s or not. TRUE means it is included. [Default value: TRUE]",
94 true);
95 paraParams[TransferVarValueStats] = new ParaParamBool(
96 "TransferVarValueStats",
97 "# Indicate if subproblem information (in ParaDiffSubproblem) includes var-value status generated by a solver s or not. TRUE means it is included. [Default value: FALSE]",
98 false);
99 paraParams[TransferBendersCuts] = new ParaParamBool(
100 "TransferBendersCuts",
101 "# Indicate if subproblem information (in ParaDiffSubproblem) includes benders cuts generated by a solver s or not. TRUE means it is included. [Default value: FALSE]",
102 false);
104 "CheckEffectOfRootNodePreprocesses",
105 "# Check effect of root node preprocesses. [Default value: FALSE]",
106 false);
107 paraParams[CollectOnce] = new ParaParamBool(
108 "CollectOnce",
109 "# Control whether or not all open nodes are collected to load coordinator after ramp-up. [Default value: TRUE]",
110 true);
111 paraParams[ProvingRun] = new ParaParamBool(
112 "ProvingRun",
113 "# Control to run for proving or not. [Default value: FALSE]",
114 false);
116 "SetAllDefaultsAfterRacing",
117 "# Set all parameter values to default after racing. [Default value: FALSE]",
118 false);
120 "DistributeBestPrimalSolution",
121 "# Control if the best primal solution is distributed or not. [Default value: TRUE]",
122 true);
124 "LightWeightRootNodeProcess",
125 "# Control if light weight root node processing is applied. [Default value: FALSE]",
126 false);
127 paraParams[RacingStatBranching] = new ParaParamBool(
128 "RacingStatBranching",
129 "# Control if racing status branching is applied. [Default value: TRUE]",
130 true);
131 paraParams[IterativeBreakDown] = new ParaParamBool(
132 "IterativeBreakDown",
133 "# Control if iterative break down is applied. [Default value: FALSE]",
134 false);
135 paraParams[NoPreprocessingInLC] = new ParaParamBool(
136 "NoPreprocessingInLC",
137 "# Control if preprocessing is disabled in LoadCoordinator. [Default value: FALSE (enabled)]",
138 false);
140 "NoUpperBoundTransferInRacing",
141 "# Disable transfer of upper bound to the other solvers in racing. [Default value: FALSE (transfer)]",
142 false);
143 paraParams[MergeNodesAtRestart] = new ParaParamBool(
144 "MergeNodesAtRestart",
145 "# Merge nodes at restart or not. [Default value: FALSE]",
146 false);
148 "NChangeIntoCollectingModeNSolvers",
149 "# Control whether or not to NChangeIntoCollectingMode to the number of solvers/2 [Default value: FALSE]",
150 false);
152 "EventWeightedDeterministic",
153 "# Enable event weighted deterministiv run (each event has its weight of deterministic time) [Default value: FALSE]",
154 false);
155 paraParams[NoSolverPresolvingAtRoot] = new ParaParamBool(
156 "NoSolverPresolvingAtRoot",
157 "# Disable presolving at root node, for distributed memory version this should be set to FALSE [Default value: FALSE (enable presolving)]",
158 false);
160 "NoSolverPresolvingAtRootDefaultSet",
161 "# Disable presolving at root and set default parameter settings: for distributed memory version this should be set to FALSE [Default value: FALSE (enable presolving)]",
162 false);
164 "NoAggressiveSeparatorInRacing",
165 "# Disable aggressive separator settings in racing [Default value: TRUE]",
166 true);
167 paraParams[AllBoundChangesTransfer] = new ParaParamBool(
168 "AllBoundChangesTransfer",
169 "# Transfer bound changes not only for branching variables, but for all variables. [Default value: TRUE]",
170 true);
172 "NoAllBoundChangesTransferInRacing",
173 "# Disable transfer of all bound changes when the stage is in racing, even if AllBoundChangesTransfer=TRUE [Default value: FALSE]",
174 false);
175 paraParams[BreakFirstSubtree] = new ParaParamBool(
176 "BreakFirstSubtree",
177 "# Break the first subtree [Default value: FALSE]",
178 false);
179 paraParams[InitialNodesGeneration] = new ParaParamBool(
180 "InitialNodesGeneration",
181 "# Run to generate initial nodes [Default value: FALSE]",
182 false);
183 paraParams[RestartRacing] = new ParaParamBool(
184 "RestartRacing",
185 "# Restart racing ramp-up, when primal solution was updated in racing [Default value: FALSE]",
186 false);
187 paraParams[CheckFeasibilityInLC] = new ParaParamBool(
188 "CheckFeasibilityInLC",
189 "# Check solution feasiblity in LoadCoordinator [Default value: FALSE]",
190 false);
192 "ControlCollectingModeOnSolverSide",
193 "# collection mode can be controlled on solver side [Default value: FALSE]",
194 false);
195 paraParams[CleanUp] = new ParaParamBool(
196 "CleanUp",
197 "# Clean up run for reducing check-pointing file [Default value: FALSE]",
198 false);
199 paraParams[DualBoundGainTest] = new ParaParamBool(
200 "DualBoundGainTest",
201 "# Test dual bound gain in Solver [Default value: FALSE]",
202 false);
204 "GenerateReducedCheckpointFiles",
205 "# The parallel solver is used only to generate reduced checkpoint files. [Default value: FALSE]",
206 false);
207 paraParams[OutputPresolvedInstance] = new ParaParamBool(
208 "OutputPresolvedInstance",
209 "# Output presolved instance. This is useful to verify the instance data at restart [Default value: FALSE]",
210 false);
212 "CommunicateTighterBoundsInRacing",
213 "# Communicate tighter bounds of variables in racing. [Default value: TRUE]",
214 true);
216 "KeepRacingUntilToFindFirstSolution",
217 "# Keep racing until first feasible solution was found. [Default value: FALSE]",
218 false);
219 paraParams[AllowTreeSearchRestart] = new ParaParamBool(
220 "AllowTreeSearchRestart",
221 "# Allow tree restart in solver [Default value: FALSE]",
222 false);
224 "OmitInfeasibleTerminationInRacing",
225 "# Omit infeasible terminations during racing [Default value: FALSE]",
226 false);
227 paraParams[WaitTerminationOfThreads] = new ParaParamBool(
228 "WaitTerminationOfThreads",
229 "# In case of racing termination wait for all threads to terminate [Default value: TRUE]",
230 true);
231 paraParams[EnhancedFinalCheckpoint] = new ParaParamBool(
232 "EnhancedFinalCheckpoint",
233 "# Enhanced checkpoint files are created, in which more nodes than normal checkpoint are included [Default value: FALSE]",
234 false);
235
236 /** int params */
237 paraParams[RampUpPhaseProcess] = new ParaParamInt(
238 "RampUpPhaseProcess",
239 "# Ramp-up phase process: 0 - normal process, 1 - racing process, 2 - rebuild tree after racing, 3 - self-split process [Default value: 2]",
240 2,
241 0,
242 3);
243 paraParams[NChangeIntoCollectingMode] = new ParaParamInt(
244 "NChangeIntoCollectingMode",
245 "# Number of nodes in LoadCoordinator to decide to change into collection mode [Default value: 1][0, INT_MAX]",
246 1,
247 0,
248 INT_MAX);
249 paraParams[NodeTransferMode] = new ParaParamInt(
250 "NodeTransferMode",
251 "# Node transfer mode: 0 : best estimate node transfer, 1 : best bound node transfer [Default value: 1]",
252 1,
253 0,
254 1);
256 "MinNumberOfCollectingModeSolvers",
257 "# Minimum number of Solvers that can be in collection mode. [Default value: 1]",
258 1,
259 1,
260 INT_MAX);
262 "MaxNumberOfCollectingModeSolvers",
263 "# Maximum number of Solvers that can be in collection mode : -1 : no limit, 0 : half of the number of Solvers, n > 0 : n [Default value: 0]",
264 0,
265 -1,
266 INT_MAX);
268 "SolverOrderInCollectingMode",
269 "# The order to send request messages in collection mode: -1 : no ordering, 0 : ordered by best dual bound value, 1 : ordered by number of nodes left, 2 : choose alternatively the best bound and the number of nodes orders [Default value: 0]",
270 0,
271 -1,
272 2);
274 "RacingRampUpTerminationCriteria",
275 "# Racing ramp-up termination criteria : 0 : stop at the number of nodes left reached, 1 : stop at time limit, 2: : stop at the Solver with the best dual bound value has a certain number of nodes, 3 : adaptive(node first), 4 : adaptive (time first): [Default value: 4]",
276 5,
277 0,
278 7);
280 "StopRacingNumberOfNodesLeft",
281 "# The number of nodes left in a solver to stop racing : [1, INT_MAX]: [Default value: 300]",
282 300,
283 1,
284 INT_MAX);
286 "NumberOfNodesKeepingInRootSolver",
287 "# The number of nodes left in the root solver to stop keeping nodes. 0: no keeping nodes : [0, INT_MAX]: [Default value: 0]",
288 0,
289 0,
290 INT_MAX);
291 paraParams[NumberOfInitialNodes] = new ParaParamInt(
292 "NumberOfInitialNodes",
293 "# The number of nodes left in all solvers to stop generating initial nodes : [1, INT_MAX]: [Default value: 300]",
294 300,
295 1,
296 INT_MAX);
297 paraParams[MaxNRacingParamSetSeed] = new ParaParamInt(
298 "MaxNRacingParamSetSeed",
299 "# The maximum number of seeds for racing parameter set : [1, INT_MAX]: [Default value: 64]",
300 64,
301 1,
302 INT_MAX);
304 "TryNVariablegOrderInRacing",
305 "# The number of variable order tries in racing ramp-up : [1, INT_MAX]: [Default value: 100]",
306 100,
307 1,
308 INT_MAX);
310 "TryNBranchingOrderInRacing",
311 "# The number of branching order tries in racing ramp-up : [1, INT_MAX]: [Default value: 100]",
312 100,
313 1,
314 INT_MAX);
316 "NEvaluationSolversToStopRacing",
317 "# The number of evaluation solvers to stop racing. ( -1 stops at all of the solvers, 0 stop at half of the solvers ) : [-1, INT_MAX]: [Default value: -1]",
318 -1,
319 -1,
320 INT_MAX);
322 "NMaxCanditatesForCollecting",
323 "# The maximum number of candidates to be in collection mode solvers, when system goes in to collecting mode : [1, INT_MAX]: [Default value: 10]",
324 10,
325 1,
326 INT_MAX);
327 paraParams[NSolverNodesStartBreaking] = new ParaParamInt(
328 "NSolverNodesStartBreaking",
329 "# The number of nodes left in a solver to start breaking. : [0, INT_MAX]: [Default value: 0: no breaking]",
330 0,
331 0,
332 INT_MAX);
333 paraParams[NStopBreaking] = new ParaParamInt(
334 "NStopBreaking",
335 "# The number of nodes left in the system to stop breaking. : [0, INT_MAX]: [Default value: 0: no breaking]",
336 0,
337 0,
338 INT_MAX);
339 paraParams[NTransferLimitForBreaking] = new ParaParamInt(
340 "NTransferLimitForBreaking",
341 "# The maximum number of nodes transferred from a solver, when system is in breaking mode. : [1, INT_MAX]: [Default value: 100]",
342 100,
343 1,
344 INT_MAX);
345 paraParams[NStopSolvingMode] = new ParaParamInt(
346 "NStopSolvingMode",
347 "# Stop solving mode if number of solved nodes is less than NStopSolvingMode. 0 means to no stop solving. [Default: 3][-1, INT_MAX]",
348 3,
349 -1,
350 INT_MAX);
351 paraParams[NCollectOnce] = new ParaParamInt(
352 "NCollectOnce",
353 "# Number of nodes collected once to load coordinator. The value -1 means all. 0 means # solvers * 5. [Default: 0][-1, INT_MAX]",
354 -1,
355 -1,
356 INT_MAX);
357 paraParams[AggressivePresolveDepth] = new ParaParamInt(
358 "AggressivePresolveDepth",
359 "# Depth to try presolving in the other solvers. Offset value will be added. -1: no aggressive presolving. [Default: -1][-1, INT_MAX]",
360 -1,
361 -1,
362 INT_MAX);
364 "AggressivePresolveStopDepth",
365 "# Depth to stop aggressive presolving. This value is only valid for AggressivePresolveDepth > 0. [Default: 8][1, INT_MAX]",
366 8,
367 1,
368 INT_MAX);
369 paraParams[BigDualGapSubtreeHandling] = new ParaParamInt(
370 "BigDualGapSubtreeHandling",
371 "# Big dual gap subtree handling. 0 : throw away, 1 : send back to load coordinator [Default: 0][0, 1]",
372 0,
373 0,
374 1);
375 paraParams[InstanceTransferMethod] = new ParaParamInt(
376 "InstanceTransferMethod",
377 "# Instance data transfer method. 0 : on memory, 1 : by file, 2 : by original data [Default: 0][0, 2]",
378 0,
379 0,
380 2);
381 paraParams[KeepNodesDepth] = new ParaParamInt(
382 "KeepNodesDepth",
383 "# Disable transfer and keep nodes depth from sub-MIP root less than this value. [Default: -1][-1, INT_MAX]",
384 -1,
385 -1,
386 INT_MAX);
387 paraParams[NoAlternateSolving] = new ParaParamInt(
388 "NoAlternateSolving",
389 "# Alternate solving is prohibited when the specified value is greater than zero. If the number of nodes left is less than the value, alternate solving is performed. [Default: 100][0, INT_MAX]",
390 100,
391 0,
392 INT_MAX);
393 paraParams[NNodesTransferLogging] = new ParaParamInt(
394 "NNodesTransferLogging",
395 "# The number of nodes transferred is logged when the specified value greater than zero. The specified value indicates the frequency for the logging. [Default: 0][0, INT_MAX]",
396 0,
397 0,
398 INT_MAX);
399 paraParams[NIdleSolversToTerminate] = new ParaParamInt(
400 "NIdleSolversToTerminate",
401 "# The number of idle solvers to terminate forcibly. Value < 0 means no termination depending of the number of idle solvers. [Default: -1][-1, INT_MAX]",
402 -1,
403 -1,
404 INT_MAX);
405 paraParams[FinalCheckpointNSolvers] = new ParaParamInt(
406 "FinalCheckpointNSolvers",
407 "# The maximum number of solvers whose nodes are collected at the final checkpoint. The value = -1 means all solvers nodes are collected. [Default: 10][-1, INT_MAX]",
408 -1,
409 -1,
410 INT_MAX);
411 paraParams[NMergingNodesAtRestart] = new ParaParamInt(
412 "NMergingNodesAtRestart",
413 "# The number of nodes trying to merge at restart. -1 : that to try to merge all nodes. [Default: -1][-1, INT_MAX]",
414 -1,
415 -1,
416 INT_MAX);
417 paraParams[NBoundChangesOfMergeNode] = new ParaParamInt(
418 "NBoundChangesOfMergeNode",
419 "# How many number of bound changes in a subproblem is needed to be merged. -1 : set automatically. 0 : everything. [Default: -1][-1, INT_MAX]",
420 -1,
421 -1,
422 INT_MAX);
424 "NNodesToKeepInCheckpointFile",
425 "# Number of the best nodes to keep in checkpoint file, that is not be processed. This parameter is only valid in restarting with checkpoint file. [Default: 0][0, INT_MAX]",
426 0,
427 0,
428 INT_MAX);
429 paraParams[NMaxRacingBaseParameters] = new ParaParamInt(
430 "NMaxRacingBaseParameters",
431 "# Maximum number of racing base parameter configurations. File started from 1 to NMaxRacingBaseParameters. [Default: 0][0, 99999]",
432 0,
433 0,
434 99999);
436 "NBoundChangesForTransferNode",
437 "# Number of bound changes needed to transfer a branch node. -1 : no restrictions. [Default: -1][-1, 99999]",
438 -1,
439 -1,
440 99999);
442 "OmitTerminationNSolutionsInRacing",
443 "# Omit racing termination until the number of incumbent solutions is obtained. 1 : at least one feasible solution is needed. [Default: 0][0, 99999]",
444 0,
445 0,
446 99999);
447 paraParams[NEagerToSolveAtRestart] = new ParaParamInt(
448 "NEagerToSolveAtRestart",
449 "# Number of best nodes, which are eager to be solved at restart. 0 : all nodes. [Default: 0][0, 99999]",
450 0,
451 0,
452 999999);
453 paraParams[SelfSplitTreeDepth] = new ParaParamInt(
454 "SelfSplitTreeDepth",
455 "# depth of branch-and-bound to open nodes for self-split [Default value: 0]",
456 0,
457 0,
458 INT_MAX);
460 "LightWeightNodePenartyInCollecting",
461 "# The number of light weight nodes in collecting mode, which can be considered as one heavy weight node [Default value: 10]",
462 10,
463 1,
464 INT_MAX);
466 "EnhancedCheckpointInterval",
467 "# Specify an interval to create checkpoint files. It is specified by the number of solvers, in which open nodes are collected. [Default value: 10]",
468 10,
469 1,
470 INT_MAX);
471
472 /** longint params */
473
474 /** real params */
476 "MultiplierForCollectingMode",
477 "# Multiplier for mp in collection mode. When the number of good nodes becomes greater than mp * NChangeIntoCollectingMode, stop collecting [Default value: 2.0][1.0, DBL_MAX]",
478 2.0,
479 1.0,
480 DBL_MAX);
482 "MultiplierToDetermineThresholdValue",
483 "# Multiplier for mth to determine threshold value. When the number of nodes left greater than mth * (meanRootNodeTime/ (meanNodeTime except root)), a Solver starts sending nodes in collection mode [Default: 1.5][1.0, DBL_MAX]",
484 1.5,
485 1.0,
486 DBL_MAX);
487 paraParams[BgapCollectingMode] = new ParaParamReal(
488 "BgapCollectingMode",
489 "# Value boundgap_p to identify good nodes, (bound value of a node - best bound value )/ (best bound value ) < gap_p is treated as good node. [Default: 0.4][0.0,1.0]",
490 0.4,
491 0.0,
492 1.0);
494 "MultiplierForBgapCollectingMode",
495 "# Define when a Solver in collection mode leaves it: (the solver's best dual bound value - g.b.d.b.v )/g.b.d.b.v > gap_p* (MultiplierForBgapCollectingMode) [Default:10.0][1.0, 10.0]",
496 10.0,
497 1.0,
498 10.0);
500 "ABgapForSwitchingToBestSolver",
501 "# Define when a Solver in collection mode leaves it: when the absolute dual gap to the best solver is greater than this value and the best solver is not in collection mode (Don't set 0.0) [Default:1.0][0.0, DBL_MAX]",
502 1.0,
503 0.0,
504 DBL_MAX);
505 paraParams[BgapStopSolvingMode] = new ParaParamReal(
506 "BgapStopSolvingMode",
507 "# Define when a solver is stopped and all generated nodes except the root nodes are discarded, when ( its local best dual bound value - LC.b.d.b.v ) / LC.b.d.b.v > BgapStopSolvingMode. [Default: 0.33][0.0, 10.0]",
508 0.33,
509 0.0,
510 10.0);
511 paraParams[StopRacingTimeLimit] = new ParaParamReal(
512 "StopRacingTimeLimit",
513 "# The time limit until racing is stopped. [Default: 720.0] [1.0, DBL_MAX]",
514 720.0,
515 1.0,
516 DBL_MAX);
518 "StopRacingTimeLimitMultiplier",
519 "# An extending time limit multiplier in case nodes left is less than stop-racing number of nodes left. [Default: 50.0] [1.0, DBL_MAX]",
520 50.0,
521 1.0,
522 DBL_MAX);
524 "StopRacingNumberOfNodesLeftMultiplier",
525 "# The multiplier for the limit of the number of nodes left to stop racing. [Default: 20.0] [1.0, DBL_MAX]",
526 3.0,
527 1.0,
528 DBL_MAX);
529 paraParams[TimeToIncreaseCMS] = new ParaParamReal(
530 "TimeToIncreaseCMS",
531 "# Timelimit for empty node pool. When node pool stays empty longer than this time, then the number of collection mode solvers will be increased. [Default: 10.0] [1.0, DBL_MAX]",
532 10.0,
533 1.0,
534 DBL_MAX);
536 "TabularSolvingStatusInterval",
537 "# Time interval inbetween output of tabular solving status log [Default: 5.0] [0.0, DBL_MAX]",
538 5.0,
539 0.0, // for debug, this is useful
540 DBL_MAX);
542 "RatioToApplyLightWeightRootProcess",
543 "# If the ratio between idle solvers divided by the total number of solvers is smaller than this parameter, then the light weight root node process is applied. [Default: 0.5] [0.0, 1.0]",
544 0.5,
545 0.0,
546 1.0);
548 "MultiplierForBreakingTargetBound",
549 "# Solvers, which have the best dual bound nodes less than (the global best dual bound * this multiplier), become target of breaking solvers. [Default: 1.03] [1.0, DBL_MAX]",
550 1.03,
551 1.0,
552 DBL_MAX);
554 "FixedVariablesRatioInMerging",
555 "# Ratio of fixed variables when merging open nodes. [Default: 0.9] [0.0, 1.0]",
556 0.9,
557 0.0,
558 1.0);
560 "AllowableRegressionRatioInMerging",
561 "# Permissible regression ratio of dual bound value in merging. [Default: 0.0] [0.0, 1.0]",
562 0.0,
563 0.0,
564 1.0);
566 "CountingSolverRatioInRacing",
567 "# Ratio of status notified solvers required to determine the winner in racing. Note: a solver with a specific setting sometimes has a hard time to solve a root node and cannot send status message to the load coordinator. [Default: 0.5] [0.0, 1.0]",
568 0.5,
569 0.0,
570 1.0);
572 "ProhibitCollectOnceMultiplier",
573 "# When the racing winner has nodes less than (the number of Solvers)*(this value), CollectOnce should be prohibited. [Default: 0.0] [0.0, DBL_MAX]",
574 0.0,
575 0.0,
576 DBL_MAX);
577 paraParams[TNodesTransferLogging] = new ParaParamReal(
578 "TNodesTransferLogging",
579 "# Log the number of transferred nodes in the specified time interavl. Logging is turned off when the specified value is nonpositive. . [Default: 2.0][-1.0, DBL_MAX]",
580 2.0,
581 -1.0,
582 DBL_MAX);
583 paraParams[RandomNodeSelectionRatio] = new ParaParamReal(
584 "RandomNodeSelectionRatio",
585 "# Frequency to select a node randomly from node pool in load coordinator. [Default: 0.2][0.0, 1.0]",
586 0.2,
587 0.0,
588 1.0);
589 paraParams[DualBoundGainBranchRatio] = new ParaParamReal(
590 "DualBoundGainBranchRatio",
591 "# Branch if the dual bound gain is less than average of the that multiplied by this value. [Default: 0.5][0.0, 3.0]",
592 0.5,
593 0.0,
594 3.0);
595 paraParams[CollectingModeInterval] = new ParaParamReal(
596 "CollectingModeInterval",
597 "# If the time interval between collection mode is less than this time, increase the number of collecting nodes. Negative value: no dynamic adjust. NOT set 0.0. [Default: 10.0][-1.0, DBL_MAX]",
598 10.0,
599 -1.0,
600 DBL_MAX);
602 "RestartInRampDownThresholdTime",
603 "# Threshold time to restart in ramp-down phase. -1.0: no restart. Do not set a positive value less than 1.0. [Default: -1.0][-1.0, DBL_MAX]",
604 -1.0,
605 -1.0,
606 DBL_MAX);
608 "RestartInRampDownActiveSolverRatio",
609 "# (EXPERIMENTAL: CURRENTLY UNUSED PARAMETER) Ratio of active solvers ratio to restart in ramp-down phase. Restart if the active solvers ratio less than this value keeps until the threshold time. [Default: 0.7][0.01, 0.99]",
610 0.7,
611 0.01,
612 0.99);
614 "HugeImbalanceThresholdTime",
615 "# Threshold time to detect huge imbalance. -1.0: no detect. NOT set 0.0. [Default: -1.0][-1.0, DBL_MAX]",
616 -1.0,
617 -1.0,
618 DBL_MAX);
620 "HugeImbalanceActiveSolverRatio",
621 "# Active solvers ratio to detect huge imbalance. If the active solvers ratio less than the value keeps until the threshold time, detect huge imbalance. [Default: 0.9][0.01, 0.99]",
622 0.9,
623 0.01,
624 0.99);
625 paraParams[TimeStopSolvingMode] = new ParaParamReal(
626 "TimeStopSolvingMode",
627 "# Candidate of stop solving mode: Node computing time less than this value. The value less than 0 means to not stop solving by this criterion. [Default: -1][-1.0, DBL_MAX]",
628 -1.0,
629 -1.0,
630 DBL_MAX);
632 "NoTransferThresholdReductionRatio",
633 "# Reduction ratio for threshold value of no node transfer. [Default: 1.0][0.0, 1.0]",
634 1.0,
635 0.0,
636 1.0);
638 "EnhancedCheckpointStartTime",
639 "# Start time to collect open nodes for enhanced checkpoint files. [Default: 36000.0][0.0, DBL_MAX]",
640 36000.0,
641 0.0,
642 DBL_MAX);
643
644 /** char params */
645
646 /** string params */
648 "SolverSettingsForInitialPresolving",
649 "# Solver parameter settings filename that is applied at initial presolving in LoadCoordinator. Empty name use default settings. [Default: ]",
650 "");
652 "SolverSettingsAtRootNode",
653 "# Solver parameter settings filename that is applied at root node solving (including presolving in load coordinator). Empty name use default settings. [Default: ]",
654 "");
656 "SolverSettingsExceptRootNode",
657 "# Solver parameter settings filename that is applied at all nodes solving except root node. Empty name use default settings. [Default: ]",
658 "");
659 paraParams[SolverSettingsAtRacing] = new ParaParamString(
660 "SolverSettingsAtRacing",
661 "# Solver parameter settings filename that is applied at racing stage. Empty name use default settings. [Default: ]",
662 "");
663}
664
665void
666BbParaParamSet::read(
667 ParaComm *comm,
668 const char* filename
669 )
670{
671
672 ParaParamSet::read(comm, filename);
673
674 ///
675 /// check parameter consistency
676 ///
680 {
681 std::cout << "Input error in file <" << filename
682 << "> [RacingStatBranching = TRUE] needs to be [RampUpPhaseProcess = 1 or 2] and [CollectOnce = TRUE]"
683 << std::endl;
684 exit(1);
685 }
687 {
691 }
693 {
695 setIntParamValue(NCollectOnce, -1); // anyway, collects all nodes once
696 }
697
698}
699
Parameter set for UG framework.
Base class of communicator object.
Definition: paraComm.h:102
class ParaParamBool
Definition: paraParamSet.h:200
class ParaParamInt
Definition: paraParamSet.h:293
class ParaParamReal
Definition: paraParamSet.h:530
class ParaParamSetMpi
class ParaParamSetTh
bool getBoolParamValue(int param)
get bool parameter value
virtual void read(ParaComm *comm, const char *filename)
read ParaParams from file
void setBoolParamValue(int param, bool value)
set bool parameter value
void setIntParamValue(int param, int value)
set int parameter value
int getIntParamValue(int param)
get int parameter value
class ParaParamString
Definition: paraParamSet.h:754
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 SolverOrderInCollectingMode
static const int NTransferLimitForBreaking
static const int MergeNodesAtRestart
static const int NumberOfNodesKeepingInRootSolver
static const int NStopBreaking
static const int NodeTransferMode
static const int NMaxCanditatesForCollecting
static const int NSolverNodesStartBreaking
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 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 NoAggressiveSeparatorInRacing
static const int HugeImbalanceThresholdTime
static const int EnhancedCheckpointStartTime
static const int ABgapForSwitchingToBestSolver
static const int MultiplierForBreakingTargetBound
static const int FinalCheckpointNSolvers
static const int SolverSettingsForInitialPresolving
static const int ProvingRun
static const int TransferVarValueStats
static const int NBoundChangesForTransferNode
static const int NNodesToKeepInCheckpointFile
static const int InstanceTransferMethod
static const int CollectOnce
static const int LogSolvingStatus
Definition: paraParamSet.h:73
static const int MaxNRacingParamSetSeed
static const int NBoundChangesOfMergeNode
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 ControlCollectingModeOnSolverSide
static const int NoAlternateSolving
static const int BigDualGapSubtreeHandling
static const int AggressivePresolveStopDepth
static const int GenerateReducedCheckpointFiles
static const int SolverSettingsAtRacing
static const int OmitInfeasibleTerminationInRacing
static const int TimeToIncreaseCMS
static const int EnhancedCheckpointInterval
static const int RampUpPhaseProcess
static const int RestartRacing
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 StopRacingNumberOfNodesLeftMultiplier
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 OmitTerminationNSolutionsInRacing
static const int LogTasksTransfer
Definition: paraParamSet.h:74
static const int EnhancedFinalCheckpoint
static const int Quiet
Definition: paraParamSet.h:71
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 TagTrace
Definition: paraParamSet.h:72
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.