Minotaur 0.4.1
Docs for developers
Loading...
Searching...
No Matches
PCBProcessor.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 MINOTAURPCBPROCESSOR_H
15#define MINOTAURPCBPROCESSOR_H
16
17#include "NodeProcessor.h"
18#include "Types.h"
19
20namespace Minotaur
21{
22
23class CutManager;
24//class Problem;
25
35
45{
46
47public:
50
51
53 PCBProcessor(EnvPtr env, EnginePtr engine, HandlerVector handlers, ProblemPtr orig = nullptr);
54
55
58
59 // Add a heuristic.
60 void addHeur(HeurPtr h);
61
62 // True if a new solution was found while processing this node.
63 bool foundNewSolution();
64
65 // Find branches that will be used to branch at this node.
66 Branches getBranches();
67
68 // Get warm-start information.
70
71 // Implement NodeProcessor::process().
72 void process(NodePtr node, RelaxationPtr rel, SolutionPoolPtr s_pool);
73
74 void setCutManager(CutManager* cutman);
75
76 // write statistics. Base class method.
77 void writeStats(std::ostream& out) const;
78
79 // write statistics. Base class method.
80 void writeStats() const;
81
82private:
84 Branches branches_;
85
90 bool contOnErr_;
91
93 CutManager* cutMan_;
94
96 double cutOff_;
97
99 EnginePtr engine_;
100
102 EngineStatus engineStatus_;
103
105 EnvPtr env_;
106
108 HandlerVector handlers_;
109
111 HeurVector heurs_;
112
114 HandlerPtr infHand_;
115
117 LoggerPtr logger_;
118
120 static const std::string me_;
121
124 int presFreq_;
125
126 //pointer to the original problem
127 ProblemPtr orig_;
129 UInt numSolutions_;
130
132 double oATol_;
133
135 double oRTol_;
136
138 RelaxationPtr relaxation_;
139
141 NodeStats stats_;
142
144 WarmStartPtr ws_;
145
152 virtual bool isFeasible_(NodePtr node, ConstSolutionPtr sol,
153 SolutionPoolPtr s_pool, bool& should_prune);
154
156 virtual bool presolveNode_(NodePtr node, SolutionPoolPtr s_pool);
157
159 virtual void solveRelaxation_();
160
165 virtual bool shouldPrune_(NodePtr node, double solval,
166 SolutionPoolPtr s_pool);
167
171 void removeCuts_(ConstSolutionPtr sol);
172
174
181 void separate_(ConstSolutionPtr sol, NodePtr node, SolutionPoolPtr s_pool,
182 SeparationStatus* status);
183
184 // Implement NodeProcessor::tightenBounds_()
185 virtual void tightenBounds_(NodePtr node, SolutionPoolPtr s_pool,
187};
188
189typedef PCBProcessor* PCBProcessorPtr;
190
191} // namespace Minotaur
192#endif
193
Define the NodeProcessor class for processing nodes in the branch-and-bound algorithm.
Declare important 'types' used in Minotaur.
Abstract base class to manage cuts in the relaxation.
Definition CutManager.h:42
Definition Engine.h:34
Definition Environment.h:28
Base class for handling specific types of constraints or objective.
Definition Handler.h:49
Definition Heuristic.h:30
Definition Logger.h:37
Definition NodeProcessor.h:49
Definition Node.h:54
Default node processor used in solver for now.
Definition PCBProcessor.h:45
WarmStartPtr getWarmStart()
Definition PCBProcessor.cpp:96
PCBProcessor()
Default constructor.
Definition PCBProcessor.h:49
void process(NodePtr node, RelaxationPtr rel, SolutionPoolPtr s_pool)
Definition PCBProcessor.cpp:182
Branches getBranches()
Find branches that will be used to branch at this node.
Definition PCBProcessor.cpp:90
void writeStats() const
Write statistics to our own logger.
Definition PCBProcessor.cpp:631
bool foundNewSolution()
Definition PCBProcessor.cpp:85
~PCBProcessor()
Destroy.
Definition PCBProcessor.cpp:63
Definition Problem.h:74
Definition Relaxation.h:53
Definition SolutionPool.h:28
Definition Solution.h:30
Definition WarmStart.h:45
Definition ActiveNodeStore.h:20
unsigned int UInt
Unsigned integer.
Definition Types.h:30
SeparationStatus
Status from separation routine:
Definition Types.h:217
EngineStatus
Different status that an external engine may report.
Definition Types.h:176
Definition PCBProcessor.h:26
UInt opt
Number of times relaxation became infeasible.
Definition PCBProcessor.h:29
UInt ub
Number of nodes processed.
Definition PCBProcessor.h:32
UInt prob
Number of times relaxation gave optimal feasible solution.
Definition PCBProcessor.h:30
UInt tol_err
Number of nodes pruned because of bound.
Definition PCBProcessor.h:33
UInt inf
Number of times relaxation became infeasible.
Definition PCBProcessor.h:28
UInt proc
Number of times problem ocurred in solving.
Definition PCBProcessor.h:31

Minotaur source code documented by Doxygen 1.9.8 on Fri Mar 20 2026