Minotaur 0.4.1
Docs for developers
Public Member Functions | List of all members
Minotaur::NodeRelaxer Class Referenceabstract

#include <NodeRelaxer.h>

Inheritance diagram for Minotaur::NodeRelaxer:
Inheritance graph
[legend]

Public Member Functions

 NodeRelaxer ()
 Default constructor.
 
virtual ~NodeRelaxer ()
 Destroy.
 
virtual RelaxationPtr createRootRelaxation (NodePtr rootNode, SolutionPool *sp, bool &prune)=0
 Create the root node relaxation. More...
 
virtual RelaxationPtr createNodeRelaxation (NodePtr node, bool dived, bool &prune)=0
 
virtual void reset (NodePtr node, bool diving)=0
 
virtual RelaxationPtr getRelaxation ()=0
 

Detailed Description

NodeRelaxer class is used to create relaxations for nodes in a tree. The relaxation at a node can be created in different ways, depending upon the problem and the algorithm used. For instance, in NLP-BB, we can simply relax the integrality constraints. In this case, we can just keep one copy of the relaxation and change bounds in different nodes. For LP based branch-and-reduce, the relaxation could be very different in a node, and we may want to create new relaxation in every node.

Relaxations are created using handlers. Therefore, the NodeRelaxer must have compatible handlers. For instance, we can not have a handler return cuts in NLP-BB. Also, we can not have handler branch on a new variable created in a relaxation, if we are creating in each node, new relaxations from scratch.

This is the abstract base class.

Member Function Documentation

◆ createNodeRelaxation()

virtual RelaxationPtr Minotaur::NodeRelaxer::createNodeRelaxation ( NodePtr  node,
bool  dived,
bool &  prune 
)
pure virtual

Create a relaxation for the current node. Relaxation can be an incremental change to an existing relaxation or it can be a new relaxation created from scratch.

Parameters
[in]nodethe node for which relaxation is created
[in]divedis true if we dived down from the previous node, i.e. if this node is processed right after its parent.
[out]pruneis true if the node was found to be infeasible after creating the relaxation.

Implemented in Minotaur::NodeFullRelaxer, Minotaur::NodeIncRelaxer, and Minotaur::ParNodeIncRelaxer.

◆ createRootRelaxation()

virtual RelaxationPtr Minotaur::NodeRelaxer::createRootRelaxation ( NodePtr  rootNode,
SolutionPool sp,
bool &  prune 
)
pure virtual

Create the root node relaxation.

Parameters
[in]rootNodeA pointer to root node.
[out]pruneis true if the root node can be pruned, either because the relaxation is found to be infeasible or because a trivial solution has been found.
Returns
a pointer to the relaxation. The method must create a relaxation even if we want to prune the root node.

Implemented in Minotaur::NodeFullRelaxer, Minotaur::NodeIncRelaxer, and Minotaur::ParNodeIncRelaxer.

◆ getRelaxation()

virtual RelaxationPtr Minotaur::NodeRelaxer::getRelaxation ( )
pure virtual

Return a pointer to the last relaxation that was created by this relaxer.

Implemented in Minotaur::NodeFullRelaxer, Minotaur::NodeIncRelaxer, and Minotaur::ParNodeIncRelaxer.

◆ reset()

virtual void Minotaur::NodeRelaxer::reset ( NodePtr  node,
bool  diving 
)
pure virtual

After processing the node, some node relaxers may like to make changes. This function is the place to do it. diving is true if the next node to be processed is a child node of the current node.

Implemented in Minotaur::NodeFullRelaxer, Minotaur::NodeIncRelaxer, and Minotaur::ParNodeIncRelaxer.


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

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