CouenneAggrProbing.hpp
Go to the documentation of this file.
1 /* $Id: CouenneAggrProbing.hpp 945 2013-04-06 20:25:21Z stefan $
2  *
3  * Name: CouenneAggrProbing.hpp
4  * Author: Giacomo Nannicini
5  * Purpose: A bound tightener based on aggressive probing
6  *
7  * (C) Giacomo Nannicini, 2010.
8  * This file is licensed under the Eclipse Public License (EPL)
9  */
10 
11 #ifndef COUENNEAGGRPROBING_HPP
12 #define COUENNEAGGRPROBING_HPP
13 
14 #include "BonRegisteredOptions.hpp"
15 
16 #include "BonOaDecBase.hpp"
17 #include "CglConfig.h"
18 #include "CglCutGenerator.hpp"
19 #include "OsiColCut.hpp"
20 #include "OsiSolverInterface.hpp"
21 #include "CouenneProblem.hpp"
22 #include "BonCouenneSetup.hpp"
23 
24 namespace Couenne {
25 
36 
37  class CouenneAggrProbing: public CglCutGenerator {
38 
39  public:
40 
44 
47 
50 
53  {return new CouenneAggrProbing (*this);}
54 
56  void generateCuts(const OsiSolverInterface & solver,
57  OsiCuts& cuts,
58  const CglTreeInfo = CglTreeInfo ())
59 #if CGL_VERSION_MAJOR == 0 && CGL_VERSION_MINOR <= 57
60  const
61 #endif
62  { }
63 
69  double probeVariable(int index, bool probeLower);
70 
73  double probeVariable2(int index, bool lower);
74 
77 
79  void setMaxTime(double value);
80  double getMaxTime() const;
81 
83  void setMaxFailedSteps(int value);
84  int getMaxFailedSteps() const;
85 
87  void setMaxNodes(int value);
88  int getMaxNodes() const;
89 
92  void setRestoreCutoff(bool value);
93  bool getRestoreCutoff() const;
94 
95  protected:
96 
99 
101  int numCols_;
102 
104  double maxTime_;
105 
108 
111 
114 
116  double initCutoff_;
117 
118  };
119 }
120 
121 #endif
Cut Generator for aggressive BT; i.e., an aggressive probing.
CouenneSetup * couenne_
Pointer to the CouenneProblem representation.
void setMaxNodes(int value)
Set/get maximum number of nodes to probe one variable.
void setMaxTime(double value)
Set/get maximum time to probe one variable.
bool restoreCutoff_
Restore initial cutoff (value and solution)?
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Add list of options to be read from file.
int numCols_
Number of columns (want to have this handy)
double initCutoff_
Initial cutoff.
double probeVariable(int index, bool probeLower)
Probe one variable (try to tigthen the lower or the upper bound, depending on the value of the second...
int maxFailedSteps_
Maximum number of failed iterations.
double probeVariable2(int index, bool lower)
Alternative probing algorithm.
void generateCuts(const OsiSolverInterface &solver, OsiCuts &cuts, const CglTreeInfo=CglTreeInfo()) const
The main CglCutGenerator; not implemented yet.
void setMaxFailedSteps(int value)
Set/get maximum number of failed steps.
CouenneAggrProbing * clone() const
Clone method (necessary for the abstract CglCutGenerator class)
int maxNodes_
Maximum number of nodes in probing.
void setRestoreCutoff(bool value)
Set/get restoreCutoff parameter (should we restore the initial cutoff value after each probing run...
double maxTime_
Maximum time to probe one variable.
CouenneAggrProbing(CouenneSetup *couenne, const Ipopt::SmartPtr< Ipopt::OptionsList > options)
Constructor.