Scippy

UG

Ubiquity Generator framework

scipParaDiffSubproblemTh.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 scipParaDiffSubproblemTh.h
27 * @brief ScipParaDiffSubproblem 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_DIFF_SUBPROBLEM_TH_H__
38#define __SCIP_PARA_DIFF_SUBPROBLEM_TH_H__
39
40#include "ug/paraDef.h"
41#include "ug_bb/bbParaComm.h"
43#include "scip/scip.h"
44
45namespace ParaSCIP
46{
47
48class ScipParaSolver;
49
50/** The difference between instance and subproblem: this is base class */
52{
53public:
54 /** default constructor */
56 {
57 }
58
59 /** Constructor */
61 SCIP *inScip,
62 ScipParaSolver *inScipParaSolver,
63 int inNNewBranchVars,
64 SCIP_VAR **inNewBranchVars,
65 SCIP_Real *inNewBranchBounds,
66 SCIP_BOUNDTYPE *inNewBoundTypes,
67 int nAddedConss,
68 SCIP_CONS **addedConss
69 ) : ScipParaDiffSubproblem(inScip, inScipParaSolver,
70 inNNewBranchVars, inNewBranchVars, inNewBranchBounds, inNewBoundTypes, nAddedConss, addedConss)
71 {
72 }
73
74 /** Constructor */
76 ScipParaDiffSubproblem *paraDiffSubproblem
77 ) : ScipParaDiffSubproblem(paraDiffSubproblem)
78 {
79 }
80
81
82 /** destractor */
84 {
85 }
86
87 /** create clone of this object */
90 )
91 {
92 return(
94 );
95 }
96
97 int bcast(
99 int root
100 )
101 {
102 THROW_LOGICAL_ERROR1("bcast is issued in ScipParaDiffSubproblemTh");
103 }
104
105 int send(
107 int dest
108 )
109 {
110 THROW_LOGICAL_ERROR1("send is issued in ScipParaDiffSubproblemTh");
111 }
112
115 int source
116 )
117 {
118 THROW_LOGICAL_ERROR1("receive is issued in ScipParaDiffSubproblemTh");
119 }
120};
121
122}
123
124#endif // __SCIP_PARA_DIFF_SUBPROBLEM_TH_H__
125
Base class of communicator for UG Framework.
int receive(UG::ParaComm *comm, int source)
ScipParaDiffSubproblemTh(ScipParaDiffSubproblem *paraDiffSubproblem)
ScipParaDiffSubproblemTh(SCIP *inScip, ScipParaSolver *inScipParaSolver, int inNNewBranchVars, SCIP_VAR **inNewBranchVars, SCIP_Real *inNewBranchBounds, SCIP_BOUNDTYPE *inNewBoundTypes, int nAddedConss, SCIP_CONS **addedConss)
int bcast(UG::ParaComm *comm, int root)
int send(UG::ParaComm *comm, int dest)
ScipParaDiffSubproblemTh * clone(UG::ParaComm *comm)
Base class of communicator object.
Definition: paraComm.h:102
static ScipParaCommTh * comm
Definition: fscip.cpp:73
Defines for UG Framework.
#define THROW_LOGICAL_ERROR1(msg1)
Definition: paraDef.h:52
ParaInitialStat extension for SCIP solver.