From 2486e9bf975e647cae36eb68143e4b3eeb0ac211 Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Sun, 12 Feb 2023 16:19:13 -0500 Subject: [PATCH] Print more information in main --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e5beefb..e82e7ee 100644 --- a/main.py +++ b/main.py @@ -13,13 +13,16 @@ from write_out import save_map def main(terrain_path: str, elevation_path: str, checkpoints_path: str, image_output: str): world = unwrap_r(load_world_from_paths(terrain_path, elevation_path)) checkpoints = unwrap_r(load_points(checkpoints_path)) + print('All files loaded, begining search...') maybe_path = pathfind_multi( world.neighbors, world.heuristic, checkpoints ) path, cost = unwrap_opt(maybe_path) - print(f'Path found! Estimated time: {cost//60_000_000} minutes') + print(f'Path found!\n\nEstimated time: {cost//60_000_000} minutes') + path_length = unwrap_r(world.calculate_path_length(path)) + print(f'Estimated length: {path_length/1_000_000:.1f} kilometers') save_map(image_output, world, path) if __name__ == '__main__':