coin-Cgl
CglLiftAndProject.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef CglLiftAndProject_H
4 #define CglLiftAndProject_H
5 
6 #include <string>
7 
8 #include "CglCutGenerator.hpp"
9 
12  friend void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
13  const std::string mpdDir );
14 
15 public:
22  virtual void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
23  const CglTreeInfo info = CglTreeInfo()) const;
24 
28  double getBeta() const {
29  return beta_;
30  }
31 
35  void setBeta(int oneOrMinusOne){
36  if (oneOrMinusOne==1 || oneOrMinusOne==-1){
37  beta_= (double)oneOrMinusOne;
38  }
39  else {
40  throw CoinError("Unallowable value. Beta must be 1 or -1",
41  "cutGeneration","CglLiftAndProject");
42  }
43  }
44 
46 
51 
54  const CglLiftAndProject &);
55 
57  virtual CglCutGenerator * clone() const;
58 
61  operator=(
62  const CglLiftAndProject& rhs);
63 
65  virtual
68  virtual std::string generateCpp( FILE * fp);
70 
71 private:
72 
73  // Private member methods
74 
77 
79 
80  // Private member data
81 
84  double beta_;
87  double epsilon_;
89  double onetol_;
91 };
92 
93 //#############################################################################
99 void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
100  const std::string mpdDir );
101 
102 #endif
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
void setBeta(int oneOrMinusOne)
Set the normalization : Either beta=+1 or beta=-1.
double beta_
The normalization is beta_=1 or beta_=-1.
double onetol_
1-epsilon
double getBeta() const
Get the normalization : Either beta=+1 or beta=-1.
virtual CglCutGenerator * clone() const
Clone.
Lift And Project Cut Generator Class.
friend void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const
Generate lift-and-project cuts for the model of the solver interface, si.
Cut Generator Base Class.
virtual ~CglLiftAndProject()
Destructor.
double epsilon_
epsilon
void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglLiftAndProject()
Default constructor.
CglLiftAndProject & operator=(const CglLiftAndProject &rhs)
Assignment operator.
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:13