Cbc 2.10.5
CbcStatistics.hpp
Go to the documentation of this file.
1/* $Id$ */
2// Copyright (C) 2005, 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 CbcStatistics_H
7#define CbcStatistics_H
8
9#include "CbcModel.hpp"
10
14public:
15 // Default Constructor
17 // Branch
19
21 // Copy
23 // Assignment
25 // Update at end of branch
26 void endOfBranch(int numberIterations, double objectiveValue);
27 // Update number of infeasibilities
28 void updateInfeasibility(int numberInfeasibilities);
29 // Branch found to be infeasible by chooseBranch
31 // Just prints
32 void print(const int *sequenceLookup = NULL) const;
33 // Node number
34 inline int node() const
35 {
36 return id_;
37 }
38 // Parent node number
39 inline int parentNode() const
40 {
41 return parentId_;
42 }
43 // depth
44 inline int depth() const
45 {
46 return depth_;
47 }
48 // way
49 inline int way() const
50 {
51 return way_;
52 }
53 // value
54 inline double value() const
55 {
56 return value_;
57 }
58 // starting objective
59 inline double startingObjective() const
60 {
61 return startingObjective_;
62 }
63 // Unsatisfied at beginning
64 inline int startingInfeasibility() const
65 {
67 }
68 // starting objective
69 inline double endingObjective() const
70 {
71 return endingObjective_;
72 }
73 // Unsatisfied at end
74 inline int endingInfeasibility() const
75 {
77 }
78 // Number iterations
79 inline int numberIterations() const
80 {
81 return numberIterations_;
82 }
83
84protected:
85 // Data
87 double value_;
93 int id_;
97 int way_;
108};
109
110#endif
111
112/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
113*/
Simple Branch and bound class.
Definition: CbcModel.hpp:100
Information required while the node is live.
Definition: CbcNode.hpp:49
For gathering statistics.
CbcStatistics(const CbcStatistics &rhs)
int startingInfeasibility_
starting number of integer infeasibilities
int numberIterations_
number of iterations
void print(const int *sequenceLookup=NULL) const
int way() const
CbcStatistics & operator=(const CbcStatistics &rhs)
int parentId_
parent id
int node() const
int sequence_
sequence number branched on
void endOfBranch(int numberIterations, double objectiveValue)
double endingObjective_
Ending objective.
int parentNode() const
void sayInfeasible()
void updateInfeasibility(int numberInfeasibilities)
double startingObjective() const
double value() const
double startingObjective_
Starting objective.
double value_
Value.
CbcStatistics(CbcNode *node, CbcModel *model)
int way_
way -1 or +1 is first branch -10 or +10 is second branch
double endingObjective() const
int depth() const
int numberIterations() const
int startingInfeasibility() const
int endingInfeasibility_
ending number of integer infeasibilities
int endingInfeasibility() const