00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef AbcBranchActual_h_
00024 #define AbcBranchActual_h_
00025
00026
00027
00028
00029
00030 #include "AbcBranchBase.h"
00031
00032
00038 class AbcBranchDefaultDecision : public AbcBranchDecision {
00039
00040 public:
00041
00042 AbcBranchDefaultDecision();
00043
00044
00045 AbcBranchDefaultDecision(const AbcBranchDefaultDecision &);
00046
00047 virtual ~AbcBranchDefaultDecision();
00048
00050 virtual AbcBranchDecision * clone() const;
00051
00053 virtual void initialize(AbcModel * model);
00054
00077 virtual int betterBranch(int thisOne,
00078 int bestSoFar,
00079 double changeUp, int numInfUp,
00080 double changeDn, int numInfDn);
00081
00082 private:
00083
00085 AbcBranchDefaultDecision & operator=(const AbcBranchDefaultDecision& rhs);
00086
00089 AbcModel * model_;
00090
00092 double bestCriterion_;
00093
00095 double bestChangeUp_;
00096
00098 int bestNumberUp_;
00099
00101 double bestChangeDown_;
00102
00104 int bestNumberDown_;
00105
00107 int bestObject_;
00108 };
00109
00110
00111 class AbcPseudocost
00112 {
00113 public:
00114 int colInd_;
00115 double upCost_;
00116 int upNum_;
00117 double downCost_;
00118 int downNum_;
00119
00120 public:
00121 AbcPseudocost()
00122 :
00123 colInd_(-1),
00124 upCost_(0.0), upNum_(0),
00125 downCost_(0.0), downNum_(0) {}
00126
00127 AbcPseudocost(const int ind,
00128 const double uc,
00129 const int un,
00130 const double dc,
00131 const int dn)
00132 :
00133 colInd_(ind),
00134 upCost_(uc), upNum_(un),
00135 downCost_(dc), downNum_(dn) {}
00136
00137 void update(const int dir,
00138 const double parentObjValue,
00139 const double objValue,
00140 const double solValue);
00141
00142 };
00143
00144 #endif