Minotaur 0.4.1
Docs for developers
Public Member Functions | List of all members
Minotaur::NodeIncRelaxer Class Reference

#include <NodeIncRelaxer.h>

Inheritance diagram for Minotaur::NodeIncRelaxer:
Inheritance graph
[legend]
Collaboration diagram for Minotaur::NodeIncRelaxer:
Collaboration graph
[legend]

Public Member Functions

 NodeIncRelaxer (EnvPtr env, HandlerVector handlers)
 Default constructor.
 
 ~NodeIncRelaxer ()
 Destroy.
 
RelaxationPtr createRootRelaxation (NodePtr rootNode, SolutionPool *sp, bool &prune)
 Create the root node relaxation. More...
 
RelaxationPtr createNodeRelaxation (NodePtr node, bool dived, bool &prune)
 
bool getModFlag ()
 Get the current value of modProb_ flag.
 
void reset (NodePtr node, bool diving)
 
void setEngine (EnginePtr e)
 
void setModFlag (bool mod_prob)
 If mod_prob is true, the problem will also be modified at each node. By default, only the relaxation is modified.
 
RelaxationPtr getRelaxation ()
 
void setRelaxation (RelaxationPtr rel)
 Set your own relaxation pointer.
 
void setProblem (ProblemPtr p)
 Set the problem pointer.
 
- Public Member Functions inherited from Minotaur::NodeRelaxer
 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

The root relaxation is stored as rel_. In each node, we apply all modifications stored in each ancestor of the node. When we are done processing the node, we undo all these changes.

If we dive after processing a node, we do not need to undo all changes and apply them again. We just apply the modifications of the parent.

Member Function Documentation

◆ createNodeRelaxation()

RelaxationPtr NodeIncRelaxer::createNodeRelaxation ( NodePtr  node,
bool  dived,
bool &  prune 
)
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.

Implements Minotaur::NodeRelaxer.

◆ createRootRelaxation()

RelaxationPtr NodeIncRelaxer::createRootRelaxation ( NodePtr  rootNode,
SolutionPool sp,
bool &  prune 
)
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.

Implements Minotaur::NodeRelaxer.

◆ getRelaxation()

RelaxationPtr NodeIncRelaxer::getRelaxation ( )
virtual

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

Implements Minotaur::NodeRelaxer.

◆ reset()

void NodeIncRelaxer::reset ( NodePtr  node,
bool  diving 
)
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.

Implements Minotaur::NodeRelaxer.

◆ setEngine()

void NodeIncRelaxer::setEngine ( EnginePtr  e)

/brief Set the engine that is used to solve the relaxations. We need to set it in order to be able to load warm-starts at a node.

Parameters
[in]eEngine that will be modified whenever a new node is about to be processed.

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