-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
32 lines (23 loc) · 1 KB
/
main.py
File metadata and controls
32 lines (23 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from ems.run import Driver
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(
description="Load configurations, data, preprocess models. Run simulator on "
"ambulance dispatch. Decisions are made during the simulation, but "
"the events are output to a csv file for replay.")
parser.add_argument('config_file',
help="The simulator needs a configuration to begin the computation.",
type=str, )
parser.add_argument('output_dir',
help="The simulator needs a configuration to begin the computation.",
type=str,
default=".")
# parse arguments
args = parser.parse_args()
# create simulator
driver = Driver(args.config_file)
sim, data = driver.create_simulator()
# run simulator
sim.run()
# Save the finished simulator information
sim.write_results(output_dir=args.output_dir)