25 #ifndef PAGMO_PROBLEM_MGA_PART_H
26 #define PAGMO_PROBLEM_MGA_PART_H
29 #include <keplerian_toolbox/planet/gtoc6.h>
30 #include <keplerian_toolbox/astro_constants.h>
31 #include <keplerian_toolbox/epoch.h>
33 #include "../config.h"
34 #include "../serialization.h"
40 namespace pagmo{
namespace problem {
55 mga_part(
const std::vector<kep_toolbox::planet::planet_ptr> = construct_default_sequence(),
56 const std::vector<std::vector<double> > tof = construct_default_tofs(),
57 const kep_toolbox::epoch t0 = kep_toolbox::epoch(11000),
58 const kep_toolbox::array3D vinf_in = construct_default_v()
63 std::string get_name()
const;
64 std::string pretty(
const std::vector<double> &x)
const;
66 void set_tof(
const std::vector<std::vector<double> >&);
67 const std::vector<std::vector<double> >& get_tof()
const;
68 void set_t0(
const kep_toolbox::epoch&);
69 const kep_toolbox::epoch& get_t0()
const;
70 void set_vinf_in(
const kep_toolbox::array3D&);
71 const kep_toolbox::array3D& get_vinf_in()
const;
72 void set_betas(
const std::vector<std::vector<double> >&);
73 std::vector<std::vector<double> > get_betas()
const;
74 void set_rps(
const std::vector<std::vector<double> >&);
75 std::vector<std::vector<double> > get_rps()
const;
76 std::vector<kep_toolbox::planet::planet_ptr> get_sequence()
const;
79 std::string human_readable_extra()
const;
81 static const std::vector<kep_toolbox::planet::planet_ptr> construct_default_sequence() {
82 std::vector<kep_toolbox::planet::planet_ptr> retval;
83 retval.push_back(kep_toolbox::planet::gtoc6(
"europa").clone());
84 retval.push_back(kep_toolbox::planet::gtoc6(
"europa").clone());
85 retval.push_back(kep_toolbox::planet::gtoc6(
"europa").clone());
88 static const kep_toolbox::array3D construct_default_v() {
89 const kep_toolbox::array3D retval = { {1500.0,2350.0,145.0} };
92 static const std::vector<std::vector<double> > construct_default_tofs() {
93 std::vector<std::vector<double> > retval;
94 std::vector<double> dumb(2);
95 dumb[0] = 10;dumb[1] = 40;
96 retval.push_back(dumb);
97 dumb[0] = 10;dumb[1] = 40;
98 retval.push_back(dumb);
102 friend class boost::serialization::access;
103 template <
class Archive>
104 void serialize(Archive &ar,
const unsigned int)
106 ar & boost::serialization::base_object<base>(*this);
112 std::vector<kep_toolbox::planet::planet_ptr> m_seq;
113 std::vector<std::vector<double> > m_tof;
114 kep_toolbox::epoch m_t0;
115 kep_toolbox::array3D m_vinf_in;
121 #endif // PAGMO_PROBLEM_MGA_PART_H
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
A part of the GTOC6 Jupiter Capture Trajectory.
std::vector< double > fitness_vector
Fitness vector type.