source: branches/devel/Bonmin/src/CbcBonmin/BonCbcNode.hpp @ 62

Last change on this file since 62 was 62, checked in by pbonami, 13 years ago

astyled the devel branch

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 3.8 KB
Line 
1// (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
2// All Rights Reserved.
3// This code is published under the Common Public License.
4//
5// Authors :
6// John J. Forrest, International Business Machines Corporation
7// Pierre Bonami, Carnegie Mellon University,
8//
9// Date : 03/15/2006
10
11#ifndef BonminCbcNode_H
12#define BonminCbcNode_H
13
14#include "CbcNode.hpp"
15
16
17namespace Bonmin
18{
19  /** \brief Holds information for recreating a subproblem by incremental change
20           from the parent for Bonmin
21
22    A BonminBonminCbcPartialNodeInfo object contains changes to the bounds and basis, and
23    additional cuts, required to recreate a subproblem by modifying and
24    augmenting the parent subproblem.
25  */
26
27  class BonCbcFullNodeInfo : public CbcFullNodeInfo
28  {
29
30  public:
31    friend class BonCbcPartialNodeInfo;
32    // Default Constructor
33    BonCbcFullNodeInfo ();
34
35    // Constructor from current state
36    BonCbcFullNodeInfo (CbcModel * model, int numberRowsAtContinuous);
37
38    // Copy constructor
39    BonCbcFullNodeInfo ( const BonCbcFullNodeInfo &);
40
41    // Destructor
42    ~BonCbcFullNodeInfo ();
43
44    /// Clone
45    virtual CbcNodeInfo * clone() const;
46
47    /**Method called when all direct sons have been explored to flush
48       useless warm start information.*/
49    virtual void allBranchesGone();
50
51    /** Number of consecutive infeasible parents only recorded if node is infeasible*/
52    inline int getSequenceOfInfeasiblesSize()
53    {
54      return sequenceOfInfeasiblesSize_;
55    }
56    /** Number of consecutive unsolved parents only recorded if node is infeasible*/
57    inline int getSequenceOfUnsolvedSize()
58    {
59      return sequenceOfUnsolvedSize_;
60    }
61  private:
62    /* Data values */
63    /** Number of consecutive infeasible parents only recorded if node is infeasible*/
64    int sequenceOfInfeasiblesSize_;
65    /** Number of consecutive unsolved parents only recorded if node is infeasible*/
66    int sequenceOfUnsolvedSize_;
67  private:
68
69    /// Illegal Assignment operator
70    BonCbcFullNodeInfo & operator=(const BonCbcFullNodeInfo& rhs);
71  };
72
73  /** \brief Holds information for recreating a subproblem by incremental change
74           from the parent for
75
76    A BonminCbcPartialNodeInfo object contains changes to the bounds and basis, and
77    additional cuts, required to recreate a subproblem by modifying and
78    augmenting the parent subproblem.
79  */
80
81  class BonCbcPartialNodeInfo : public CbcPartialNodeInfo
82  {
83
84  public:
85    // Default Constructor
86    BonCbcPartialNodeInfo ();
87
88    // Constructor from current state
89    BonCbcPartialNodeInfo (CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
90        int numberChangedBounds,const int * variables,
91        const double * boundChanges,
92        const CoinWarmStartDiff *basisDiff) ;
93
94    // Copy constructor
95    BonCbcPartialNodeInfo ( const BonCbcPartialNodeInfo &);
96
97    // Destructor
98    ~BonCbcPartialNodeInfo ();
99
100    /// Clone
101    virtual CbcNodeInfo * clone() const;
102
103    /**Method called when all direct sons have been explored to flush
104       useless warm start information.*/
105    virtual void allBranchesGone();
106
107    /** Number of consecutive infeasible parents only recorded if node is infeasible*/
108    inline int getSequenceOfInfeasiblesSize()
109    {
110      return sequenceOfInfeasiblesSize_;
111    }
112    /** Number of consecutive unsolved parents only recorded if node is infeasible*/
113    inline int getSequenceOfUnsolvedSize()
114    {
115      return sequenceOfUnsolvedSize_;
116    }
117  private:
118    /* Data values */
119    /** Number of consecutive infeasible parents only recorded if node is infeasible*/
120    int sequenceOfInfeasiblesSize_;
121    /** Number of consecutive unsolved parents only recorded if node is infeasible*/
122    int sequenceOfUnsolvedSize_;
123  private:
124
125    /// Illegal Assignment operator
126    BonCbcPartialNodeInfo & operator=(const Bonmin::BonCbcPartialNodeInfo& rhs);
127  };
128}
129#endif
Note: See TracBrowser for help on using the repository browser.