idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy Class Reference
Inheritance diagram for idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy:
Inheritance graph
Collaboration diagram for idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy:
Collaboration graph

Public Member Functions

 Strategy (const OptimizerFactory &t_optimizer)
 
bool with_integer_columns () const
 
void set_integer_columns (bool t_value)
 
void set_time_limit (double t_time_limit)
 
void set_iteration_limit (unsigned int t_iteration_limit)
 
void set_max_depth (unsigned int t_max_depth)
 
void set_frequency (unsigned int t_frequency)
 

Protected Member Functions

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 ()
 

Detailed Description

template<class NodeInfoT = idol::DefaultNodeInfo>
class idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy

Definition at line 37 of file IntegerMaster.h.

Constructor & Destructor Documentation

◆ Strategy()

template<class NodeInfoT >
idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy::Strategy ( const OptimizerFactory t_optimizer)
explicit

Definition at line 170 of file IntegerMaster.h.

Member Function 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
protectedinherited

Definition at line 232 of file BranchAndBoundCallback.h.

◆ best_obj()

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

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
protectedinherited

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::Heuristics::IntegerMaster< NodeInfoT >::Strategy::operator() ( CallbackEvent  t_event)
overrideprotectedvirtual

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 176 of file IntegerMaster.h.

◆ original_model()

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

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
protectedinherited

Returns the current node's model being solved

Returns
the current node's model being solved

Definition at line 274 of file BranchAndBoundCallback.h.

◆ set_frequency()

template<class NodeInfoT = idol::DefaultNodeInfo>
void idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy::set_frequency ( unsigned int  t_frequency)
inline

Definition at line 60 of file IntegerMaster.h.

◆ set_integer_columns()

template<class NodeInfoT = idol::DefaultNodeInfo>
void idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy::set_integer_columns ( bool  t_value)
inline

Definition at line 52 of file IntegerMaster.h.

◆ set_iteration_limit()

template<class NodeInfoT = idol::DefaultNodeInfo>
void idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy::set_iteration_limit ( unsigned int  t_iteration_limit)
inline

Definition at line 56 of file IntegerMaster.h.

◆ set_max_depth()

template<class NodeInfoT = idol::DefaultNodeInfo>
void idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy::set_max_depth ( unsigned int  t_max_depth)
inline

Definition at line 58 of file IntegerMaster.h.

◆ set_time_limit()

template<class NodeInfoT = idol::DefaultNodeInfo>
void idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy::set_time_limit ( double  t_time_limit)
inline

Definition at line 54 of file IntegerMaster.h.

◆ side_effect_registry()

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

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
protectedinherited

Definition at line 250 of file BranchAndBoundCallback.h.

◆ with_integer_columns()

template<class NodeInfoT = idol::DefaultNodeInfo>
bool idol::Heuristics::IntegerMaster< NodeInfoT >::Strategy::with_integer_columns ( ) const
inline

Definition at line 50 of file IntegerMaster.h.