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

- File List
- File Members

# /home/coin/svn-release/Alps-1.4.8/Clp/src/ClpEventHandler.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpEventHandler.hpp 1825 2011-11-20 16:02:57Z forrest $ */
    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, // after gutsOfSolution etc
    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           goodFactorization, // before gutsOfSolution
    00051           complicatedPivotIn, // in modifyCoefficients
    00052           noCandidateInPrimal, // tentative end
    00053           looksEndInPrimal, // About to declare victory (or defeat)
    00054           endInPrimal, // Victory (or defeat)
    00055           beforeStatusOfProblemInPrimal,
    00056           startOfStatusOfProblemInPrimal,
    00057           complicatedPivotOut, // in modifyCoefficients
    00058           noCandidateInDual, // tentative end
    00059           looksEndInDual, // About to declare victory (or defeat)
    00060           endInDual, // Victory (or defeat)
    00061           beforeStatusOfProblemInDual,
    00062           startOfStatusOfProblemInDual,
    00063           startOfIterationInDual,
    00064           updateDualsInDual,
    00065           endOfCreateRim,
    00066           slightlyInfeasible,
    00067           modifyMatrixInMiniPresolve,
    00068           moreMiniPresolve,
    00069           modifyMatrixInMiniPostsolve,
    00070           noTheta // At end (because no pivot)
    00071      };
    00082      virtual int event(Event whichEvent);
    00086      virtual int eventWithInfo(Event whichEvent, void * info) ;
    00088
    00089
    00094      ClpEventHandler(ClpSimplex * model = NULL);
    00096      virtual ~ClpEventHandler();
    00097      // Copy
    00098      ClpEventHandler(const ClpEventHandler&);
    00099      // Assignment
    00100      ClpEventHandler& operator=(const ClpEventHandler&);
    00102      virtual ClpEventHandler * clone() const;
    00103
    00105
    00110      void setSimplex(ClpSimplex * model);
    00112      inline ClpSimplex * simplex() const {
    00113           return model_;
    00114      }
    00116
    00117
    00118 protected:
    00122
    00123      ClpSimplex * model_;
    00125 };
    00133 class ClpDisasterHandler  {
    00134
    00135 public:
    00139
    00140      virtual void intoSimplex() = 0;
    00142      virtual bool check() const = 0;
    00144      virtual void saveInfo() = 0;
    00146      virtual int typeOfDisaster();
    00148
    00149
    00154      ClpDisasterHandler(ClpSimplex * model = NULL);
    00156      virtual ~ClpDisasterHandler();
    00157      // Copy
    00158      ClpDisasterHandler(const ClpDisasterHandler&);
    00159      // Assignment
    00160      ClpDisasterHandler& operator=(const ClpDisasterHandler&);
    00162      virtual ClpDisasterHandler * clone() const = 0;
    00163
    00165
    00170      void setSimplex(ClpSimplex * model);
    00172      inline ClpSimplex * simplex() const {
    00173           return model_;
    00174      }
    00176
    00177
    00178 protected:
    00182
    00183      ClpSimplex * model_;
    00185 };
    00186 #endif