24 typedef const Node *ConstNodePtr;
25 typedef Relaxation *RelaxationPtr;
26 typedef WarmStart *WarmStartPtr;
147 double getLb()
const {
return lb_; }
172 DoubleVector
getPCUp()
const {
return pseudoUp_; }
180 double setVioVal(
double v) {
return vioVal_ = v; }
182 double getVioVal() {
return vioVal_; }
207 ModificationConstIterator
modsBegin()
const {
return pMods_.begin(); }
208 ModificationConstIterator modsrBegin()
const {
return rMods_.begin(); }
211 ModificationConstIterator
modsEnd()
const {
return pMods_.end(); }
212 ModificationConstIterator modsrEnd()
const {
return rMods_.end(); }
215 ModificationRConstIterator
modsRBegin()
const {
return pMods_.rbegin(); }
218 ModificationRConstIterator
modsREnd()
const {
return pMods_.rend(); }
250 lastStrBranched_ = lstStrnBrnchd;
254 void setLb(
double value);
257 void setPCDown(DoubleVector pcDown) { pseudoDown_ = pcDown; }
260 void setPCUp(DoubleVector pcUp) { pseudoUp_ = pcUp; }
333 void write(std::ostream &o)
const;
343 NodePtrVector children_;
352 UIntVector lastStrBranched_;
364 std::vector<ModificationPtr> pMods_;
370 std::vector<ModificationPtr> rMods_;
382 DoubleVector pseudoDown_;
385 DoubleVector pseudoUp_;
403 UIntVector timesDown_;
Declare important 'types' used in Minotaur.
Base class for storing branching modifications.
Definition: Branch.h:33
Store function, bounds and other information about a cut.
Definition: Cut.h:52
Definition: Modification.h:29
void setLastStrongBranched(UIntVector lstStrnBrnchd)
Set the vector of last strong branched information of candidates.
Definition: Node.h:248
void removeWarmStart()
Remove warm start information associated with this node.
Definition: Node.cpp:244
void updateBrCands(UInt index)
Definition: Node.cpp:396
UIntVector getTimesDown() const
Definition: Node.h:188
size_t getNumChildren()
Number of children of this node.
Definition: Node.h:150
double getLb() const
Return the lower bound of the relaxation obtained at this node.
Definition: Node.h:147
void addPMod(ModificationPtr m)
Definition: Node.h:81
void applyCutsByIndex(RelaxationPtr rel)
Definition: Node.cpp:155
void undoRMods(RelaxationPtr r)
Definition: Node.cpp:315
void setTbScore(double d)
Get the tie-breaking score.
Definition: Node.h:266
void write(std::ostream &o) const
Write the node.
Definition: Node.cpp:446
void removeParent()
Remove the pointer to the parent node. Used when deleting a node.
Definition: Node.cpp:238
void undoRModsTrans(RelaxationPtr r)
Definition: Node.cpp:343
void undoMods(RelaxationPtr rel, ProblemPtr p)
Definition: Node.cpp:389
UInt getDepth() const
Return the depth of the node in the tree.
Definition: Node.h:138
void applyMods(RelaxationPtr rel, ProblemPtr p)
Definition: Node.cpp:219
ModificationConstIterator modsBegin() const
Definition: Node.h:207
void applyRModsTrans(RelaxationPtr rel)
Definition: Node.cpp:179
void removeChild(NodePtrIterator childNodeIter)
Definition: Node.cpp:226
ModificationConstIterator modsEnd() const
End of modifications applied at this node.
Definition: Node.h:211
void updateLastStrBranched(UInt index, double value)
Definition: Node.cpp:401
UIntVector getTimesUp() const
Definition: Node.h:194
void setTimesDown(UIntVector timesDown)
Set the times down for this node.
Definition: Node.h:269
CutList getCutPool()
Return the cut-pool of this node.
Definition: Node.h:135
DoubleVector getPCDown()
Definition: Node.h:160
double getTbScore() const
Get the tie-breaking score.
Definition: Node.h:178
NodeStatus getStatus() const
Get the status of this node.
Definition: Node.h:175
void setPCDown(DoubleVector pcDown)
Set the down pseudocosts for this node.
Definition: Node.h:257
void addCutToPool(CutPtr cut, RelaxationPtr rel)
Add cut to the cut-pool of this node.
Definition: Node.cpp:133
void setDepth(UInt depth)
Set the depth of the node in the tree.
Definition: Node.cpp:257
void removeChildren()
Disassociate all children from this node.
Definition: Node.cpp:232
void applyRMods(RelaxationPtr rel)
Definition: Node.cpp:113
UIntVector getLastStrongBranched()
Return the vector of last strong branching information of candidates.
Definition: Node.h:144
void setPCUp(DoubleVector pcUp)
Set the up pseudocosts for this node.
Definition: Node.h:260
void updateTimesUp(UInt index, double value)
Definition: Node.cpp:437
void applyPMods(ProblemPtr p)
Definition: Node.cpp:93
BranchPtr getBranch() const
Definition: Node.h:132
virtual ~Node()
Default destructor.
Definition: Node.cpp:64
void setLb(double value)
Set a lower bound for the relaxation at this node.
Definition: Node.cpp:269
void addChild(NodePtr childNode)
Add a child node.
Definition: Node.cpp:87
UInt getId() const
Return the ID of this node.
Definition: Node.h:141
WarmStartPtr getWarmStart()
Get the warm start information.
Definition: Node.h:197
DoubleVector getPCUp() const
Definition: Node.h:172
NodePtrIterator childrenEnd()
Last child.
Definition: Node.h:126
void setId(UInt id)
Definition: Node.cpp:263
void setWarmStart(WarmStartPtr ws)
Set warm start information.
Definition: Node.cpp:275
NodePtr getParent() const
Return a pointer to the parent node.
Definition: Node.h:153
void setBrCands(UIntVector brCands)
Set the branching candidate information for this node.
Definition: Node.h:236
ModificationRConstIterator modsRBegin() const
Reverse iterators.
Definition: Node.h:215
NodePtrIterator childrenBegin()
Access the children by iterating over the vector.
Definition: Node.h:123
void setTimesUp(UIntVector timesUp)
Set the times up for this node.
Definition: Node.h:272
void addRMod(ModificationPtr m)
Definition: Node.h:89
void undoPMods(ProblemPtr p)
Definition: Node.cpp:287
Node()
Default constructor.
Definition: Node.cpp:30
ModificationRConstIterator modsREnd() const
Reverse iterators.
Definition: Node.h:218
void updatePCDown(UInt index, double value)
Definition: Node.cpp:410
void updateTimesDown(UInt index, double value)
Definition: Node.cpp:428
void makeChildOf(const Node *parent)
UIntVector getBrCands() const
Definition: Node.h:166
void updatePCUp(UInt index, double value)
Definition: Node.cpp:419
void setStatus(NodeStatus status)
Set the status of this node.
Definition: Node.h:263
Definition: Relaxation.h:53
Definition: WarmStart.h:45
Definition: ActiveNodeStore.h:20
unsigned int UInt
Unsigned integer.
Definition: Types.h:30
NodeStatus
Status of a node in branch-and-bound.
Definition: Types.h:204