Minotaur 0.4.1
Docs for developers
MaxVioBrancher.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 MINOTAURMAXVIOBRANCHER_H
15#define MINOTAURMAXVIOBRANCHER_H
16
17#include "Brancher.h"
18
19namespace Minotaur {
20
21 class Timer;
22
24 UInt calls;
25 double time;
26 };
27
29 class MaxVioBrancher : public Brancher {
30
31 public:
33 MaxVioBrancher(EnvPtr env, HandlerVector & handlers);
34
37
38 // find branches after a node is processed.
39 Branches findBranches(RelaxationPtr rel, NodePtr node,
41 BrancherStatus & br_status, ModVector &mods);
42
45
46 // write statistics.
47 void writeStats(std::ostream &out) const;
48
50 std::string getName() const;
51
52 private:
54 BrVarCandSet cands_;
55
57 BrCandVector gencands_;
58
63 HandlerVector handlers_;
64
66 const static std::string me_;
67
69 RelaxationPtr rel_;
70
72 MaxVioBrStats * stats_;
73
75 Timer *timer_;
76
77 DoubleVector x_;
78
82 void freeCandidates_(BrCandPtr no_del);
83
85 void findCandidates_(ModVector &mods, bool &should_prune);
86
88 BrCandPtr findBestCandidate_();
89
90 };
92}
93#endif
94
Declare the base class Brancher for finding and creating branches in Branch-and-Bound.
Base class for describing candidates for branching on a node in branch-and-bound.
Definition: BrCand.h:32
A brancher is used to find suitable branches for a given node. e.g. LexicoBrancher....
Definition: Brancher.h:33
Definition: Environment.h:28
A class to select a variable for branching using maximum-violated branching.
Definition: MaxVioBrancher.h:29
Branches findBranches(RelaxationPtr rel, NodePtr node, ConstSolutionPtr sol, SolutionPoolPtr s_pool, BrancherStatus &br_status, ModVector &mods)
Find a branching candidate.
Definition: MaxVioBrancher.cpp:55
~MaxVioBrancher()
Destroy.
Definition: MaxVioBrancher.cpp:50
virtual void updateAfterSolve(NodePtr, ConstSolutionPtr)
Update pseudo-cost/other information after branching.
Definition: MaxVioBrancher.cpp:222
std::string getName() const
Return name.
Definition: MaxVioBrancher.cpp:231
void writeStats(std::ostream &out) const
Write statistics to the given out stream.
Definition: MaxVioBrancher.cpp:224
MaxVioBrancher(EnvPtr env, HandlerVector &handlers)
Construct using an environment pointer and initialize .
Definition: MaxVioBrancher.cpp:38
Definition: Node.h:54
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: MaxVioBrancher.h:23
double time
Number of times called to find a branching candidate.
Definition: MaxVioBrancher.h:25

Minotaur source code documented by Doxygen 1.9.4 on Thu Apr 24 2025