25 #ifndef PAGMO_PROBLEM_MGA_1DSM_TOF_H
26 #define PAGMO_PROBLEM_MGA_1DSM_TOF_H
29 #include <boost/array.hpp>
30 #include <keplerian_toolbox/planet/jpl_low_precision.h>
31 #include <keplerian_toolbox/epoch.h>
33 #include "../config.h"
34 #include "../serialization.h"
40 namespace pagmo{
namespace problem {
66 mga_1dsm_tof(
const std::vector<kep_toolbox::planet::planet_ptr> = construct_default_sequence(),
67 const kep_toolbox::epoch t0_l = kep_toolbox::epoch(0),
const kep_toolbox::epoch t0_r = kep_toolbox::epoch(1000),
68 const std::vector<boost::array<double,2> > = construct_default_tof(),
69 const double vinf_l = 0.5,
const double vinf_u = 2.5,
70 const bool mo =
false,
const bool add_vinf_dep =
false,
const bool add_vinf_arr =
true);
74 std::string get_name()
const;
75 std::string pretty(
const std::vector<double> &x,
bool extended_output =
false)
const;
76 void set_tof(
const std::vector<boost::array<double,2> >);
77 void set_launch_window(
const kep_toolbox::epoch&,
const kep_toolbox::epoch&);
78 void set_vinf(
const double);
79 std::vector<kep_toolbox::planet::planet_ptr> get_sequence()
const;
80 std::vector<std::vector<double> > get_tof()
const;
83 std::string human_readable_extra()
const;
86 static const std::vector<kep_toolbox::planet::planet_ptr> construct_default_sequence() {
87 std::vector<kep_toolbox::planet::planet_ptr> retval;
88 retval.push_back(kep_toolbox::planet::jpl_lp(
"earth").clone());
89 retval.push_back(kep_toolbox::planet::jpl_lp(
"venus").clone());
90 retval.push_back(kep_toolbox::planet::jpl_lp(
"earth").clone());
93 static const std::vector<boost::array<double,2> > construct_default_tof() {
94 std::vector<boost::array<double,2> > retval;
95 boost::array<double,2> dumb = {{ 50,900 }};
96 retval.push_back(dumb);
97 retval.push_back(dumb);
101 friend class boost::serialization::access;
102 template <
class Archive>
103 void serialize(Archive &ar,
const unsigned int)
105 ar & boost::serialization::base_object<base>(*this);
107 ar &
const_cast<size_t &
>(m_n_legs);
111 std::vector<kep_toolbox::planet::planet_ptr> m_seq;
112 const size_t m_n_legs;
120 #endif // PAGMO_PROBLEM_MGA_1DSM_TOF_H
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
A generic MGA-1DSM Problem (tof encoding)
std::vector< double > fitness_vector
Fitness vector type.