13#ifndef MINOTAURBRCAND_H
14#define MINOTAURBRCAND_H
59 virtual std::string
getName()
const {
return "default br-cand";};
92 void setDist(
double ddist,
double udist);
Declare important 'types' used in Minotaur.
Base class for describing candidates for branching on a node in branch-and-bound.
Definition: BrCand.h:32
virtual double getUDist()=0
virtual void setHandler(HandlerPtr h)
Set the handler that created this candidate.
Definition: BrCand.h:95
virtual void setDir(BranchDirection d)
Set the preferred direction that will be processed first in the branch-and-bound tree.
Definition: BrCand.h:86
virtual HandlerPtr getHandler()
Return the handler that created this candidate.
Definition: BrCand.h:56
virtual void decrBranches()
Decrement the number of branches currently associated with this candidate.
Definition: BrCand.h:43
HandlerPtr h_
Handler that created this candidate.
Definition: BrCand.h:112
virtual int numBranches()
Return the number of branches currently associated with this candidate.
Definition: BrCand.h:80
BranchDirection prefDir_
Which is preferred for processing next? UpBranch or DownBranch?
Definition: BrCand.h:121
int pCostIndex_
Index of the this candidate in the pseudo-cost array.
Definition: BrCand.h:118
virtual BranchDirection getDir() const
Get the preferred direction.
Definition: BrCand.h:53
virtual ~BrCand()
Destroy.
Definition: BrCand.h:38
virtual double getScore()
Return the score for this candidate.
Definition: BrCand.h:68
void setDist(double ddist, double udist)
Set the distance of the current solution from the down branch and the up branch.
Definition: BrCand.cpp:44
double score_
Score of this candidate.
Definition: BrCand.h:124
virtual void setScore(const double score)
Set score for this candidate.
Definition: BrCand.h:108
virtual std::string getName() const
Display for debugging.
Definition: BrCand.h:59
virtual double getDDist()=0
int branches_
Number of branches still in the tree which were created by this candidate.
Definition: BrCand.h:115
virtual int getPCostIndex() const
Return the index in the pseudo cost array. If it is not in the array, return a value less than 0.
Definition: BrCand.h:65
virtual void setNumBranches(int n)
Set the number of branches associated with this candidate.
Definition: BrCand.h:100
BrCand()
Constructor.
Definition: BrCand.cpp:39
Base class for handling specific types of constraints or objective.
Definition: Handler.h:49
Definition: ActiveNodeStore.h:20
BranchDirection
Two directions for branching.
Definition: Types.h:201
bool CompareScore(BrCandPtr c1, BrCandPtr c2)
Comparison function to sort candidates in the decreasing order of their score.
Definition: BrCand.cpp:22