Cgl  0.60.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 //#############################################################################
102  const std::string mpdDir );
103 
104 #endif
Error Class thrown by an exception.
Definition: CoinError.hpp:42
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
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.
double beta_
The normalization is beta_=1 or beta_=-1.
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
Lift And Project Cut Generator Class.
Abstract Base Class for describing an interface to a solver.
double getBeta() const
Get the normalization : Either beta=+1 or beta=-1.
Cut Generator Base Class.
friend void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
void setBeta(int oneOrMinusOne)
Set the normalization : Either beta=+1 or beta=-1.
CglLiftAndProject & operator=(const CglLiftAndProject &rhs)
Assignment operator.
virtual ~CglLiftAndProject()
Destructor.
CglLiftAndProject()
Default constructor.
virtual CglCutGenerator * clone() const
Clone.
double epsilon_
epsilon
double onetol_
1-epsilon