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

A class to select a variable for branching using maximum-frequency branching. More...

#include <MaxFreqBrancher.h>

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

Public Member Functions

 MaxFreqBrancher (EnvPtr env, HandlerVector &handlers)
 Construct using an environment pointer and initialize .
 
 ~MaxFreqBrancher ()
 Destroy.
 
Branches findBranches (RelaxationPtr rel, NodePtr node, ConstSolutionPtr sol, SolutionPoolPtr s_pool, BrancherStatus &br_status, ModVector &mods)
 Find a branching candidate. More...
 
virtual void updateAfterSolve (NodePtr, ConstSolutionPtr)
 Update pseudo-costs after LP is solved. More...
 
void writeStats (std::ostream &out) const
 Write statistics to the given out stream. More...
 
std::string getName () const
 Return the name of this brancher. More...
 
void initialize (RelaxationPtr rel)
 Initialize data structures. More...
 
- Public Member Functions inherited from Minotaur::Brancher
 Brancher ()
 Default constructor.
 
virtual ~Brancher ()
 Destroy.
 
virtual Branches findBranches (RelaxationPtr rel, NodePtr node, ConstSolutionPtr sol, SolutionPoolPtr s_pool, BrancherStatus &br_status, ModVector &mods)=0
 Find a branching candidate. More...
 
virtual std::string getName () const =0
 Return the name of this brancher. More...
 
virtual void updateAfterSolve (NodePtr node, ConstSolutionPtr sol)
 Update pseudo-costs after LP is solved. More...
 
virtual void writeStats (std::ostream &) const
 Write statistics to the given out stream. More...
 

Additional Inherited Members

- Protected Attributes inherited from Minotaur::Brancher
LoggerPtr logger_
 Log manager.
 

Detailed Description

A class to select a variable for branching using maximum-frequency branching.

Member Function Documentation

◆ findBranches()

Branches MaxFreqBrancher::findBranches ( RelaxationPtr  rel,
NodePtr  node,
ConstSolutionPtr  sol,
SolutionPoolPtr  s_pool,
BrancherStatus br_status,
ModVector &  mods 
)
virtual

Find a branching candidate.

Returns
NULL if x does not have any fractional values for integer constrained variables or if no branching candidates are found (e.g. when we realize that problem is infeasible).
Parameters
[in]relRelaxation at the current node.
[in]nodeThe current node.
[in]solThe solution at the current node.
[in]s_poolSolution pool containing known feasible solutions.
[out]br_statusStatus returned by this brancher.
[out]modsModification returned by this brancher. NULL if none found.

Implements Minotaur::Brancher.

◆ getName()

std::string MaxFreqBrancher::getName ( ) const
virtual

Return the name of this brancher.

Implements Minotaur::Brancher.

◆ initialize()

void MaxFreqBrancher::initialize ( RelaxationPtr  rel)

Initialize data structures.

Parameters
[in]relRelaxation for which this brancher is used.

◆ updateAfterSolve()

void MaxFreqBrancher::updateAfterSolve ( NodePtr  node,
ConstSolutionPtr  sol 
)
virtual

Update pseudo-costs after LP is solved.

Parameters
[in]nodeThe node for which relaxation is solved. The pseudo cost of branching candidate used in node->parent is updated.
[in]solThe solution of the relaxation at this node (not the parent).

Reimplemented from Minotaur::Brancher.

◆ writeStats()

void MaxFreqBrancher::writeStats ( std::ostream &  ) const
virtual

Write statistics to the given out stream.

Reimplemented from Minotaur::Brancher.


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