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