/home/coin/SVN-release/Alps-1.2.2/Clp/src/ClpEventHandler.hpp

Go to the documentation of this file.
00001 /* $Id: ClpEventHandler.hpp 1610 2010-09-23 15:11:23Z forrest $ */
00002 // Copyright (C) 2004, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 #ifndef ClpEventHandler_H
00005 #define ClpEventHandler_H
00006 
00007 #include "ClpSimplex.hpp"
00025 class ClpEventHandler  {
00026 
00027 public:
00032      enum Event {
00033           endOfIteration = 100, // used to set secondary status
00034           endOfFactorization,
00035           endOfValuesPass,
00036           node, // for Cbc
00037           treeStatus, // for Cbc
00038           solution, // for Cbc
00039           theta, // hit in parametrics
00040           pivotRow, // used to choose pivot row
00041           presolveStart, // ClpSolve presolve start
00042           presolveSize, // sees if ClpSolve presolve too big or too small
00043           presolveInfeasible, // ClpSolve presolve infeasible
00044           presolveBeforeSolve, // ClpSolve presolve before solve
00045           presolveAfterFirstSolve, // ClpSolve presolve after solve
00046           presolveAfterSolve, // ClpSolve presolve after solve
00047           presolveEnd // ClpSolve presolve end
00048      };
00059      virtual int event(Event whichEvent);
00061 
00062 
00067      ClpEventHandler(ClpSimplex * model = NULL);
00069      virtual ~ClpEventHandler();
00070      // Copy
00071      ClpEventHandler(const ClpEventHandler&);
00072      // Assignment
00073      ClpEventHandler& operator=(const ClpEventHandler&);
00075      virtual ClpEventHandler * clone() const;
00076 
00078 
00083      void setSimplex(ClpSimplex * model);
00085      inline ClpSimplex * simplex() const {
00086           return model_;
00087      }
00089 
00090 
00091 protected:
00095 
00096      ClpSimplex * model_;
00098 };
00106 class ClpDisasterHandler  {
00107 
00108 public:
00112 
00113      virtual void intoSimplex() = 0;
00115      virtual bool check() const = 0;
00117      virtual void saveInfo() = 0;
00119      virtual int typeOfDisaster();
00121 
00122 
00127      ClpDisasterHandler(ClpSimplex * model = NULL);
00129      virtual ~ClpDisasterHandler();
00130      // Copy
00131      ClpDisasterHandler(const ClpDisasterHandler&);
00132      // Assignment
00133      ClpDisasterHandler& operator=(const ClpDisasterHandler&);
00135      virtual ClpDisasterHandler * clone() const = 0;
00136 
00138 
00143      void setSimplex(ClpSimplex * model);
00145      inline ClpSimplex * simplex() const {
00146           return model_;
00147      }
00149 
00150 
00151 protected:
00155 
00156      ClpSimplex * model_;
00158 };
00159 #endif

Generated on Fri Jan 7 03:09:09 2011 by  doxygen 1.4.7