00001 /*===========================================================================* 00002 * This file is part of the BiCePS Linear Integer Solver (BLIS). * 00003 * * 00004 * BLIS is distributed under the Common Public License as part of the * 00005 * COIN-OR repository (http://www.coin-or.org). * 00006 * * 00007 * Authors: * 00008 * * 00009 * Yan Xu, Lehigh University * 00010 * Ted Ralphs, Lehigh University * 00011 * * 00012 * Conceptual Design: * 00013 * * 00014 * Yan Xu, Lehigh University * 00015 * Ted Ralphs, Lehigh University * 00016 * Laszlo Ladanyi, IBM T.J. Watson Research Center * 00017 * Matthew Saltzman, Clemson University * 00018 * * 00019 * * 00020 * Copyright (C) 2001-2007, Lehigh University, Yan Xu, and Ted Ralphs. * 00021 * All Rights Reserved. * 00022 *===========================================================================*/ 00023 00024 //############################################################################# 00025 // This file is modified from from COIN/Cbc 00026 //############################################################################# 00027 00028 00029 #include "BcpsObject.h" 00030 #include "BlisPseudo.h" 00031 00032 class BlisModel; 00033 00034 //############################################################################# 00035 00036 class BlisObjectInt : public BcpsObject { 00037 00038 protected: 00039 00041 int columnIndex_; 00042 00044 double originalLower_; 00045 00047 double originalUpper_; 00048 00050 double breakEven_; 00051 00053 BlisPseudocost pseudocost_; 00054 00055 public: 00056 00058 BlisObjectInt(); 00059 00061 BlisObjectInt(int objectIndex, 00062 int iColumn, 00063 double lb, 00064 double ub, 00065 double breakEven = 0.5); 00066 00068 virtual ~BlisObjectInt() {} 00069 00071 BlisObjectInt( const BlisObjectInt &); 00072 00074 virtual BcpsObject * clone() const { 00075 return new BlisObjectInt(*this); 00076 } 00077 00079 BlisObjectInt & operator=( const BlisObjectInt& rhs); 00080 00083 virtual double infeasibility(BcpsModel *m, int & preferredWay) const; 00084 00091 virtual void feasibleRegion(BcpsModel *m); 00092 00094 virtual BcpsBranchObject * createBranchObject(BcpsModel *m, 00095 int direction) const; 00096 00111 virtual BcpsBranchObject * preferredNewFeasible(BcpsModel *m) const; 00112 00120 virtual BcpsBranchObject * notPreferredNewFeasible(BcpsModel *m) const ; 00121 00126 virtual void resetBounds(BcpsModel *m); 00127 00129 virtual int columnIndex() const { return columnIndex_; } 00130 00133 inline double originalLowerBound() const { return originalLower_; } 00134 inline void setOriginalLowerBound(double value) { originalLower_=value; } 00135 inline double originalUpperBound() const { return originalUpper_; } 00136 inline void setOriginalUpperBound(double value) { originalUpper_=value; } 00138 00140 inline double breakEven() const { return breakEven_; } 00141 00143 inline void setBreakEven(double value) { breakEven_ = value; } 00144 00146 BlisPseudocost & pseudocost() { return pseudocost_; } 00147 }; 00148