25 #ifndef PAGMO_PROBLEM_TSP_CS_H
26 #define PAGMO_PROBLEM_TSP_CS_H
28 #include <boost/array.hpp>
32 #include "./base_tsp.h"
33 #include "../serialization.h"
35 namespace pagmo {
namespace problem {
70 const std::vector<std::vector<double> >& get_weights()
const;
71 const std::vector<double>& get_values()
const;
72 double get_max_path_length()
const;
77 std::string get_name()
const;
78 std::string human_readable_extra()
const;
79 double distance(decision_vector::size_type, decision_vector::size_type)
const;
82 void find_subsequence(
const decision_vector &,
double &,
double &, decision_vector::size_type &, decision_vector::size_type &)
const;
86 void check_weights(
const std::vector<std::vector<double> >&)
const;
87 size_t compute_idx(
const size_t i,
const size_t j,
const size_t n)
const;
92 friend class boost::serialization::access;
93 template <
class Archive>
94 void serialize(Archive &ar,
const unsigned int)
96 ar & boost::serialization::base_object<base_tsp>(*this);
99 ar &
const_cast<double &
>(m_max_path_length);
100 ar & m_max_edge_length;
104 std::vector<std::vector<double> > m_weights;
105 std::vector<double> m_values ;
106 const double m_max_path_length;
107 double m_max_edge_length;
114 #endif //PAGMO_PROBLEM_TSP_CS_H
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
The City-Selection Travelling Salesman Problem.
encoding_type
Mechanism used to encode the sequence of vertices to be visited.
std::vector< double > fitness_vector
Fitness vector type.
std::vector< double > constraint_vector
Constraint vector type.
Base TSP (Travelling Salesman Problem).