Minotaur 0.4.1
Docs for developers
Classes | Public Member Functions | List of all members
Minotaur::CutMan2 Class Reference
Inheritance diagram for Minotaur::CutMan2:
Inheritance graph
[legend]
Collaboration diagram for Minotaur::CutMan2:
Collaboration graph
[legend]

Classes

struct  ctMngrInfo
 

Public Member Functions

 CutMan2 ()
 Default constructor.
 
 CutMan2 (EnvPtr env, ProblemPtr p)
 Constructor that loads the relaxation problem.
 
 ~CutMan2 ()
 Destroy.
 
void addCut (CutPtr c)
 Add a cut to be managed by the cut manager. More...
 
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 separate() for it). More...
 
size_t getNumCuts () const
 Get the total number of cuts available to the manager. More...
 
size_t getNumEnabledCuts () const
 Get the total number of cuts currently enabled, i.e., added to the relaxation. More...
 
size_t getNumDisabledCuts () const
 Get the total number of cuts currently not enabled. More...
 
size_t getNumNewCuts () const
 Get the total number of cuts added to manager (but not to problem) before the last call to separate() or postSolveUpdate(). More...
 
ConstraintPtr addCut (ProblemPtr rel, FunctionPtr fn, double lb, double ub, bool directToRel, bool neverDelete)
 Add a cut. More...
 
void NodeIsBranched (NodePtr node, ConstSolutionPtr sol, int num)
 
void NodeIsProcessed (NodePtr node)
 
void postSolveUpdate (ConstSolutionPtr, EngineStatus)
 
void separate (ProblemPtr, ConstSolutionPtr, bool *, size_t *)
 Separate a given point using the cuts in the storage. More...
 
void updatePool (ProblemPtr rel, ConstSolutionPtr sol)
 Update information of the cuts in the pool. More...
 
void updateRel (ConstSolutionPtr sol, ProblemPtr rel)
 Update information about cuts in the relaxation. More...
 
void write (std::ostream &out) const
 Write cuts to output. More...
 
void writeStats (std::ostream &out) const
 Write statistics to output. More...
 
void writeStat ()
 
ctMngrInfo getInfo ()
 
- Public Member Functions inherited from Minotaur::CutManager
 CutManager ()
 Empty constructor.
 
virtual ~CutManager ()
 Destroy.
 
virtual void addCut (CutPtr c)=0
 Add a cut to be managed by the cut manager. More...
 
virtual void addCutToPool (CutPtr c)=0
 Add a cut to the pool managed by the cut manager. More...
 
virtual ConstraintPtr addCut (ProblemPtr p, FunctionPtr f, double lb, double ub, bool direct_to_rel, bool never_del)=0
 Add a cut. More...
 
virtual void addCuts (CutVectorIter cbeg, CutVectorIter cend)=0
 Add a cut to be managed by the cut manager. The cut is not added to the problem by this function (See separate() for it). More...
 
virtual size_t getNumCuts () const =0
 Get the total number of cuts available to the manager. More...
 
virtual size_t getNumEnabledCuts () const =0
 Get the total number of cuts currently enabled, i.e., added to the relaxation. More...
 
virtual size_t getNumDisabledCuts () const =0
 Get the total number of cuts currently not enabled. More...
 
virtual size_t getNumNewCuts () const =0
 Get the total number of cuts added to manager (but not to problem) before the last call to separate() or postSolveUpdate(). More...
 
virtual std::vector< ConstraintPtrgetPoolCons ()=0
 
virtual void nodeIsBranched (NodePtr, ConstSolutionPtr, int)
 Update information on a node which is branched. More...
 
virtual void nodeIsProcessed (NodePtr)
 Update information when a node is processed. More...
 
virtual void postSolveUpdate (ConstSolutionPtr sol, EngineStatus e_status)=0
 
virtual void separate (ProblemPtr p, ConstSolutionPtr sol, bool *separated, size_t *n_added)=0
 Separate a given point using the cuts in the storage. More...
 
virtual void updatePool (ProblemPtr, ConstSolutionPtr)
 Update information of the cuts in the pool. More...
 
virtual void updateRel (ConstSolutionPtr, ProblemPtr)
 Update information about cuts in the relaxation. More...
 
virtual void write (std::ostream &out) const =0
 Write cuts to output. More...
 
virtual void writeStats (std::ostream &out) const =0
 Write statistics to output. More...
 

Member Function Documentation

◆ addCut() [1/2]

void CutMan2::addCut ( CutPtr  c)
virtual

Add a cut to be managed by the cut manager.

Parameters
[in]cCut pointer to be added. Do not change a cut after it is added.

Implements Minotaur::CutManager.

◆ addCut() [2/2]

ConstraintPtr CutMan2::addCut ( ProblemPtr  p,
FunctionPtr  f,
double  lb,
double  ub,
bool  direct_to_rel,
bool  never_del 
)
virtual

Add a cut.

Parameters
[in]pProblem to add a cut to
[in]fFunction of the cut
[in]lbLower bound
[in]ubUpper bound
[in]direct_to_relWhether add the cut directly to rel
[in]never_delWhether the cut should always remain in the pool
Returns
A pointer to the constraint added to rel

Implements Minotaur::CutManager.

◆ addCuts()

void CutMan2::addCuts ( CutVectorIter  cbeg,
CutVectorIter  cend 
)
virtual

Add a cut to be managed by the cut manager. The cut is not added to the problem by this function (See separate() for it).

Parameters
[in]cbeg'Begin' iterator of the vector of cuts to be added.
[in]cend'End' iterator of the vector of cuts to be added.

Implements Minotaur::CutManager.

◆ getNumCuts()

size_t Minotaur::CutMan2::getNumCuts ( ) const
inlinevirtual

Get the total number of cuts available to the manager.

Implements Minotaur::CutManager.

◆ getNumDisabledCuts()

size_t Minotaur::CutMan2::getNumDisabledCuts ( ) const
inlinevirtual

Get the total number of cuts currently not enabled.

Implements Minotaur::CutManager.

◆ getNumEnabledCuts()

size_t Minotaur::CutMan2::getNumEnabledCuts ( ) const
inlinevirtual

Get the total number of cuts currently enabled, i.e., added to the relaxation.

Implements Minotaur::CutManager.

◆ getNumNewCuts()

size_t Minotaur::CutMan2::getNumNewCuts ( ) const
inlinevirtual

Get the total number of cuts added to manager (but not to problem) before the last call to separate() or postSolveUpdate().

Implements Minotaur::CutManager.

◆ postSolveUpdate()

void Minotaur::CutMan2::postSolveUpdate ( ConstSolutionPtr  sol,
EngineStatus  e_status 
)
inlinevirtual

Updates information about the cuts after problem is solved. Also removes cuts from relaxation and/or the storage.

Parameters
[in]solSolution from previous solve.
[in]e_statusStatus of the engine

Implements Minotaur::CutManager.

◆ separate()

void Minotaur::CutMan2::separate ( ProblemPtr  p,
ConstSolutionPtr  sol,
bool *  separated,
size_t *  n_added 
)
inlinevirtual

Separate a given point using the cuts in the storage.

Parameters
[in]solSolution that needs to be separated.
[out]separatedTrue if solution is separated by cuts. False otherwise.
[out]n_addedThe number of cuts added by this routine to the problem.

Implements Minotaur::CutManager.

◆ updatePool()

void CutMan2::updatePool ( ProblemPtr  ,
ConstSolutionPtr   
)
virtual

Update information of the cuts in the pool.

Parameters
[in]problemPointer to the relaxation problem
[in]solSolution of the LP solve
[in]nodeNode in which information gets updated

Reimplemented from Minotaur::CutManager.

◆ updateRel()

void CutMan2::updateRel ( ConstSolutionPtr  ,
ProblemPtr   
)
virtual

Update information about cuts in the relaxation.

Parameters
[in]solSolution of the LP solve
[in]problemPointer to the relaxation problem

Reimplemented from Minotaur::CutManager.

◆ write()

void CutMan2::write ( std::ostream &  out) const
virtual

Write cuts to output.

Implements Minotaur::CutManager.

◆ writeStats()

void CutMan2::writeStats ( std::ostream &  out) const
virtual

Write statistics to output.

Implements Minotaur::CutManager.


The documentation for this class was generated from the following files:

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