Dip-All  0.91.0
AlpsDecompTreeNode.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the DIP Solver Framework. //
3 // //
4 // DIP is distributed under the Eclipse Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // //
9 // Conceptual Design: Matthew Galati, SAS Institute Inc. //
10 // Ted Ralphs, Lehigh University //
11 // //
12 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, Ted Ralphs //
13 // All Rights Reserved. //
14 //===========================================================================//
15 
16 #ifndef AlpsDecompTreeNode_h_
17 #define AlpsDecompTreeNode_h_
18 
19 //===========================================================================//
20 #include "Alps.h"
21 #include "AlpsTreeNode.h"
22 
23 //===========================================================================//
24 class AlpsNodeDesc;
25 class AlpsDecompModel;
26 
27 //===========================================================================//
29 private:
31  std::string m_classTag;
32 
33  std::vector< std::pair<int, double> > downBranchLB_;
34  std::vector< std::pair<int, double> > downBranchUB_;
35  std::vector< std::pair<int, double> > upBranchLB_;
36  std::vector< std::pair<int, double> > upBranchUB_;
37 
38 public:
41  AlpsTreeNode(),
42  m_classTag ("ALPSTN")
43 
44  {
45  //quality_ = -ALPS_OBJ_MAX;//MVG?
46  }
47 
49  virtual ~AlpsDecompTreeNode() {
50  }
51 
52  bool checkIncumbent(AlpsDecompModel* model,
53  const DecompSolution* decompSol);
54 
55  //---
56  //--- pure virtual functions from AlpsTreeNode or AlpsTreeNode
57  //---
58 
61 
63  int chooseBranchingObject(AlpsModel* model);
64 
65 
66  //point direct to DECOMP?
68  int process(bool isRoot = false, bool rampUp = false);
69 
74  std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> > branch();
75 
76  //For now, we assume there is only one variable being branched on.
78  if (!downBranchLB_.empty()) {
79  return downBranchLB_[0].first;
80  } else {
81  return -1;
82  }
83  }
84 };
85 
86 #endif
std::vector< std::pair< int, double > > upBranchLB_
AlpsDecompTreeNode()
Default constructor.
std::vector< CoinTriple< AlpsNodeDesc *, AlpsNodeStatus, double > > branch()
Takes the explicit description of the current active node and creates the children&#39;s descriptions...
int process(bool isRoot=false, bool rampUp=false)
Performing the bounding operation.
virtual ~AlpsDecompTreeNode()
Destructor.
std::string m_classTag
class tag for debugging
Derivation of AlpsModel for DECOMP.
std::vector< std::pair< int, double > > downBranchUB_
This class holds one node of the search tree.
Definition: AlpsTreeNode.h:50
std::vector< std::pair< int, double > > downBranchLB_
AlpsTreeNode * createNewTreeNode(AlpsNodeDesc *&desc) const
Create a new node based on given desc.
std::vector< std::pair< int, double > > upBranchUB_
bool checkIncumbent(AlpsDecompModel *model, const DecompSolution *decompSol)
int chooseBranchingObject(AlpsModel *model)
To be defined.
A class to refer to the description of a search tree node.
Definition: AlpsNodeDesc.h:35