| 1 |
// (C) Copyright Carnegie Mellon University 2005 |
| 2 |
// All Rights Reserved. |
| 3 |
// This code is published under the Eclipse Public License. |
| 4 |
// |
| 5 |
// Authors : |
| 6 |
// P. Bonami, Carnegie Mellon University |
| 7 |
// |
| 8 |
// Date : 05/26/2005 |
| 9 |
|
| 10 |
|
| 11 |
#ifndef BonOACutGenerator2_HPP |
| 12 |
#define BonOACutGenerator2_HPP |
| 13 |
#include "BonOaDecBase.hpp" |
| 14 |
|
| 15 |
namespace Bonmin |
| 16 |
{ |
| 17 |
/** Class to perform OA in its classical form.*/ |
| 18 |
class OACutGenerator2 : public OaDecompositionBase |
| 19 |
{ |
| 20 |
public: |
| 21 |
/// Constructor with basic setup |
| 22 |
OACutGenerator2(BabSetupBase & b); |
| 23 |
|
| 24 |
/// Copy constructor |
| 25 |
OACutGenerator2(const OACutGenerator2 ©) |
| 26 |
: |
| 27 |
OaDecompositionBase(copy), |
| 28 |
subMip_(new SubMipSolver (*copy.subMip_)) |
| 29 |
{} |
| 30 |
/// Destructor |
| 31 |
~OACutGenerator2(); |
| 32 |
|
| 33 |
void setStrategy(const CbcStrategy & strategy) |
| 34 |
{ |
| 35 |
parameters_.setStrategy(strategy); |
| 36 |
} |
| 37 |
|
| 38 |
virtual CglCutGenerator * clone() const |
| 39 |
{ |
| 40 |
return new OACutGenerator2(*this); |
| 41 |
} |
| 42 |
/** Register OA options.*/ |
| 43 |
static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions); |
| 44 |
|
| 45 |
protected: |
| 46 |
/// virtual method which performs the OA algorithm by modifying lp and nlp. |
| 47 |
virtual double performOa(OsiCuts & cs, solverManip &lpManip, |
| 48 |
BabInfo * babInfo, double &cutoff, const CglTreeInfo & info) const; |
| 49 |
/// virutal method to decide if local search is performed |
| 50 |
virtual bool doLocalSearch(BabInfo * babInfo) const; |
| 51 |
|
| 52 |
private: |
| 53 |
SubMipSolver * subMip_; |
| 54 |
}; |
| 55 |
} |
| 56 |
#endif |