Clp  1.17.8
ClpEventHandler.hpp
Go to the documentation of this file.
1 /* $Id$ */
2 // Copyright (C) 2004, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef ClpEventHandler_H
7 #define ClpEventHandler_H
8 
9 #include "ClpSimplex.hpp"
28 
29 public:
34  enum Event {
35  endOfIteration = 100, // used to set secondary status
36  endOfFactorization, // after gutsOfSolution etc
38  node, // for Cbc
39  treeStatus, // for Cbc
40  solution, // for Cbc
41  theta, // hit in parametrics
42  pivotRow, // used to choose pivot row
43  presolveStart, // ClpSolve presolve start
44  presolveSize, // sees if ClpSolve presolve too big or too small
45  presolveInfeasible, // ClpSolve presolve infeasible
46  presolveBeforeSolve, // ClpSolve presolve before solve
47  presolveAfterFirstSolve, // ClpSolve presolve after solve
48  presolveAfterSolve, // ClpSolve presolve after solve
49  presolveEnd, // ClpSolve presolve end
50  goodFactorization, // before gutsOfSolution
51  complicatedPivotIn, // in modifyCoefficients
52  noCandidateInPrimal, // tentative end
53  looksEndInPrimal, // About to declare victory (or defeat)
54  endInPrimal, // Victory (or defeat)
57  complicatedPivotOut, // in modifyCoefficients
58  noCandidateInDual, // tentative end
59  looksEndInDual, // About to declare victory (or defeat)
60  endInDual, // Victory (or defeat)
75  startOfCrossover, // in Idiot
76  noTheta // At end (because no pivot)
77  };
88  virtual int event(Event whichEvent);
92  virtual int eventWithInfo(Event whichEvent, void *info);
94 
99  ClpEventHandler(ClpSimplex *model = NULL);
101  virtual ~ClpEventHandler();
102  // Copy
104  // Assignment
107  virtual ClpEventHandler *clone() const;
108 
110 
115  void setSimplex(ClpSimplex *model);
117  inline ClpSimplex *simplex() const
118  {
119  return model_;
120  }
122 
123 protected:
130 };
139 
140 public:
144  virtual void intoSimplex() = 0;
147  virtual bool check() const = 0;
149  virtual void saveInfo() = 0;
151  virtual int typeOfDisaster();
153 
158  ClpDisasterHandler(ClpSimplex *model = NULL);
160  virtual ~ClpDisasterHandler();
161  // Copy
163  // Assignment
166  virtual ClpDisasterHandler *clone() const = 0;
167 
169 
174  void setSimplex(ClpSimplex *model);
176  inline ClpSimplex *simplex() const
177  {
178  return model_;
179  }
181 
182 protected:
189 };
190 #endif
191 
192 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
193 */
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
ClpEventHandler::startOfCrossover
@ startOfCrossover
Definition: ClpEventHandler.hpp:75
ClpEventHandler::startOfStatusOfProblemInDual
@ startOfStatusOfProblemInDual
Definition: ClpEventHandler.hpp:62
ClpEventHandler::presolveEnd
@ presolveEnd
Definition: ClpEventHandler.hpp:49
ClpEventHandler::startOfIterationInDual
@ startOfIterationInDual
Definition: ClpEventHandler.hpp:63
ClpEventHandler::endOfIteration
@ endOfIteration
Definition: ClpEventHandler.hpp:35
ClpEventHandler::clone
virtual ClpEventHandler * clone() const
Clone.
ClpEventHandler::beforeCreateNonLinear
@ beforeCreateNonLinear
Definition: ClpEventHandler.hpp:73
ClpEventHandler::endOfValuesPass
@ endOfValuesPass
Definition: ClpEventHandler.hpp:37
ClpEventHandler::complicatedPivotIn
@ complicatedPivotIn
Definition: ClpEventHandler.hpp:51
ClpDisasterHandler::ClpDisasterHandler
ClpDisasterHandler(ClpSimplex *model=NULL)
Default constructor.
ClpDisasterHandler::simplex
ClpSimplex * simplex() const
Get model.
Definition: ClpEventHandler.hpp:176
ClpEventHandler::slightlyInfeasible
@ slightlyInfeasible
Definition: ClpEventHandler.hpp:67
ClpDisasterHandler::operator=
ClpDisasterHandler & operator=(const ClpDisasterHandler &)
ClpEventHandler::presolveBeforeSolve
@ presolveBeforeSolve
Definition: ClpEventHandler.hpp:46
ClpEventHandler::goodFactorization
@ goodFactorization
Definition: ClpEventHandler.hpp:50
ClpEventHandler::beforeChooseIncoming
@ beforeChooseIncoming
Definition: ClpEventHandler.hpp:71
ClpEventHandler::beforeDeleteRim
@ beforeDeleteRim
Definition: ClpEventHandler.hpp:65
ClpEventHandler::endOfFactorization
@ endOfFactorization
Definition: ClpEventHandler.hpp:36
ClpEventHandler::presolveInfeasible
@ presolveInfeasible
Definition: ClpEventHandler.hpp:45
ClpEventHandler::presolveSize
@ presolveSize
Definition: ClpEventHandler.hpp:44
ClpEventHandler::solution
@ solution
Definition: ClpEventHandler.hpp:40
ClpDisasterHandler::check
virtual bool check() const =0
Checks if disaster.
ClpEventHandler::event
virtual int event(Event whichEvent)
This can do whatever it likes.
ClpDisasterHandler::setSimplex
void setSimplex(ClpSimplex *model)
set model.
ClpEventHandler::modifyMatrixInMiniPostsolve
@ modifyMatrixInMiniPostsolve
Definition: ClpEventHandler.hpp:70
ClpEventHandler::pivotRow
@ pivotRow
Definition: ClpEventHandler.hpp:42
ClpDisasterHandler
Base class for Clp disaster handling.
Definition: ClpEventHandler.hpp:138
ClpEventHandler::complicatedPivotOut
@ complicatedPivotOut
Definition: ClpEventHandler.hpp:57
ClpEventHandler::presolveAfterSolve
@ presolveAfterSolve
Definition: ClpEventHandler.hpp:48
ClpEventHandler::modifyMatrixInMiniPresolve
@ modifyMatrixInMiniPresolve
Definition: ClpEventHandler.hpp:68
ClpEventHandler::theta
@ theta
Definition: ClpEventHandler.hpp:41
ClpSimplex.hpp
ClpEventHandler::eventWithInfo
virtual int eventWithInfo(Event whichEvent, void *info)
This can do whatever it likes.
ClpDisasterHandler::clone
virtual ClpDisasterHandler * clone() const =0
Clone.
ClpEventHandler::looksEndInPrimal
@ looksEndInPrimal
Definition: ClpEventHandler.hpp:53
ClpEventHandler::afterCreateNonLinear
@ afterCreateNonLinear
Definition: ClpEventHandler.hpp:74
ClpEventHandler::beforeStatusOfProblemInDual
@ beforeStatusOfProblemInDual
Definition: ClpEventHandler.hpp:61
ClpEventHandler::Event
Event
enums for what sort of event.
Definition: ClpEventHandler.hpp:34
ClpDisasterHandler::model_
ClpSimplex * model_
Pointer to simplex.
Definition: ClpEventHandler.hpp:187
ClpEventHandler::simplex
ClpSimplex * simplex() const
Get model.
Definition: ClpEventHandler.hpp:117
ClpEventHandler::noTheta
@ noTheta
Definition: ClpEventHandler.hpp:76
ClpEventHandler::moreMiniPresolve
@ moreMiniPresolve
Definition: ClpEventHandler.hpp:69
ClpEventHandler::looksEndInDual
@ looksEndInDual
Definition: ClpEventHandler.hpp:59
ClpEventHandler::treeStatus
@ treeStatus
Definition: ClpEventHandler.hpp:39
ClpEventHandler::noCandidateInPrimal
@ noCandidateInPrimal
Definition: ClpEventHandler.hpp:52
ClpDisasterHandler::typeOfDisaster
virtual int typeOfDisaster()
Type of disaster 0 can fix, 1 abort.
ClpEventHandler::afterChooseIncoming
@ afterChooseIncoming
Definition: ClpEventHandler.hpp:72
ClpDisasterHandler::intoSimplex
virtual void intoSimplex()=0
Into simplex.
ClpEventHandler::endInPrimal
@ endInPrimal
Definition: ClpEventHandler.hpp:54
ClpEventHandler
Base class for Clp event handling.
Definition: ClpEventHandler.hpp:27
ClpDisasterHandler::saveInfo
virtual void saveInfo()=0
saves information for next attempt
ClpEventHandler::presolveStart
@ presolveStart
Definition: ClpEventHandler.hpp:43
ClpEventHandler::endOfCreateRim
@ endOfCreateRim
Definition: ClpEventHandler.hpp:66
ClpEventHandler::~ClpEventHandler
virtual ~ClpEventHandler()
Destructor.
ClpEventHandler::noCandidateInDual
@ noCandidateInDual
Definition: ClpEventHandler.hpp:58
ClpEventHandler::setSimplex
void setSimplex(ClpSimplex *model)
set model.
ClpEventHandler::model_
ClpSimplex * model_
Pointer to simplex.
Definition: ClpEventHandler.hpp:128
ClpEventHandler::ClpEventHandler
ClpEventHandler(ClpSimplex *model=NULL)
Default constructor.
ClpEventHandler::startOfStatusOfProblemInPrimal
@ startOfStatusOfProblemInPrimal
Definition: ClpEventHandler.hpp:56
ClpEventHandler::updateDualsInDual
@ updateDualsInDual
Definition: ClpEventHandler.hpp:64
ClpEventHandler::node
@ node
Definition: ClpEventHandler.hpp:38
ClpDisasterHandler::~ClpDisasterHandler
virtual ~ClpDisasterHandler()
Destructor.
ClpEventHandler::presolveAfterFirstSolve
@ presolveAfterFirstSolve
Definition: ClpEventHandler.hpp:47
ClpEventHandler::operator=
ClpEventHandler & operator=(const ClpEventHandler &)
ClpEventHandler::endInDual
@ endInDual
Definition: ClpEventHandler.hpp:60
ClpEventHandler::beforeStatusOfProblemInPrimal
@ beforeStatusOfProblemInPrimal
Definition: ClpEventHandler.hpp:55