-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move deployments and postprocessing into sailship function and make d…
…ata directory a parameter instead of hardcoded
- Loading branch information
Showing
5 changed files
with
47 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
from datetime import timedelta | ||
from virtual_ship.virtual_ship_configuration import VirtualShipConfiguration | ||
from virtual_ship.costs import costs | ||
from virtual_ship.sailship import sailship | ||
from virtual_ship.drifter_deployments import drifter_deployments | ||
from virtual_ship.argo_deployments import argo_deployments | ||
from virtual_ship.postprocess import postprocess | ||
|
||
if __name__ == '__main__': | ||
config = VirtualShipConfiguration('student_input.json') | ||
drifter_time, argo_time, total_time = sailship(config) | ||
drifter_deployments(config, drifter_time) | ||
argo_deployments(config, argo_time) | ||
postprocess() | ||
print("All data has been gathered and postprocessed, returning home.") | ||
cost = costs(config, total_time) | ||
print(f"This cruise took {timedelta(seconds=total_time)} and would have cost {cost:,.0f} euros.") | ||
if __name__ == "__main__": | ||
config = VirtualShipConfiguration("student_input.json") | ||
sailship(config) |