25 #ifndef PAGMO_PROBLEM_GTOC_2_H
26 #define PAGMO_PROBLEM_GTOC_2_H
30 #include <keplerian_toolbox/epoch.h>
31 #include <keplerian_toolbox/planet/gtoc2.h>
32 #include <keplerian_toolbox/sims_flanagan/leg.h>
33 #include <keplerian_toolbox/sims_flanagan/spacecraft.h>
34 #include <keplerian_toolbox/sims_flanagan/throttle.h>
36 #include "../config.h"
37 #include "../serialization.h"
42 namespace pagmo {
namespace problem {
59 gtoc_2(
int = 815,
int = 300,
int = 110,
int = 47,
int = 10, objective = MASS_TIME);
62 std::string get_name()
const;
63 std::string pretty(
const std::vector<double> &x)
const;
67 std::string human_readable_extra()
const;
69 template <
class Iterator>
70 kep_toolbox::sims_flanagan::throttle get_nth_throttle(
int n, Iterator it,
const kep_toolbox::epoch &start,
const kep_toolbox::epoch &end)
const
72 Iterator n_it = it + 3 * n;
73 kep_toolbox::array3D tmp = {{ *n_it, *(n_it + 1), *(n_it + 2)}};
74 const double seg_duration = (end.mjd() - start.mjd()) / m_n_seg;
75 return kep_toolbox::sims_flanagan::throttle( kep_toolbox::epoch(start.mjd() + seg_duration * n,kep_toolbox::epoch::MJD),
76 kep_toolbox::epoch(start.mjd() + seg_duration * (n + 1),kep_toolbox::epoch::MJD),
80 friend class boost::serialization::access;
81 template <
class Archive>
82 void serialize(Archive &ar,
const unsigned int)
84 ar & boost::serialization::base_object<base>(*this);
85 ar &
const_cast<int &
>(m_n_seg);
88 ar &
const_cast< kep_toolbox::sims_flanagan::spacecraft &
>(m_spacecraft);
92 std::vector<kep_toolbox::planet::gtoc2> m_asteroids;
93 mutable std::vector< kep_toolbox::sims_flanagan::leg> m_legs;
94 const kep_toolbox::sims_flanagan::spacecraft m_spacecraft;
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
GTOC_2 Low-Thrust Multiple Asteroid Randezvous Problem.
objective
The objective function can be defined as final mass, final time or mass/time.
std::vector< double > fitness_vector
Fitness vector type.
std::vector< double > constraint_vector
Constraint vector type.