- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
13 class CglLiftAndProject : public CglCutGenerator {
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
51 CglLiftAndProject ();
53
55 CglLiftAndProject (
56 const CglLiftAndProject &);
57
59 virtual CglCutGenerator * clone() const;
60
62 CglLiftAndProject &
63 operator=(
64 const CglLiftAndProject& rhs);
65
67 virtual
68 ~CglLiftAndProject ();
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
CglLiftAndProject::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglLiftAndProject::setBeta
void setBeta(int oneOrMinusOne)
Set the normalization : Either beta=+1 or beta=-1.
Definition: CglLiftAndProject.hpp:37
CglLiftAndProject::beta_
double beta_
The normalization is beta_=1 or beta_=-1.
Definition: CglLiftAndProject.hpp:87
CglLiftAndProject::onetol_
double onetol_
1-epsilon
Definition: CglLiftAndProject.hpp:91
CglLiftAndProject::getBeta
double getBeta() const
Get the normalization : Either beta=+1 or beta=-1.
Definition: CglLiftAndProject.hpp:30
CglLiftAndProject::clone
virtual CglCutGenerator * clone() const
Clone.
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
CglLiftAndProject
Lift And Project Cut Generator Class.
Definition: CglLiftAndProject.hpp:13
CglLiftAndProject::CglLiftAndProjectUnitTest
friend void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglCutGenerator.hpp
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
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::~CglLiftAndProject
virtual ~CglLiftAndProject()
Destructor.
CoinError
Error Class thrown by an exception.
Definition: CoinError.hpp:42
CglLiftAndProject::epsilon_
double epsilon_
epsilon
Definition: CglLiftAndProject.hpp:89
CglLiftAndProjectUnitTest
void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglLiftAndProject::CglLiftAndProject
CglLiftAndProject()
Default constructor.
CglLiftAndProject::operator=
CglLiftAndProject & operator=(const CglLiftAndProject &rhs)
Assignment operator.
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15