Giter VIP home page Giter VIP logo

padmanabhapsimha / trajopt_de Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 10.03 MB

Spacecraft trajectory optimization using differential evolution

License: GNU General Public License v3.0

C++ 48.65% MATLAB 4.62% C 1.72% Makefile 0.62% Batchfile 0.04% TeX 43.94% Emacs Lisp 0.40%
optimal-control ephemerides boost-libraries optimization evolutionary-algorithms spacecraft-trajectory-optimization trajectory-optimization differential-evolution multithreading

trajopt_de's Introduction

TrajOpt_DE

This code can optimize continuous low thrust spacecraft trajectories by solving the two point boundary value problem that results from the application of the Pontryagin's minimum principle. At the heart of this code lies a multiple thread capable optimization routine based on Differential Evolution (Refer to Storn and Price for details). This version of the code is coarse grain parallelized by domain decomposition. This has been designed for shared memory parallel systems. Can be run in distributed systems by manual decomposition of the search hyperbox. This is a full 3D code and is quite capable of handling arbitrary thruster performance characteristics. Nuclear electric and inverse square solar electric thrust models have been hard coded in. Other exotic thrusters can be manually put in along with stuff like eclipsing of the Sun etc. This code can as of now handle transfers between arbitrary parking orbits of different planets. (Earth-Mars transfer from 25000km EPO at -23.4 degrees to Earth equator to 17500km MPO at 90 degrees to the ecliptic plane has been verified) GTO to GSO transfers have also been verified and have been compared with results from literature. Better optimal results have been obtained. 3D to 3D heliocentric transfer portion of this code as of now is the most capable and tested part.

Actual readme stuff - Important info

Read individual input file readme(s) for supplying the inputs. Boost library header files are absolutely essential. Version 1.66.0 has been used. Wide variety of benchmark problems hard coded in a long switch-case construct. Eliminate this if not needed.

cpp files

de_solver.cpp has the parallelized version of the DE solver coded. Durstenfeld's version of the Fisher-Yates shuffle is used as a nifty little trick here for making the implementation much cleaner. de_func.cpp generates the initial population and some other stuff. Other files are mostly for support and modularity. cost_fn.cpp and cost_fn_print.cpp are absolutely bloated and can be trimmed out if parts are not necessary.

Other related stuff

64bit C++17 standard. Originally compiled with g++ 7.2.0 STL and Boost libraries have been heavily used. Check out Project Pluto --> https://www.projectpluto.com/jpl_eph.htm#eph_basics is amazing for reading JPL ephemeris data. Github page --> https://github.com/Bill-Gray/jpl_eph Some stupid looking/sounding wrappers have been written to make the ephemeris code C++ friendly and hope to keep up with RAII.

Additional comments

This code is quite fast..!! Multithreading scales well with cores. Superlinear speedups have also been observed when threads are reasonable in number. It's yet to be profiled though. Main emphasis till now has been on the accuracy of the numerical results obtained.

Future work

Make this MPI capable instead of only the C++17 threading framework.

trajopt_de's People

Contributors

padmanabhapsimha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

geoguxm oygx210

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.