-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (22 loc) · 779 Bytes
/
main.py
File metadata and controls
30 lines (22 loc) · 779 Bytes
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
"""
main.py
previously the main module of auto assign project.
Now gui.py is being used for this purpose
"""
import importTable as it
import algorithm as algo
import os
if __name__ == "__main__":
script_dir = os.path.dirname(__file__) #<-- absolute dir the script is in
rel_path = "table.xlsx" # rel path of stocklist
abs_file_path = os.path.join(script_dir, rel_path) # absolute path to stocklist
myIT = it.ImportTable(abs_file_path)
df = myIT.fetchTable(myIT.path)
sailors = myIT.processTable(df)
myAlgo = algo.Alogorithm(sailors)
drivers,riders = myAlgo.getDrivers()
print("drivers:")
[x.toString() for x in drivers]
print("riders:")
[x.toString() for x in riders]
myAlgo.rideAssignment(drivers,riders)