Minotaur 0.4.1
Docs for developers
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Minotaur::Branch Class Reference

Base class for storing branching modifications. More...

#include <Branch.h>

Collaboration diagram for Minotaur::Branch:
Collaboration graph
[legend]

Public Member Functions

 Branch ()
 Constructor.
 
 ~Branch ()
 Destroy.
 
void addPMod (ModificationPtr mod)
 Add a problem modification to the current vector of modifications associated with this branch. More...
 
void addRMod (ModificationPtr mod)
 Add a relaxation modification to the current vector of modifications associated with this branch. More...
 
void setBrCand (BrCandPtr cand)
 Set the candidate that was used to generate this branch. More...
 
ModificationConstIterator pModsBegin () const
 The first modification in the vector of modifications (problem).
 
ModificationConstIterator rModsBegin () const
 The first modification in the vector of modifications (relaxation).
 
ModificationConstIterator pModsEnd () const
 The last iterator of the vector of modifications (problem).
 
ModificationConstIterator rModsEnd () const
 The last iterator of the vector of modifications (relaxation).
 
ModificationRConstIterator pModsRBegin () const
 The reverse iterators are used for undoing the changes to the problem. It is important that the changes are reverted in the reverse order.
 
ModificationRConstIterator rModsRBegin () const
 The reverse iterators are used for undoing the changes to the relaxation. It is important that the changes are reverted in the reverse order.
 
ModificationRConstIterator pModsREnd () const
 The last reverse iterator for modifications for the problem. Corresponds to the first modification in the vector.
 
ModificationRConstIterator rModsREnd () const
 The last reverse iterator for modifications for the relaxation. Corresponds to the first modification in the vector.
 
double getActivity () const
 Return the activity or the value of the branching expression before we branched. Used for updating pseudo-costs.
 
void setActivity (double value)
 Set the activity or the value of the branching expression before we branched. More...
 
BrCandPtr getBrCand ()
 Return the branching candidate that was used to create this branch.
 
void write (std::ostream &out) const
 Write the branch to 'out'.
 

Protected Attributes

ModVector pMods_
 A vector of modifications of Problem that define this branch. More...
 
ModVector rMods_
 A vector of modifications of Relaxation that define this branch. More...
 
double activity_
 The value of the branching expression before we branched. More...
 
BrCandPtr brCand_
 Branching candidate that is used to create this branch.
 

Static Protected Attributes

static const std::string me_ = "Branch: "
 Name.
 

Detailed Description

Base class for storing branching modifications.

A Branch just has a vector of modifications. This vector of modifications can be applied to obtain a child node from the parent's relaxation. For each child node, we must have an associated Branch object. The object can also have other information (estimates on lower bounds of child etc).

Member Function Documentation

◆ addPMod()

void Branch::addPMod ( ModificationPtr  mod)

Add a problem modification to the current vector of modifications associated with this branch.

Parameters
[in]modThe modification that must be added to the child node.

◆ addRMod()

void Branch::addRMod ( ModificationPtr  mod)

Add a relaxation modification to the current vector of modifications associated with this branch.

Parameters
[in]modThe modification that must be added to the child node.

◆ setActivity()

void Branch::setActivity ( double  value)

Set the activity or the value of the branching expression before we branched.

Parameters
[in]valueThe value of activity.

◆ setBrCand()

void Minotaur::Branch::setBrCand ( BrCandPtr  cand)
inline

Set the candidate that was used to generate this branch.

Parameters
[in]candThe branching candidate that was used to create this branch.

Member Data Documentation

◆ activity_

double Minotaur::Branch::activity_
protected

The value of the branching expression before we branched.

If an integer variable has value 1.3 before branching, and we branch on it, the value is set at 1.3

◆ pMods_

ModVector Minotaur::Branch::pMods_
protected

A vector of modifications of Problem that define this branch.

A branch may have more than one modifications. For instance, fixing a variable to zero may have implications on bounds of other variables as well.

◆ rMods_

ModVector Minotaur::Branch::rMods_
protected

A vector of modifications of Relaxation that define this branch.

A branch may have more than one modifications. For instance, fixing a variable to zero may have implications on bounds of other variables as well.


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