Scippy

UG

Ubiquity Generator framework

bbParaCalculationStateTh.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 paraCalculationStateTh.h
27  * @brief CalcutationStte object extension for threads communication
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_CALCULATION_STATE_TH_H__
38 #define __BB_PARA_CALCULATION_STATE_TH_H__
39 
40 #include "bbParaCalculationState.h"
41 
42 namespace UG
43 {
44 
45 ///
46 /// Calculation state object for thread communications
47 ///
49 {
50 
51  ///
52  /// create thread object datatype of this object
53  /// @return thread object dataypte of this object
54  ///
56  );
57 
58 public:
59 
60  ///
61  /// default constructor of this object
62  ///
64  )
65  {
66  }
67 
68  ///
69  /// constructor of this object
70  ///
72  double inCompTime, ///< computation time of this ParaNode
73  double inRootTime, ///< computation time of the root node
74  int inNSolved, ///< the number of nodes solved
75  int inNSent, ///< the number of ParaNodes sent
76  int inNImprovedIncumbent, ///< the number of improved solution generated in this ParaSolver
77  int inTerminationState, ///< indicate whether if this computation is terminationState or not. 0: no, 1: terminationState
78  int inNSolvedWithNoPreprocesses, ///< number of nodes solved when it is solved with no preprocesses
79  int inNSimplexIterRoot, ///< number of simplex iteration at root node
80  double inAverageSimplexIter, ///< average number of simplex iteration except root node
81  int inNTransferredLocalCuts, ///< number of local cuts transferred from a ParaNode
82  int inMinTransferredLocalCuts, ///< minimum number of local cuts transferred from a ParaNode
83  int inMaxTransferredLocalCuts, ///< maximum number of local cuts transferred from a ParaNode
84  int inNTransferredBendersCuts, ///< number of benders cuts transferred from a ParaNode
85  int inMinTransferredBendersCuts, ///< minimum number of benders cuts transferred from a ParaNode
86  int inMaxTransferredBendersCuts, ///< maximum number of benders cuts transferred from a ParaNode
87  int inNRestarts, ///< number of restarts
88  double inMinIisum, ///< minimum sum of integer infeasibility
89  double inMaxIisum, ///< maximum sum of integer infeasibility
90  int inMinNii, ///< minimum number of integer infeasibility
91  int inMaxNii, ///< maximum number of integer infeasibility
92  double inDualBound, ///< final dual Bound value
93  int inNSelfSplitNodesLeft ///< number of self-split nodes left
94  )
95  : BbParaCalculationState(inCompTime,inRootTime, inNSolved, inNSent,inNImprovedIncumbent,inTerminationState,inNSolvedWithNoPreprocesses,
96  inNSimplexIterRoot, inAverageSimplexIter,
97  inNTransferredLocalCuts, inMinTransferredLocalCuts, inMaxTransferredLocalCuts,
98  inNTransferredBendersCuts, inMinTransferredBendersCuts, inMaxTransferredBendersCuts,
99  inNRestarts, inMinIisum, inMaxIisum, inMinNii, inMaxNii, inDualBound, inNSelfSplitNodesLeft)
100  {
101  }
102 
103  ///
104  /// destructor of this object
105  ///
107  )
108  {
109  }
110 
111  ///
112  /// send this object to destination
113  ///
114  void send(
115  ParaComm *comm, ///< communicator used to send this object
116  int destination, ///< destination rank to send
117  int tag ///< tag to show this object
118  );
119 
120  ///
121  /// receive this object from source
122  ///
123  void receive(
124  ParaComm *comm, ///< communicator used to receive this object
125  int source, ///< source rank to receive this object
126  int tag ///< tag to show this object
127  );
128 
129 };
130 
131 }
132 
133 #endif // __BB_PARA_CALCULATION_STATE_TH_H__
134 
static ScipParaCommTh * comm
Definition: fscip.cpp:73
BbParaCalculationStateTh * createDatatype()
create thread object datatype of this object
Base class of Calculation state in a ParaSolver.
BbParaCalculationStateTh(double inCompTime, double inRootTime, int inNSolved, int inNSent, int inNImprovedIncumbent, int inTerminationState, int inNSolvedWithNoPreprocesses, int inNSimplexIterRoot, double inAverageSimplexIter, int inNTransferredLocalCuts, int inMinTransferredLocalCuts, int inMaxTransferredLocalCuts, int inNTransferredBendersCuts, int inMinTransferredBendersCuts, int inMaxTransferredBendersCuts, int inNRestarts, double inMinIisum, double inMaxIisum, int inMinNii, int inMaxNii, double inDualBound, int inNSelfSplitNodesLeft)
constructor of this object
void send(ParaComm *comm, int destination, int tag)
send this object to destination
void receive(ParaComm *comm, int source, int tag)
receive this object from source
Calculation state object for thread communications.
BbParaCalculationStateTh()
default constructor of this object
~BbParaCalculationStateTh()
destructor of this object
Base class of communicator object.
Definition: paraComm.h:101