ClpEventHandler.hpp
Go to the documentation of this file.
1 /* $Id: ClpEventHandler.hpp 1533 2010-03-23 15:26:32Z forrest $ */
2 // Copyright (C) 2004, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef ClpEventHandler_H
5 #define ClpEventHandler_H
6 
7 #include "ClpSimplex.hpp"
26 
27 public:
32  enum Event {
33  endOfIteration = 100, // used to set secondary status
36  node, // for Cbc
37  treeStatus, // for Cbc
38  solution, // for Cbc
39  theta, // hit in parametrics
40  pivotRow // used to choose pivot row
41  };
51  virtual int event(Event whichEvent);
53 
54 
59  ClpEventHandler(ClpSimplex * model = NULL);
61  virtual ~ClpEventHandler();
62  // Copy
64  // Assignment
67  virtual ClpEventHandler * clone() const;
68 
70 
75  void setSimplex(ClpSimplex * model);
77  inline ClpSimplex * simplex() const {
78  return model_;
79  }
81 
82 
83 protected:
87 
90 };
99 
100 public:
104 
105  virtual void intoSimplex() = 0;
107  virtual bool check() const = 0;
109  virtual void saveInfo() = 0;
111  virtual int typeOfDisaster();
113 
114 
119  ClpDisasterHandler(ClpSimplex * model = NULL);
121  virtual ~ClpDisasterHandler();
122  // Copy
124  // Assignment
127  virtual ClpDisasterHandler * clone() const = 0;
128 
130 
135  void setSimplex(ClpSimplex * model);
137  inline ClpSimplex * simplex() const {
138  return model_;
139  }
141 
142 
143 protected:
147 
150 };
151 #endif