Blis  0.94
BlisBranchStrategyStrong.h
Go to the documentation of this file.
1 /*===========================================================================*
2  * This file is part of the BiCePS Linear Integer Solver (BLIS). *
3  * *
4  * ALPS is distributed under the Eclipse Public License as part of the *
5  * COIN-OR repository (http://www.coin-or.org). *
6  * *
7  * Authors: *
8  * *
9  * Yan Xu, Lehigh University *
10  * Ted Ralphs, Lehigh University *
11  * *
12  * Conceptual Design: *
13  * *
14  * Yan Xu, Lehigh University *
15  * Ted Ralphs, Lehigh University *
16  * Laszlo Ladanyi, IBM T.J. Watson Research Center *
17  * Matthew Saltzman, Clemson University *
18  * *
19  * *
20  * Copyright (C) 2001-2019, Lehigh University, Yan Xu, and Ted Ralphs. *
21  * All Rights Reserved. *
22  *===========================================================================*/
23 
24 
25 //#############################################################################
26 // NOTE: Borrow ideas from COIN/Cbc
27 //#############################################################################
28 
29 
30 #ifndef BlisBranchStrategyStrong_h_
31 #define BlisBranchStrategyStrong_h_
32 
33 #include "BcpsBranchObject.h"
34 #include "BcpsBranchStrategy.h"
35 #include "BlisModel.h"
36 
37 
38 //#############################################################################
39 
40 
41 typedef struct {
42  int objectIndex; // object index
43  BcpsBranchObject * bObject; // the branching object
44  int numIntInfUp; // without odd ones
45  int numObjInfUp; // just odd ones
46  bool finishedUp; // true if solver finished
47  int numIntInfDown; // without odd ones
48  int numObjInfDown; // just odd ones
49  bool finishedDown; // true if solver finished
50 } BlisStrong;
51 
52 
53 //#############################################################################
54 
55 
58 
59  private:
60 
63 
64  public:
65 
68  type_ = static_cast<int>(BlisBranchingStrategyStrong);
69  }
70 
73  : BcpsBranchStrategy(model) {
74  type_ = static_cast<int>(BlisBranchingStrategyStrong);
75  }
76 
79 
82 
84  virtual BcpsBranchStrategy * clone() const {
85  return new BlisBranchStrategyStrong(*this);
86  }
87 
89  virtual int createCandBranchObjects(int numPassesLeft, double ub);
90 
96  virtual int betterBranchObject(BcpsBranchObject * thisOne,
97  BcpsBranchObject * bestSoFar);
98 };
99 
100 #endif
BlisStrong::numIntInfDown
int numIntInfDown
Definition: BlisBranchStrategyStrong.h:47
BcpsBranchStrategy::type_
int type_
BlisBranchStrategyStrong::betterBranchObject
virtual int betterBranchObject(BcpsBranchObject *thisOne, BcpsBranchObject *bestSoFar)
Compare branching object thisOne to bestSoFar.
BlisStrong::numObjInfDown
int numObjInfDown
Definition: BlisBranchStrategyStrong.h:48
BcpsBranchObject.h
BlisModel
Definition: BlisModel.h:69
BlisStrong
Definition: BlisBranchStrategyStrong.h:41
BlisStrong::numIntInfUp
int numIntInfUp
Definition: BlisBranchStrategyStrong.h:44
BcpsBranchStrategy.h
BlisStrong::finishedUp
bool finishedUp
Definition: BlisBranchStrategyStrong.h:46
BlisStrong::finishedDown
bool finishedDown
Definition: BlisBranchStrategyStrong.h:49
BcpsBranchObject
BlisModel.h
BlisBranchStrategyStrong
This class implements strong branching.
Definition: BlisBranchStrategyStrong.h:57
BlisBranchStrategyStrong::clone
virtual BcpsBranchStrategy * clone() const
Clone a brancing strategy.
Definition: BlisBranchStrategyStrong.h:84
BlisBranchStrategyStrong::BlisBranchStrategyStrong
BlisBranchStrategyStrong()
Strong Constructor.
Definition: BlisBranchStrategyStrong.h:67
BlisBranchStrategyStrong::BlisBranchStrategyStrong
BlisBranchStrategyStrong(const BlisBranchStrategyStrong &)
Copy constructor.
BlisBranchStrategyStrong::~BlisBranchStrategyStrong
virtual ~BlisBranchStrategyStrong()
Destructor.
Definition: BlisBranchStrategyStrong.h:78
BcpsBranchStrategy
BlisBranchingStrategyStrong
@ BlisBranchingStrategyStrong
Definition: Blis.h:106
BlisStrong::objectIndex
int objectIndex
Definition: BlisBranchStrategyStrong.h:42
BlisStrong::bObject
BcpsBranchObject * bObject
Definition: BlisBranchStrategyStrong.h:43
BlisBranchStrategyStrong::createCandBranchObjects
virtual int createCandBranchObjects(int numPassesLeft, double ub)
Create a set of candidate branching objects.
BlisBranchStrategyStrong::BlisBranchStrategyStrong
BlisBranchStrategyStrong(BlisModel *model)
Strong Constructor.
Definition: BlisBranchStrategyStrong.h:72
BlisStrong::numObjInfUp
int numObjInfUp
Definition: BlisBranchStrategyStrong.h:45