Cgl
0.60.10
Toggle main menu visibility
Loading...
Searching...
No Matches
Cgl
src
CglLiftAndProject
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
:
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
52
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
87
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
CglCutGenerator.hpp
CglLiftAndProjectUnitTest
void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglCutGenerator::CglCutGenerator
CglCutGenerator()
Default constructor.
CglLiftAndProject::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
CglLiftAndProject::beta_
double beta_
The normalization is beta_=1 or beta_=-1.
Definition
CglLiftAndProject.hpp:87
CglLiftAndProject::CglLiftAndProject
CglLiftAndProject()
Default constructor.
CglLiftAndProject::getBeta
double getBeta() const
Get the normalization : Either beta=+1 or beta=-1.
Definition
CglLiftAndProject.hpp:30
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
CglLiftAndProject(const CglLiftAndProject &)
Copy constructor.
CglLiftAndProject::operator=
CglLiftAndProject & operator=(const CglLiftAndProject &rhs)
Assignment operator.
CglLiftAndProject::setBeta
void setBeta(int oneOrMinusOne)
Set the normalization : Either beta=+1 or beta=-1.
Definition
CglLiftAndProject.hpp:37
CglLiftAndProject::clone
virtual CglCutGenerator * clone() const
Clone.
CglLiftAndProject::onetol_
double onetol_
1-epsilon
Definition
CglLiftAndProject.hpp:91
CglLiftAndProject::CglLiftAndProjectUnitTest
friend void CglLiftAndProjectUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglLiftAndProject class.
CglLiftAndProject::epsilon_
double epsilon_
epsilon
Definition
CglLiftAndProject.hpp:89
CglLiftAndProject::~CglLiftAndProject
virtual ~CglLiftAndProject()
Destructor.
CglTreeInfo
Information about where the cut generator is invoked from.
Definition
CglTreeInfo.hpp:15
Generated by
1.17.0