diff --git a/LaTeX/approach.tex b/LaTeX/approach.tex index 0cd7e93..b20cf76 100644 --- a/LaTeX/approach.tex +++ b/LaTeX/approach.tex @@ -114,7 +114,7 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{flowcharts/nlp} + \includegraphics[width=\textwidth]{LaTeX/flowcharts/nlp} \caption{A flowchart of the TPBVP Solution Approach} \label{nlp} \end{figure} @@ -176,7 +176,7 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{fig/laguerre_plot} + \includegraphics[width=\textwidth]{LaTeX/fig/laguerre_plot} \caption{Example of a natural trajectory propagated via the Laguerre-Conway approach to solving Kepler's Problem} \label{laguerre_plot} @@ -202,7 +202,7 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{fig/spiral_plot} + \includegraphics[width=\textwidth]{LaTeX/fig/spiral_plot} \caption{An example trajectory showing that classic continuous-thrust orbit shapes, such as this orbit spiral, are easily achievable using a Sims-Flanagan model} @@ -320,7 +320,7 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{flowcharts/mbh} + \includegraphics[width=\textwidth]{LaTeX/flowcharts/mbh} \caption{A flowchart visualizing the steps in the monotonic basin hopping algorithm} \label{mbh_flow} diff --git a/LaTeX/presentation.tex b/LaTeX/presentation.tex new file mode 100644 index 0000000..4a1836e --- /dev/null +++ b/LaTeX/presentation.tex @@ -0,0 +1,50 @@ +\documentclass{beamer} +\usetheme{Luebeck} + +\definecolor{color1}{HTML}{3A4040} +\definecolor{color2}{HTML}{F5F2F8} +\definecolor{color3}{HTML}{B65D4E} +\definecolor{color4}{HTML}{B6AD96} +\definecolor{color5}{HTML}{A96041} + +\setbeamercolor*{structure}{bg=color3,fg=color3} +\setbeamercolor*{palette primary}{fg=color1,bg=color4} +\setbeamercolor*{palette secondary}{fg=color1,bg=color2} +\setbeamercolor*{palette tertiary}{fg=color1,bg=color2} +\setbeamercolor*{palette quaternary}{fg=color1,bg=color3} +\setbeamercolor{alerted text}{fg=color1,bg=color3} +\setbeamercolor{titlelike}{bg=color2,fg=color1} +\setbeamercolor*{titlelike}{bg=color2,fg=color1} +\setbeamercolor{frametitle}{bg=color1,fg=color2} +\setbeamercolor{background canvas}{bg=color2,fg=color2} + +\title{Designing Optimal Low-Thrust Interplanetary Trajectories} +\subtitle{Utilizing Monotonic Basin Hopping} +\author{Richard Connor Johnstone} +\institute{University of Colorado -- Boulder} +\date{\today} + +\begin{document} + +\begin{frame} + \titlepage +\end{frame} + +\section{Introduction} + + \begin{frame} \frametitle{First Frame} + \begin{itemize} + \item Item 1 + \item Item 2 + \end{itemize} + \end{frame} + +\section{Introduction} + +\section{Introduction} + +\section{Introduction} + +\section{Introduction} + +\end{document} diff --git a/LaTeX/results.tex b/LaTeX/results.tex index 2c7f4fd..57a9a7c 100644 --- a/LaTeX/results.tex +++ b/LaTeX/results.tex @@ -128,7 +128,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.9\textwidth]{fig/EMS_plot} + \includegraphics[width=0.9\textwidth]{LaTeX/fig/EMS_plot} \caption{Depictions of the faster Earth-Mars-Saturn trajectory found by the algorithm to be most efficient; planetary ephemeris arcs are shown during the phase in which the spacecraft approached them} @@ -137,7 +137,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.9\textwidth]{fig/EMS_plot_noplanets} + \includegraphics[width=0.9\textwidth]{LaTeX/fig/EMS_plot_noplanets} \caption{Another depiction of the EMS trajectory, without the planetary ephemeris arcs} \label{ems_nop} @@ -156,14 +156,14 @@ \begin{figure}[H] \centering - \includegraphics[width=0.9\textwidth]{fig/EMS_thrust_mag} + \includegraphics[width=0.9\textwidth]{LaTeX/fig/EMS_thrust_mag} \caption{The magnitude of the unit thrust vector over time for the EMS trajectory} \label{ems_mag} \end{figure} \begin{figure}[H] \centering - \includegraphics[width=0.9\textwidth]{fig/EMS_thrust_components} + \includegraphics[width=0.9\textwidth]{LaTeX/fig/EMS_thrust_components} \caption{The inertial x, y, and z components of the unit thrust vector over time for the EMS trajectory} \label{ems_components} @@ -212,7 +212,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.9\textwidth]{fig/EMJS_plot} + \includegraphics[width=0.9\textwidth]{LaTeX/fig/EMJS_plot} \caption{Depictions of the slower Earth-Mars-Jupiter-Saturn trajectory found by the algorithm to be the second most efficient; planetary ephemeris arcs are shown during the phase in which the spacecraft approached them} @@ -221,7 +221,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.9\textwidth]{fig/EMJS_plot_noplanets} + \includegraphics[width=0.9\textwidth]{LaTeX/fig/EMJS_plot_noplanets} \caption{Another depiction of the EMJS trajectory, without the planetary ephemeris arcs} \label{emjs_nop} @@ -236,14 +236,14 @@ \begin{figure}[H] \centering - \includegraphics[width=0.9\textwidth]{fig/EMJS_thrust_mag} + \includegraphics[width=0.9\textwidth]{LaTeX/fig/EMJS_thrust_mag} \caption{The magnitude of the unit thrust vector over time for the EMJS trajectory} \label{emjs_mag} \end{figure} \begin{figure}[H] \centering - \includegraphics[width=0.9\textwidth]{fig/EMJS_thrust_components} + \includegraphics[width=0.9\textwidth]{LaTeX/fig/EMJS_thrust_components} \caption{The inertial x, y, and z components of the unit thrust vector over time for the EMJS trajectory} \label{emjs_components} @@ -304,7 +304,7 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{fig/c3} + \includegraphics[width=\textwidth]{LaTeX/fig/c3} \caption{Plot of Delta IV and Atlas V launch vehicle capabilities as they relate to payload mass \cite{c3capabilities} from Vardaxis, et al, 2007 } \label{c3} diff --git a/LaTeX/thesis.tex b/LaTeX/thesis.tex index df7f82f..eee3a48 100644 --- a/LaTeX/thesis.tex +++ b/LaTeX/thesis.tex @@ -1,4 +1,4 @@ -\documentclass[defaultstyle,11pt]{thesis} +\documentclass[defaultstyle,11pt]{LaTeX/thesis} \usepackage{graphicx} \usepackage{amssymb} @@ -61,7 +61,7 @@ \begin{document} - \input macros.tex + \input LaTeX/macros.tex \input LaTeX/introduction.tex @@ -77,8 +77,6 @@ \bibliographystyle{plain} \nocite{*} - \bibliography{thesis} - - \appendix + \bibliography{LaTeX/thesis} \end{document} diff --git a/LaTeX/trajectory_design.tex b/LaTeX/trajectory_design.tex index be54b72..c659e6f 100644 --- a/LaTeX/trajectory_design.tex +++ b/LaTeX/trajectory_design.tex @@ -37,7 +37,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.65\textwidth]{fig/2bp} + \includegraphics[width=0.65\textwidth]{LaTeX/fig/2bp} \caption{Figure representing the positions of the bodies relative to each other and the center of mass in the two body problem} \label{2bp_fig} @@ -148,7 +148,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.8\textwidth]{fig/kepler} + \includegraphics[width=0.8\textwidth]{LaTeX/fig/kepler} \caption{Geometric representation of auxiliary circle}\label{aux_circ} \end{figure} @@ -297,7 +297,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.8\textwidth]{fig/patched_conics} + \includegraphics[width=0.8\textwidth]{LaTeX/fig/patched_conics} \caption{Patched Conics Example Figure} \label{patched_conics_fig} \end{figure} @@ -396,7 +396,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.8\textwidth]{fig/flyby} + \includegraphics[width=0.8\textwidth]{LaTeX/fig/flyby} \caption{Velocity changes during a gravity assist} \label{grav_assist_fig} \end{figure} @@ -470,7 +470,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.8\textwidth]{fig/lamberts} + \includegraphics[width=0.8\textwidth]{LaTeX/fig/lamberts} \caption{Visualization of the possible solutions to Lambert's Problem} \label{type1type2} \end{figure} @@ -587,7 +587,7 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{fig/porkchop} + \includegraphics[width=\textwidth]{LaTeX/fig/porkchop} \caption{A sample porkchop plot of an Earth-Mars transfer} \label{porkchop} \end{figure} @@ -652,7 +652,7 @@ \begin{figure}[H] \centering - \includegraphics[width=0.6\textwidth]{fig/sft} + \includegraphics[width=0.6\textwidth]{LaTeX/fig/sft} \caption{Example of an orbit raising using the Sims-Flanagan Transcription with 7 Sub-Trajectories} \label{sft_fig} @@ -739,14 +739,14 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{fig/low_efficiency} + \includegraphics[width=\textwidth]{LaTeX/fig/low_efficiency} \caption{Graphic of an orbit-raising with a low efficiency cutoff} \label{low_efficiency_fig} \end{figure} \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{fig/high_efficiency} + \includegraphics[width=\textwidth]{LaTeX/fig/high_efficiency} \caption{Graphic of an orbit-raising with a high efficiency cutoff} \label{high_efficiency_fig} \end{figure} diff --git a/LaTeX/trajectory_optimization.tex b/LaTeX/trajectory_optimization.tex index 120266a..8fe94c9 100644 --- a/LaTeX/trajectory_optimization.tex +++ b/LaTeX/trajectory_optimization.tex @@ -105,7 +105,7 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{fig/single_shoot} + \includegraphics[width=\textwidth]{LaTeX/fig/single_shoot} \caption{Single shooting over a trajectory arc} \label{single_shoot_fig} \end{figure} @@ -130,7 +130,7 @@ \begin{figure}[H] \centering - \includegraphics[width=\textwidth]{fig/multiple_shoot} + \includegraphics[width=\textwidth]{LaTeX/fig/multiple_shoot} \caption{Visualization of a multiple shooting technique over a trajectory arc} \label{multiple_shoot_fig} \end{figure} diff --git a/Makefile b/Makefile index dce770c..508a010 100644 --- a/Makefile +++ b/Makefile @@ -1,68 +1,39 @@ -OPTIONS = markdown+yaml_metadata_block+smart - -NOTES = $(wildcard prelim_notes/*.md) -NOTES_PDFS = $(patsubst %.md,%.pdf,$(NOTES)) - -THESIS = LaTeX/thesis.tex +SRC_DIR = LaTeX/ +THESIS_SRC_NAMES = thesis.tex thesis.bib approach.tex conclusion.tex introduction.tex \ + results.tex trajectory_design.tex trajectory_optimization.tex +THESIS_SRC = $(addprefix $(SRC_DIR)/,$(THESIS_SRC_NAMES)) +THESIS_PRES_SRC_NAMES = presentation.tex +THESIS_PRES_SRC = $(addprefix $(SRC_DIR)/,$(THESIS_PRES_SRC_NAMES)) +THESIS_PRES = presentation.pdf THESIS_PDF = thesis.pdf +BUILD_DIR = temp/ -all: $(THESIS_PDF) $(NOTES_PDFS) +all: $(THESIS_PDF) $(THESIS_PRES) -$(NOTES_PDFS): $(NOTES) - pandoc \ - --variable mainfont="Roboto" \ - --variable monofont="Fira Code" \ - --variable fontsize=11pt \ - --variable geometry:"top=1in, bottom=1in, left=1in, right=1in" \ - --variable geometry:letterpaper \ - -f markdown $< \ - -o $@ +$(BUILD_DIR): + mkdir -p $(BUILD_DIR) -thesis_pdf/: - mkdir $@ +$(BUILD_DIR)/$(THESIS_PDF): $(BUILD_DIR) $(THESIS_SRC) + xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/thesis + bibtex $(BUILD_DIR)/thesis + xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/thesis + xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/thesis -$(THESIS_PDF): $(THESIS) LaTeX/thesis.bib - mkdir -p temp - cp -r LaTeX/fig . - cp -r LaTeX/flowcharts . - cp -r LaTeX/thesis.tex . - cp -r LaTeX/macros.tex . - cp -r LaTeX/thesis.bib . - cp -r LaTeX/thesis.cls . - xelatex thesis - bibtex thesis - xelatex thesis - xelatex thesis - rm -rf fig - rm -rf flowcharts - cp thesis.pdf temp/. - rm -rf macros.tex - rm -rf thesis.* - cp temp/thesis.pdf . - rm -rf temp +$(BUILD_DIR)/$(THESIS_PRES): $(BUILD_DIR) $(THESIS_PRES_SRC) + xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/presentation + +$(THESIS_PDF): $(BUILD_DIR)/$(THESIS_PDF) + cp $(BUILD_DIR)/thesis.pdf . + +$(THESIS_PRES): $(BUILD_DIR)/$(THESIS_PRES) + cp $(BUILD_DIR)/presentation.pdf . .PHONY: clean revise clean: rm -rf $(THESIS_PDF) - rm -rf $(NOTES_PDFS) - rm -rf thesis_pdf + rm -rf $(THESIS_PRES) + rm -rf $(BUILD_DIR) -revise: $(THESIS) LaTeX/thesis.bib - mkdir -p temp - cp -r LaTeX/fig . - cp -r LaTeX/flowcharts . - cp -r LaTeX/thesis.tex . - cp -r LaTeX/macros.tex . - cp -r LaTeX/thesis.bib . - cp -r LaTeX/thesis.cls . - xelatex thesis - bibtex thesis - xelatex thesis - xelatex thesis - rm -rf fig - rm -rf flowcharts - cp thesis.pdf temp/. - rm -rf macros.tex - rm -rf thesis.* - cp temp/thesis.pdf . +final: $(THESIS_PDF) $(THESIS_PRES) + rm -rf $(BUILD_DIR) diff --git a/best_missions b/best_missions deleted file mode 100644 index 1ebea84..0000000 --- a/best_missions +++ /dev/null @@ -1,3 +0,0 @@ -./archive/EMMJS_2021-12-03T17:38:37.546/mission -./archive/EMS_2021-12-12T16:01:04.514/mission -./archive/EVMS_2021-12-14T16:31:21.927/mission diff --git a/email_to_commitee.md b/email_to_commitee.md deleted file mode 100644 index 4b5e6c6..0000000 --- a/email_to_commitee.md +++ /dev/null @@ -1,15 +0,0 @@ -Dr. Scheeres, - -I'm currently working on finishing up my Master's Thesis. The topic will be a routine for optimizing -Interplanetary Low-Thrust Trajectories, combining approaches for flyby optimization and low-thrust -trajectory arc optimization. I think that your research interests would make you an ideal fit for a -place on my committee, so I would like to ask if you have any availability to be on my committee -this semester? Currently, I am targeting finish up sometime around March 12th, so it would probably -be a defense in late March or early April, but I have a little room for flexibility if that doesn't -work. - -If you think you may be able to sit on my committee then just let me know and I can begin the -process of determining everyone's availabilities and finding the most appropriate defense date. - -Thanks! -Connor Johnstone diff --git a/ipopt.out b/ipopt.out deleted file mode 100644 index e69de29..0000000 diff --git a/prelim_notes/paper_notes.md b/prelim_notes/paper_notes.md deleted file mode 100644 index e92970d..0000000 --- a/prelim_notes/paper_notes.md +++ /dev/null @@ -1,102 +0,0 @@ -# Notes on Research Papers - -## Neural Networks in Time-Optimal Low-Thrust Interplanetary Transfers - -- For the most part this paper isn't *that* relevant. -- It seems to be a low-fidelity method, or at least, it's fidelity is kind of hard to pin down, - since it uses a neural net. -- However, the neural net is an interesting concept. -- And in fact, this paper advocates for a concept of using the neural net as a predictor. So, say, - given a leg of a particular journey, as in the Englander paper, could I use this technique rather - than Sims-Flanagan transcription in the outer loop? -- Something to consider as an alternative to the method proposed in Englander -- Could also be used to generate initial guesses for the single-shooting methods that I'll have to - use if I use an indirect optimization method. - -## Design and optimization of interplanetary low-thrust trajectory with planetary aerogravity-assist maneuver - -- I didn't realize that this paper is specifically talking about *aero*gravity assists. I don't - think that level of complication is necessary for this paper. I'm going to stick with gravity - assists that don't get into atmospheric effects. - -## Orbital and Angular Motion Construction for Low Thrust Interplanetary Flight - -- This one actually isn't even about optimization. Not relevant -- To be honest, I don't actually understand it very well anyway - -## A Rapid Estimation for Interplanetary Low-Thrust Trajectories Using Support Vector Regression - -- This is another machine-learning approach -- It uses a different approach that I'm not that familiar with (Support Vector Regression) - - It looks like this is a form of regression similar to linear regression, I suppose being used - by the machine learning algorithm for predicting optimal trajectories -- However, it seems like everything that applies in the neural net paper probably apply here as well -- This could be an alternative for predicting optimal trajectories over certain legs of the journey - -## Automated Solution of the Low-Thrust Interplanetary Trajectory Problem - -- This is the Englander paper I mentioned earlier. It seems highly relevant as they're essentially - doing what I'd like to do: producing an automated method for high-level interplanetary low-thrust - mission design including the flybys. -- I need to look up MALTO and GALLOP (established tools that do this) -- This paper also open sources it's code: available [here](https://opensource.gsfc.nasa.gov/projects/emtg/index.php) -- This paper formulates the problem as a *Hybrid Optimal Control Problem*. This requires some - further research by me, but from the paper it seems to be a way of optimizing two seperables - subproblems where one of the subproblems exists as a sub-loop of the other problem (for instance - optimizing flybys in a high-level loop and particular planet-to-planet trajectories as a sub-loop of - that problem). This apparently works because the "outer-loop" uses discrete variables while the - "inner-loop" uses continuous variables. -- The outer loop is based on the "null-gene" transciption from another Englander paper and uses a - genetic algorithm. - - I'm not going to go too deep here into the details of the GA. But there's an entire paper on - it - - The paper does mention that it lends itself well to parallelization, which is true. Kubernetes - cluster? -- The inner loop uses Sim-Flanagan transcription combined with Monotonic Basin Hopping, a method for - single-shooting without initial guesses - - Sims-Flanagan transcription is where you discretize the flight arc into many smaller time - steps and the thrust applied is approximated as an impulsive thrust in the middle of each time - step. - - SFT is considered to be a "medium-fidelity" approach - - For this solver, the trajectory betweens these points is produced as a solution to Kepler's - problem, which is basically just the analytical solution to the 2BP, so that no derivatives or - orbit-propagation is needed, for speed. - - One thing I noted about this approach is that it doesn't seem to include a possibility for - "coasting arcs" or throttling anything less than 100% (though the modeling of what 100% means is - quite thorough), so perhaps we're missing some fidelity there? - - I think SNOPT is used to optimize these "inner-loops". This should be pretty fast since it - just uses Kepler's eq - - The MBH method eliminates the need to solve Lambert's problem for initial guesses. This allows - for a more robust analysis of the search base (if there are global optima further from the local - optima near lambert's solution) but might be slower? I'm not sure. - - The technique is kind of weird, but I suppose it works. -- This paper uses a hierarchy of events starting with the overall *mission*, which separates into - *journies*, which, in the example I'm pursuing will be Earth -> Neptune and Neptune -> Earth (if - applicable, but probably just the first one). Then these journies are further divided into - *phases*, which include each planet -> planet leg. The number of phases and the identities of the - planets are chosen by the algorithm. -- The paper goes into some length to determine what the launch C3, propulsion, power, and ephemeris - modeling are. This is all very useful, but as far as I can tell it's pretty typical, so I won't note - too much about it. - - However, it does mention that SPICE presented some challenges for using a preferable method of - parallelization. As an alternative, the paper mentions that FIRE could be used instead for - ephemeris. Which might be worth looking into. -- The paper also include pseudocode, which is nice - -## Automated Mission Planning via Evolutionary Algorithms - -- This is another Englander paper that gives more details on the outer-loop GA. Useful for details. - -## Multi-Objective Low-Thrust Interplanetary Trajectory Optimization Based on Generalized Logarithmic Spirals - -- This is the first paper I looked at. It's actually quite similar to the Englander paper, but I - think not quite as good -- Again, it formulates the problem as an HOCP. -- However, the "inner-loop" for this problem is an optimization of generalized logarithmic spirals. - I don't think this is a very high fidelity method. -- The outer step uses collocation and an NLP optimizer (looks like it actually might just feed the - guesses into GALLOP, which I assume uses SNOPT, though, to be honest, I can't find much on it from - a quick search) -- I'm leaning toward Englander's approach over this one, perhaps with an alternative being to use - one of the machine-learning approaches from above for the inner loop instead - diff --git a/prelim_notes/plan.md b/prelim_notes/plan.md deleted file mode 100644 index 9f73a0e..0000000 --- a/prelim_notes/plan.md +++ /dev/null @@ -1,37 +0,0 @@ -# Plan After Literature Review - -After reading the papers in the Google Drive (see `paper_notes.md`) I've come up with the following -plan: - -I think that I'd like to follow an approach similar to what I saw in Englander and Morante. However, -I think it makes more sense to follow the Englander approach for the specific optimizers being used -in the inner and outer loops. Specifically this means: - -- Set up the problem as a Hybrid Optimal Control Problem (HOCP) with an inner and an outer loop -- The outer loop will determine the number and identities of the flybys and optimize using a Binary - Genetic Algorithm described by Englander -- The inner loop in Englander uses Sims-Flanagan Transcription optimized using monotonic basin - hopping. This seems like a good approach. I'd like to use this approach, but also consider using, - as an alternative method for comparison, one of the machine-learning algorithms from the other - papers. -- There are a number of other details including modeling launch C3, power, thrust, and ephemeris. - For all of these I'll use either the exact approach from Englander or a similar approach. There - exists an option to use alternatives to SPICE for ephemeris, but I think the parallelization - problems that SPICE poses can be solved in other ways. - - Specifically, I'd like to build this program using a micro-service architecture. This could - allow for deployment using Kubernetes clusters. This will handle the parallelization (by - running multiple inner loop micro-services at once) and allow for simpler use in production - environments if that's ever needed, as kubernetes has a robust integration with most - web-hosting services. This also allows for flexible scalability if improved speed is ever - needed. - -## Open Questions - -- Are there other inner and outer loop optimization approaches I should consider? -- I didn't see a ton of information regarding the specific parameters of the orbital flybys outside - of the number and the identities of the planets. I need to figure out whether Englander approaches - that optimization in the inner or the outer loop -- I would like to use a fast language for this, and ideally one that I could benefit from learning - about (by this I mean, preferably not C++, as I've used that before -- though it does integrate - well with tools like SPICE, so it is a good option). Preferably Rust, as it has the fastest server - libraries, which I don't expect to have a huge overhead, but is something to consider. diff --git a/prelim_notes/technical_plan.md b/prelim_notes/technical_plan.md deleted file mode 100644 index 30c6308..0000000 --- a/prelim_notes/technical_plan.md +++ /dev/null @@ -1,76 +0,0 @@ -# Technical Plan - -## Notes - -- Each of these steps will be completed first in Julia, as I can use that to get - to a working point really quickly. Then, I'll redo the efforts in Rust inside - of docker containers, providing increased robustness and speed. I'll provide - expected time for completion after each item in the form (x/y) where x is the - number of hours I expect to take to write the Julia code and y is the number - of hours I expect to take to write the Rust code. - -## Stages of Development - -1. First I need to set up the inner loop. The inner loop is a Sims-Flanagan transcription - single-shooting algorithm, optimized using monotonic basin-hopping. - a. I've constructed single-shooting algorithms before, and the Sims-Flanagan - transcription is just a really simple notation for approximating low-thrust - arcs. So first I'll need to set up a very simple Sims-Flanagan single - shooter. I don't expect this to take long. I will write a simple - single-shooting algorithm that takes in a start and end state (for now... in - stage 2b below I'll update this to only need the J200 time (for ephemeris - lookup) and the velocity) and solves Kepler's equation to satisfy the - continuity condition. For the rust code, this will require some considerable - initial setup of the docker containers and such, though. (6/20) - b. Next I'll need to set up the monotonic basin-hopping algorithm. I've - written similar optimization algorithms in my spacecraft trajectory - optimization course, but none that use basin-hopping. However, it's more - or less just a genetic algorithm, so it should be simple to set up in a - very general way. The function I'm optimizing can be seen as a system of - inputs (initial and final states) and outputs (mass used, or some other - more complicated measure of optimality), so I can follow many very - descriptive accounts online of this type of genetic algorithm. (12/18) -2. Then I'll need to set up the outer loop. This will require optimizing over - inputs (selection of flybys) by calling the inner loop to optimize each leg - and summing these by way of some cost function. These flyby selections will - be optimized using the genetic algorithm described in the first Englander - paper. - a. First I'll set up a very simple version of the outer loop, that - doesn't optimize anything. It will take in a selection of flybys and - simply call the inner loop for each of the flybys, outputting some cost - function. This shouldn't take long, but at this point I'm adding time - because the inner loop may take some time to call (8/12). - b. There are also some other inputs to this algorithm, that won't change from - problem to problem, but will take some effort to calculate. These include - initial launch C3, ephemeris, problem constraints, etc. SPICE and basic - modeling can be used for most of this, but I should include some time for - incorporating SPICE via C-bindings, which should be relatively easy in - both Julia and Rust (in fact, a wrapper exists at least in Julia - already). As a less high fidelity backup, I've also modeled ephemeris by - polynomials before, so I can do that again, if I find incorporating SPICE - is taking too long (16/16) - c. Next, I'll write the genetic algorithm in a very general way, as before. - This is a different GA (a Binary Genetic Algorithm, suited for discrete - problems), but the algorithm is described in-depth in the first Englander - paper and I also can refer to the source code from the second Englander - paper. In the first paper, he mentions that he used Matlab's - implementation. It seems Julia also has an implementation, so this should - be simple in Julia, but I will include significant extra time in Rust, in - case that is more difficult (6/32) - d. From there, calling my outer-loop implementation from the GA should be - simple. However, I will include extra time for the rust implementation, - because I will also have to consider spinning up extra kubernetes - instances for each inner and outer loop. (6/32) -3. From here, the work is more or less done. There will be some finalizing to - do, including setting up the Kubernetes cluster for the Rust implementation. - I've not set up a Kubernetes cluster before, but I have set up docker-compose - setups for Rust code, so I would anticipate an extra 10 hours being needed - for transitioning that. I will also have to provide a sort of wrapper - function that parses the inputs and spins up/calls each lower loop of this - optimizer. That should be really simple, but I'm including some slop time in - this category to account for administrative issues, particularly in setting - up the deployment of the cluster (12/32) - -## Summary - -So, in total, that comes out to 66 hours of coding for the initial Julia implementation and then another 162 hours for the re-implementation in Rust using docker + kubernetes and the deployment of the cluster. At a rate of 20 hours/week, which seems reasonable, as I will have my job to account for, but I am finished with classes, that comes out to roughly 3.5 weeks to finish the first implementation and then 8 weeks to finalize. I think, if anything, that's very conservative, particularly on the Rust side, as I've got a decent amount of experience in web-based deployment, so I shouldn't have as much trouble with Kubernetes and Docker as I've outlined. But it's also worth noting that the Julia implementation is probably perfectly proficient for a Master's Thesis. If the Rust work is too much, then I can write the thesis on the Julia implementation. diff --git a/readme.md b/readme.md index 7a86851..e7cd5bc 100644 --- a/readme.md +++ b/readme.md @@ -2,10 +2,7 @@ This will be a repository for my code while I work on my thesis. The general idea is to generate a method for automatically producing optimal low-thrust trajectories (including optimizations of the -planetary flybys) for a sample mission to Neptune. - -For now, it will just be a location for storing my notes as I come up with a plan. I will update -this readme as I flush out the plan a little better and then as I begin producing code. +planetary flybys) for a sample mission to Saturn. ## Dependencies @@ -34,8 +31,14 @@ Pkg.build() To produce the pdfs, simply run: -```bash -make +```bash +make ``` -### Julia Code +They will go in the build directory + +To produce final pdfs: + +```bash +make final +```