Minotaur 0.4.1
Docs for developers
Loading...
Searching...
No Matches
RandomBrancher.h
Go to the documentation of this file.
1//
2// Minotaur -- It's only 1/2 bull
3//
4// (C)opyright 2009 - 2025 The Minotaur Team.
5//
6
14#ifndef MINOTAURRANDOMBRANCHER_H
15#define MINOTAURRANDOMBRANCHER_H
16
17#include "Brancher.h"
18
19namespace Minotaur {
20
22 UInt calls;
23 double time;
24 };
25
26 class Timer;
27
29 class RandomBrancher : public Brancher {
30
31 public:
34
36 RandomBrancher(EnvPtr env, HandlerVector handlers);
37
40
41 // Find a branching candidate. Returns NULL if x does not have any
42 // thing to branch on or if no branching candidates are needed.
43 Branches findBranches(RelaxationPtr rel, NodePtr node,
45 BrancherStatus & br_status, ModVector &mods);
46
47 // Write the statistics.
48 void writeStats(std::ostream &out) const;
49
50 // Return name.
51 std::string getName() const;
52
53 private:
55 const static std::string me_;
56
58 LoggerPtr logger_;
59
61 HandlerVector handlers_;
62
64 Timer *timer_;
65
67 RandomBrStats *stats_;
68
70 UInt seed_;
71
72 };
74}
75#endif
76
Declare the base class Brancher for finding and creating branches in Branch-and-Bound.
A brancher is used to find suitable branches for a given node. e.g. LexicoBrancher....
Definition Brancher.h:33
Definition Environment.h:28
Definition Logger.h:37
Definition Node.h:54
A class to select random branching candidate from the available ones.
Definition RandomBrancher.h:29
~RandomBrancher()
Destroy.
Definition RandomBrancher.cpp:63
std::string getName() const
Return the name of this brancher.
Definition RandomBrancher.cpp:160
Branches findBranches(RelaxationPtr rel, NodePtr node, ConstSolutionPtr sol, SolutionPoolPtr s_pool, BrancherStatus &br_status, ModVector &mods)
Find a branching candidate.
Definition RandomBrancher.cpp:75
void writeStats(std::ostream &out) const
Write statistics to the given out stream.
Definition RandomBrancher.cpp:151
RandomBrancher()
Default constructor.
Definition RandomBrancher.cpp:35
Definition Relaxation.h:53
Definition SolutionPool.h:28
Definition Solution.h:30
Definition Timer.h:40
Definition ActiveNodeStore.h:20
BrancherStatus
What can a brancher do to a node in branch-and-bound.
Definition Types.h:193
unsigned int UInt
Unsigned integer.
Definition Types.h:30
Definition RandomBrancher.h:21
double time
Number of times called, to find a branching candidate.
Definition RandomBrancher.h:23

Minotaur source code documented by Doxygen 1.9.8 on Fri Nov 21 2025