PaGMO
1.1.5
|
A part of the GTOC6 Jupiter Capture Trajectory. More...
#include <mga_part.h>
Public Member Functions | |
mga_part (const std::vector< kep_toolbox::planet::planet_ptr >=construct_default_sequence(), const std::vector< std::vector< double > > tof=construct_default_tofs(), const kep_toolbox::epoch t0=kep_toolbox::epoch(11000), const kep_toolbox::array3D vinf_in=construct_default_v()) | |
Constructor. More... | |
mga_part (const mga_part &) | |
Copy Constructor. Performs a deep copy. | |
base_ptr | clone () const |
Clone method. | |
std::string | get_name () const |
Get problem's name. More... | |
std::string | pretty (const std::vector< double > &x) const |
Outputs a stream with the trajectory data. More... | |
void | set_tof (const std::vector< std::vector< double > > &) |
Sets the times of flight. More... | |
const std::vector< std::vector< double > > & | get_tof () const |
Gets the times of flight. More... | |
void | set_t0 (const kep_toolbox::epoch &) |
Sets the start epoch. More... | |
const kep_toolbox::epoch & | get_t0 () const |
Gets the start epoch. More... | |
void | set_vinf_in (const kep_toolbox::array3D &) |
Sets the start velocity. More... | |
const kep_toolbox::array3D & | get_vinf_in () const |
Gets the start velocity. More... | |
void | set_betas (const std::vector< std::vector< double > > &) |
Sets the betas. More... | |
std::vector< std::vector< double > > | get_betas () const |
Gets the betas. More... | |
void | set_rps (const std::vector< std::vector< double > > &) |
Sets the peri-planet bounds. More... | |
std::vector< std::vector< double > > | get_rps () const |
Gets the peri-planet bounds. More... | |
std::vector< kep_toolbox::planet::planet_ptr > | get_sequence () const |
Gets the planetary sequence defining the interplanetary mga-1dsm mission. More... | |
Public Member Functions inherited from pagmo::problem::base | |
base (int, int=0, int=1, int=0, int=0, const double &=0) | |
Constructor from global dimension, integer dimension, fitness dimension, global constraints dimension, inequality constraints dimension and constraints tolerance. More... | |
base (int, int, int, int, int, const std::vector< double > &) | |
Constructor from global dimension, integer dimension, fitness dimension, global constraints dimension, inequality constraints dimension and constraints tolerance. More... | |
base (const double &, const double &, int, int=0, int=1, int=0, int=0, const double &=0) | |
Constructor from values for lower and upper bounds, global dimension, integer dimension, fitness dimension, global constraints dimension, inequality constraints dimension and constraints tolerance. More... | |
base (const decision_vector &, const decision_vector &, int=0, int=1, int=0, int=0, const double &=0) | |
Constructor from upper/lower bounds, integer dimension, fitness dimension, global constraints dimension, inequality constraints dimension and constraints tolerance. More... | |
template<std::size_t N> | |
base (const double(&v1)[N], const double(&v2)[N], int ni=0, int nf=1, int nc=0, int nic=0, const double &c_tol=0) | |
Constructor from raw arrays, integer dimension, fitness dimension, global constraints dimension, inequality constraints dimension and constraints tolerance. More... | |
template<class Iterator1 , class Iterator2 > | |
base (Iterator1 start1, Iterator1 end1, Iterator2 start2, Iterator2 end2, int ni=0, int nf=1, int nc=0, int nic=0, const double &c_tol=0) | |
Constructor from iterators, integer dimension, fitness dimension, global constraints dimension, inequality constraints dimension and constraints tolerance. More... | |
virtual | ~base () |
Trivial destructor. More... | |
std::string | human_readable () const |
Return human readable representation of the problem. More... | |
bool | operator== (const base &) const |
Equality operator. More... | |
bool | operator!= (const base &) const |
Inequality operator. More... | |
bool | is_compatible (const base &) const |
Compatibility operator. More... | |
bool | compare_x (const decision_vector &, const decision_vector &) const |
Compare decision vectors. More... | |
bool | verify_x (const decision_vector &) const |
Verify compatibility of decision vector x with problem. More... | |
bool | compare_fc (const fitness_vector &, const constraint_vector &, const fitness_vector &, const constraint_vector &) const |
Simultaneous fitness-constraint comparison. More... | |
virtual void | pre_evolution (population &) const |
Pre-evolution hook. More... | |
virtual void | post_evolution (population &) const |
Post-evolution hook. More... | |
virtual void | set_sparsity (int &lenG, std::vector< int > &iGfun, std::vector< int > &jGvar) const |
Sets the sparsity pattern of the gradient. More... | |
const decision_vector & | get_lb () const |
Lower bounds getter. More... | |
const decision_vector & | get_ub () const |
Upper bounds getter. More... | |
void | set_bounds (const decision_vector &, const decision_vector &) |
Bounds setter from pagmo::decision_vector. More... | |
template<class Iterator1 , class Iterator2 > | |
void | set_bounds (Iterator1 start1, Iterator1 end1, Iterator2 start2, Iterator2 end2) |
Bounds setter from iterators. More... | |
template<std::size_t N> | |
void | set_bounds (const double(&v1)[N], const double(&v2)[N]) |
Bounds setter from raw arrays. More... | |
void | set_bounds (const double &, const double &) |
Set bounds to specified values. More... | |
void | set_bounds (int, const double &, const double &) |
Set bounds to specified values. More... | |
void | set_lb (const decision_vector &) |
Set lower bounds from pagmo::decision_vector. More... | |
void | set_lb (int, const double &) |
Set specific lower bound to value. More... | |
void | set_lb (const double &) |
Set all lower bounds to value. More... | |
template<class Iterator > | |
void | set_lb (Iterator start, Iterator end) |
Lower bounds setter from iterators. More... | |
template<std::size_t N> | |
void | set_lb (const double(&v)[N]) |
Lower bounds setter from raw array. More... | |
void | set_ub (const decision_vector &) |
Set upper bounds from pagmo::decision_vector. More... | |
void | set_ub (int, const double &) |
Set specific upper bound to value. More... | |
void | set_ub (const double &) |
Set all upper bounds to value. More... | |
template<class Iterator > | |
void | set_ub (Iterator start, Iterator end) |
Upper bounds setter from iterators. More... | |
template<std::size_t N> | |
void | set_ub (const double(&v)[N]) |
Upper bounds setter from raw array. More... | |
unsigned int | get_fevals () const |
Return number of function evaluations. More... | |
unsigned int | get_cevals () const |
Return number of constraints function evaluations. More... | |
size_type | get_dimension () const |
Return global dimension. More... | |
size_type | get_i_dimension () const |
Return integer dimension. More... | |
f_size_type | get_f_dimension () const |
Return fitness dimension. More... | |
c_size_type | get_c_dimension () const |
Return global constraints dimension. More... | |
c_size_type | get_ic_dimension () const |
Return inequality constraints dimension. More... | |
const std::vector< double > & | get_c_tol () const |
Return constraints tolerance. More... | |
double | get_diameter () const |
Get the diameter of the problem. More... | |
constraint_vector | compute_constraints (const decision_vector &) const |
Compute constraints and return constraint vector. More... | |
void | compute_constraints (constraint_vector &, const decision_vector &) const |
Compute constraints and write them into contraint vector. More... | |
bool | compare_constraints (const constraint_vector &, const constraint_vector &) const |
Compare constraint vectors. More... | |
bool | test_constraint (const constraint_vector &, const c_size_type &) const |
Test i-th constraint of c (using tolerance information). More... | |
bool | feasibility_x (const decision_vector &) const |
Test feasibility of decision vector. More... | |
bool | feasibility_c (const constraint_vector &) const |
Test feasibility of constraint vector. More... | |
fitness_vector | objfun (const decision_vector &) const |
Return fitness of pagmo::decision_vector. More... | |
void | objfun (fitness_vector &, const decision_vector &) const |
Write fitness of pagmo::decision_vector into pagmo::fitness_vector. More... | |
bool | compare_fitness (const fitness_vector &, const fitness_vector &) const |
Compare fitness vectors. More... | |
void | reset_caches () const |
Reset internal caches. More... | |
const std::vector< constraint_vector > & | get_best_c (void) const |
Get the best known constraint vector. More... | |
const std::vector< decision_vector > & | get_best_x (void) const |
Get the best known decision vector. More... | |
const std::vector< fitness_vector > & | get_best_f (void) const |
Get the best known fitness vector. More... | |
void | set_best_x (const std::vector< decision_vector > &) |
Sets the best known decision vectors. More... | |
Protected Member Functions | |
void | objfun_impl (fitness_vector &, const decision_vector &) const |
Implementation of the objective function. | |
std::string | human_readable_extra () const |
Extra human readable info for the problem. More... | |
Protected Member Functions inherited from pagmo::problem::base | |
virtual bool | equality_operator_extra (const base &) const |
Extra requirements for equality. More... | |
virtual bool | compare_fc_impl (const fitness_vector &, const constraint_vector &, const fitness_vector &, const constraint_vector &) const |
Implementation of simultaneous fitness-constraint comparison. More... | |
void | estimate_sparsity (const decision_vector &, int &lenG, std::vector< int > &iGfun, std::vector< int > &jGvar) const |
Heuristics to estimate the sparsity pattern of the problem. More... | |
void | estimate_sparsity (int &lenG, std::vector< int > &iGfun, std::vector< int > &jGvar) const |
Heuristics to estimate the sparsity pattern of the problem. More... | |
virtual void | compute_constraints_impl (constraint_vector &, const decision_vector &) const |
Implementation of constraint computation. More... | |
virtual bool | compare_constraints_impl (const constraint_vector &, const constraint_vector &) const |
Implementation of constraint vector comparison. More... | |
virtual bool | compare_fitness_impl (const fitness_vector &, const fitness_vector &) const |
Implementation of fitness vectors comparison. More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
Public Types inherited from pagmo::problem::base | |
typedef decision_vector::size_type | size_type |
Problem's size type: the same as pagmo::decision_vector's size type. | |
typedef fitness_vector::size_type | f_size_type |
Fitness' size type: the same as pagmo::fitness_vector's size type. | |
typedef constraint_vector::size_type | c_size_type |
Constraints' size type: the same as pagmo::constraint_vector's size type. | |
Static Public Attributes inherited from pagmo::problem::base | |
static const std::size_t | cache_capacity = 5 |
Capacity of the internal caches. | |
A part of the GTOC6 Jupiter Capture Trajectory.
A PyGMO global optimization problem (box-bounded, continuous) representing a part of the gtoc6 preliminary trajectory design
Decision vector: [beta1, rp1/rP1, eta1,T1] + [beta2, rp2/rP2, eta2,T2] + ....
Definition at line 52 of file mga_part.h.
pagmo::problem::mga_part::mga_part | ( | const std::vector< kep_toolbox::planet::planet_ptr > | seq = construct_default_sequence() , |
const std::vector< std::vector< double > > | tof = construct_default_tofs() , |
||
const kep_toolbox::epoch | t0 = kep_toolbox::epoch(11000) , |
||
const kep_toolbox::array3D | vinf_in = construct_default_v() |
||
) |
Constructor.
Constructs a global optimization problem (box-bounded, continuous) representing a part og the gtoc6 jupiter moon tour
[in] | seq | std::vector of kep_toolbox::planet_ptr containing the encounter sequence for the trajectoty (including the initial planet) |
[in] | tof | time-of-flight vector containing lower and upper bounds (in days) for the various legs time of flights |
[in] | t0 | starting kep_toolbox::epoch |
[in] | vinf_in | incoming velocity at the departing moon (before fly-by, absolute) |
value_error | if the planets in seq do not all have the same central body gravitational constant |
value_error | if tof has a size different from seq.size() |
value_error | if seq.size() is < 2 |
Definition at line 56 of file mga_part.cpp.
std::vector< std::vector< double > > pagmo::problem::mga_part::get_betas | ( | ) | const |
|
virtual |
Get problem's name.
Default implementation will return the problem's mangled C++ name.
Reimplemented from pagmo::problem::base.
Definition at line 283 of file mga_part.cpp.
std::vector< std::vector< double > > pagmo::problem::mga_part::get_rps | ( | ) | const |
Gets the peri-planet bounds.
Definition at line 368 of file mga_part.cpp.
std::vector< kep_toolbox::planet::planet_ptr > pagmo::problem::mga_part::get_sequence | ( | ) | const |
Gets the planetary sequence defining the interplanetary mga-1dsm mission.
Definition at line 420 of file mga_part.cpp.
const kep_toolbox::epoch & pagmo::problem::mga_part::get_t0 | ( | ) | const |
const std::vector< std::vector< double > > & pagmo::problem::mga_part::get_tof | ( | ) | const |
Gets the times of flight.
Definition at line 308 of file mga_part.cpp.
const kep_toolbox::array3D & pagmo::problem::mga_part::get_vinf_in | ( | ) | const |
Gets the start velocity.
Definition at line 411 of file mga_part.cpp.
|
protectedvirtual |
Extra human readable info for the problem.
Will return a formatted string containing the values vector, the weights vectors and the max weight. It is concatenated with the base::problem human_readable
Reimplemented from pagmo::problem::base.
Definition at line 429 of file mga_part.cpp.
std::string pagmo::problem::mga_part::pretty | ( | const std::vector< double > & | x | ) | const |
Outputs a stream with the trajectory data.
While the chromosome contains all necessary information to describe a trajectory, mission analysits often require a different set of data to evaluate its use. This method outputs a stream with information on the trajectory that is otherwise 'hidden' in the chromosome
[in] | x | chromosome representing the trajectory in the optimization process |
Definition at line 197 of file mga_part.cpp.
void pagmo::problem::mga_part::set_betas | ( | const std::vector< std::vector< double > > & | betas | ) |
Sets the betas.
This setter changes the problem bounds as to define a minimum and a maximum allowed beta for each leg. Remember that beta controls the inclination of the planetocentric hyperbola
[in] | betas | vector of bounds for betas (rad) |
Definition at line 319 of file mga_part.cpp.
void pagmo::problem::mga_part::set_rps | ( | const std::vector< std::vector< double > > & | rps | ) |
Sets the peri-planet bounds.
This setter changes the problem bounds as to define a minimum and a maximum allowed periplanet distance
[in] | rps | vector of peri-planets (altitudes in km) |
Definition at line 352 of file mga_part.cpp.
void pagmo::problem::mga_part::set_t0 | ( | const kep_toolbox::epoch & | t0 | ) |
Sets the start epoch.
This setter changes the starting epoch
[in] | t0 | new start epoch |
Definition at line 385 of file mga_part.cpp.
void pagmo::problem::mga_part::set_tof | ( | const std::vector< std::vector< double > > & | tof | ) |
Sets the times of flight.
This setter changes the problem bounds as to define a minimum and a maximum allowed total time of flight
[in] | tof | vector of times of flight |
Definition at line 294 of file mga_part.cpp.
void pagmo::problem::mga_part::set_vinf_in | ( | const kep_toolbox::array3D & | vinf_in | ) |
Sets the start velocity.
This setter changes the relative velocity of the spacecraft used to define the starting conditions on the traj
[in] | vinf_in | new incoming relative velocity (m/s) |
Definition at line 403 of file mga_part.cpp.