Cbc 2.10.11
Loading...
Searching...
No Matches
CbcFathom.hpp
Go to the documentation of this file.
1/* $Id$ */
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
17class CbcModel;
18
19//#############################################################################
31class CbcFathom {
32public:
33 // Default Constructor
35
36 // Constructor with model - assumed before cuts
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
66protected:
71
72private:
75};
76
77#include "OsiClpSolverInterface.hpp"
78
79//#############################################################################
80
88class CbcOsiSolver : public OsiClpSolverInterface {
89
90public:
95
97 virtual OsiSolverInterface *clone(bool copyData = true) const;
98
101
104
106 virtual ~CbcOsiSolver();
107
109
113 inline void setCbcModel(CbcModel *model)
114 {
115 cbcModel_ = model;
116 }
118 inline CbcModel *cbcModel() const
119 {
120 return cbcModel_;
121 }
123
124 //---------------------------------------------------------------------------
125
126protected:
132};
133#endif
134
135/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
136*/
Fathom base class.
Definition CbcFathom.hpp:31
bool possible_
Possible - if this method of fathoming can be used.
Definition CbcFathom.hpp:70
virtual void resetModel(CbcModel *model)=0
Resets stuff if model changes.
virtual ~CbcFathom()
virtual int fathom(double *&newSolution)=0
returns 0 if no fathoming attempted, 1 fully fathomed, 2 incomplete search, 3 incomplete search but t...
CbcFathom(CbcModel &model)
bool possible() const
Definition CbcFathom.hpp:61
virtual CbcFathom * clone() const =0
Clone.
CbcModel * model_
Model.
Definition CbcFathom.hpp:68
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
CbcFathom & operator=(const CbcFathom &rhs)
Illegal Assignment operator.
Simple Branch and bound class.
Definition CbcModel.hpp:100
This is for codes where solver needs to know about CbcModel Seems to provide only one value-added fea...
Definition CbcFathom.hpp:88
virtual ~CbcOsiSolver()
Destructor.
CbcModel * cbcModel_
Pointer back to CbcModel.
CbcOsiSolver(const CbcOsiSolver &)
Copy constructor.
CbcModel * cbcModel() const
Return Cbc Model.
virtual OsiSolverInterface * clone(bool copyData=true) const
Clone.
CbcOsiSolver & operator=(const CbcOsiSolver &rhs)
Assignment operator.
CbcOsiSolver()
Default Constructor.
void setCbcModel(CbcModel *model)
Set Cbc Model.