00001 00033 #ifndef ABA_SETBRANCHRULE_H 00034 #define ABA_SETBRANCHRULE_H 00035 00036 #include "abacus/branchrule.h" 00037 #include "abacus/fsvarstat.h" 00038 00039 #ifdef ABACUS_PARALLEL 00040 class ABA_MESSAGE; 00041 #endif 00042 00043 class ABA_SETBRANCHRULE : public ABA_BRANCHRULE { 00044 public: 00045 00053 ABA_SETBRANCHRULE(ABA_MASTER *master, int variable, 00054 ABA_FSVARSTAT::STATUS status); 00055 00057 virtual ~ABA_SETBRANCHRULE(); 00058 #ifdef ABACUS_PARALLEL 00059 00068 ABA_SETBRANCHRULE(const ABA_MASTER *master, ABA_MESSAGE &msg); 00069 00077 virtual void pack(ABA_MESSAGE &msg) const; 00078 00086 virtual int classId() const; 00087 #endif 00088 00097 friend ostream &operator<<(ostream &out, const ABA_SETBRANCHRULE &rhs); 00098 00099 00108 virtual int extract(ABA_SUB *sub); 00109 00121 virtual void extract(ABA_LPSUB *lp); 00122 00124 virtual void unExtract(ABA_LPSUB *lp); 00125 00132 virtual bool branchOnSetVar(); 00133 00137 bool setToUpperBound() const; 00138 00141 int variable() const; 00142 00143 private: 00144 int variable_; 00145 ABA_FSVARSTAT::STATUS status_; 00146 double oldLpBound_; 00147 }; 00148 00149 00150 00151 inline int ABA_SETBRANCHRULE::variable() const 00152 { 00153 return variable_; 00154 } 00155 00156 00157 #endif // ABA_SETBRANCHRULE_H 00158