/home/coin/SVN-release/Osi-0.100.2/Clp/src/ClpEventHandler.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2004, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef ClpEventHandler_H
00004 #define ClpEventHandler_H
00005 
00006 #include "ClpSimplex.hpp"
00024 class ClpEventHandler  {
00025   
00026 public:
00031   enum Event {
00032     endOfIteration = 100, // used to set secondary status
00033     endOfFactorization,
00034     endOfValuesPass,
00035     node, // for Cbc
00036     treeStatus, // for Cbc
00037     solution, // for Cbc
00038     theta // hit in parametrics
00039   };
00049   virtual int event(Event whichEvent);
00051   
00052   
00057   ClpEventHandler(ClpSimplex * model = NULL);
00059   virtual ~ClpEventHandler();
00060   // Copy
00061   ClpEventHandler(const ClpEventHandler&);
00062   // Assignment
00063   ClpEventHandler& operator=(const ClpEventHandler&);
00065   virtual ClpEventHandler * clone() const;
00066 
00068   
00073   void setSimplex(ClpSimplex * model);
00075   inline ClpSimplex * simplex() const
00076   { return model_;}
00078   
00079   
00080 protected:
00084 
00085   ClpSimplex * model_;
00087 };
00095 class ClpDisasterHandler  {
00096   
00097 public:
00101 
00102   virtual void intoSimplex()=0;
00104   virtual bool check() const = 0;
00106   virtual void saveInfo() =0;
00108   virtual int typeOfDisaster();
00110   
00111   
00116   ClpDisasterHandler(ClpSimplex * model = NULL);
00118   virtual ~ClpDisasterHandler();
00119   // Copy
00120   ClpDisasterHandler(const ClpDisasterHandler&);
00121   // Assignment
00122   ClpDisasterHandler& operator=(const ClpDisasterHandler&);
00124   virtual ClpDisasterHandler * clone() const =0;
00125 
00127   
00132   void setSimplex(ClpSimplex * model);
00134   inline ClpSimplex * simplex() const
00135   { return model_;}
00137   
00138   
00139 protected:
00143 
00144   ClpSimplex * model_;
00146 };
00147 #endif

Generated on Wed Oct 7 03:08:09 2009 by  doxygen 1.4.7