25 #ifndef PAGMO_PROBLEM_TSP_DS_H
26 #define PAGMO_PROBLEM_TSP_DS_H
30 #include <keplerian_toolbox/planet/base.h>
31 #include <keplerian_toolbox/planet/jpl_low_precision.h>
32 #include <keplerian_toolbox/astro_constants.h>
35 #include "./base_tsp.h"
36 #include "../serialization.h"
39 namespace pagmo {
namespace problem {
63 const std::vector<kep_toolbox::planet::planet_ptr>& planets = {kep_toolbox::planet::jpl_lp(
"venus").clone(), kep_toolbox::planet::jpl_lp(
"earth").clone(), kep_toolbox::planet::jpl_lp(
"mars").clone()},
64 const std::vector<double>& values = {1.,1.,1.},
65 const double max_DV = 30000,
66 const std::vector<double>& epochs = {1200, 1550, 1940},
74 void find_subsequence(
const decision_vector &,
double &,
double &, decision_vector::size_type &, decision_vector::size_type &,
const bool =
false)
const;
78 const std::vector<kep_toolbox::planet::planet_ptr>& get_planets()
const;
79 const std::vector<double>& get_values()
const;
80 double get_max_DV()
const;
86 std::string get_name()
const;
87 std::string human_readable_extra()
const;
88 double distance(decision_vector::size_type, decision_vector::size_type)
const;
93 void check_weights(
const std::vector<std::vector<double> >&)
const;
94 size_t compute_idx(
const size_t i,
const size_t j,
const size_t n)
const;
99 double three_impulses(
double,
double,
double,
double,
double,
double,
double,
double)
const;
100 void precompute_ephemerides()
const;
102 double distance_3_imp(
const decision_vector::size_type,
const decision_vector::size_type,
const size_t)
const;
104 friend class boost::serialization::access;
105 template <
class Archive>
106 void serialize(Archive &ar,
const unsigned int)
108 ar & boost::serialization::base_object<base_tsp>(*this);
109 ar &
const_cast<std::vector<kep_toolbox::planet::planet_ptr> &
>(m_planets);
110 ar &
const_cast<std::vector<double> &
>(m_values);
111 ar &
const_cast<double &
>(m_max_DV);
112 ar &
const_cast<std::vector<double> &
>(m_epochs);
113 precompute_ephemerides();
117 const std::vector<kep_toolbox::planet::planet_ptr> m_planets;
118 const std::vector<double> m_values;
119 const double m_max_DV;
124 mutable std::vector<double> m_DV;
125 mutable std::vector<std::vector<kep_toolbox::array3D> >m_eph_r;
126 mutable std::vector<std::vector<kep_toolbox::array3D> >m_eph_v;
127 mutable std::vector<std::vector<kep_toolbox::array6D> >m_eph_el;
134 #endif //PAGMO_PROBLEM_TSP_DS_H
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
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).
The TSP - Debris Selection Problem.