Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcFathom.hpp
Go to the documentation of this file.
1 /* $Id: CbcFathom.hpp 1889 2013-04-07 13:46:46Z stefan $ */
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 CbcFathom_H
7 #define CbcFathom_H
8 #include "CbcConfig.h"
9 
10 /*
11  This file contains two classes, CbcFathom and CbcOsiSolver. It's unclear why
12  they're in the same file. CbcOsiSolver is a base class for CbcLinked.
13 
14  --lh, 071031 --
15 */
16 
17 
18 class CbcModel;
19 
20 //#############################################################################
32 class CbcFathom {
33 public:
34  // Default Constructor
35  CbcFathom ();
36 
37  // Constructor with model - assumed before cuts
38  CbcFathom (CbcModel & model);
39 
40  virtual ~CbcFathom();
41 
43  virtual void setModel(CbcModel * model);
44 
46  virtual CbcFathom * clone() const = 0;
47 
49  virtual void resetModel(CbcModel * model) = 0;
50 
59  virtual int fathom(double *& newSolution) = 0;
60 
61  // Is this method possible
62  inline bool possible() const {
63  return possible_;
64  }
65 
66 protected:
67 
71  bool possible_;
72 private:
73 
75  CbcFathom & operator=(const CbcFathom& rhs);
76 
77 };
78 
80 
81 //#############################################################################
82 
91 
92 public:
93 
96  CbcOsiSolver ();
98 
100  virtual OsiSolverInterface * clone(bool copyData = true) const;
101 
103  CbcOsiSolver (const CbcOsiSolver &);
104 
106  CbcOsiSolver & operator=(const CbcOsiSolver& rhs);
107 
109  virtual ~CbcOsiSolver ();
110 
112 
113 
116  inline void setCbcModel(CbcModel * model) {
118  cbcModel_ = model;
119  }
121  inline CbcModel * cbcModel() const {
122  return cbcModel_;
123  }
125 
126  //---------------------------------------------------------------------------
127 
128 protected:
129 
130 
136 };
137 #endif
CbcFathom & operator=(const CbcFathom &rhs)
Illegal Assignment operator.
virtual ~CbcFathom()
CbcModel * model_
Model.
Definition: CbcFathom.hpp:69
bool possible() const
Definition: CbcFathom.hpp:62
virtual void resetModel(CbcModel *model)=0
Resets stuff if model changes.
CbcModel * cbcModel() const
Return Cbc Model.
Definition: CbcFathom.hpp:121
Clp Solver Interface.
virtual OsiSolverInterface * clone(bool copyData=true) const
Clone.
CbcOsiSolver()
Default Constructor.
Abstract Base Class for describing an interface to a solver.
This is for codes where solver needs to know about CbcModel Seems to provide only one value-added fea...
Definition: CbcFathom.hpp:90
virtual int fathom(double *&newSolution)=0
returns 0 if no fathoming attempted, 1 fully fathomed, 2 incomplete search, 3 incomplete search but t...
CbcOsiSolver & operator=(const CbcOsiSolver &rhs)
Assignment operator.
bool possible_
Possible - if this method of fathoming can be used.
Definition: CbcFathom.hpp:71
Fathom base class.
Definition: CbcFathom.hpp:32
virtual ~CbcOsiSolver()
Destructor.
CbcModel * cbcModel_
Pointer back to CbcModel.
Definition: CbcFathom.hpp:134
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
Simple Branch and bound class.
Definition: CbcModel.hpp:101
virtual CbcFathom * clone() const =0
Clone.
void setCbcModel(CbcModel *model)
Set Cbc Model.
Definition: CbcFathom.hpp:117