class_consclassifier.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
4 /* GCG --- Generic Column Generation */
5 /* a Dantzig-Wolfe decomposition based extension */
6 /* of the branch-cut-and-price framework */
7 /* SCIP --- Solving Constraint Integer Programs */
8 /* */
9 /* Copyright (C) 2010-2018 Operations Research, RWTH Aachen University */
10 /* Zuse Institute Berlin (ZIB) */
11 /* */
12 /* This program is free software; you can redistribute it and/or */
13 /* modify it under the terms of the GNU Lesser General Public License */
14 /* as published by the Free Software Foundation; either version 3 */
15 /* of the License, or (at your option) any later version. */
16 /* */
17 /* This program is distributed in the hope that it will be useful, */
18 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
19 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
20 /* GNU Lesser General Public License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with this program; if not, write to the Free Software */
24 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
25 /* */
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 #ifndef GCG_CLASS_CONSCLASSIFIER_H__
37 #define GCG_CLASS_CONSCLASSIFIER_H__
38 
39 #include "class_indexclassifier.h"
40 
41 namespace gcg
42 {
43 
45 {
46  BOTH = 0,
49 };
51 
52 
54 {
55 
56 public:
57 
60  SCIP* scip,
61  const char* name,
62  int nClasses,
63  int nConss
64  );
65 
68  const ConsClassifier* toCopy
69  );
70 
71 
74 
75 
77  int addClass(
78  const char* name,
79  const char* desc,
80  CONS_DECOMPINFO decompInfo
81  );
82 
84  void assignConsToClass(
85  int consindex,
86  int classindex
87  );
88 
90  std::vector<std::vector<int>> getAllSubsets(
91  bool both,
92  bool only_master,
93  bool only_pricing
94  );
95 
97  CONS_DECOMPINFO getClassDecompInfo(
98  int classindex
99  );
100 
102  const char* getClassNameOfCons(
103  int consindex
104  );
105 
106 
108  int getClassOfCons(
109  int consindex
110  );
111 
113  const int* getConssToClasses(
114  );
115 
117  int getNConss(
118  );
119 
121  std::vector<int> getNConssOfClasses(
122  );
123 
125  bool isConsClassified(
126  int consindex
127  );
128 
129 
134  int maxNumberOfClasses
135  );
136 
138  void setClassDecompInfo(
139  int classindex,
140  CONS_DECOMPINFO decompInfo
141  );
142 
143 };
144 
145 
146 } /* namespace gcg */
147 #endif /* GCG_CLASS_CONSCLASSIFIER_H__ */
int getClassOfCons(int consindex)
const char * getClassNameOfCons(int consindex)
std::vector< int > getNConssOfClasses()
generalization of ConsClassifier and VarClassifier
void assignConsToClass(int consindex, int classindex)
CONS_DECOMPINFO getClassDecompInfo(int classindex)
enum ConsClassDecompInfo CONS_DECOMPINFO
std::vector< std::vector< int > > getAllSubsets(bool both, bool only_master, bool only_pricing)
ConsClassifier(SCIP *scip, const char *name, int nClasses, int nConss)
void setClassDecompInfo(int classindex, CONS_DECOMPINFO decompInfo)
int addClass(const char *name, const char *desc, CONS_DECOMPINFO decompInfo)
bool isConsClassified(int consindex)
ConsClassifier * reduceClasses(int maxNumberOfClasses)