Scippy

UG

Ubiquity Generator framework

scipParaObjNodesel.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 objnodesel.h
27  * @brief C++ wrapper for node selectors
28  * @author Yuji Shinano
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __SCIP_PARA_OBJNODESEL_H__
34 #define __SCIP_PARA_OBJNODESEL_H__
35 
36 #include <cstring>
37 // #include "scipParaComm.h"
38 #include "scipParaSolver.h"
39 #include "objscip/objnodesel.h"
40 #include "scip/scipdefplugins.h"
41 
42 namespace ParaSCIP
43 {
44 
45 class ScipParaSolver;
46 
47 /** @brief C++ wrapper for primal heuristics
48  *
49  * This class defines the interface for node selectors implemented in C++. Note that there is a pure virtual
50  * function (this function has to be implemented). This function is: scip_comp().
51  *
52  * - \ref NODESEL "Instructions for implementing a node selector"
53  * - \ref NODESELECTORS "List of available node selectors"
54  * - \ref type_nodesel.h "Corresponding C interface"
55  */
56 class ScipParaObjNodesel : public scip::ObjNodesel
57 {
59 
60  int getNBoundChanges(SCIP_NODE* node);
61 
62 public:
63  /** default constructor */
65  ScipParaSolver *solver
66  )
67  : scip::ObjNodesel::ObjNodesel(solver->getScip(), "ScipParaObjNodesel", "Node selector when a node is sent to LC",
68  0, 0), scipParaSolver(solver)
69  {
70  }
71 
72  /** destructor */
74  {
75  }
76 
77  /** node selection method of node selector
78  *
79  * @see SCIP_DECL_NODESELSELECT(x) in @ref type_nodesel.h
80  */
81  virtual SCIP_DECL_NODESELSELECT(scip_select);
82 
83  /** node comparison method of node selector
84  *
85  * @see SCIP_DECL_NODESELCOMP(x) in @ref type_nodesel.h
86  */
87  virtual SCIP_DECL_NODESELCOMP(scip_comp);
88 
89  void reset()
90  {
91  }
92 
93 };
94 
95 } /* namespace scip */
96 
97 #endif
virtual SCIP_DECL_NODESELSELECT(scip_select)
ScipParaObjNodesel(ScipParaSolver *solver)
ParaSolver extension for SCIP: Parallelized solver implementation for SCIP.
virtual SCIP_DECL_NODESELCOMP(scip_comp)
C++ wrapper for primal heuristics.
int getNBoundChanges(SCIP_NODE *node)