/home/coin/SVN-release/OS-2.4.0/Couenne/src/problem/CouenneSolverInterface.hpp

Go to the documentation of this file.
00001 /* $Id: CouenneSolverInterface.hpp 560 2011-04-17 10:01:15Z stefan $
00002  *
00003  * Name:    CouenneSolverInterface.hpp
00004  * Authors: Pietro Belotti, Carnegie Mellon University
00005  * Purpose: OsiSolverInterface with a pointer to a CouenneCutGenerator object
00006  *
00007  * (C) Carnegie-Mellon University, 2007-09.
00008  * This file is licensed under the Eclipse Public License (EPL)
00009  */
00010 
00011 #ifndef COUENNESOLVERINTERFACE_HPP
00012 #define COUENNESOLVERINTERFACE_HPP
00013 
00014 class OsiSolverInterface;
00015 
00016 namespace Couenne {
00017 
00018 class CouenneCutGenerator;
00019 
00026  
00027 template <class T> class CouenneSolverInterface: public T {
00028 
00029 public:
00030 
00032   CouenneSolverInterface (CouenneCutGenerator *cg = NULL);
00033 
00035   CouenneSolverInterface (const CouenneSolverInterface &src);
00036 
00038   ~CouenneSolverInterface ();
00039 
00041   virtual OsiSolverInterface * clone (bool copyData = true) const
00042   {return new CouenneSolverInterface (*this);}
00043 
00045   virtual bool isProvenPrimalInfeasible () const;
00046 
00048   virtual bool isProvenOptimal () const;
00049 
00051   CouenneCutGenerator *CutGen ()
00052   {return cutgen_;}
00053 
00057   void setCutGenPtr (CouenneCutGenerator *cg) {
00058     cutgen_ = cg;
00059     //if (cutgen_ && !(cutgen_ -> enableLpImpliedBounds ()))
00060     //specialOptions_ = specialOptions_ | 262144; 
00061   }
00062 
00064   virtual void initialSolve (); 
00065 
00067   virtual void resolve ();
00068 
00070   virtual void resolve_nobt ()
00071   {T::resolve ();}
00072 
00076 
00077   virtual void markHotStart();
00078 
00080   virtual void solveFromHotStart();
00081 
00083   virtual void unmarkHotStart();
00085 
00087   virtual int tightenBounds (int lightweight);
00088 
00090   //bool &doingResolve () 
00091   //{return doingResolve_;}
00092 
00094   bool isProvenDualInfeasible () const;
00095   //{return knowDualInfeasible_;}
00096 
00097 protected:
00098 
00100   virtual int tightenBoundsCLP (int lightweight);
00101 
00103   virtual int tightenBoundsCLP_Light (int lightweight);
00104 
00108   CouenneCutGenerator *cutgen_;
00109 
00111   bool knowInfeasible_;
00112 
00114   bool knowOptimal_;
00115 
00117   bool knowDualInfeasible_;
00118 
00121   //bool doingResolve_;
00122 };
00123 
00124 }
00125 
00126 // These source files are #included due to the template classes
00127 // defined in there
00128 
00129 #include "CouenneSolverInterface.cpp"
00130 #include "CouenneLPtightenBounds.cpp"
00131 #include "CouenneLPtightenBoundsCLP-light.cpp"
00132 #include "CouenneLPtightenBoundsCLP.cpp"
00133 
00134 #endif

Generated on Thu Sep 22 03:05:59 2011 by  doxygen 1.4.7