Added some better logging
This commit is contained in:
@@ -28,20 +28,24 @@
|
||||
launch_window = DateTime(1992,11,1), DateTime(1992,12,1)
|
||||
latest_arrival = DateTime(1993,6,1)
|
||||
planets = [ Earth, Venus ]
|
||||
best, archive = mbh(planets, launch_window, latest_arrival, 2, 3)
|
||||
best, archive = mbh(planets, launch_window, latest_arrival, 10, 5)
|
||||
@test typeof(best) == Mission
|
||||
p = plot(best, title="MBH Test Solution")
|
||||
savefig(p,"../plots/mbh_test_1_phase.html")
|
||||
store(best, "missions/mbh_1_phase_best")
|
||||
store(archive, "missions/mbh_1_phase_archive")
|
||||
|
||||
# Now for a more complicated two-phase mission, with a bigger date range
|
||||
# This is known to have a solution though
|
||||
planets = [Earth, Venus, Mars]
|
||||
launch_window = DateTime(2021,6,1), DateTime(2022,6,1)
|
||||
latest_arrival = DateTime(2024,1,1)
|
||||
best, archive = mbh(planets, launch_window, latest_arrival, 10, 3)
|
||||
best, archive = mbh(planets, launch_window, latest_arrival, 20, 5)
|
||||
@test typeof(best) == Mission
|
||||
p = plot(best, title="MBH Test Solution")
|
||||
savefig(p,"../plots/mbh_test_2_phase.html")
|
||||
store(best, "missions/mbh_2_phase_best")
|
||||
store(archive, "missions/mbh_2_phase_archive")
|
||||
|
||||
# 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
|
||||
@@ -49,9 +53,11 @@
|
||||
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)
|
||||
best, archive = mbh(planets, launch_window, latest_arrival, 200, 10)
|
||||
@test typeof(best) == Mission
|
||||
p = plot(best, title="MBH Test Solution")
|
||||
savefig(p,"../plots/mbh_test_5_phase.html")
|
||||
store(best, "missions/mbh_5_phase_best")
|
||||
store(archive, "missions/mbh_5_phase_archive")
|
||||
|
||||
end
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
# Now we can plot the results to check visually
|
||||
p = plot(m, title="NLP Test Solution")
|
||||
savefig(p,"../plots/nlp_test_1_phase.html")
|
||||
store(m, "missions/nlp_1_phase")
|
||||
|
||||
# Now we can look at a slightly more complicated trajectory
|
||||
flybys = [Earth, Venus, Mars]
|
||||
@@ -42,6 +43,7 @@
|
||||
@test typeof(m) == Mission
|
||||
p = plot(m, title="NLP Test Solution (2 Phases)")
|
||||
savefig(p,"../plots/nlp_test_2_phase.html")
|
||||
store(m, "missions/nlp_2_phase")
|
||||
|
||||
# Here is the final, most complicated, trajectory to test
|
||||
flybys = [Earth, Venus, Earth, Mars, Earth, Jupiter]
|
||||
@@ -67,5 +69,6 @@
|
||||
@test typeof(m) == Mission
|
||||
p = plot(m, title="NLP Test Solution (5 Phases)")
|
||||
savefig(p,"../plots/nlp_test_5_phase.html")
|
||||
store(m, "missions/nlp_5_phase")
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user