- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

BlisTreeNode.h
Go to the documentation of this file.
1 /*===========================================================================*
2 * This file is part of the Bcps Linear Solver (BLIS). *
3 * *
4 * BLIS 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-2013, Lehigh University, Yan Xu, and Ted Ralphs. *
21 * All Rights Reserved. *
22 *===========================================================================*/
23
24 #ifndef BlisTreeNode_h_
25 #define BlisTreeNode_h_
26
27 //#############################################################################
28
29 #include "AlpsNodeDesc.h"
30
31 #include "BcpsObjectPool.h"
32 #include "BcpsTreeNode.h"
33
34 #include "BcpsNodeDesc.h"
35 #include "BlisNodeDesc.h"
36
37 class BcpsModel;
38 class BlisModel;
39
40
41 //#############################################################################
45 //#############################################################################
46
47
48 class BlisTreeNode : public BcpsTreeNode {
49
50 private:
51
53 BlisTreeNode(const BlisTreeNode&);
54
55 BlisTreeNode& operator=(const BlisTreeNode&);
56
58 //BcpsConstraintPool *constraintPool_;
59
61 //BcpsVariablePool *variablePool_;
62
64 //void saveExplicit();
65
66 bool parallel(BlisModel *model,
67 OsiCuts *newCutSet,
68 int lastNew,
69 OsiRowCut *rowCut);
70
71 public:
72
74 BlisTreeNode()
75 :
76 BcpsTreeNode()
77 { init(); }
78
80 BlisTreeNode(BlisModel* m) {
81 init();
82 desc_ = new BlisNodeDesc(m);
83 }
84
86 BlisTreeNode(AlpsNodeDesc *&desc) {
87 init();
88 desc_ = desc;
89 desc = NULL;
90 }
91
93 virtual ~BlisTreeNode() {
94 //delete constraintPool_;
95 //delete variablePool_;
96 }
97
99 void init() {
100 //constraintPool_ = new BcpsConstraintPool;
101 //variablePool_ = new BcpsVariablePool;
102 }
103
105 AlpsTreeNode* createNewTreeNode(AlpsNodeDesc *&desc) const;
106
108 virtual void convertToExplicit();
110 virtual void convertToRelative();
112
114 virtual int installSubProblem(BcpsModel *mode);
115
117 virtual int process(bool isRoot = false, bool rampUp = false);
118
120 virtual int bound(BcpsModel *model);
121
126 virtual std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> >
127 branch();
128
130 int selectBranchObject(BlisModel *model,
131 bool& foundSol,
132 int numPassesLeft);
133
135 virtual int chooseBranchingObject(BcpsModel*) { return AlpsReturnStatusOk;}
136
138 int generateConstraints(BlisModel *model, OsiCuts & cutPool);
139
141 int applyConstraints(BlisModel *model,
142 OsiCuts & cutPool,
143 const double *solution);
144
146 int reducedCostFix(BlisModel *model);
147
149 //BcpsConstraintPool * constraintPool() { return constraintPool_; }
150
152 //BcpsVariablePool * variablePool() { return variablePool_; }
153
155 virtual AlpsEncoded* encode() const;
156
158 virtual AlpsKnowledge* decode(AlpsEncoded&) const;
159 };
160
161 #endif
BlisModel
Definition: BlisModel.h:60
BlisTreeNode::BlisTreeNode
BlisTreeNode(BlisModel *m)
Useful constructor.
Definition: BlisTreeNode.h:80
AlpsNodeDesc.h
BlisTreeNode::process
virtual void process()
BlisTreeNode
This is the class in which we are finally able to concretely define the bounding procedure.
Definition: BlisSubTree.h:33
OsiRowCut
Row Cut Class.
Definition: OsiRowCut.hpp:29
BlisTreeNode::createNewTreeNode
AlpsTreeNode * createNewTreeNode(AlpsNodeDesc *&desc) const
Create a new node based on given desc.
BlisTreeNode::convertToExplicit
virtual void convertToExplicit()
Convert explicit description to difference, and vise-vesa.
BlisTreeNode::applyConstraints
int applyConstraints(BlisModel *model, OsiCuts &cutPool, const double *solution)
Select and apply constraints.
BlisTreeNode::bound
virtual int bound(BcpsModel *model)
Bounding procedure.
BlisTreeNode::selectBranchObject
int selectBranchObject(BlisModel *model, bool &foundSol, int numPassesLeft)
Select a branching object based on give branching strategy.
BlisTreeNode::branch
virtual std::vector< CoinTriple< AlpsNodeDesc *, AlpsNodeStatus, double > > branch()
Takes the explicit description of the current active node and creates the children&#39;s descriptions...
BlisTreeNode::init
void init()
Initilize member data when constructing a node.
Definition: BlisTreeNode.h:99
BlisTreeNode::generateConstraints
int generateConstraints(BlisModel *model, OsiCuts &cutPool)
Generate constraints.
BlisTreeNode::parallel
bool parallel(BlisModel *model, OsiCuts *newCutSet, int lastNew, OsiRowCut *rowCut)
Constraint pool.
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
AlpsEncoded
This data structure is to contain the packed form of an encodable knowledge.
Definition: AlpsEncoded.h:25
BcpsObjectPool.h
AlpsReturnStatusOk
Definition: Alps.h:119
BlisTreeNode::reducedCostFix
int reducedCostFix(BlisModel *model)
Fix and tighten varaibles based optimality conditions.
AlpsTreeNode
This class holds one node of the search tree.
Definition: AlpsTreeNode.h:50
BcpsModel
Definition: BcpsModel.h:40
BlisTreeNode::operator=
BlisTreeNode & operator=(const BlisTreeNode &)
BcpsTreeNode.h
AlpsKnowledge
The abstract base class of any user-defined class that Alps has to know about in order to encode/deco...
Definition: AlpsKnowledge.h:51
BlisTreeNode::convertToRelative
virtual void convertToRelative()
Convert explicit description to difference, and vise-vesa.
BlisTreeNode::~BlisTreeNode
virtual ~BlisTreeNode()
Destructor.
Definition: BlisTreeNode.h:93
BlisTreeNode::encode
virtual AlpsEncoded * encode() const
Return constraint pool.
BlisNodeDesc
Definition: BlisNodeDesc.h:40
BlisTreeNode::BlisTreeNode
BlisTreeNode(AlpsNodeDesc *&desc)
Useful constructor.
Definition: BlisTreeNode.h:86
BlisTreeNode::chooseBranchingObject
virtual int chooseBranchingObject(BcpsModel *)
To be defined.
Definition: BlisTreeNode.h:135
BlisTreeNode::installSubProblem
virtual int installSubProblem(BcpsModel *mode)
intall subproblem
BlisTreeNode::BlisTreeNode
BlisTreeNode()
Default constructor.
Definition: BlisTreeNode.h:74
BlisNodeDesc.h
BlisTreeNode::decode
virtual AlpsKnowledge * decode(AlpsEncoded &) const
Decode a node from an encoded object.
BcpsNodeDesc.h
AlpsNodeDesc
A class to refer to the description of a search tree node.
Definition: AlpsNodeDesc.h:35
AlpsTreeNode::desc_
AlpsNodeDesc * desc_
The actual description of the tree node.
Definition: AlpsTreeNode.h:95
BcpsTreeNode
This class contain the data for a BCPS search tree node.
Definition: BcpsTreeNode.h:46