Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
MyEventHandler Class Reference

This is so user can trap events and do useful stuff. More...

#include <MyEventHandler.hpp>

+ Inheritance diagram for MyEventHandler:
+ Collaboration diagram for MyEventHandler:

Public Member Functions

virtual int event (Event whichEvent)
 This can do whatever it likes. More...
Constructors, destructor etc
 MyEventHandler ()
 Default constructor. More...
 MyEventHandler (ClpSimplex *model)
 Constructor with pointer to model (redundant as setEventHandler does) More...
virtual ~MyEventHandler ()
 Destructor. More...
 MyEventHandler (const MyEventHandler &rhs)
 The copy constructor. More...
MyEventHandleroperator= (const MyEventHandler &rhs)
 Assignment. More...
virtual ClpEventHandlerclone () const
 Clone. More...
- Public Member Functions inherited from ClpEventHandler
virtual int eventWithInfo (Event whichEvent, void *info)
 This can do whatever it likes. More...
 ClpEventHandler (ClpSimplex *model=NULL)
 Default constructor. More...
virtual ~ClpEventHandler ()
 Destructor. More...
 ClpEventHandler (const ClpEventHandler &)
ClpEventHandleroperator= (const ClpEventHandler &)
void setSimplex (ClpSimplex *model)
 set model. More...
ClpSimplexsimplex () const
 Get model. More...

Additional Inherited Members

- Public Types inherited from ClpEventHandler
enum  Event {
  endOfIteration = 100, endOfFactorization, endOfValuesPass, node,
  treeStatus, solution, theta, pivotRow,
  presolveStart, presolveSize, presolveInfeasible, presolveBeforeSolve,
  presolveAfterFirstSolve, presolveAfterSolve, presolveEnd, goodFactorization,
  complicatedPivotIn, noCandidateInPrimal, looksEndInPrimal, endInPrimal,
  beforeStatusOfProblemInPrimal, startOfStatusOfProblemInPrimal, complicatedPivotOut, noCandidateInDual,
  looksEndInDual, endInDual, beforeStatusOfProblemInDual, startOfStatusOfProblemInDual,
  startOfIterationInDual, updateDualsInDual, endOfCreateRim, slightlyInfeasible,
  modifyMatrixInMiniPresolve, moreMiniPresolve, modifyMatrixInMiniPostsolve, startOfCrossover,
 enums for what sort of event. More...
- Protected Attributes inherited from ClpEventHandler
 Pointer to simplex. More...

Detailed Description

This is so user can trap events and do useful stuff.

This is used in Clp/Test/unitTest.cpp

ClpSimplex model_ is available as well as anything else you care to pass in

Definition at line 18 of file MyEventHandler.hpp.

Constructor & Destructor Documentation

MyEventHandler::MyEventHandler ( )

Default constructor.

MyEventHandler::MyEventHandler ( ClpSimplex model)

Constructor with pointer to model (redundant as setEventHandler does)

virtual MyEventHandler::~MyEventHandler ( )


MyEventHandler::MyEventHandler ( const MyEventHandler rhs)

The copy constructor.

Member Function Documentation

virtual int MyEventHandler::event ( Event  whichEvent)

This can do whatever it likes.

If return code -1 then carries on if 0 sets ClpModel::status() to 5 (stopped by event) and will return to user. At present if <-1 carries on and if >0 acts as if 0 - this may change. For ClpSolve 2 -> too big return status of -2 and -> too small 3

Reimplemented from ClpEventHandler.

MyEventHandler& MyEventHandler::operator= ( const MyEventHandler rhs)


virtual ClpEventHandler* MyEventHandler::clone ( ) const


Reimplemented from ClpEventHandler.

The documentation for this class was generated from the following file: