- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Blis-0.92.0/Clp/src/ClpEventHandler.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpEventHandler.hpp 1665 2011-01-04 17:55:54Z lou $ */
    00002 // Copyright (C) 2004, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
    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, // used to set secondary status
    00036           endOfFactorization,
    00037           endOfValuesPass,
    00038           node, // for Cbc
    00039           treeStatus, // for Cbc
    00040           solution, // for Cbc
    00041           theta, // hit in parametrics
    00042           pivotRow, // used to choose pivot row
    00043           presolveStart, // ClpSolve presolve start
    00044           presolveSize, // sees if ClpSolve presolve too big or too small
    00045           presolveInfeasible, // ClpSolve presolve infeasible
    00046           presolveBeforeSolve, // ClpSolve presolve before solve
    00047           presolveAfterFirstSolve, // ClpSolve presolve after solve
    00048           presolveAfterSolve, // ClpSolve presolve after solve
    00049           presolveEnd // ClpSolve presolve end
    00050      };
    00061      virtual int event(Event whichEvent);
    00063
    00064
    00069      ClpEventHandler(ClpSimplex * model = NULL);
    00071      virtual ~ClpEventHandler();
    00072      // Copy
    00073      ClpEventHandler(const ClpEventHandler&);
    00074      // Assignment
    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      // Copy
    00133      ClpDisasterHandler(const ClpDisasterHandler&);
    00134      // Assignment
    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