forked from The-Berkeley-Project/BP_lunch_route_alg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlunchRoute.py
22 lines (17 loc) · 843 Bytes
/
lunchRoute.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
def assignLocations(drivers, locations):
# naive alg:
# 1. assign a random location to each of the drivers
# 2. loop through each driver (random order again) and add the location that is nearest to the driver
pass
def findOptimalRoute(driversAndLocation):
# traveling salesman problem
pass
def calculateCost(driversAndLocation):
# calculate the time it takes each driver to go to their locations based on the optimal route
# if any cost exceeds the time required to deliver all food, rerun assignLocations (the entire alg)
# if after 10 tries, there still isn't an optimal route, then we will manually make edits to the best plan the alg gives us
pass
if __name__ == "__main__":
# must import number of drivers and a list of all the locations
# assignLocations(drivers, locations)
pass