Cgl 0.60.9
Loading...
Searching...
No Matches
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
17public:
20
24 virtual void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
25 const CglTreeInfo info = CglTreeInfo());
26
29
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
53
56 const CglLiftAndProject &);
57
59 virtual CglCutGenerator * clone() const;
60
64 const CglLiftAndProject& rhs);
65
67 virtual
70 virtual std::string generateCpp( FILE * fp);
72
73private:
74
75 // Private member methods
76
79
81
82 // Private member data
83
86
87 double beta_;
89 double epsilon_;
91 double onetol_;
93};
94
95//#############################################################################
101void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
102 const std::string mpdDir );
103
104#endif
void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglCutGenerator()
Default constructor.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
double beta_
The normalization is beta_=1 or beta_=-1.
CglLiftAndProject()
Default constructor.
double getBeta() const
Get the normalization : Either beta=+1 or beta=-1.
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(const CglLiftAndProject &)
Copy constructor.
CglLiftAndProject & operator=(const CglLiftAndProject &rhs)
Assignment operator.
void setBeta(int oneOrMinusOne)
Set the normalization : Either beta=+1 or beta=-1.
virtual CglCutGenerator * clone() const
Clone.
double onetol_
1-epsilon
friend void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
virtual ~CglLiftAndProject()
Destructor.
Information about where the cut generator is invoked from.