Dip  0.92.4
DecompConstraintSet.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the Decomp Solver Framework. //
3 // //
4 // Decomp is distributed under the Common Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // //
9 // Copyright (C) 2002-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
10 // All Rights Reserved. //
11 //===========================================================================//
12 
13 #ifndef DECOMP_CONSTRAINTSET_INCLUDED
14 #define DECOMP_CONSTRAINTSET_INCLUDED
15 
16 #include "UtilMacros.h"
17 #include "DecompPortable.h"
18 
19 // --------------------------------------------------------------------- //
20 class DecompConstraintSet {
21 private:
22  //need these if vector?
23  //DecompConstraintSet(const DecompConstraintSet &);
24  //DecompConstraintSet & operator=(const DecompConstraintSet &);
25 
26  //THINK - better overall to store as sense!
27 public:
28  //do we want this dependence on CoinPackedMatrix?
29  //do we want all this depenence on STL vectors?
30 
31  //how does this all work for removing cuts?? if using vector!?
32 
33  //must flip to row ordered?
35  int nBaseRowsOrig;
36  int nBaseRows;
37  vector<string> rowHash;
38  vector<char> rowSense;
39  vector<double> rowRhs; //ugh... have to carry around
40  //ranges?
41 
42  vector<double> rowLB; //vector or double *?
43  vector<double> rowUB;
44  vector<double> colLB;
45  vector<double> colUB;
46  vector<int> integerVars;
47  //TODO: why not vector if rest are... nice if consistent
48  //double * objCoeff; //only used for modelCore?
49 
50  //TODO: colNames, rowNames
51 
52 
53 public:
54  inline const int getNumRows() const {
55  return M->getNumRows();
56  }
57  inline const int getNumCols() const {
58  return M->getNumCols();
59  }
60 
61 public:
62  void createRowHash();
63  void checkSenseAndBound();
64  void sensesToBounds();
65  void boundsToSenses();
66 
67 public:
69  M(0),
70  nBaseRowsOrig(0),
71  nBaseRows(0),
72  rowSense(),
73  rowRhs(),
74  rowLB(),
75  rowUB(),
76  colLB(),
77  colUB(),
78  integerVars()
79  //objCoeff(0)
80  {};
81 
83  UTIL_DELPTR(M);
84  };
85 };
86 
87 #endif
std::vector< double > colLB
std::vector< double > rowLB
vector< double > colLB
vector< double > colUB
std::vector< double > colUB
std::vector< double > rowUB
int getNumRows() const
Number of rows.
Sparse Matrix Base Class.
const int getNumRows() const
std::vector< int > integerVars
vector< string > rowHash
CoinPackedMatrix * M
int getNumCols() const
Number of columns.
vector< double > rowUB
std::vector< double > rowRhs
#define UTIL_DELPTR(x)
Definition: UtilMacros.h:28
vector< double > rowLB
vector< double > rowRhs
const int getNumCols() const
std::vector< char > rowSense