Debian Codegraph @

Bonmin/src/CbcBonmin/BonCbcNode.hpp

raw
1 // (C) Copyright International Business Machines Corporation and Carnegie Mellon University 2006
2 // All Rights Reserved.
3 // This code is published under the Eclipse 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 #include "BonRegisteredOptions.hpp"
16
17
18 namespace Bonmin
19 {
20 /** \brief Holds information for recreating a subproblem by incremental change
21 from the parent for Bonmin
22
23 A BonminBonminCbcPartialNodeInfo object contains changes to the bounds and basis, and
24 additional cuts, required to recreate a subproblem by modifying and
25 augmenting the parent subproblem.
26 */
27
28 class BonCbcFullNodeInfo : public CbcFullNodeInfo
29 {
30
31 public:
32 friend class BonCbcPartialNodeInfo;
33 // Default Constructor
34 BonCbcFullNodeInfo ();
35
36 // Constructor from current state
37 BonCbcFullNodeInfo (CbcModel * model, int numberRowsAtContinuous);
38
39 // Copy constructor
40 BonCbcFullNodeInfo ( const BonCbcFullNodeInfo &);
41
42 // Destructor
43 ~BonCbcFullNodeInfo ();
44
45 /// Clone
46 virtual CbcNodeInfo * clone() const;
47
48 /**Method called when all direct sons have been explored to flush
49 useless warm start information.*/
50 virtual void allBranchesGone();
51
52 /** Number of consecutive infeasible parents only recorded if node is infeasible*/
53 inline int getSequenceOfInfeasiblesSize()
54 {
55 return sequenceOfInfeasiblesSize_;
56 }
57 /** Number of consecutive unsolved parents only recorded if node is infeasible*/
58 inline int getSequenceOfUnsolvedSize()
59 {
60 return sequenceOfUnsolvedSize_;
61 }
62 /** Register all the options for class instance.*/
63 static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
64
65 private:
66 /* Data values */
67 /** Number of consecutive infeasible parents only recorded if node is infeasible*/
68 int sequenceOfInfeasiblesSize_;
69 /** Number of consecutive unsolved parents only recorded if node is infeasible*/
70 int sequenceOfUnsolvedSize_;
71 private:
72
73 /// Illegal Assignment operator
74 BonCbcFullNodeInfo & operator=(const BonCbcFullNodeInfo& rhs);
75 };
76
77 /** \brief Holds information for recreating a subproblem by incremental change
78 from the parent for
79
80 A BonminCbcPartialNodeInfo object contains changes to the bounds and basis, and
81 additional cuts, required to recreate a subproblem by modifying and
82 augmenting the parent subproblem.
83 */
84
85 class BonCbcPartialNodeInfo : public CbcPartialNodeInfo
86 {
87
88 public:
89 // Default Constructor
90 BonCbcPartialNodeInfo ();
91
92 // Constructor from current state
93 BonCbcPartialNodeInfo (CbcModel * model, CbcNodeInfo * parent, CbcNode * owner,
94 int numberChangedBounds,const int * variables,
95 const double * boundChanges,
96 const CoinWarmStartDiff *basisDiff) ;
97
98 // Copy constructor
99 BonCbcPartialNodeInfo ( const BonCbcPartialNodeInfo &);
100
101 // Destructor
102 ~BonCbcPartialNodeInfo ();
103
104 /// Clone
105 virtual CbcNodeInfo * clone() const;
106
107 /**Method called when all direct sons have been explored to flush
108 useless warm start information.*/
109 virtual void allBranchesGone();
110
111 /** Number of consecutive infeasible parents only recorded if node is infeasible*/
112 inline int getSequenceOfInfeasiblesSize()
113 {
114 return sequenceOfInfeasiblesSize_;
115 }
116 /** Number of consecutive unsolved parents only recorded if node is infeasible*/
117 inline int getSequenceOfUnsolvedSize()
118 {
119 return sequenceOfUnsolvedSize_;
120 }
121 private:
122 /* Data values */
123 /** Number of consecutive infeasible parents only recorded if node is infeasible*/
124 int sequenceOfInfeasiblesSize_;
125 /** Number of consecutive unsolved parents only recorded if node is infeasible*/
126 int sequenceOfUnsolvedSize_;
127 private:
128
129 /// Illegal Assignment operator
130 BonCbcPartialNodeInfo & operator=(const Bonmin::BonCbcPartialNodeInfo& rhs);
131 };
132 }
133 #endif