Minotaur 0.4.1
Docs for developers
SimpleCutMan.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 MINOTAURSIMPLECUTMAN_H
14#define MINOTAURSIMPLECUTMAN_H
15
16#include <list>
17#include "CutManager.h"
18#include "Types.h"
19
20
21namespace Minotaur {
22
30 class SimpleCutMan : public CutManager {
31
32 public:
35
43
46
47 // Base class method.
48 void addCut(CutPtr c);
49
50 // Base class method.
51 ConstraintPtr addCut(ProblemPtr p, FunctionPtr f, double lb, double ub,
52 bool directToRel, bool neverDelete);
53
54 // Base class method.
55 void addCuts(CutVectorIter cbeg, CutVectorIter cend);
56
57 // Base class method.
58 size_t getNumCuts() const;
59
60 // Base class method.
61 size_t getNumEnabledCuts() const;
62
63 // Base class method.
64 size_t getNumDisabledCuts() const;
65
66 // Base class method.
67 size_t getNumNewCuts() const;
68
69 // Base class method.
70 void postSolveUpdate(ConstSolutionPtr sol, EngineStatus eng_status);
71
72 // Base class method.
73 void separate(ProblemPtr p, ConstSolutionPtr sol, bool *separated,
74 size_t *added);
75
76 // Base class method.
77 void write(std::ostream &out) const;
78
79 // Base class method.
80 void writeStats(std::ostream &out) const;
81
82 private:
84 size_t enCuts_;
85
87 EnvPtr env_;
88
90 LoggerPtr logger_;
91
93 const static std::string me_;
94
99 CutList newCuts_;
100
102 ProblemPtr p_;
103
106 CutList pool_;
107
109 double violAbs_;
110
113 double violRel_;
114
116 void mvNewToPool_();
117 };
118
119 //typedef CutManager* CutManagerPtr;
120} //namespace Minotaur
121#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
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
Derived class for managing cuts. Adds all violated cuts from the storage to the relaxation and never ...
Definition: SimpleCutMan.h:30
size_t getNumNewCuts() const
Get the total number of cuts added to manager (but not to problem) before the last call to separate()...
Definition: SimpleCutMan.cpp:103
void writeStats(std::ostream &out) const
Write statistics to output.
Definition: SimpleCutMan.cpp:173
size_t getNumDisabledCuts() const
Get the total number of cuts currently not enabled.
Definition: SimpleCutMan.cpp:97
SimpleCutMan()
Empty constructor.
Definition: SimpleCutMan.cpp:36
size_t getNumCuts() const
Get the total number of cuts available to the manager.
Definition: SimpleCutMan.cpp:85
size_t getNumEnabledCuts() const
Get the total number of cuts currently enabled, i.e., added to the relaxation.
Definition: SimpleCutMan.cpp:91
void write(std::ostream &out) const
Write cuts to output.
Definition: SimpleCutMan.cpp:167
void postSolveUpdate(ConstSolutionPtr sol, EngineStatus eng_status)
Definition: SimpleCutMan.cpp:117
void separate(ProblemPtr p, ConstSolutionPtr sol, bool *separated, size_t *added)
Separate a given point using the cuts in the storage.
Definition: SimpleCutMan.cpp:122
~SimpleCutMan()
Destroy.
Definition: SimpleCutMan.cpp:56
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: SimpleCutMan.cpp:77
void addCut(CutPtr c)
Add a cut to be managed by the cut manager.
Definition: SimpleCutMan.cpp:62
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