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 
70 
71  public:
72 
89  bool generateCuts( OsiCuts &cs, bool fullScan);
91 
92 
95  AbcCutGenerator ();
97 
100  int howOften=1, const char * name=NULL,
101  bool normal=true, bool atSolution=false,
102  bool infeasible=false);
103 
106 
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:
179 
180  // The CglCutGenerator object
182 
187 
190 
192  bool normal_;
193 
196 
199 };
200 
201 #endif
void setNormal(bool value)
Set whether the cut generator should be called in the normal place.
Row Cut Class.
Definition: OsiRowCut.hpp:29
AbcCutGenerator & operator=(const AbcCutGenerator &rhs)
Assignment operator.
const char * cutGeneratorName() const
return name of generator
char * generatorName_
Name of generator.
bool whenInfeasible_
Whether to call generator when a subproblem is found to be infeasible.
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
bool whenInfeasible() const
Get whether the cut generator should be called when the subproblem is found to be infeasible...
void refreshModel(AbcModel *model)
Set the client model.
void setHowOften(int value)
Set the cut generation interval.
int whenCutGenerator_
Number of nodes between calls to the CglCutGenerator::generateCuts routine.
void setWhenInfeasible(bool value)
Set whether the cut generator should be called when the subproblem is found to be infeasible...
AbcModel * model_
The client model.
bool generateCuts(OsiCuts &cs, bool fullScan)
Generate cuts for the client model.
Cut Generator Base Class.
int howOften() const
Get the cut generation interval.
void setAtSolution(bool value)
Set whether the cut generator should be called when a solution is found.
Validate cuts against a known solution.
CglCutGenerator * generator() const
Get the CglCutGenerator bound to this AbcCutGenerator.
bool atSolution() const
Get whether the cut generator should be called when a solution is found.
bool atSolution_
Whether to call the generator when a new solution is found.
~AbcCutGenerator()
Destructor.
bool normal() const
Get whether the cut generator should be called in the normal place.
AbcCutGenerator()
Default constructor.
CglCutGenerator * generator_
Interface between Abc and Cut Generation Library.
bool normal_
Whether to call the generator in the normal place.
Model class for ALPS Branch and Cut.
Definition: AbcModel.h:55