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

#include <NodeFullRelaxer.h>

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

Public Member Functions

 NodeFullRelaxer (EnvPtr env, HandlerVector handlers)
 Default constructor.
 
 NodeFullRelaxer (EnvPtr env, EnginePtr e, HandlerVector handlers)
 If you know the engine, you can initialize it here.
 
 ~NodeFullRelaxer ()
 Destroy.
 
RelaxationPtr createRootRelaxation (NodePtr root, SolutionPool *sp, bool &prune)
 Create the root node relaxation. More...
 
RelaxationPtr createNodeRelaxation (NodePtr node, bool dived, bool &prune)
 
void reset (NodePtr node, bool diving)
 
void setEngine (EnginePtr e)
 
RelaxationPtr getRelaxation ()
 
void setRelaxation (RelaxationPtr rel)
 Set your own relaxation 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 NodeFullRelaxer::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 NodeFullRelaxer::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 NodeFullRelaxer::getRelaxation ( )
virtual

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

Implements Minotaur::NodeRelaxer.

◆ reset()

void NodeFullRelaxer::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 NodeFullRelaxer::setEngine ( EnginePtr  e)

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.


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