Camargue
|
The external storage of a collection of HyperGraph cuts in a Relaxation. More...
#include <hypergraph.hpp>
Public Member Functions | |
ExternalCuts (const std::vector< int > &tour, const std::vector< int > &perm) | |
Construct ExternalCuts with reference tour and perm. | |
void | add_cut (const CCtsp_lpcut_in &cc_lpcut, const std::vector< int > ¤t_tour) |
Add a Concorde cut. | |
void | add_cut (const dominoparity &dp_cut, const double rhs, const std::vector< int > ¤t_tour) |
Add a simple DP cut. | |
void | add_cut (const std::vector< int > &blossom_handle, const std::vector< std::vector< int >> &tooth_edges) |
Add an ex_blossom cut. | |
void | add_cut (HyperGraph &H) |
Add a HyperGraph cut from a pool. More... | |
void | add_cut () |
Add a Non HyperGraph cut. More... | |
void | reset_ages () |
Reset the ages of all cuts to zero. | |
void | tour_age_cuts (std::vector< double > duals) |
Update tour ages. | |
void | piv_age_cuts (std::vector< double > duals) |
Update pivot ages. | |
void | del_cuts (std::vector< int > &delset) |
Delete a specified set of cuts or move them to the cut pool. More... | |
const HyperGraph & | get_cut (int lp_rownum) const |
Return a cut corresponding to a row number index from the lp. | |
const std::vector< HyperGraph > & | get_cuts () const |
int | cut_count () const |
int | pool_count () const |
const CliqueBank & | get_cbank () const |
const ToothBank & | get_tbank () const |
void | get_col (int end0, int end1, std::vector< int > &cmatind, std::vector< double > &cmatval) const |
Get the column associated with an edge to be added to the lp. More... | |
Private Member Functions | |
void | pool_add (HyperGraph H) |
Private Attributes | |
const int | node_count |
Number of nodes in the Instance being tracked. More... | |
CliqueBank | clique_bank |
Bank for adding and dispensing cliques. | |
ToothBank | tooth_bank |
Bank for adding and dispensing teeth. | |
CliqueBank | pool_cliques |
Bank of cliques for cuts in cut_pool. | |
std::vector< HyperGraph > | cuts |
List of the cuts in the CoreLP. | |
std::vector< HyperGraph > | cut_pool |
Pool of cuts pruned from CoreLP. | |
CCtsp_lpcuts * | cc_pool |
Concorde rep of cut pool. | |
CCtsp_cuttree | tightcuts |
Cut tree for separation routines. | |
Friends | |
class | Separator |
The external storage of a collection of HyperGraph cuts in a Relaxation.
void CMR::Sep::ExternalCuts::add_cut | ( | HyperGraph & | H | ) |
Add a HyperGraph cut from a pool.
This function is meant to be invoked after a call to PoolSep which takes H
from cut_pool and identifies that it is violated by the current LP solution, hence adding it back to the LP and the vector cuts.
void CMR::Sep::ExternalCuts::add_cut | ( | ) |
Add a Non HyperGraph cut.
Add a branching constraint or Non HyperGraph cut to the list.
Maintains indexing that agrees with the Relaxation for bookkeeping and cut pruning purposes.
void CMR::Sep::ExternalCuts::del_cuts | ( | std::vector< int > & | delset | ) |
Delete a specified set of cuts or move them to the cut pool.
delset | vector with nonzero entries indicating cuts to be deleted from an LP::Relaxation. |
delset[i] == 1
if get_cut(i)
is to be deleted immediately, and delset[i] == 3
if get_cut(i)
should be considered for addition to the cut pool. delset
will be binary valued with all 3's changed to 1's. void CMR::Sep::ExternalCuts::get_col | ( | int | end0, |
int | end1, | ||
std::vector< int > & | cmatind, | ||
std::vector< double > & | cmatval | ||
) | const |
Get the column associated with an edge to be added to the lp.
[in] | end0 | one end of the edge to be added |
[in] | end1 | the other end of the edge to be added |
[in,out] | cmatind | the indices of the rows having nonzero coefficients for the new edge |
[in,out] | cmatval | the coefficients corresponding to entries of cmatind . |
|
private |
Number of nodes in the Instance being tracked.
Used to compute offsets for indices of cuts from LP::Relaxation.