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!")
|
print("--- End!")
|
||||||
|
|
||||||
# IA
|
# IA
|
||||||
|
Dt = [[] for d in range(D)) # Drone tasks
|
||||||
|
# (client, product)
|
||||||
|
|
||||||
def nearestW(p, pos):
|
def nearestW(p, pos):
|
||||||
minDist = math.inf
|
minDist = math.inf
|
||||||
selW = None
|
selW = None
|
||||||
|
@ -209,6 +212,12 @@ def nearestW(p, pos):
|
||||||
selW = w
|
selW = w
|
||||||
return selW
|
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():
|
def listNeeds():
|
||||||
N = []
|
N = []
|
||||||
|
|
Reference in a new issue