Scippy

UG

Ubiquity Generator framework

bbParaCalculationStateTh.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 bbParaCalculationStateTh.cpp
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#include "bbParaComm.h"
38
39using namespace UG;
40
42BbParaCalculationStateTh::createDatatype(
43 )
44{
45 return new BbParaCalculationStateTh(
48 nSolved,
49 nSent,
64 minNii,
65 maxNii,
68 );
69}
70
71void
74 int destination,
75 int tag
76 )
77{
78 DEF_PARA_COMM( commTh, comm);
79
81 commTh->uTypeSend(createDatatype(), ParaCalculationStateType, destination, tag)
82 );
83}
84
85void
88 int source,
89 int tag
90 )
91{
92 DEF_PARA_COMM( commTh, comm);
93
95
97 commTh->uTypeReceive((void **)&received, ParaCalculationStateType, source, tag)
98 );
99
100 compTime = received->compTime;
101 rootTime = received->rootTime;
102 nSolved = received->nSolved;
103 nSent = received->nSent;
115 nRestarts = received->nRestarts;
116 minIisum = received->minIisum;
117 maxIisum = received->maxIisum;
118 minNii = received->minNii;
119 maxNii = received->maxNii;
120 dualBound = received->dualBound;
122
123 delete received;
124
125}
CalcutationStte object extension for threads communication.
Base class of communicator for UG Framework.
Calculation state object for thread communications.
void send(ParaComm *comm, int destination, int tag)
send this object to destination
BbParaCalculationStateTh * createDatatype()
create thread object datatype of this object
void receive(ParaComm *comm, int source, int tag)
receive this object from source
BbParaCalculationStateTh()
default constructor of this object
int minTransferredLocalCuts
minimum number of local cuts transferred from a ParaNode
int nTransferredBendersCuts
number of benders cuts transferred from a ParaNode
double rootTime
computation time of the root node
double dualBound
final dual bound value
int maxTransferredLocalCuts
maximum number of local cuts transferred from a ParaNode
int maxTransferredBendersCuts
maximum number of benders cuts transferred from a ParaNode
int nSelfSplitNodesLeft
number of self-split nodes left
int nSimplexIterRoot
number of simplex iteration at root node
int maxNii
maximum number of integer infeasibility
int minTransferredBendersCuts
minimum number of benders cuts transferred from a ParaNode
int nSolvedWithNoPreprocesses
number of nodes solved when it is solved with no preprocesses
int nRestarts
number of restarts
double averageSimplexIter
average number of simplex iteration except root node
double maxIisum
maximum sum of integer infeasibility
int nImprovedIncumbent
the number of improved solution generated in this ParaSolver
double minIisum
minimum sum of integer infeasibility
int minNii
minimum number of integer infeasibility
int nSent
the number of ParaNodes sent
int nTransferredLocalCuts
number of local cuts transferred from a ParaNode
int nSolved
the number of tasks solved
int terminationState
indicate whether if this computation is terminationState or not. 0: no, 1: terminationState meaning c...
double compTime
computation time of this ParaTask
Base class of communicator object.
Definition: paraComm.h:102
static ScipParaCommTh * comm
Definition: fscip.cpp:73
static const int ParaCalculationStateType
#define DEF_PARA_COMM(para_comm, comm)
#define PARA_COMM_CALL(paracommcall)
Definition: paraComm.h:47