00001
00002
00003
00004
00005
00006 #ifndef ClpEventHandler_H
00007 #define ClpEventHandler_H
00008
00009 #include "ClpSimplex.hpp"
00027 class ClpEventHandler {
00028
00029 public:
00034 enum Event {
00035 endOfIteration = 100,
00036 endOfFactorization,
00037 endOfValuesPass,
00038 node,
00039 treeStatus,
00040 solution,
00041 theta,
00042 pivotRow,
00043 presolveStart,
00044 presolveSize,
00045 presolveInfeasible,
00046 presolveBeforeSolve,
00047 presolveAfterFirstSolve,
00048 presolveAfterSolve,
00049 presolveEnd
00050 };
00061 virtual int event(Event whichEvent);
00063
00064
00069 ClpEventHandler(ClpSimplex * model = NULL);
00071 virtual ~ClpEventHandler();
00072
00073 ClpEventHandler(const ClpEventHandler&);
00074
00075 ClpEventHandler& operator=(const ClpEventHandler&);
00077 virtual ClpEventHandler * clone() const;
00078
00080
00085 void setSimplex(ClpSimplex * model);
00087 inline ClpSimplex * simplex() const {
00088 return model_;
00089 }
00091
00092
00093 protected:
00097
00098 ClpSimplex * model_;
00100 };
00108 class ClpDisasterHandler {
00109
00110 public:
00114
00115 virtual void intoSimplex() = 0;
00117 virtual bool check() const = 0;
00119 virtual void saveInfo() = 0;
00121 virtual int typeOfDisaster();
00123
00124
00129 ClpDisasterHandler(ClpSimplex * model = NULL);
00131 virtual ~ClpDisasterHandler();
00132
00133 ClpDisasterHandler(const ClpDisasterHandler&);
00134
00135 ClpDisasterHandler& operator=(const ClpDisasterHandler&);
00137 virtual ClpDisasterHandler * clone() const = 0;
00138
00140
00145 void setSimplex(ClpSimplex * model);
00147 inline ClpSimplex * simplex() const {
00148 return model_;
00149 }
00151
00152
00153 protected:
00157
00158 ClpSimplex * model_;
00160 };
00161 #endif