Cgl  0.60.7
CglLiftAndProject.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 // This code is licensed under the terms of the Eclipse Public License (EPL).
4 
5 #ifndef CglLiftAndProject_H
6 #define CglLiftAndProject_H
7 
8 #include <string>
9 
10 #include "CglCutGenerator.hpp"
11 
14  friend void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
15  const std::string mpdDir );
16 
17 public:
24  virtual void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
25  const CglTreeInfo info = CglTreeInfo());
26 
30  double getBeta() const {
31  return beta_;
32  }
33 
37  void setBeta(int oneOrMinusOne){
38  if (oneOrMinusOne==1 || oneOrMinusOne==-1){
39  beta_= static_cast<double>(oneOrMinusOne);
40  }
41  else {
42  throw CoinError("Unallowable value. Beta must be 1 or -1",
43  "cutGeneration","CglLiftAndProject");
44  }
45  }
46 
48 
53 
56  const CglLiftAndProject &);
57 
59  virtual CglCutGenerator * clone() const;
60 
63  operator=(
64  const CglLiftAndProject& rhs);
65 
67  virtual
70  virtual std::string generateCpp( FILE * fp);
72 
73 private:
74 
75  // Private member methods
76 
79 
81 
82  // Private member data
83 
86  double beta_;
89  double epsilon_;
91  double onetol_;
93 };
94 
95 //#############################################################################
101 void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
102  const std::string mpdDir );
103 
104 #endif
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
CglLiftAndProject::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglLiftAndProject::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate lift-and-project cuts for the model of the solver interface, si.
CglLiftAndProject::beta_
double beta_
The normalization is beta_=1 or beta_=-1.
Definition: CglLiftAndProject.hpp:87
CglLiftAndProject::clone
virtual CglCutGenerator * clone() const
Clone.
CglLiftAndProject::getBeta
double getBeta() const
Get the normalization : Either beta=+1 or beta=-1.
Definition: CglLiftAndProject.hpp:30
CglCutGenerator.hpp
CglLiftAndProject::CglLiftAndProjectUnitTest
friend void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglLiftAndProject::setBeta
void setBeta(int oneOrMinusOne)
Set the normalization : Either beta=+1 or beta=-1.
Definition: CglLiftAndProject.hpp:37
CglLiftAndProjectUnitTest
void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
CglLiftAndProject::operator=
CglLiftAndProject & operator=(const CglLiftAndProject &rhs)
Assignment operator.
CglLiftAndProject
Lift And Project Cut Generator Class.
Definition: CglLiftAndProject.hpp:13
CglLiftAndProject::~CglLiftAndProject
virtual ~CglLiftAndProject()
Destructor.
CglLiftAndProject::CglLiftAndProject
CglLiftAndProject()
Default constructor.
CglLiftAndProject::epsilon_
double epsilon_
epsilon
Definition: CglLiftAndProject.hpp:89
CglLiftAndProject::onetol_
double onetol_
1-epsilon
Definition: CglLiftAndProject.hpp:91