Minotaur 0.4.1
Docs for developers
|
#include <ParNodeIncRelaxer.h>
Public Member Functions | |
ParNodeIncRelaxer (EnvPtr env, HandlerVector handlers) | |
Default constructor. | |
~ParNodeIncRelaxer () | |
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. | |
![]() | |
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 |
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.
|
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.
[in] | node | the node for which relaxation is created |
[in] | dived | is true if we dived down from the previous node, i.e. if this node is processed right after its parent. |
[out] | prune | is true if the node was found to be infeasible after creating the relaxation. |
Implements Minotaur::NodeRelaxer.
|
virtual |
Create the root node relaxation.
[in] | rootNode | A pointer to root node. |
[out] | prune | is 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. |
Implements Minotaur::NodeRelaxer.
|
virtual |
Return a pointer to the last relaxation that was created by this relaxer.
Implements Minotaur::NodeRelaxer.
|
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.
void ParNodeIncRelaxer::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.
[in] | e | Engine that will be modified whenever a new node is about to be processed. |