List drone items
This commit is contained in:
parent
df1f75c876
commit
ebaf8101d9
9
main.py
9
main.py
|
@ -198,6 +198,9 @@ def end():
|
|||
print("--- End!")
|
||||
|
||||
# IA
|
||||
Dt = [[] for d in range(D)) # Drone tasks
|
||||
# (client, product)
|
||||
|
||||
def nearestW(p, pos):
|
||||
minDist = math.inf
|
||||
selW = None
|
||||
|
@ -209,6 +212,12 @@ def nearestW(p, pos):
|
|||
selW = w
|
||||
return selW
|
||||
|
||||
def listItems(d):
|
||||
items = []
|
||||
for p in range(P):
|
||||
for cp in range(abs(Di[d][p])):
|
||||
items.append(p)
|
||||
return items
|
||||
|
||||
def listNeeds():
|
||||
N = []
|
||||
|
|
Reference in a new issue