Added some better logging

This commit is contained in:
Connor
2021-10-12 01:36:39 -06:00
parent 7727e436e8
commit c7913d2944
6 changed files with 78 additions and 10 deletions

View File

@@ -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