ClpEventHandler.hpp
Go to the documentation of this file.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 goodFactorization,
00051 complicatedPivotIn,
00052 noCandidateInPrimal,
00053 looksEndInPrimal,
00054 endInPrimal,
00055 beforeStatusOfProblemInPrimal,
00056 startOfStatusOfProblemInPrimal,
00057 complicatedPivotOut,
00058 noCandidateInDual,
00059 looksEndInDual,
00060 endInDual,
00061 beforeStatusOfProblemInDual,
00062 startOfStatusOfProblemInDual,
00063 startOfIterationInDual,
00064 updateDualsInDual,
00065 endOfCreateRim,
00066 slightlyInfeasible,
00067 modifyMatrixInMiniPresolve,
00068 moreMiniPresolve,
00069 modifyMatrixInMiniPostsolve,
00070 startOfCrossover,
00071 noTheta
00072 };
00083 virtual int event(Event whichEvent);
00087 virtual int eventWithInfo(Event whichEvent, void * info) ;
00089
00090
00095 ClpEventHandler(ClpSimplex * model = NULL);
00097 virtual ~ClpEventHandler();
00098
00099 ClpEventHandler(const ClpEventHandler&);
00100
00101 ClpEventHandler& operator=(const ClpEventHandler&);
00103 virtual ClpEventHandler * clone() const;
00104
00106
00111 void setSimplex(ClpSimplex * model);
00113 inline ClpSimplex * simplex() const {
00114 return model_;
00115 }
00117
00118
00119 protected:
00123
00124 ClpSimplex * model_;
00126 };
00134 class ClpDisasterHandler {
00135
00136 public:
00140
00141 virtual void intoSimplex() = 0;
00143 virtual bool check() const = 0;
00145 virtual void saveInfo() = 0;
00147 virtual int typeOfDisaster();
00149
00150
00155 ClpDisasterHandler(ClpSimplex * model = NULL);
00157 virtual ~ClpDisasterHandler();
00158
00159 ClpDisasterHandler(const ClpDisasterHandler&);
00160
00161 ClpDisasterHandler& operator=(const ClpDisasterHandler&);
00163 virtual ClpDisasterHandler * clone() const = 0;
00164
00166
00171 void setSimplex(ClpSimplex * model);
00173 inline ClpSimplex * simplex() const {
00174 return model_;
00175 }
00177
00178
00179 protected:
00183
00184 ClpSimplex * model_;
00186 };
00187 #endif