earth_planet::earth_planet(int segments, std::string target, const double &ctol) : base(base_format(1,segments,1000).size(), 0, 1, 6 + segments + 1 +1, segments+2,ctol), encoding(1,segments,1000), vmax(3000),n_segments(segments) { std::vector<double> lb_v(get_dimension()); std::vector<double> ub_v(get_dimension()); //Start lb_v[encoding.leg_start_epoch_i(0)[0]] = 0; ub_v[encoding.leg_start_epoch_i(0)[0]] = 1000; //End lb_v[encoding.leg_end_epoch_i(0)[0]] = 500; ub_v[encoding.leg_end_epoch_i(0)[0]] = 1500; //Start Velocity std::vector<int> tmp = encoding.leg_start_velocity_i(0); for (std::vector<int>::size_type i = 0; i < tmp.size() ; ++i) { lb_v[tmp[i]] = -3; ub_v[tmp[i]] = 3; } //End Velocity tmp = encoding.leg_end_velocity_i(0); for (std::vector<int>::size_type i = 0; i < tmp.size() ; ++i) { lb_v[tmp[i]] = 0; ub_v[tmp[i]] = 0; } //I Throttles for (int j = 0; j<encoding.n_segments(0); ++j) { tmp = encoding.segment_thrust_i(0,j); for (std::vector<int>::size_type i = 0; i < tmp.size() ; ++i) { lb_v[tmp[i]] = -1; ub_v[tmp[i]] = 1; } } set_bounds(lb_v,ub_v); //traj_fb constructor std::vector<planet_ptr> sequence; sequence.push_back(planet_ptr(new planet_ss("earth"))); sequence.push_back(planet_ptr(new planet_ss(target))); trajectory = fb_traj(sequence,segments,1000,0.05,boost::numeric::bounds<double>::highest()); }
/// Polymorphic copy constructor. planet_ptr jpl_lp::clone() const { return planet_ptr(new jpl_lp(*this)); }
/// Polymorphic copy constructor. planet_ptr keplerian::clone() const { return planet_ptr(new keplerian(*this)); }
planet_ptr planet::clone() const { return planet_ptr(new planet(*this)); }
/// Polymorphic copy constructor.le::clone() const planet_ptr tle::clone() const { return planet_ptr(new tle(*this)); }
/// Polymorphic copy constructor.le::clone() const planet_ptr spice::clone() const { return planet_ptr(new spice(*this)); }
planet_ptr planet_mpcorb::clone() const { return planet_ptr(new planet_mpcorb(*this)); }