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

- File List
- File Members

AbcCutGenerator.h
Go to the documentation of this file.
1 /*===========================================================================*
2 * This file is part of the Abstract Library for Parallel Search (ALPS). *
3 * *
4 * ALPS is distributed under the Eclipse Public License as part of the *
5 * COIN-OR repository (http://www.coin-or.org). *
6 * *
7 * Authors: *
8 * *
9 * Yan Xu, Lehigh University *
10 * Ted Ralphs, Lehigh University *
11 * *
12 * Conceptual Design: *
13 * *
14 * Yan Xu, Lehigh University *
15 * Ted Ralphs, Lehigh University *
16 * Laszlo Ladanyi, IBM T.J. Watson Research Center *
17 * Matthew Saltzman, Clemson University *
18 * *
19 * *
20 * Copyright (C) 2001-2013, Lehigh University, Yan Xu, and Ted Ralphs. *
21 *===========================================================================*/
22
23 //#############################################################################
24 // This file is modified from SbbCutGenerator.hpp
25 //#############################################################################
26
27 #ifndef AbcCutGenerator_h_
28 #define AbcCutGenerator_h_
29
30 #include "OsiSolverInterface.hpp"
31 #include "OsiCuts.hpp"
32
33 class AbcModel;
34 class OsiRowCut;
35 class OsiRowCutDebugger;
36 class CglCutGenerator;
37
38 //#############################################################################
39
69 class AbcCutGenerator {
70
71 public:
72
89 bool generateCuts( OsiCuts &cs, bool fullScan);
91
92
95 AbcCutGenerator ();
97
99 AbcCutGenerator(AbcModel * model,CglCutGenerator * generator,
100 int howOften=1, const char * name=NULL,
101 bool normal=true, bool atSolution=false,
102 bool infeasible=false);
103
105 AbcCutGenerator (const AbcCutGenerator &);
106
108 AbcCutGenerator & operator=(const AbcCutGenerator& rhs);
109
111 ~AbcCutGenerator ();
113
121 void refreshModel(AbcModel * model);
122
124 inline const char * cutGeneratorName() const
125 {
126 return generatorName_;
127 }
128
143 void setHowOften(int value) ;
144
146 inline int howOften() const
147 { return whenCutGenerator_; }
148
150 inline bool normal() const
151 { return normal_; }
153 inline void setNormal(bool value)
154 { normal_=value; }
156 inline bool atSolution() const
157 { return atSolution_; }
159 inline void setAtSolution(bool value)
160 { atSolution_=value; }
164 inline bool whenInfeasible() const
165 { return whenInfeasible_; }
169 inline void setWhenInfeasible(bool value)
170 { whenInfeasible_=value; }
172 inline CglCutGenerator * generator() const
173 { return generator_; }
175
176 private:
178 AbcModel *model_;
179
180 // The CglCutGenerator object
181 CglCutGenerator * generator_;
182
186 int whenCutGenerator_;
187
189 char * generatorName_;
190
192 bool normal_;
193
195 bool atSolution_;
196
198 bool whenInfeasible_;
199 };
200
201 #endif
AbcCutGenerator::setNormal
void setNormal(bool value)
Set whether the cut generator should be called in the normal place.
Definition: AbcCutGenerator.h:153
OsiRowCut
Row Cut Class.
Definition: OsiRowCut.hpp:29
AbcCutGenerator::operator=
AbcCutGenerator & operator=(const AbcCutGenerator &rhs)
Assignment operator.
AbcCutGenerator::cutGeneratorName
const char * cutGeneratorName() const
return name of generator
Definition: AbcCutGenerator.h:124
AbcCutGenerator::generatorName_
char * generatorName_
Name of generator.
Definition: AbcCutGenerator.h:189
AbcCutGenerator::whenInfeasible_
bool whenInfeasible_
Whether to call generator when a subproblem is found to be infeasible.
Definition: AbcCutGenerator.h:198
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
AbcCutGenerator::whenInfeasible
bool whenInfeasible() const
Get whether the cut generator should be called when the subproblem is found to be infeasible...
Definition: AbcCutGenerator.h:164
AbcCutGenerator::refreshModel
void refreshModel(AbcModel *model)
Set the client model.
AbcCutGenerator::setHowOften
void setHowOften(int value)
Set the cut generation interval.
AbcCutGenerator::whenCutGenerator_
int whenCutGenerator_
Number of nodes between calls to the CglCutGenerator::generateCuts routine.
Definition: AbcCutGenerator.h:186
AbcCutGenerator::setWhenInfeasible
void setWhenInfeasible(bool value)
Set whether the cut generator should be called when the subproblem is found to be infeasible...
Definition: AbcCutGenerator.h:169
AbcCutGenerator::model_
AbcModel * model_
The client model.
Definition: AbcCutGenerator.h:178
AbcCutGenerator::generateCuts
bool generateCuts(OsiCuts &cs, bool fullScan)
Generate cuts for the client model.
OsiSolverInterface.hpp
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
AbcCutGenerator::howOften
int howOften() const
Get the cut generation interval.
Definition: AbcCutGenerator.h:146
AbcCutGenerator::setAtSolution
void setAtSolution(bool value)
Set whether the cut generator should be called when a solution is found.
Definition: AbcCutGenerator.h:159
OsiRowCutDebugger
Validate cuts against a known solution.
Definition: OsiRowCutDebugger.hpp:42
AbcCutGenerator::generator
CglCutGenerator * generator() const
Get the CglCutGenerator bound to this AbcCutGenerator.
Definition: AbcCutGenerator.h:172
AbcCutGenerator::atSolution
bool atSolution() const
Get whether the cut generator should be called when a solution is found.
Definition: AbcCutGenerator.h:156
AbcCutGenerator::atSolution_
bool atSolution_
Whether to call the generator when a new solution is found.
Definition: AbcCutGenerator.h:195
AbcCutGenerator::~AbcCutGenerator
~AbcCutGenerator()
Destructor.
AbcCutGenerator::normal
bool normal() const
Get whether the cut generator should be called in the normal place.
Definition: AbcCutGenerator.h:150
AbcCutGenerator::AbcCutGenerator
AbcCutGenerator()
Default constructor.
OsiCuts.hpp
AbcCutGenerator::generator_
CglCutGenerator * generator_
Definition: AbcCutGenerator.h:181
AbcCutGenerator
Interface between Abc and Cut Generation Library.
Definition: AbcCutGenerator.h:69
AbcCutGenerator::normal_
bool normal_
Whether to call the generator in the normal place.
Definition: AbcCutGenerator.h:192
AbcModel
Model class for ALPS Branch and Cut.
Definition: AbcModel.h:55