IpCbcOACutGenerator.hpp

Go to the documentation of this file.
00001 // (C) Copyright Carnegie Mellon University 2005
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // Authors :
00006 // P. Bonami, Carnegie Mellon University
00007 //
00008 // Date :  05/26/2005
00009 
00010 #ifndef IpCbcOACutGenerator_HPP
00011 #define IpCbcOACutGenerator_HPP
00012 #include "CglCutGenerator.hpp"
00013 #include "IpoptInterface.hpp"
00014 #include "OaMessages.hpp"
00015 
00016 class IpCbcOACutGenerator : public CglCutGenerator
00017 {
00018 public:
00020   IpCbcOACutGenerator(IpoptInterface * si = NULL,
00021       int maxDepth = 10);
00023   IpCbcOACutGenerator(const IpCbcOACutGenerator &copy)
00024       :
00025       nlp_(copy.nlp_),
00026       maxDepth_(copy.maxDepth_)
00027   {
00028     handler_ = new CoinMessageHandler();
00029     handler_ -> setLogLevel(copy.handler_->logLevel());
00030     messages_ = OaMessages();
00031   }
00032 
00034   virtual CglCutGenerator * clone() const
00035   {
00036     return new IpCbcOACutGenerator(*this);
00037   }
00038 
00040   virtual ~IpCbcOACutGenerator()
00041   {
00042     delete handler_;
00043   }
00044 
00046   void assignInterface(IpoptInterface * si);
00048   virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
00049       const CglTreeInfo info) const;
00050 
00051 
00052 
00053   void setMaxDepth(int value)
00054   {
00055     maxDepth_ = value;
00056   }
00057   inline int getNSolve()
00058   {
00059     return nSolve_;
00060   }
00062   void setLogLevel(int value)
00063   {
00064     handler_->setLogLevel(value);
00065   }
00066 
00067  CoinMessageHandler * messageHandler(){
00068    return handler_;
00069  }
00070 private:
00072   IpoptInterface * nlp_;
00073 
00075   int maxDepth_;
00076 
00078   mutable int nSolve_;
00080   CoinMessageHandler * handler_;
00082   CoinMessages messages_;
00083 };
00084 #endif

Generated on Fri May 16 21:05:59 2008 for Bonmin by  doxygen 1.4.7