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

- File List
- File Members

ClpEventHandler.hpp
Go to the documentation of this file.
1 /* $Id: ClpEventHandler.hpp 2156 2015-08-07 14:51:42Z forrest $ */
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"
27 class ClpEventHandler {
28
29 public:
34 enum Event {
35 endOfIteration = 100, // used to set secondary status
36 endOfFactorization, // after gutsOfSolution etc
37 endOfValuesPass,
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)
55 beforeStatusOfProblemInPrimal,
56 startOfStatusOfProblemInPrimal,
57 complicatedPivotOut, // in modifyCoefficients
58 noCandidateInDual, // tentative end
59 looksEndInDual, // About to declare victory (or defeat)
60 endInDual, // Victory (or defeat)
61 beforeStatusOfProblemInDual,
62 startOfStatusOfProblemInDual,
63 startOfIterationInDual,
64 updateDualsInDual,
65 endOfCreateRim,
66 slightlyInfeasible,
67 modifyMatrixInMiniPresolve,
68 moreMiniPresolve,
69 modifyMatrixInMiniPostsolve,
70 startOfCrossover, // in Idiot
71 noTheta // At end (because no pivot)
72 };
83 virtual int event(Event whichEvent);
87 virtual int eventWithInfo(Event whichEvent, void * info) ;
89
90
95 ClpEventHandler(ClpSimplex * model = NULL);
97 virtual ~ClpEventHandler();
98 // Copy
99 ClpEventHandler(const ClpEventHandler&);
100 // Assignment
101 ClpEventHandler& operator=(const ClpEventHandler&);
103 virtual ClpEventHandler * clone() const;
104
106
111 void setSimplex(ClpSimplex * model);
113 inline ClpSimplex * simplex() const {
114 return model_;
115 }
117
118
119 protected:
123 ClpSimplex * model_;
126 };
134 class ClpDisasterHandler {
135
136 public:
140 virtual void intoSimplex() = 0;
143 virtual bool check() const = 0;
145 virtual void saveInfo() = 0;
147 virtual int typeOfDisaster();
149
150
155 ClpDisasterHandler(ClpSimplex * model = NULL);
157 virtual ~ClpDisasterHandler();
158 // Copy
159 ClpDisasterHandler(const ClpDisasterHandler&);
160 // Assignment
161 ClpDisasterHandler& operator=(const ClpDisasterHandler&);
163 virtual ClpDisasterHandler * clone() const = 0;
164
166
171 void setSimplex(ClpSimplex * model);
173 inline ClpSimplex * simplex() const {
174 return model_;
175 }
177
178
179 protected:
183 ClpSimplex * model_;
186 };
187 #endif
ClpDisasterHandler::saveInfo
virtual void saveInfo()=0
saves information for next attempt
ClpDisasterHandler::model_
ClpSimplex * model_
Pointer to simplex.
Definition: ClpEventHandler.hpp:184
ClpDisasterHandler::check
virtual bool check() const =0
Checks if disaster.
ClpEventHandler::solution
Definition: ClpEventHandler.hpp:40
ClpEventHandler::noCandidateInPrimal
Definition: ClpEventHandler.hpp:52
ClpEventHandler::startOfStatusOfProblemInPrimal
Definition: ClpEventHandler.hpp:56
ClpEventHandler::presolveStart
Definition: ClpEventHandler.hpp:43
ClpEventHandler::~ClpEventHandler
virtual ~ClpEventHandler()
Destructor.
ClpEventHandler::moreMiniPresolve
Definition: ClpEventHandler.hpp:68
ClpEventHandler::endInPrimal
Definition: ClpEventHandler.hpp:54
ClpEventHandler::presolveAfterFirstSolve
Definition: ClpEventHandler.hpp:47
ClpEventHandler::presolveSize
Definition: ClpEventHandler.hpp:44
ClpEventHandler::endInDual
Definition: ClpEventHandler.hpp:60
ClpEventHandler::node
Definition: ClpEventHandler.hpp:38
ClpEventHandler::startOfStatusOfProblemInDual
Definition: ClpEventHandler.hpp:62
ClpEventHandler::updateDualsInDual
Definition: ClpEventHandler.hpp:64
ClpEventHandler::modifyMatrixInMiniPresolve
Definition: ClpEventHandler.hpp:67
ClpEventHandler::looksEndInPrimal
Definition: ClpEventHandler.hpp:53
ClpSimplex.hpp
ClpEventHandler::model_
ClpSimplex * model_
Pointer to simplex.
Definition: ClpEventHandler.hpp:124
ClpEventHandler::Event
Event
enums for what sort of event.
Definition: ClpEventHandler.hpp:34
ClpDisasterHandler::simplex
ClpSimplex * simplex() const
Get model.
Definition: ClpEventHandler.hpp:173
ClpEventHandler::startOfCrossover
Definition: ClpEventHandler.hpp:70
ClpEventHandler::presolveInfeasible
Definition: ClpEventHandler.hpp:45
ClpEventHandler::noCandidateInDual
Definition: ClpEventHandler.hpp:58
ClpDisasterHandler::operator=
ClpDisasterHandler & operator=(const ClpDisasterHandler &)
Default constructor.
ClpEventHandler::endOfValuesPass
Definition: ClpEventHandler.hpp:37
ClpDisasterHandler::setSimplex
void setSimplex(ClpSimplex *model)
set model.
ClpEventHandler::treeStatus
Definition: ClpEventHandler.hpp:39
ClpEventHandler::slightlyInfeasible
Definition: ClpEventHandler.hpp:66
ClpEventHandler::looksEndInDual
Definition: ClpEventHandler.hpp:59
ClpEventHandler::noTheta
Definition: ClpEventHandler.hpp:71
ClpEventHandler::pivotRow
Definition: ClpEventHandler.hpp:42
ClpDisasterHandler
Base class for Clp disaster handling.
Definition: ClpEventHandler.hpp:134
ClpDisasterHandler::typeOfDisaster
virtual int typeOfDisaster()
Type of disaster 0 can fix, 1 abort.
ClpEventHandler::goodFactorization
Definition: ClpEventHandler.hpp:50
ClpEventHandler::theta
Definition: ClpEventHandler.hpp:41
ClpEventHandler::operator=
ClpEventHandler & operator=(const ClpEventHandler &)
Default constructor.
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
ClpDisasterHandler::intoSimplex
virtual void intoSimplex()=0
Into simplex.
ClpEventHandler
Base class for Clp event handling.
Definition: ClpEventHandler.hpp:27
ClpEventHandler::presolveEnd
Definition: ClpEventHandler.hpp:49
ClpEventHandler::endOfCreateRim
Definition: ClpEventHandler.hpp:65
ClpEventHandler::beforeStatusOfProblemInDual
Definition: ClpEventHandler.hpp:61
ClpEventHandler::modifyMatrixInMiniPostsolve
Definition: ClpEventHandler.hpp:69
ClpEventHandler::setSimplex
void setSimplex(ClpSimplex *model)
set model.
ClpDisasterHandler::clone
virtual ClpDisasterHandler * clone() const =0
Clone.
ClpEventHandler::beforeStatusOfProblemInPrimal
Definition: ClpEventHandler.hpp:55
ClpEventHandler::complicatedPivotIn
Definition: ClpEventHandler.hpp:51
ClpEventHandler::startOfIterationInDual
Definition: ClpEventHandler.hpp:63
ClpEventHandler::event
virtual int event(Event whichEvent)
This can do whatever it likes.
ClpEventHandler::presolveAfterSolve
Definition: ClpEventHandler.hpp:48
ClpEventHandler::endOfIteration
Definition: ClpEventHandler.hpp:35
ClpEventHandler::endOfFactorization
Definition: ClpEventHandler.hpp:36
ClpEventHandler::eventWithInfo
virtual int eventWithInfo(Event whichEvent, void *info)
This can do whatever it likes.
ClpEventHandler::complicatedPivotOut
Definition: ClpEventHandler.hpp:57
ClpDisasterHandler::ClpDisasterHandler
ClpDisasterHandler(ClpSimplex *model=NULL)
Default constructor.
ClpEventHandler::ClpEventHandler
ClpEventHandler(ClpSimplex *model=NULL)
Default constructor.
ClpDisasterHandler::~ClpDisasterHandler
virtual ~ClpDisasterHandler()
Destructor.
ClpEventHandler::simplex
ClpSimplex * simplex() const
Get model.
Definition: ClpEventHandler.hpp:113
ClpEventHandler::presolveBeforeSolve
Definition: ClpEventHandler.hpp:46
ClpEventHandler::clone
virtual ClpEventHandler * clone() const
Clone.