Camargue
meta_sep.hpp
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
7 #ifndef CMR_META_SEP_H
8 #define CMR_META_SEP_H
9 
10 #include "active_tour.hpp"
11 #include "hypergraph.hpp"
12 #include "datagroups.hpp"
13 #include "cc_lpcuts.hpp"
14 
15 #include <iostream>
16 #include <unordered_map>
17 #include <utility>
18 #include <vector>
19 
20 namespace CMR {
21 namespace Sep {
22 
24 class MetaCuts {
25 public:
26  MetaCuts(const ExternalCuts &EC_,
27  const std::vector<Graph::Edge> &core_edges_,
28  const LP::ActiveTour &active_tour_,
29  Data::SupportGroup &s_dat);
30 
32  enum class Type {
33  Decker,
34  Handling,
35  Teething,
36  };
37 
38  bool find_cuts(Type meta_type);
39 
40  bool tighten_cuts();
41 
42  LPcutList &metacuts_q() { return meta_q; }
43 
44  bool verbose = false;
45  bool filter_primal = true;
46 
47 private:
49  bool price_combs(bool tighten);
50 
52  bool above_threshold(int num_paths);
53 
54  bool attempt_sep();
55 
56  void price_cliques();
57 
58  bool pure_comb(CCtsp_lpcut_in &c);
59 
60  std::unordered_map<Clique, double> clique_vals;
61 
62  using HGitr = std::vector<HyperGraph>::const_iterator;
63  std::vector<HGitr> interest_combs;
64 
65  const ExternalCuts &EC;
66 
67  const std::vector<Graph::Edge> &core_edges;
68  const LP::ActiveTour &active_tour;
69  Data::SupportGroup &supp_data;
70 
71  TourGraph TG;
72  std::vector<int> perm_elist;
73 
74  LPcutList meta_q;
75 };
76 
77 std::ostream &operator<<(std::ostream &os, MetaCuts::Type t);
78 
79 }
80 }
81 
82 #endif
Support graph data for an LP solution.
Definition: datagroups.hpp:174
bool above_threshold(int num_paths)
Used by attempt_sep to determine if num_paths is high enough.
Definition: meta_sep.cpp:375
Type
Categories of implemented cut metamorphoses.
Definition: meta_sep.hpp:32
Representing cuts outside the LP solver.
Management of Concorde lpcut_in linked list.
Definition: cc_lpcuts.hpp:56
The external storage of a collection of HyperGraph cuts in a Relaxation.
Definition: hypergraph.hpp:126
Data group structures.
Information about the active tour in a CoreLP.
Definition: active_tour.hpp:30
bool price_combs(bool tighten)
Price all comb-like cuts in LP; return true iff some are of interest.
Definition: meta_sep.cpp:343
bool pure_comb(CCtsp_lpcut_in &c)
Is c a pure comb.
Definition: meta_sep.cpp:453
The namespace for this project.
Definition: abc_nodesel.hpp:20
bool attempt_sep()
Should separation be attempted at all.
Definition: meta_sep.cpp:385
Monitoring the active tour in the solution process.
Wrappers for Concorde cut structures/separators.
Separation of cut metamorphoses.
Definition: meta_sep.hpp:24
Wrapper to Concorde CCtsp_lpgraph for pricing cuts at tours.
Definition: cc_lpcuts.hpp:28
void price_cliques()
Price all the Cliques in the LP.
Definition: meta_sep.cpp:410