Scippy

UG

Ubiquity Generator framework

bbParaLoadCoordinator.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 paraLoadCoordinator.h
27  * @brief Load Coordinator.
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_LOADCOORDINATOR_H__
38 #define __BB_PARA_LOADCOORDINATOR_H__
39 
40 #include <fstream>
41 #include <list>
42 #include <queue>
43 #include <set>
44 #include "ug/paraDef.h"
45 #include "ug/paraComm.h"
46 #include "ug/paraLoadCoordinator.h"
47 #include "ug/paraTimer.h"
49 #include "bbParaNodePool.h"
50 #include "bbParaInitiator.h"
51 #include "bbParaSolverState.h"
52 #include "bbParaCalculationState.h"
53 #include "bbParaNode.h"
54 #include "bbParaParamSet.h"
55 #include "bbParaTagDef.h"
57 #include "bbParaSolverPool.h"
58 #include "bbParaSolution.h"
59 #include "bbParaInstance.h"
60 #include "bbParaDiffSubproblem.h"
61 #include "bbParaNodesMerger.h"
62 
63 #ifdef UG_WITH_UGS
64 #include "ugs/ugsDef.h"
65 #include "ugs/ugsParaCommMpi.h"
66 #endif
67 
68 namespace UG
69 {
70 
71 static const double displayInfOverThisValue = 5.0; ///< if gap is over this value, Inf is displayed at gap
72  ///< TODO: this would move to inherited class
73 
74 ///
75 /// Class for LoadCoordinator
76 ///
78 {
79 
80 protected:
81 
83 
84  bool initialNodesGenerated; ///< indicates that initial nodes have been generated
85  int firstCollectingModeState; ///< status of first collecting mode
86  ///< -1 : have not been in collecting mode
87  ///< 0 : once in collecting mode
88  ///< 1 : collecting mode is terminated once
89  bool isCollectingModeRestarted; ///< this flag indicate if a collecting mode is restarted or not
90  bool isBreakingFinised; ///< indicate that breaking is finished or not
91  ///< if bootstrap ramp-up is not specified, this flag should be always true
92  int breakingSolverId; ///< all nodes collecting solver Id: -1: no collecting
93  int nReplaceToBetterNode; ///< the number of replacing to a better nodes
94  int nNormalSelection; ///< number of normal node selection to a random node selection
95 
96  bool winnerSolverNodesCollected; ///< indicate that all winner solver nodes has been collected
97 
98  bool primalUpdated; ///< indicate that primal solution was updated or not
99  bool restartingRacing; ///< indicate that racing ramp-up is restarting
100  int nRestartedRacing; ///< number of racing stages restarted
101 
102  ///
103  /// Pools in LoadCorrdinator
104  ///
105  BbParaNodePool *paraNodePool; ///< node pool
106 
107  BbParaLoadCoordinatorTerminationState lcts; ///< LoadCoordinatorTerminationState: counters and times
108 
109  ///
110  /// To measure how long does node pool stay in empty situation
111  ///
112  double statEmptyNodePoolTime; ///< start time that node pool becomes empty. initialized by max double
113 
114  ///
115  /// racing winner information
116  ///
117  int minDepthInWinnerSolverNodes; ///< minimum depth of open nodes in the winner solver tree
118  int maxDepthInWinnerSolverNodes; ///< maximum depth of open nodes in the winner solver tree
119 
120  ///
121  /// for merging nodes
122  ///
123  bool merging; ///< indicate that merging is processing
124  int nBoundChangesOfBestNode; ///< the number of fixed variables of the best node
125  /// The followings are used temporary to generate merge nodes info
126 // BbParaFixedValue **varIndexTable; ///< variable indices table.
127 // BbParaMergeNodeInfo *mergeInfoHead; ///< head of BbParaMergeNodeInfo list
128 // BbParaMergeNodeInfo *mergeInfoTail; ///< tail of BbParaMergeNodeInfo list
129  BbParaNodesMerger *nodesMerger; ///< pointer to nodes merger object, which merges nodes
130 
131  ///
132  /// counter to check if all solvers are terminated or not
133  ///
134  size_t nCollectedSolvers; ///< number of solvers which open nodes are collected
135 
136  double previousTabularOutputTime; ///< to keep tabular solving status output time
137 
138  double averageDualBoundGain; ///< average dual bound gain: could be negative value at restart
139  int nAverageDualBoundGain; ///< number of nodes whose dual bound gain are counted
140  std::deque<double> lastSeveralDualBoundGains; ///< keep last several dual bound gains
141  double averageLastSeveralDualBoundGains; ///< average dual bound gains of last several ones
142 
143  double starvingTime; ///< start time of starving active solvers
144  double hugeImbalanceTime; ///< start time of huge imbalance situation
145  BbParaNodePool *paraNodePoolToRestart; ///< ParaNode pool to restart in ramp-down phase
146  BbParaNodePool *paraNodePoolBufferToRestart; ///< ParaNode pool for buffering ParaNodes in huge imbalance situation
147 
148  BbParaNodePool *paraNodePoolBufferToGenerateCPF; ///< This is used for GenerateReducedCheckpointFiles
149  BbParaNodePool *paraNodeToKeepCheckpointFileNodes; ///< The first n nodes may always keep in checkpoint file,
150  ///< that is, the n nodes are not processed in this run
151  BbParaNodePool *unprocessedParaNodes; ///< The last n nodes may always keep in checkpoint file,
152  ///< that is, the n nodes are not processed in this run
153 
154  std::set<int> *selfSplitFinisedSolvers; ///< indicate selfSplit finished solvers
155 
156  ///
157  /// output streams and flags which indicate the output is specified or not
158  ///
159  bool outputTabularSolvingStatusFlag; ///< indicate if solving status in tabular form or not
160  std::ofstream ofsTabularSolvingStatus; ///< ofstream for solving status in tabular form
161  std::ostream *osTabularSolvingStatus; ///< ostream for solving status in tabular form to switch output location
162  bool logSubtreeInfoFlag; ///< indicate if subtree info. is logged or not
163  std::ofstream ofsLogSubtreeInfo; ///< ofstream for subtree info.
164  std::ostream *osLogSubtreeInfo; ///< ostram for subtree info. to switch output location
165 
166  bool allCompInfeasibleAfterSolution; ///< indicate that all computations are infeasible after a feasible solution
167  double minmalDualBoundNormalTermSolvers; ///< minimal dual bound for normal termination solvers
168  bool warmStartNodeTransferring; ///< indicate that the first node transferring at warm start (restart)
169  bool hugeImbalance; ///< indicate that a huge imbalance in solvers is detected
170 
171  bool isHeaderPrinted; ///< indicate if heeader is printed or not
172  bool givenGapIsReached; ///< shows if specified gap is reached or not
173 
174  bool aSolverTerminatedWithOptimality; ///< indicate if a solver terminated with proving optimality of the problem
175 
176  BbParaSolution *pendingSolution; ///< pending solution during merging
177 
178 
179  ///
180  /// terminate all solvers
181  ///
182  void terminateAllSolvers(
183  );
184 
185  ///
186  /// notify retry ramp-up to all solvers
187  ///
188  virtual void sendRetryRampUpToAllSolvers(
189  );
190 
191  ///
192  /// send interrupt request to all solvers
193  ///
194  virtual void sendInterruptRequest(
195  );
196 
197 
198  ///
199  /// update incumbent solution
200  /// @return true if it is updated
201  ///
202  virtual bool updateSolution(
203  BbParaSolution * ///< pointer to new incumbent solution
204  );
205 
206  ///
207  /// send incumbent value
208  ///
209  virtual void sendIncumbentValue(
210  int receivedRank ///< solver rank which the incumbent value was generated
211  );
212 
213  ///
214  /// send cut off value
215  ///
216  virtual void sendCutOffValue(
217  int receivedRank ///< solver rank which the cut off value was generated
218  );
219 
220  ///////////////////////
221  ///
222  /// Message handlers
223  ///
224  ///////////////////////
225 
226  ///
227  /// function to process TagTask message
228  /// @return always 0 (for extension)
229  ///
230  virtual int processTagTask(
231  int source, ///< source solver rank
232  int tag ///< TagTask
233  );
234 
235  ///
236  /// function to process TagSolution message
237  /// @return always 0 (for extension)
238  ///
239  virtual int processTagSolution(
240  int source, ///< source solver rank
241  int tag ///< TagSolution
242  );
243 
244  ///
245  /// function to process TagSolverState message
246  /// @return always 0 (for extension)
247  ///
248  virtual int processTagSolverState(
249  int source, ///< source solver rank
250  int tag ///< TagSolverState
251  );
252 
253  ///
254  /// function to process TagCompletionOfCalculation message
255  /// @return always 0 (for extension)
256  ///
258  int source, ///< source solver rank
259  int tag ///< TagCompletionOfCalculation
260  );
261 
262  ///
263  /// function to process TagTermStateForInterruption message
264  /// @return always 0 (for extension)
265  ///
267  int source, ///< source solver rank
268  int tag ///< TagUbBoundTightened
269  );
270 
271  ///
272  /// function to process TagAnotherNodeRequest message
273  /// @return always 0 (for extension)
274  ///
275  virtual int processTagAnotherNodeRequest(
276  int source, ///< source solver rank
277  int tag ///< TagAnotherNodeRequest
278  );
279 
280  ///
281  /// function to process TagAllowToBeInCollectingMode message
282  /// @return always 0 (for extension)
283  ///
285  int source, ///< source solver rank
286  int tag ///< TagAllowToBeInCollectingMode
287  );
288 
289  ///
290  /// function to process TagLbBoundTightened message
291  /// @return always 0 (for extension)
292  ///
293  virtual int processTagLbBoundTightened(
294  int source, ///< source solver rank
295  int tag ///< TagLbBoundTightened
296  );
297 
298  ///
299  /// function to process TagUbBoundTightened message
300  /// @return always 0 (for extension)
301  ///
302  virtual int processTagUbBoundTightened(
303  int source, ///< source solver rank
304  int tag ///< TagUbBoundTightened
305  );
306 
307  ///
308  /// function to process TagSelfSplitFinished message
309  /// @return always 0 (for extension)
310  ///
311  virtual int processTagSelfSplitFinished(
312  int source, ///< source solver rank
313  int tag ///< TagSelfSplitFinished
314  );
315 
316  ///
317  /// function to process TagNewSubtreeRootNode message
318  /// @return always 0 (for extension)
319  ///
320  virtual int processTagNewSubtreeRootNode(
321  int source, ///< source solver rank
322  int tag ///< TagNewSubtreeRootNode
323  );
324 
325  ///
326  /// function to process TagSubtreeRootNodeStartComputation message
327  /// @return always 0 (for extension)
328  ///
330  int source, ///< source solver rank
331  int tag ///< TagSubtreeRootNodeStartComputation
332  );
333 
334  ///
335  /// function to process TagSubtreeRootNodeToBeRemoved message
336  /// @return always 0 (for extension)
337  ///
339  int source, ///< source solver rank
340  int tag ///< TagSubtreeRootNodeToBeRemoved
341  );
342 
343  ///
344  /// function to process TagReassignSelfSplitSubtreeRootNode message
345  /// @return always 0 (for extension)
346  ///
348  int source, ///< source solver rank
349  int tag ///< TagReassignSelfSplitSubtreeRootNode
350  );
351 
352  ///
353  /// function to process TagSelfSlpitNodeCalcuationState message
354  /// @return always 0 (for extension)
355  ///
357  int source, ///< source solver rank
358  int tag ///< TagSelfSlpitNodeCalcuationState
359  );
360 
361 
362  ///
363  /// function to process TagSelfSplitTermStateForInterruption message
364  /// @return always 0 (for extension)
365  ///
367  int source, ///< source solver rank
368  int tag ///< TagSelfSplitTermStateForInterruption
369  );
370 
371  ///////////////////////
372  ///
373  /// message handlers specialized for racing ramp-up
374  ///
375  ///////////////////////
376 
377  ///
378  /// function to process TagSolverState message in racing ramp-up stage
379  /// @return always 0 (for extension)
380  ///
382  int source, ///< source solver rank
383  int tag ///< TagSolverState
384  );
385 
386  ///
387  /// function to process TagCompletionOfCalculation message in racing ramp-up stage
388  /// @return always 0 (for extension)
389  ///
391  int source, ///< source solver rank
392  int tag ///< TagCompletionOfCalculation
393  );
394 
395  ///
396  /// run function to start main process
397  ///
398  virtual void run(
399  );
400 
401 #ifdef UG_WITH_ZLIB
402 
403  ///
404  /// function to update checkpoint files
405  ///
406  virtual void updateCheckpointFiles(
407  );
408 
409  ///
410  /// write LoadCorrdinator statistics to checkpoint file
411  ///
412  virtual void writeLoadCoordinatorStatisticsToCheckpointFile(
413  gzstream::ogzstream &loadCoordinatorStatisticsStream, ///< gzstream to checkpoint file
414  int nSolverInfo, ///< number of solver info.
415  double globalBestDualBoundValue, ///< global best dual bound value
416  double externalGlobalBestDualBoundValue ///< external value of the global best dual bound value
417  );
418 
419  ///
420  /// write previous run's statistics information
421  ///
422  virtual void writePreviousStatisticsInformation(
423  );
424 
425 #endif
426 
427  ///
428  /// send ParaNodes to idle solvers
429  /// @return true, if a ParaNodes is sent
430  ///
431  virtual bool sendParaTasksToIdleSolvers(
432  );
433 
434  ///
435  /// inactivate racing solver pool
436  ///
437  virtual void inactivateRacingSolverPool(
438  int rank ///< winner solver rank
439  );
440 
441  ///
442  /// output tabular solving status header
443  ///
445  );
446 
447  ///
448  /// output solving status in tabular form
449  ///
450  virtual void outputTabularSolvingStatus(
451  char incumbent ///< character to show incumbent is obtained '*', if it is not incumbnet ' '
452  );
453 
454  ///
455  /// write subtree info.
456  ///
457  virtual void writeSubtreeInfo(
458  int source, ///< solver rank
459  ParaCalculationState *calcState ///< calculation state
460  );
461 
462 #ifdef UG_WITH_ZLIB
463  ///
464  /// restart in ramp-down phase
465  ///
466  virtual void restartInRampDownPhase(
467  );
468 #endif
469 
470  ///
471  /// restart racing
472  /// @return true if problem is solved in racing
473  ///
474  virtual int restartRacing(
475  );
476 
477  ///
478  /// start a new racing
479  ///
480  virtual void newRacing(
481  );
482 
483  ///
484  /// change search strategy of all solvers to best bound bound search strategy
485  ///
487  );
488 
489  ///
490  /// change search strategy of all solvers to original search strategy
491  ///
493  );
494 
495 #ifdef UG_WITH_UGS
496 
497  ///
498  /// check and read incument solution
499  ///
500  int checkAndReadIncumbent(
501  );
502 
503 #endif
504 
505  ///
506  /// check if current stage is in racing or not
507  /// @return true, if current stage is in racing
508  ///
509  virtual bool isRacingStage(
510  )
511  {
512  if( // ( !paraInitiator->getPrefixWarm() ) &&
515  && racingWinner < 0 )
516  return true;
517  else
518  return false;
519  }
520 
521  ///
522  /// check if Gap reached or not
523  /// @return true, if the specified gap is reached
524  ///
525  virtual bool isGapReached(
526  )
527  {
528  return false;
529  }
530 
531 public:
532 
533  ///
534  /// constructor
535  ///
537 #ifdef UG_WITH_UGS
538  UGS::UgsParaCommMpi *inComUgs, ///< communicator used for UGS
539 #endif
540  int inNhanders, ///< number of valid message handlers
541  ParaComm *inComm, ///< communicator used
542  ParaParamSet *inParaParamSet, ///< UG parameter set used
543  ParaInitiator *paraInitiator, ///< ParaInitiator for initialization of solving algorithm
544  bool *racingSolversExist, ///< indicate racing solver exits or not
545  ParaTimer *paraTimer, ///< ParaTimer used
546  ParaDeterministicTimer *detTimer ///< DeterministicTimer used
547  );
548 
549  ///
550  /// destructor
551  ///
552  virtual ~BbParaLoadCoordinator(
553  );
554 
555 #ifdef UG_WITH_ZLIB
556 
557  ///
558  /// warm start (restart)
559  ///
560  virtual void warmStart(
561  );
562 
563 #endif
564 
565  ///
566  /// run for normal ramp-up
567  ///
568  virtual void run(
569  ParaTask *paraNode ///< root ParaNode
570  );
571 
572  ///
573  /// run for racing ramp-up
574  ///
575  virtual void run(
576  ParaTask *paraNode, ///< root ParaNode
577  int nRacingSolvers, ///< number of racing solvers
578  ParaRacingRampUpParamSet **racingRampUpParams ///< racing parameters
579  );
580 
581  ///
582  /// set global best incumbent solution
583  ///
585  ParaSolution *sol ///< incumbent solution to be set
586  );
587 
588 };
589 
590 }
591 
592 #endif // __BB_PARA_LOADCOORDINATOR_H__
593 
virtual void inactivateRacingSolverPool(int rank)
inactivate racing solver pool
std::ostream * osTabularSolvingStatus
ostream for solving status in tabular form to switch output location
ramp-up phase
BbParaNodePool * paraNodePoolBufferToGenerateCPF
This is used for GenerateReducedCheckpointFiles.
void terminateAllSolvers()
terminate all solvers
double averageDualBoundGain
average dual bound gain: could be negative value at restart
virtual int restartRacing()
restart racing
ParaTimer * paraTimer
Timers for LoadCoordinator.
std::deque< double > lastSeveralDualBoundGains
keep last several dual bound gains
virtual void outputTabularSolvingStatus(char incumbent)
output solving status in tabular form
static const double displayInfOverThisValue
if gap is over this value, Inf is displayed at gap TODO: this would move to inherited class ...
int breakingSolverId
all nodes collecting solver Id: -1: no collecting
virtual int processTagAllowToBeInCollectingMode(int source, int tag)
function to process TagAllowToBeInCollectingMode message
void setGlobalBestIncumbentSolution(ParaSolution *sol)
set global best incumbent solution
Class for LoadCoordinator termination state which contains calculation state in a ParaLoadCoordinator...
virtual int processTagLbBoundTightened(int source, int tag)
function to process TagLbBoundTightened message
size_t nCollectedSolvers
counter to check if all solvers are terminated or not
int racingWinner
racing winner information
BbParaNodePool * paraNodePool
Pools in LoadCorrdinator.
bool isBreakingFinised
indicate that breaking is finished or not if bootstrap ramp-up is not specified, this flag should be ...
int nAverageDualBoundGain
number of nodes whose dual bound gain are counted
BbParaNodePool * paraNodeToKeepCheckpointFileNodes
The first n nodes may always keep in checkpoint file, that is, the n nodes are not processed in this ...
virtual int processTagSelfSplitTermStateForInterruption(int source, int tag)
function to process TagSelfSplitTermStateForInterruption message
virtual int processTagAnotherNodeRequest(int source, int tag)
function to process TagAnotherNodeRequest message
ParaInitiator * paraInitiator
initiator
class for solution
Base class of Calculation state in a ParaSolver.
bool outputTabularSolvingStatusFlag
output streams and flags which indicate the output is specified or not
bool aSolverTerminatedWithOptimality
indicate if a solver terminated with proving optimality of the problem
Base class for deterministic timer.
virtual void sendInterruptRequest()
send interrupt request to all solvers
int minDepthInWinnerSolverNodes
racing winner information
Defines for UG Framework.
ug_bb Tag definitions
int maxDepthInWinnerSolverNodes
maximum depth of open nodes in the winner solver tree
bool hugeImbalance
indicate that a huge imbalance in solvers is detected
int nBoundChangesOfBestNode
the number of fixed variables of the best node The followings are used temporary to generate merge no...
bool * racingSolversExist
indicate if racing solver exits or not, true: exists
BbParaNodePool * paraNodePoolBufferToRestart
ParaNode pool for buffering ParaNodes in huge imbalance situation.
double starvingTime
start time of starving active solvers
Class for initiator.
Definition: paraInitiator.h:62
class for deterministic timer
bool logSubtreeInfoFlag
indicate if subtree info. is logged or not
bool warmStartNodeTransferring
indicate that the first node transferring at warm start (restart)
int(UG::BbParaLoadCoordinator::* BbMessageHandlerFunctionPointer)(int, int)
virtual ~BbParaLoadCoordinator()
destructor
Base class for Timer.
BbParaNodePool * paraNodePoolToRestart
ParaNode pool to restart in ramp-down phase.
virtual int processRacingRampUpTagSolverState(int source, int tag)
message handlers specialized for racing ramp-up
int nNormalSelection
number of normal node selection to a random node selection
virtual int processTagReassignSelfSplitSubtreeRootNode(int source, int tag)
function to process TagReassignSelfSplitSubtreeRootNode message
virtual bool sendParaTasksToIdleSolvers()
send ParaNodes to idle solvers
BbParaLoadCoordinatorTerminationState lcts
LoadCoordinatorTerminationState: counters and times.
virtual void changeSearchStrategyOfAllSolversToOriginalSearch()
change search strategy of all solvers to original search strategy
virtual void sendIncumbentValue(int receivedRank)
send incumbent value
bool allCompInfeasibleAfterSolution
indicate that all computations are infeasible after a feasible solution
std::ofstream ofsTabularSolvingStatus
ofstream for solving status in tabular form
ParaParamSet * paraParams
UG parameter set.
virtual int processTagTermStateForInterruption(int source, int tag)
function to process TagTermStateForInterruption message
bool restartingRacing
indicate that racing ramp-up is restarting
std::set< int > * selfSplitFinisedSolvers
indicate selfSplit finished solvers
virtual void writeSubtreeInfo(int source, ParaCalculationState *calcState)
write subtree info.
bool merging
for merging nodes
virtual int processTagTask(int source, int tag)
Message handlers.
int firstCollectingModeState
status of first collecting mode -1 : have not been in collecting mode 0 : once in collecting mode 1 :...
bool givenGapIsReached
shows if specified gap is reached or not
Base class of communicator for UG Framework.
virtual void sendCutOffValue(int receivedRank)
send cut off value
virtual int processTagSolution(int source, int tag)
function to process TagSolution message
virtual void outputTabularSolvingStatusHeader()
output tabular solving status header
BbParaSolution * pendingSolution
pending solution during merging
virtual void run()
run function to start main process
class ParaParamSet
Definition: paraParamSet.h:850
Load Coordinator.
virtual int processTagSelfSlpitNodeCalcuationState(int source, int tag)
function to process TagSelfSlpitNodeCalcuationState message
Class for LoadCoordinator.
bool winnerSolverNodesCollected
indicate that all winner solver nodes has been collected
virtual int processTagSolverState(int source, int tag)
function to process TagSolverState message
virtual void changeSearchStrategyOfAllSolversToBestBoundSearch()
change search strategy of all solvers to best bound bound search strategy
int nReplaceToBetterNode
the number of replacing to a better nodes
virtual void sendRetryRampUpToAllSolvers()
notify retry ramp-up to all solvers
RunningPhase runningPhase
status of LoadCoordinator
BbParaLoadCoordinator(int inNhanders, ParaComm *inComm, ParaParamSet *inParaParamSet, ParaInitiator *paraInitiator, bool *racingSolversExist, ParaTimer *paraTimer, ParaDeterministicTimer *detTimer)
constructor
static const int RampUpPhaseProcess
virtual int processTagUbBoundTightened(int source, int tag)
function to process TagUbBoundTightened message
virtual int processTagSubtreeRootNodeToBeRemoved(int source, int tag)
function to process TagSubtreeRootNodeToBeRemoved message
BbParaNodePool * unprocessedParaNodes
The last n nodes may always keep in checkpoint file, that is, the n nodes are not processed in this r...
double minmalDualBoundNormalTermSolvers
minimal dual bound for normal termination solvers
virtual int processTagSelfSplitFinished(int source, int tag)
function to process TagSelfSplitFinished message
class BbParaNodePool
virtual int processRacingRampUpTagCompletionOfCalculation(int source, int tag)
function to process TagCompletionOfCalculation message in racing ramp-up stage
std::ofstream ofsLogSubtreeInfo
ofstream for subtree info.
bool isCollectingModeRestarted
this flag indicate if a collecting mode is restarted or not
virtual void newRacing()
start a new racing
double statEmptyNodePoolTime
To measure how long does node pool stay in empty situation.
virtual int processTagNewSubtreeRootNode(int source, int tag)
function to process TagNewSubtreeRootNode message
double averageLastSeveralDualBoundGains
average dual bound gains of last several ones
virtual bool isRacingStage()
check if current stage is in racing or not
int getIntParamValue(int param)
for int parameters
bool isHeaderPrinted
indicate if heeader is printed or not
Class for LoadCoordinator.
class ParaTimer
Definition: paraTimer.h:48
virtual bool updateSolution(BbParaSolution *)
update incumbent solution
class ParaRacingRampUpParamSet (parameter set for racing ramp-up)
BbParaNodesMerger * nodesMerger
pointer to nodes merger object, which merges nodes
Base class of communicator object.
Definition: paraComm.h:101
bool primalUpdated
indicate that primal solution was updated or not
class for solution
Definition: paraSolution.h:53
virtual bool isGapReached()
check if Gap reached or not
virtual int processTagCompletionOfCalculation(int source, int tag)
function to process TagCompletionOfCalculation message
double previousTabularOutputTime
to keep tabular solving status output time
std::ostream * osLogSubtreeInfo
ostram for subtree info. to switch output location
bool initialNodesGenerated
indicates that initial nodes have been generated
class ParaTask
Definition: paraTask.h:541
double hugeImbalanceTime
start time of huge imbalance situation
virtual int processTagSubtreeRootNodeStartComputation(int source, int tag)
function to process TagSubtreeRootNodeStartComputation message
int nRestartedRacing
number of racing stages restarted