source: trunk/Clp/src/ClpEventHandler.cpp @ 1304

Last change on this file since 1304 was 1287, checked in by forrest, 12 years ago

changes for cbc event handler and multiple factorizations

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1// Copyright (C) 2004, International Business Machines
2// Corporation and others.  All Rights Reserved.
3
4#include "CoinPragma.hpp"
5
6#include "ClpEventHandler.hpp"
7#include "ClpSimplex.hpp"
8
9//#############################################################################
10// Constructors / Destructor / Assignment
11//#############################################################################
12
13//-------------------------------------------------------------------
14// Default Constructor
15//-------------------------------------------------------------------
16ClpEventHandler::ClpEventHandler (ClpSimplex * model) :
17  model_(model)
18{
19
20}
21
22//-------------------------------------------------------------------
23// Copy constructor
24//-------------------------------------------------------------------
25ClpEventHandler::ClpEventHandler (const ClpEventHandler & rhs) 
26  : model_(rhs.model_)
27{ 
28}
29
30//-------------------------------------------------------------------
31// Destructor
32//-------------------------------------------------------------------
33ClpEventHandler::~ClpEventHandler ()
34{
35}
36
37//----------------------------------------------------------------
38// Assignment operator
39//-------------------------------------------------------------------
40ClpEventHandler &
41ClpEventHandler::operator=(const ClpEventHandler& rhs)
42{
43  if (this != &rhs) {
44    model_ = rhs.model_;
45  }
46  return *this;
47}
48// Clone
49ClpEventHandler * 
50ClpEventHandler::clone() const
51{
52  return new ClpEventHandler(*this);
53}
54// Event
55int
56ClpEventHandler::event(Event whichEvent)
57{
58  if (whichEvent!=theta)
59    return -1; // do nothing
60  else
61    return 0; // say normal exit
62}
63/* set model. */
64void 
65ClpEventHandler::setSimplex(ClpSimplex * model)
66{
67  model_= model;
68}
69//#############################################################################
70// Constructors / Destructor / Assignment
71//#############################################################################
72
73//-------------------------------------------------------------------
74// Default Constructor
75//-------------------------------------------------------------------
76ClpDisasterHandler::ClpDisasterHandler (ClpSimplex * model) :
77  model_(model)
78{
79
80}
81
82//-------------------------------------------------------------------
83// Copy constructor
84//-------------------------------------------------------------------
85ClpDisasterHandler::ClpDisasterHandler (const ClpDisasterHandler & rhs) 
86  : model_(rhs.model_)
87{ 
88}
89
90//-------------------------------------------------------------------
91// Destructor
92//-------------------------------------------------------------------
93ClpDisasterHandler::~ClpDisasterHandler ()
94{
95}
96
97//----------------------------------------------------------------
98// Assignment operator
99//-------------------------------------------------------------------
100ClpDisasterHandler &
101ClpDisasterHandler::operator=(const ClpDisasterHandler& rhs)
102{
103  if (this != &rhs) {
104    model_ = rhs.model_;
105  }
106  return *this;
107}
108/* set model. */
109void 
110ClpDisasterHandler::setSimplex(ClpSimplex * model)
111{
112  model_= model;
113}
114// Type of disaster 0 can fix, 1 abort
115int 
116ClpDisasterHandler::typeOfDisaster()
117{
118  return 0;
119}
120
121
Note: See TracBrowser for help on using the repository browser.