Cbc  2.10.5
 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 2465 2019-01-03 19:26:52Z unxusr $ */
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 class CbcModel;
18 
19 //#############################################################################
31 class CbcFathom {
32 public:
33  // Default Constructor
34  CbcFathom();
35 
36  // Constructor with model - assumed before cuts
37  CbcFathom(CbcModel &model);
38 
39  virtual ~CbcFathom();
40 
42  virtual void setModel(CbcModel *model);
43 
45  virtual CbcFathom *clone() const = 0;
46 
48  virtual void resetModel(CbcModel *model) = 0;
49 
58  virtual int fathom(double *&newSolution) = 0;
59 
60  // Is this method possible
61  inline bool possible() const
62  {
63  return possible_;
64  }
65 
66 protected:
70  bool possible_;
71 
72 private:
74  CbcFathom &operator=(const CbcFathom &rhs);
75 };
76 
78 
79 //#############################################################################
80 
89 
90 public:
93  CbcOsiSolver();
95 
97  virtual OsiSolverInterface *clone(bool copyData = true) const;
98 
100  CbcOsiSolver(const CbcOsiSolver &);
101 
103  CbcOsiSolver &operator=(const CbcOsiSolver &rhs);
104 
106  virtual ~CbcOsiSolver();
107 
109 
112  inline void setCbcModel(CbcModel *model)
114  {
115  cbcModel_ = model;
116  }
118  inline CbcModel *cbcModel() const
119  {
120  return cbcModel_;
121  }
123 
124  //---------------------------------------------------------------------------
125 
126 protected:
132 };
133 #endif
134 
135 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
136 */
CbcFathom & operator=(const CbcFathom &rhs)
Illegal Assignment operator.
virtual ~CbcFathom()
CbcModel * model_
Model.
Definition: CbcFathom.hpp:68
bool possible() const
Definition: CbcFathom.hpp:61
virtual void resetModel(CbcModel *model)=0
Resets stuff if model changes.
CbcModel * cbcModel() const
Return Cbc Model.
Definition: CbcFathom.hpp:118
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:88
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:70
Fathom base class.
Definition: CbcFathom.hpp:31
virtual ~CbcOsiSolver()
Destructor.
CbcModel * cbcModel_
Pointer back to CbcModel.
Definition: CbcFathom.hpp:130
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
Simple Branch and bound class.
Definition: CbcModel.hpp:100
virtual CbcFathom * clone() const =0
Clone.
void setCbcModel(CbcModel *model)
Set Cbc Model.
Definition: CbcFathom.hpp:113