Scippy

UG

Ubiquity Generator framework

scipParaInitialStatTh.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 scipParaInitialStatTh.h
27 * @brief ScipParaInitialStat 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 __SCIP_PARA_INITIAL_STAT_TH_H__
38#define __SCIP_PARA_INITIAL_STAT_TH_H__
39
40#include <iostream>
41#include "ug/paraTagDef.h"
42#include "ug/paraComm.h"
43#include "scipParaInitialStat.h"
44#include "scip/scip.h"
45
46namespace ParaSCIP
47{
48
49/** The initial statistic collecting data class: this is base class */
51{
53public:
54 /** default constructor */
56 )
57 {
58 }
59
60 /** constructor for clone */
62 int inMaxDepth,
63 int inMaxTotalDepth,
64 int inNVarBranchStatsDown,
65 int inNVarBranchStatsUp,
66 int *inIdxLBranchStatsVarsDown,
67 int *inNVarBranchingDown,
68 int *inIdxLBranchStatsVarsUp,
69 int *inNVarBranchingUp,
70 SCIP_Real *inDownpscost,
71 SCIP_Real *inDownvsids,
72 SCIP_Real *inDownconflen,
73 SCIP_Real *inDowninfer,
74 SCIP_Real *inDowncutoff,
75 SCIP_Real *inUppscost,
76 SCIP_Real *inUpvsids,
77 SCIP_Real *inUpconflen,
78 SCIP_Real *inUpinfer,
79 SCIP_Real *inUpcutoff
80 )
81 {
82 maxDepth = inMaxDepth;
83 maxTotalDepth = inMaxTotalDepth;
84 nVarBranchStatsDown = inNVarBranchStatsDown;
85 nVarBranchStatsUp = inNVarBranchStatsUp;
86 idxLBranchStatsVarsDown = inIdxLBranchStatsVarsDown;
87 nVarBranchingDown = inNVarBranchingDown;
88 idxLBranchStatsVarsUp = inIdxLBranchStatsVarsUp;
89 nVarBranchingUp = inNVarBranchingUp;
90 downpscost = inDownpscost;
91 downvsids = inDownvsids;
92 downconflen = inDownconflen;
93 downinfer = inDowninfer;
94 downcutoff = inDowncutoff;
95 uppscost = inUppscost;
96 upvsids = inUpvsids;
97 upconflen = inUpconflen;
98 upinfer = inUpinfer;
99 upcutoff = inUpcutoff;
100 }
101
102 /** constructor to create this object */
104 SCIP *scip
105 ) : ScipParaInitialStat(scip)
106 {
107 }
108
109 /** destractor */
111 {
112 }
113
114 /** user should implement send method */
115 void send(UG::ParaComm *comm, int dest);
116
117 /** user should implement receive method */
118 void receive(UG::ParaComm *comm, int source);
119};
120
121}
122
123#endif // __SCIP_PARA_INITIAL_STAT_TH_H__
void send(UG::ParaComm *comm, int dest)
ScipParaInitialStatTh(int inMaxDepth, int inMaxTotalDepth, int inNVarBranchStatsDown, int inNVarBranchStatsUp, int *inIdxLBranchStatsVarsDown, int *inNVarBranchingDown, int *inIdxLBranchStatsVarsUp, int *inNVarBranchingUp, SCIP_Real *inDownpscost, SCIP_Real *inDownvsids, SCIP_Real *inDownconflen, SCIP_Real *inDowninfer, SCIP_Real *inDowncutoff, SCIP_Real *inUppscost, SCIP_Real *inUpvsids, SCIP_Real *inUpconflen, SCIP_Real *inUpinfer, SCIP_Real *inUpcutoff)
UG::ParaInitialStat * createDatatype(UG::ParaComm *comm)
void receive(UG::ParaComm *comm, int source)
Base class of communicator object.
Definition: paraComm.h:102
class for initial statistics collecting after racing
static ScipParaCommTh * comm
Definition: fscip.cpp:73
Base class of communicator for UG Framework.
Fundamental Tag definitions.
ParaInitialStat extension for SCIP solver.