Minotaur 0.4.1
Docs for developers
CutMan1.h
Go to the documentation of this file.
1//
2// Minotaur -- It's only 1/2 bull
3//
4// (C)opyright 2010 - 2025 The Minotaur Team.
5//
6
13#ifndef MINOTAURCUTMAN1_H
14#define MINOTAURCUTMAN1_H
15
16#include <list>
17#include "CutManager.h"
18#include "Types.h"
19
20
21namespace Minotaur {
22
27 class CutMan1 : public CutManager {
28
29 public:
31 CutMan1();
32
40
42 ~CutMan1();
43
44 // Base class method.
45 void addCut(CutPtr c);
46
47 ConstraintPtr addCut(ProblemPtr, FunctionPtr, double, double, bool, bool)
48 {
49 return ConstraintPtr();
50 };
51
52 // Base class method.
53 void addCuts(CutVectorIter cbeg, CutVectorIter cend);
54
55 // Base class method.
56 size_t getNumCuts() const;
57
58 // Base class method.
59 size_t getNumEnabledCuts() const;
60
61 // Base class method.
62 size_t getNumDisabledCuts() const;
63
64 // Base class method.
65 size_t getNumNewCuts() const;
66
67 // Base class method.
68 void postSolveUpdate(ConstSolutionPtr sol, EngineStatus eng_status);
69
70 // Base class method.
71 void separate(ProblemPtr p, ConstSolutionPtr sol, bool *separated,
72 size_t *n_added);
73
74 // Base class method.
75 void write(std::ostream &out) const;
76
77 // Base class method.
78 void writeStats(std::ostream &out) const;
79
80 private:
82 double absTol_;
83
85 CutList disCuts_;
86
88 CutList enCuts_;
89
91 EnvPtr env_;
92
94 LoggerPtr logger_;
95
97 size_t maxDisCutAge_;
98
103 size_t maxInactCutAge_;
104
106 const static std::string me_;
107
112 CutList newCuts_;
113
115 ProblemPtr p_;
116
117 CutList pool_;
118
119 void addToRel_(CutPtr cons, bool new_cut);
120
121 void addToPool_(CutPtr cons);
122 };
123
124} //namespace Minotaur
125#endif
Manages addition and deletion of cuts to problem.
Declare important 'types' used in Minotaur.
The Constraint class is used to manage a constraint.
Definition: Constraint.h:61
Derived class for managing cuts. Add and remove cuts based on priority and violation.
Definition: CutMan1.h:27
void addCut(CutPtr c)
Add a cut to be managed by the cut manager.
Definition: CutMan1.cpp:168
void addCuts(CutVectorIter cbeg, CutVectorIter cend)
Add a cut to be managed by the cut manager. The cut is not added to the problem by this function (See...
Definition: CutMan1.cpp:174
size_t getNumCuts() const
Get the total number of cuts available to the manager.
Definition: CutMan1.cpp:65
void write(std::ostream &out) const
Write cuts to output.
Definition: CutMan1.cpp:196
size_t getNumDisabledCuts() const
Get the total number of cuts currently not enabled.
Definition: CutMan1.cpp:77
CutMan1()
Empty constructor.
Definition: CutMan1.cpp:36
void separate(ProblemPtr p, ConstSolutionPtr sol, bool *separated, size_t *n_added)
Separate a given point using the cuts in the storage.
Definition: CutMan1.cpp:136
void postSolveUpdate(ConstSolutionPtr sol, EngineStatus eng_status)
Definition: CutMan1.cpp:90
size_t getNumNewCuts() const
Get the total number of cuts added to manager (but not to problem) before the last call to separate()...
Definition: CutMan1.cpp:83
void writeStats(std::ostream &out) const
Write statistics to output.
Definition: CutMan1.cpp:202
size_t getNumEnabledCuts() const
Get the total number of cuts currently enabled, i.e., added to the relaxation.
Definition: CutMan1.cpp:71
~CutMan1()
Destroy.
Definition: CutMan1.cpp:58
ConstraintPtr addCut(ProblemPtr, FunctionPtr, double, double, bool, bool)
Add a cut.
Definition: CutMan1.h:47
Abstract base class to manage cuts in the relaxation.
Definition: CutManager.h:42
Store function, bounds and other information about a cut.
Definition: Cut.h:52
Definition: Environment.h:28
Definition: Function.h:37
Definition: Logger.h:37
Definition: Problem.h:74
Definition: Solution.h:30
Definition: ActiveNodeStore.h:20
EngineStatus
Different status that an external engine may report.
Definition: Types.h:176

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