|
Camargue
|
Information about the active tour in a CoreLP. More...
#include <active_tour.hpp>

Public Member Functions | |
| ActiveTour (const Graph::CoreGraph &graph, const Data::BestGroup &best_data) | |
| An ActiveTour for a new CoreLP using the Padberg-Hong approach. More... | |
| ActiveTour (std::vector< int > tour_nodes_, std::vector< double > lp_edges, Basis base, double lp_objval, const Graph::CoreGraph &graph) | |
| Construct from an augmenting pivot/dfs island. | |
| ActiveTour (std::vector< int > tour_nodes_, LP::Relaxation &relax, const Graph::CoreGraph &graph) | |
Construct a new ActiveTour from scratch, instating it in relax. More... | |
| ActiveTour (ActiveTour &&T) noexcept | |
| ActiveTour & | operator= (ActiveTour &&T) noexcept |
| void | set_basis (Basis new_base) |
| void | instate (Relaxation &relax) |
Instate this tour in relax. More... | |
| void | reset_instate (Relaxation &relax) |
Get a new basis for this tour from relax, instating it. More... | |
| void | best_update (Data::BestGroup &best_data) const |
Update best_data with the this tour. More... | |
| void | enter_tourless (Data::BestGroup &best_data) |
| Go into tourless mode of operation with best tour. | |
| double | length () const |
| bool | tourless () const |
| const std::vector< int > & | nodes () const |
| const std::vector< int > & | tour_perm () const |
| const std::vector< double > & | edges () const |
| const Basis & | base () const |
Private Attributes | |
| double | tour_len |
| std::vector< int > | tour_nodes |
| std::vector< int > | perm |
| std::vector< double > | tour_edges |
| Basis | tour_base |
| bool | tourless_mode = false |
Information about the active tour in a CoreLP.
This class stores the tour which will be used to generate cuts and perform pivots. It should be used in a CoreLP in cooperation with a BestGroup, although they need not store the same tour.
| CMR::LP::ActiveTour::ActiveTour | ( | const Graph::CoreGraph & | graph, |
| const Data::BestGroup & | best_data | ||
| ) |
An ActiveTour for a new CoreLP using the Padberg-Hong approach.
Constructs an ActiveTour with basis using the Padberg-Hong algorithm for getting a basis from a tour for an LP relaxation with only the degree constraints.
| graph | the CoreGraph on which the tour was found. |
| best_data | the data which will be used to directly initialize all members except tour_base. |
| CMR::LP::ActiveTour::ActiveTour | ( | std::vector< int > | tour_nodes_, |
| LP::Relaxation & | relax, | ||
| const Graph::CoreGraph & | graph | ||
| ) |
Construct a new ActiveTour from scratch, instating it in relax.
Construct an ActiveTour from scratch, using pure combinatorial data, and then instate it in an LP::Relxation.
| tour_nodes_ | the sequence of nodes defining the tour. |
| relax | the LP::Relaxation in which to instate the tour. |
| graph | the CoreGraph describing the edge set of relax. |
tour_nodes_ is moved from. | void CMR::LP::ActiveTour::best_update | ( | Data::BestGroup & | best_data | ) | const |
Update best_data with the this tour.
This method will update the BestGroup best_data with the stored information in this ActiveTour.
This method will verify that the tour is indeed an improvement on the one currently in best_data, throwing an exception if it is worse or if the edge vector is generated incorrectly.
| void CMR::LP::ActiveTour::instate | ( | Relaxation & | relax | ) |
Instate this tour in relax.
This function will try to instate this tour in relax, first by copying the tour edges and basic statuses, and then by generating a new basis if that fails.
| void CMR::LP::ActiveTour::reset_instate | ( | Relaxation & | relax | ) |
Get a new basis for this tour from relax, instating it.
Instate this ActiveTour in relax by constructing a new basis for it and setting said basis (along with this tour) as the starting solution.
1.8.11