From a13e71860b9bba5796ee3fe2f7af10ae9beef568 Mon Sep 17 00:00:00 2001 From: Connor Date: Tue, 12 Oct 2021 00:50:45 -0600 Subject: [PATCH] IT WORKS WITH 5 PHASES!!!! --- julia/test/inner_loop/monotonic_basin_hopping.jl | 14 +++++++++++++- julia/test/runtests.jl | 8 ++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/julia/test/inner_loop/monotonic_basin_hopping.jl b/julia/test/inner_loop/monotonic_basin_hopping.jl index 55ebd4a..fd872a1 100644 --- a/julia/test/inner_loop/monotonic_basin_hopping.jl +++ b/julia/test/inner_loop/monotonic_basin_hopping.jl @@ -23,7 +23,8 @@ search_patience=sp, drill_patience=dp, verbose=true) # Again, we're going to test a simple case first - # This one seems to converge really easily, so we don't run it much + # This one seems to converge really easily, so we don't search much + # For all of these, this is a test, not actual optimization, so we don't drill much either launch_window = DateTime(1992,11,1), DateTime(1992,12,1) latest_arrival = DateTime(1993,6,1) planets = [ Earth, Venus ] @@ -42,4 +43,15 @@ p = plot(best, title="MBH Test Solution") savefig(p,"../plots/mbh_test_2_phase.html") + # Now for a real stress test - the old ten-year, 5-phase Jovian mission + # This is known to have a solution... tough to find though + # I'll give it a tight launch window to be nice + planets = [Earth, Venus, Earth, Mars, Earth, Jupiter] + launch_window = DateTime(2023,4,1), DateTime(2023,7,1) + latest_arrival = DateTime(2033,1,1) + best, archive = mbh(planets, launch_window, latest_arrival, 100, 3) + @test typeof(best) == Mission + p = plot(best, title="MBH Test Solution") + savefig(p,"../plots/mbh_test_5_phase.html") + end diff --git a/julia/test/runtests.jl b/julia/test/runtests.jl index 1f16d54..390f23e 100644 --- a/julia/test/runtests.jl +++ b/julia/test/runtests.jl @@ -14,9 +14,9 @@ catch end @testset "All Tests" begin - include("plotting.jl") - include("inner_loop/laguerre-conway.jl") - include("inner_loop/propagator.jl") - include("inner_loop/nlp_solver.jl") + # include("plotting.jl") + # include("inner_loop/laguerre-conway.jl") + # include("inner_loop/propagator.jl") + # include("inner_loop/nlp_solver.jl") include("inner_loop/monotonic_basin_hopping.jl") end