/home/coin/SVN-release/CoinAll-1.1.0/Bcps/examples/Blis/BlisObjectInt.h

Go to the documentation of this file.
00001 /*===========================================================================*
00002  * This file is part of the Bcps Linear 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-2005, International Business Machines                  *
00021  * Corporation, Lehigh University, Yan Xu, Ted Ralphs, Matthew Salzman and   *
00022  * others. All Rights Reserved.                                              *
00023  *===========================================================================*/
00024 
00025 //#############################################################################
00026 // This file is modified from from COIN/Cbc
00027 //#############################################################################
00028 
00029 
00030 #include "BcpsObject.h"
00031 #include "BlisPseudo.h"
00032 
00033 class BlisModel;
00034 
00035 //#############################################################################
00036 
00037 class BlisObjectInt : public BcpsObject {
00038 
00039 protected:
00040 
00042     int columnIndex_;
00043     
00045     double originalLower_;
00046     
00048     double originalUpper_;
00049     
00051     double breakEven_;
00052     
00054     BlisPseudocost pseudocost_;
00055     
00056  public:
00057 
00059     BlisObjectInt();
00060     
00062     BlisObjectInt(int objectIndex, 
00063                   int iColumn, 
00064                   double lb,
00065                   double ub,
00066                   double breakEven = 0.5);
00067     
00069     virtual ~BlisObjectInt() {}
00070   
00072     BlisObjectInt( const BlisObjectInt &);
00073     
00075     virtual BcpsObject * clone() const {
00076         return new BlisObjectInt(*this);
00077     }
00078     
00080     BlisObjectInt & operator=( const BlisObjectInt& rhs);
00081     
00084     virtual double infeasibility(BcpsModel *m, int & preferredWay) const;
00085     
00092     virtual void feasibleRegion(BcpsModel *m);
00093 
00095     virtual BcpsBranchObject * createBranchObject(BcpsModel *m, 
00096                                                   int direction) const;
00097     
00112     virtual BcpsBranchObject * preferredNewFeasible(BcpsModel *m) const;
00113   
00121     virtual BcpsBranchObject * notPreferredNewFeasible(BcpsModel *m) const ;
00122   
00127     virtual void resetBounds(BcpsModel *m);
00128     
00130     virtual int columnIndex() const { return columnIndex_; }
00131 
00134     inline double originalLowerBound() const { return originalLower_; }
00135     inline void setOriginalLowerBound(double value) { originalLower_=value; }
00136     inline double originalUpperBound() const { return originalUpper_; }
00137     inline void setOriginalUpperBound(double value) { originalUpper_=value; }
00139 
00141     inline double breakEven() const { return breakEven_; }
00142 
00144     inline void setBreakEven(double value) { breakEven_ = value; }
00145 
00147     BlisPseudocost & pseudocost() { return pseudocost_; }
00148 };
00149 

Generated on Sun Nov 14 14:06:30 2010 for Coin-All by  doxygen 1.4.7