Bonmin
1.8.9
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Algorithms
OaGenerators
BonEcpCuts.hpp
Go to the documentation of this file.
1
// (C) Copyright International Business Machines (IBM) 2006, 2007
2
// All Rights Reserved.
3
// This code is published under the Eclipse Public License.
4
//
5
// Authors :
6
// P. Bonami, International Business Machines
7
//
8
// Date : 12/20/2006
9
10
#ifndef BonECPCuts_HPP
11
#define BonECPCuts_HPP
12
13
#include "
BonOaDecBase.hpp
"
14
#include "
CglCutGenerator.hpp
"
15
namespace
Bonmin
16
{
17
class
EcpCuts
:
public
OaDecompositionBase
18
{
19
public
:
20
EcpCuts
(
BabSetupBase
& b);
21
23
EcpCuts
(
const
EcpCuts
& copy):
24
OaDecompositionBase
(copy),
25
objValue_(copy.objValue_),
26
numRounds_(copy.numRounds_),
27
abs_violation_tol_(copy.abs_violation_tol_),
28
rel_violation_tol_(copy.rel_violation_tol_),
29
beta_(copy.beta_)
30
{}
31
33
CglCutGenerator
*
clone
()
const
34
{
35
return
new
EcpCuts
(*
this
);
36
}
37
39
virtual
~EcpCuts
()
40
{}
41
42
virtual
void
generateCuts
(
const
OsiSolverInterface
&si,
OsiCuts
& cs,
43
const
CglTreeInfo
info =
CglTreeInfo
());
44
double
doEcpRounds
(
OsiSolverInterface
&si,
45
bool
leaveSiUnchanged,
46
double
* violation = NULL);
47
48
void
setNumRounds
(
int
value)
49
{
50
numRounds_ = value;
51
}
52
53
void
setPropabilityFactor
(
double
value)
54
{
55
beta_ = value;
56
}
57
58
void
setAbsViolationTolerance
(
double
value)
59
{
60
abs_violation_tol_ = value;
61
}
62
void
setRelViolationTolerance
(
double
value)
63
{
64
rel_violation_tol_ = value;
65
}
66
68
static
void
registerOptions
(
Ipopt::SmartPtr<Bonmin::RegisteredOptions>
roptions);
69
70
protected
:
72
virtual
double
performOa
(
OsiCuts
& cs,
solverManip
&lpManip,
73
BabInfo
* babInfo,
double
&cutoff,
const
CglTreeInfo
&info)
const
74
{
75
throw
-1;
76
}
77
78
virtual
bool
doLocalSearch
(
BabInfo
* babInfo)
const
79
{
80
return
0;
81
}
82
private
:
84
mutable
double
objValue_;
86
mutable
double
violation_;
88
int
numRounds_;
90
double
abs_violation_tol_;
92
double
rel_violation_tol_;
94
double
beta_;
95
};
96
}
/* end namespace Bonmin.*/
97
#endif
BonOaDecBase.hpp
CglCutGenerator.hpp
Bonmin::BabInfo
Bonmin class for passing info between components of branch-and-cuts.
Definition
BonBabInfos.hpp:20
Bonmin::BabSetupBase
A class to have all elements necessary to setup a branch-and-bound.
Definition
BonBabSetupBase.hpp:26
Bonmin::EcpCuts::setAbsViolationTolerance
void setAbsViolationTolerance(double value)
Definition
BonEcpCuts.hpp:58
Bonmin::EcpCuts::~EcpCuts
virtual ~EcpCuts()
Destructor.
Definition
BonEcpCuts.hpp:39
Bonmin::EcpCuts::clone
CglCutGenerator * clone() const
clone
Definition
BonEcpCuts.hpp:33
Bonmin::EcpCuts::setPropabilityFactor
void setPropabilityFactor(double value)
Definition
BonEcpCuts.hpp:53
Bonmin::EcpCuts::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Standard cut generation methods.
Bonmin::EcpCuts::setNumRounds
void setNumRounds(int value)
Definition
BonEcpCuts.hpp:48
Bonmin::EcpCuts::doLocalSearch
virtual bool doLocalSearch(BabInfo *babInfo) const
virutal method to decide if local search is performed
Definition
BonEcpCuts.hpp:78
Bonmin::EcpCuts::doEcpRounds
double doEcpRounds(OsiSolverInterface &si, bool leaveSiUnchanged, double *violation=NULL)
Bonmin::EcpCuts::performOa
virtual double performOa(OsiCuts &cs, solverManip &lpManip, BabInfo *babInfo, double &cutoff, const CglTreeInfo &info) const
virtual method which performs the OA algorithm by modifying lp and nlp.
Definition
BonEcpCuts.hpp:72
Bonmin::EcpCuts::setRelViolationTolerance
void setRelViolationTolerance(double value)
Definition
BonEcpCuts.hpp:62
Bonmin::EcpCuts::registerOptions
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register ecp cuts options.
Bonmin::EcpCuts::EcpCuts
EcpCuts(BabSetupBase &b)
Bonmin::EcpCuts::EcpCuts
EcpCuts(const EcpCuts ©)
Copy constructor.
Definition
BonEcpCuts.hpp:23
Bonmin::OaDecompositionBase::solverManip
Small class to manipulatee various things in an OsiSolverInterface and restore them.
Definition
BonOaDecBase.hpp:35
Bonmin::OaDecompositionBase::OaDecompositionBase
OaDecompositionBase(BabSetupBase &b, bool leaveSiUnchanged, bool reassignLpsolver)
New usefull constructor.
CglCutGenerator::CglCutGenerator
CglCutGenerator()
CglTreeInfo
Ipopt::SmartPtr
OsiCuts
OsiSolverInterface
Bonmin
(C) Copyright International Business Machines Corporation 2007
Definition
BonAmplSetup.hpp:16
Generated by
1.17.0