summaryrefslogtreecommitdiff
path: root/build/Bonmin/include/coin/BonBabInfos.hpp
blob: 4ff4b372768738455b3d42dde1ce4911ae62eb77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// (C) Copyright International Business Machines Corporation 2007
// All Rights Reserved.
// This code is published under the Eclipse Public License.
//
// Authors :
// Pierre Bonami, International Business Machines Corporation
//
// Date : 04/23/2007

#ifndef BonBabInfos_H
#define BonBabInfos_H
#include <stdlib.h>
#include "BonAuxInfos.hpp"

namespace Bonmin
{
  class Bab;
  /** Bonmin class for passing info between components of branch-and-cuts.*/
  class BabInfo : public Bonmin::AuxInfo
  {
  public:
    /** Default constructor.*/
    BabInfo(int type);

    /** Constructor from OsiBabSolver.*/
    BabInfo(const OsiBabSolver &other);

    /** Copy constructor.*/
    BabInfo(const BabInfo &other);

    /** Destructor.*/
    virtual ~BabInfo();

    /** Virtual copy constructor.*/
    virtual OsiAuxInfo * clone() const;

    /** Set pointer to the branch-and-bound algorithm (to access CbcModel).*/
    void setBabPtr(Bab * babPtr)
    {
      babPtr_ = babPtr;
    }

    /** Pointer to the branch-and-bound algorithm (to access CbcModel).*/
    Bab * babPtr()
    {
      return babPtr_;
    }

    bool hasSolution() const{
      return bestSolution_ != NULL;}
  protected:
    /** Pointer to branch-and-bound algorithm.*/
    Bab * babPtr_;
  };
}/* End namespace.*/

#endif