ClpEventHandler.hpp

Go to the documentation of this file.
00001 /* $Id: ClpEventHandler.hpp 2156 2015-08-07 14:51:42Z 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           startOfCrossover, // in Idiot
00071           noTheta // At end (because no pivot)
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      // Copy
00099      ClpEventHandler(const ClpEventHandler&);
00100      // Assignment
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      // Copy
00159      ClpDisasterHandler(const ClpDisasterHandler&);
00160      // Assignment
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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 28 Aug 2015 for Clp by  doxygen 1.6.1