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

- File List
- File Members

# /home/coin/SVN-release/Osi-0.98.1/Clp/src/ClpEventHandler.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2004, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 #ifndef ClpEventHandler_H
    00004 #define ClpEventHandler_H
    00005
    00006 #include "ClpSimplex.hpp"
    00024 class ClpEventHandler  {
    00025
    00026 public:
    00031   enum Event {
    00032     endOfIteration = 100, // used to set secondary status
    00033     endOfFactorization,
    00034     endOfValuesPass,
    00035     node, // for Cbc
    00036     treeStatus, // for Cbc
    00037     solution, // for Cbc
    00038     theta // hit in parametrics
    00039   };
    00049   virtual int event(Event whichEvent);
    00051
    00052
    00057   ClpEventHandler(ClpSimplex * model = NULL);
    00059   virtual ~ClpEventHandler();
    00060   // Copy
    00061   ClpEventHandler(const ClpEventHandler&);
    00062   // Assignment
    00063   ClpEventHandler& operator=(const ClpEventHandler&);
    00065   virtual ClpEventHandler * clone() const;
    00066
    00068
    00073   void setSimplex(ClpSimplex * model);
    00075   inline ClpSimplex * simplex() const
    00076   { return model_;}
    00078
    00079
    00080 protected:
    00084
    00085   ClpSimplex * model_;
    00087 };
    00095 class ClpDisasterHandler  {
    00096
    00097 public:
    00101
    00102   virtual void intoSimplex()=0;
    00104   virtual bool check() const = 0;
    00106   virtual void saveInfo() =0;
    00108
    00109
    00114   ClpDisasterHandler(ClpSimplex * model = NULL);
    00116   virtual ~ClpDisasterHandler();
    00117   // Copy
    00118   ClpDisasterHandler(const ClpDisasterHandler&);
    00119   // Assignment
    00120   ClpDisasterHandler& operator=(const ClpDisasterHandler&);
    00122   virtual ClpDisasterHandler * clone() const =0;
    00123
    00125
    00130   void setSimplex(ClpSimplex * model);
    00132   inline ClpSimplex * simplex() const
    00133   { return model_;}
    00135
    00136
    00137 protected:
    00141
    00142   ClpSimplex * model_;
    00144 };
    00145 #endif