#include <ClpEventHandler.hpp>
Inheritance diagram for ClpEventHandler:
Public Types | |
enum | Event { endOfIteration = 100, endOfFactorization, endOfValuesPass } |
enums for what sort of event. More... | |
Public Member Functions | |
Virtual method that the derived classe should provide. | |
The base class instance does nothing and as event() is only useful method it would not be very useful NOT providing one! | |
virtual int | event (Event whichEvent) |
This can do whatever it likes. | |
Constructors, destructor | |
ClpEventHandler (ClpSimplex *model=NULL) | |
Default constructor. | |
virtual | ~ClpEventHandler () |
Destructor. | |
ClpEventHandler (const ClpEventHandler &) | |
Default constructor. | |
ClpEventHandler & | operator= (const ClpEventHandler &) |
Default constructor. | |
virtual ClpEventHandler * | clone () const |
Clone. | |
Sets/gets | |
void | setSimplex (ClpSimplex *model) |
set model. | |
ClpSimplex * | simplex () const |
Get model. | |
Protected Attributes | |
Data members | |
The data members are protected to allow access for derived classes. | |
ClpSimplex * | model_ |
Pointer to simplex. |
This is just here to allow for event handling. By event I mean a Clp event e.g. end of values pass.
One use would be to let a user handle a system event e.g. Control-C. This could be done by deriving a class MyEventHandler which knows about such events. If one occurs MyEventHandler::event() could clear event status and return 3 (stopped).
Clp would then return to user code.
As it is called every iteration this should be fine grained enough.
Definition at line 23 of file ClpEventHandler.hpp.
|
enums for what sort of event. These will also be returned in ClpModel::secondaryStatus() as int Definition at line 30 of file ClpEventHandler.hpp. |
|
Default constructor.
|
|
Destructor.
|
|
Default constructor.
|
|
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 Reimplemented in MyEventHandler. |
|
Default constructor.
|
|
Clone.
Reimplemented in MyEventHandler. |
|
set model.
|
|
Get model.
Definition at line 70 of file ClpEventHandler.hpp. References model_. |
|
Pointer to simplex.
Definition at line 80 of file ClpEventHandler.hpp. Referenced by simplex(). |