Loading...
Searching...
No Matches
idol::CallbackAsBranchAndBoundCallback< NodeInfoT >::Strategy Class Reference

Description

template<class NodeInfoT>
class idol::CallbackAsBranchAndBoundCallback< NodeInfoT >::Strategy

Definition at line 26 of file CallbackAsBranchAndBoundCallback.h.

Protected Methods

 Strategy (Callback *t_cb)
void operator() (CallbackEvent t_event) override
virtual void initialize ()
virtual void log_after_termination ()
void add_user_cut (const TempCtr &t_cut)
void add_lazy_cut (const TempCtr &t_cut)
void add_local_variable_branching (const Var &t_var, CtrType t_type, double t_rhs)
const Node< NodeInfoT > & node () const
const Modelrelaxation () const
const Modeloriginal_model () const
void submit_heuristic_solution (NodeInfoT *t_info)
void submit_bound (double t_bound)
const SideEffectRegistryside_effect_registry () const
const Timertime () const
double best_bound () const
double best_obj () const
void terminate ()

Friends

class ::idol::CallbackAsBranchAndBoundCallback< NodeInfoT >

Constructor & Destructor Documentation

◆ Strategy()

template<class NodeInfoT>
idol::CallbackAsBranchAndBoundCallback< NodeInfoT >::Strategy::Strategy ( Callback * t_cb)
inlineexplicitprotected

Definition at line 80 of file CallbackAsBranchAndBoundCallback.h.

Methods Documentation

◆ add_lazy_cut()

template<class NodeInfoT>
void idol::BranchAndBoundCallback< NodeInfoT >::add_lazy_cut ( const TempCtr & t_cut)
protectedinherited

Adds a lazy cut to the relaxation

Parameters
t_cutthe cut to be added

Definition at line 286 of file BranchAndBoundCallback.h.

◆ add_local_variable_branching()

template<class NodeInfoT>
void idol::BranchAndBoundCallback< NodeInfoT >::add_local_variable_branching ( const Var & t_var,
CtrType t_type,
double t_rhs )
protectedinherited

Definition at line 220 of file BranchAndBoundCallback.h.

◆ add_user_cut()

template<class NodeInfoT>
void idol::BranchAndBoundCallback< NodeInfoT >::add_user_cut ( const TempCtr & t_cut)
protectedinherited

Adds a user cut to the relaxation

Parameters
t_cutthe cut to be added

Definition at line 292 of file BranchAndBoundCallback.h.

◆ best_bound()

template<class NodeInfoT>
double idol::BranchAndBoundCallback< NodeInfoT >::best_bound ( ) const
nodiscardprotectedinherited

Definition at line 232 of file BranchAndBoundCallback.h.

◆ best_obj()

template<class NodeInfoT>
double idol::BranchAndBoundCallback< NodeInfoT >::best_obj ( ) const
nodiscardprotectedinherited

Definition at line 226 of file BranchAndBoundCallback.h.

◆ initialize()

template<class NodeInfoT>
virtual void idol::BranchAndBoundCallback< NodeInfoT >::initialize ( )
inlineprotectedvirtualinherited

This method is called at the very beginning of the Branch-and-Bound algorithm

Reimplemented in idol::Cuts::KnapsackCover< NodeInfoT >::Strategy.

Definition at line 139 of file BranchAndBoundCallback.h.

◆ log_after_termination()

template<class NodeInfoT>
virtual void idol::BranchAndBoundCallback< NodeInfoT >::log_after_termination ( )
inlineprotectedvirtualinherited

Definition at line 147 of file BranchAndBoundCallback.h.

◆ node()

template<class NodeInfoT>
const idol::Node< NodeInfoT > & idol::BranchAndBoundCallback< NodeInfoT >::node ( ) const
nodiscardprotectedinherited

Returns the node which is currently explored

Returns
the node which is currently explored

Definition at line 280 of file BranchAndBoundCallback.h.

◆ operator()()

template<class NodeInfoT>
void idol::CallbackAsBranchAndBoundCallback< NodeInfoT >::Strategy::operator() ( CallbackEvent t_event)
inlineoverrideprotectedvirtual

This method is left for the user to write and consists in the main execution block of the callback.

Parameters
t_eventThe event triggering the callback

Implements idol::BranchAndBoundCallback< NodeInfoT >.

Definition at line 82 of file CallbackAsBranchAndBoundCallback.h.

◆ original_model()

template<class NodeInfoT>
const idol::Model & idol::BranchAndBoundCallback< NodeInfoT >::original_model ( ) const
nodiscardprotectedinherited

Returns the original model from which the branch-and-bound algorithm started (i.e., the original non-relaxed model)

Returns
the original model

Definition at line 268 of file BranchAndBoundCallback.h.

◆ relaxation()

template<class NodeInfoT>
const idol::Model & idol::BranchAndBoundCallback< NodeInfoT >::relaxation ( ) const
nodiscardprotectedinherited

Returns the current node's model being solved

Returns
the current node's model being solved

Definition at line 274 of file BranchAndBoundCallback.h.

◆ side_effect_registry()

template<class NodeInfoT>
const idol::SideEffectRegistry & idol::BranchAndBoundCallback< NodeInfoT >::side_effect_registry ( ) const
nodiscardprotectedinherited

Returns the side effect registry

Returns
the side effect registry

Definition at line 244 of file BranchAndBoundCallback.h.

◆ submit_bound()

template<class NodeInfoT>
void idol::BranchAndBoundCallback< NodeInfoT >::submit_bound ( double t_bound)
protectedinherited

Submits a new proven bound.

The given bound is set as best bound if and only if it improves the current best bound.

Parameters
t_bounda proven bound

Definition at line 256 of file BranchAndBoundCallback.h.

◆ submit_heuristic_solution()

template<class NodeInfoT>
void idol::BranchAndBoundCallback< NodeInfoT >::submit_heuristic_solution ( NodeInfoT * t_info)
protectedinherited

Submits a new solution to the branch-and-bound tree algorithm.

The solution is checked for validity according to the branch-and-bound tree branching rule and is set as incumbent if and only if it is valid and improves the current best objective.

Parameters
t_infoa node information storing the solution

Definition at line 262 of file BranchAndBoundCallback.h.

◆ terminate()

template<class NodeInfoT>
void idol::BranchAndBoundCallback< NodeInfoT >::terminate ( )
protectedinherited

Definition at line 238 of file BranchAndBoundCallback.h.

◆ time()

template<class NodeInfoT>
const idol::Timer & idol::BranchAndBoundCallback< NodeInfoT >::time ( ) const
nodiscardprotectedinherited

Definition at line 250 of file BranchAndBoundCallback.h.

◆ ::idol::CallbackAsBranchAndBoundCallback< NodeInfoT >

template<class NodeInfoT>
friend class ::idol::CallbackAsBranchAndBoundCallback< NodeInfoT >
friend

Definition at line 95 of file CallbackAsBranchAndBoundCallback.h.