14#ifndef MINOTAURBRANCHANDBOUND_H
15#define MINOTAURBRANCHANDBOUND_H
32 typedef BabOptions* BabOptionsPtr;
164 static const std::string me_;
179 HeurVector preHeurs_;
214 NodePtr processRoot_(
bool *should_prune,
bool *should_dive);
217 bool shouldPrune_(
NodePtr node);
232 void showStatus_(
bool current_uncounted,
bool last_line);
234 void showStatusHead_();
Declare the base class Brancher for finding and creating branches in Branch-and-Bound.
Define the Environment class.
Define abstract base class for heuristics of various kinds.
Define the NodeProcessor class for processing nodes in the branch-and-bound algorithm.
Define the NodeRelaxer class for creating relaxation for nodes in the branch-and-bound algorithm.
Declare the base class Modification.
Declare the class Relaxation for storing and manipulating relaxations.
Declare a container for storing solutions and their qualities.
Declare class ParTreeManager for managing tree for parallel Branch-and-Bound.
Declare important 'types' used in Minotaur.
Implement a generic branch-and-bound algorithm on a single cpu.
Definition: BranchAndBound.h:38
NodeRelaxerPtr getNodeRelaxer()
Return a pointer to NodeRelaxer used in branch-and-bound.
Definition: BranchAndBound.cpp:98
NodeProcessorPtr getNodeProcessor()
Return a pointer to NodeProcessor used in branch-and-bound.
Definition: BranchAndBound.cpp:93
void setNodeRelaxer(NodeRelaxerPtr nr)
Set the NodeRelaxer for setting-up relaxations at each node.
Definition: BranchAndBound.cpp:213
UInt numProcNodes()
Return number of nodes processed while solving.
Definition: BranchAndBound.cpp:128
void solve()
Start solving the Problem using branch-and-bound.
Definition: BranchAndBound.cpp:336
double getPerGap()
Return the percentage gap between the lower and upper bounds.
Definition: BranchAndBound.cpp:83
void setNodeProcessor(NodeProcessorPtr p)
Set the NodeProcessor that processes each node.
Definition: BranchAndBound.cpp:208
void shouldCreateRoot(bool b)
Switch to turn on/off root-node creation.
Definition: BranchAndBound.cpp:218
double getLb()
Return the lower bound from the search tree.
Definition: BranchAndBound.cpp:88
BranchAndBound()
Default constructor.
Definition: BranchAndBound.cpp:25
virtual ~BranchAndBound()
Destroy.
Definition: BranchAndBound.cpp:53
TreeManagerPtr getTreeManager()
Return a pointer to the tree manager. The client can then directly query the TreeManager for its size...
Definition: BranchAndBound.cpp:118
void writeStats()
Write statistics to the logger.
void addPreRootHeur(HeurPtr h)
Add a heuristic that will be called before root node.
Definition: BranchAndBound.cpp:78
double totalTime()
Return total time taken.
Definition: BranchAndBound.cpp:532
SolveStatus getStatus()
Return the final status.
Definition: BranchAndBound.cpp:113
void setLogLevel(LogLevel level)
Set log level.
Definition: BranchAndBound.cpp:203
double getUb()
Return the upper bound for the solution value from the search tree.
Definition: BranchAndBound.cpp:123
Definition: Environment.h:28
Definition: Heuristic.h:30
Definition: NodeProcessor.h:49
Definition: NodeRelaxer.h:42
Definition: SolutionPool.h:28
Definition: Solution.h:30
Base class for managing the branch-and-bound tree.
Definition: TreeManager.h:29
Definition: ActiveNodeStore.h:20
LogLevel
Levels of verbosity.
Definition: Types.h:226
unsigned int UInt
Unsigned integer.
Definition: Types.h:30
SolveStatus
Different states an algorithm like branch-and-bound can be in.
Definition: Types.h:158
Different options and parameters that control branch-and-bound.
Definition: BranchAndBound.h:256
double timeLimit
Time limit in seconds for the branch-and-bound.
Definition: BranchAndBound.h:285
UInt nodeLimit
Limit on number of nodes processed.
Definition: BranchAndBound.h:273
double logInterval
Time in seconds between status updates of the progress.
Definition: BranchAndBound.h:270
UInt solLimit
Limit on number of nodes processed.
Definition: BranchAndBound.h:282
double perGapLimit
Stop if the percent gap between lower and upper bounds of the objective function falls below this lev...
Definition: BranchAndBound.h:279
BabOptions()
Default constructor.
Definition: BranchAndBound.cpp:548
bool createRoot
Should the root be created in branch-and-bound (yes), or the user calls branch-and-bound after creati...
Definition: BranchAndBound.h:267
Statistics about the branch-and-bound.
Definition: BranchAndBound.h:239
BabStats()
Constructor. All data is initialized to zero.
Definition: BranchAndBound.cpp:540
UInt nodesProc
Number of nodes processed.
Definition: BranchAndBound.h:244
double timeUsed
Total time used in branch-and-bound.
Definition: BranchAndBound.h:247
double updateTime
Time of the last log display.
Definition: BranchAndBound.h:250