00001 /*===========================================================================* 00002 * This file is part of the Bcps Linear Solver (BLIS). * 00003 * * 00004 * ALPS is distributed under the Eclipse 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-2013, Lehigh University, Yan Xu, and Ted Ralphs. * 00021 * All Rights Reserved. * 00022 *===========================================================================*/ 00023 00024 00025 //############################################################################# 00026 // NOTE: Borrow ideas from COIN/Cbc 00027 //############################################################################# 00028 00029 00030 #ifndef BlisBranchStrategyStrong_h_ 00031 #define BlisBranchStrategyStrong_h_ 00032 00033 #include "BcpsBranchObject.h" 00034 #include "BcpsBranchStrategy.h" 00035 #include "BlisModel.h" 00036 00037 00038 //############################################################################# 00039 00040 00041 typedef struct { 00042 int objectIndex; // object index 00043 BcpsBranchObject * bObject; // the branching object 00044 int numIntInfUp; // without odd ones 00045 int numObjInfUp; // just odd ones 00046 bool finishedUp; // true if solver finished 00047 int numIntInfDown; // without odd ones 00048 int numObjInfDown; // just odd ones 00049 bool finishedDown; // true if solver finished 00050 } BlisStrong; 00051 00052 00053 //############################################################################# 00054 00055 00059 class BlisBranchStrategyStrong : public BcpsBranchStrategy { 00060 00061 private: 00062 00064 BlisBranchStrategyStrong& operator=(const BlisBranchStrategyStrong& rhs); 00065 00066 public: 00067 00069 BlisBranchStrategyStrong() {} 00070 00072 BlisBranchStrategyStrong(BlisModel *model) 00073 : BcpsBranchStrategy(model) 00074 {} 00075 00077 virtual ~BlisBranchStrategyStrong() {} 00078 00080 BlisBranchStrategyStrong(const BlisBranchStrategyStrong &); 00081 00083 virtual BcpsBranchStrategy * clone() const { 00084 return new BlisBranchStrategyStrong(*this); 00085 } 00086 00088 virtual int createCandBranchObjects(int numPassesLeft); 00089 00095 virtual int betterBranchObject(BcpsBranchObject * thisOne, 00096 BcpsBranchObject * bestSoFar); 00097 }; 00098 00099 #endif