Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
separator.h
Go to the documentation of this file.
1
30#pragma once
31
33
36
37namespace abacus {
38
39
41
42
44
65template <class BaseType, class CoType>
66class Separator : public AbacusRoot {
67public:
68
70
96
97
99 virtual ~Separator() {
100 delete hash_;
101 }
102
103
105 virtual void separate() = 0;
106
108
118
120
124 virtual bool terminateSeparation() {
125 return ( nGen() >= maxGen() );
126 }
127
130
131
133 int nGen() const { return newCons_.number(); }
134
135
137 int nDuplications() const { return nDuplications_; }
138
139
141 int nCollisions() const;
142
144 int maxGen() const { return newCons_.size(); }
145
146
148 double minAbsViolation() const { return minAbsViolation_; }
149
150
155
160
171
172protected:
173
183
186
187private:
194
198};
199
200}
201
Hash tables.
Definition hash.h:124
Global data and functions.
Definition global.h:57
Base class of all other classes of ABACUS.
Definition abacusroot.h:68
LP solutions.
Definition lpsolution.h:64
The master of the optimization.
Definition master.h:69
Standard pools without constraint duplication.
Definition nonduplpool.h:58
Separators.
Definition separator.h:66
void watchNonDuplPool(NonDuplPool< BaseType, CoType > *pool)
If the separator checks for duplication of cuts, the test is also done for constraints/variables that...
Definition separator.h:168
AbaHash< unsigned, BaseType * > * hash_
Definition separator.h:190
int maxGen() const
Returns the maximal number of generated cutting planes.
Definition separator.h:144
Separator_CUTFOUND cutFound(BaseType *cv)
Passes a cut (constraint or variable) to the buffer.
int nGen() const
Returns the number of generated cutting planes.
Definition separator.h:133
double minAbsViolation() const
Returns the absolute value for considering a constraint/variable as violated.
Definition separator.h:148
LpSolution< CoType, BaseType > * lpSolution()
The lpSolution to be separated.
Definition separator.h:157
virtual ~Separator()
The destructor.
Definition separator.h:99
int nCollisions() const
Returns the number of collisions in the hash table.
LpSolution< CoType, BaseType > * lpSol_
The LP solution to be separated.
Definition separator.h:185
void minAbsViolation(double minAbsVio)
Sets a new value for minAbsViolation.
Definition separator.h:152
double minAbsViolation_
Definition separator.h:188
virtual bool terminateSeparation()
Returns true if the separation should be terminated.
Definition separator.h:124
int nDuplications() const
Returns the number of duplicated constraints/variables which are discarded.
Definition separator.h:137
Separator(const Separator< BaseType, CoType > &rhs)
virtual void separate()=0
This function has to be redefined and should implement the separation routine.
bool find(BaseType *cv)
const Separator< BaseType, CoType > & operator=(const Separator< BaseType, CoType > &rhs)
Master * master_
A pointer to the corresponding master of the optimization.
Definition separator.h:184
ArrayBuffer< BaseType * > & cutBuffer()
Returns the buffer with the generated constraints/variable.
Definition separator.h:129
NonDuplPool< BaseType, CoType > * pool_
Definition separator.h:193
Separator(LpSolution< CoType, BaseType > *lpSolution, bool nonDuplications, int maxGen=300)
Creates a separator.
Definition separator.h:80
ArrayBuffer< BaseType * > newCons_
Definition separator.h:189
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition ArrayBuffer.h:56
INDEX size() const
Returns number of elements in the buffer.
hash table.
lpsolution.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
Separator_CUTFOUND
Definition separator.h:40
@ Duplication
Definition separator.h:40
@ Added
Definition separator.h:40
standard pool without constraint duplication.