Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. personindexwarehouse = []
  2. Totalperwarehouse = []
  3.  
  4. for i in range(W):
  5. personindexwarehouse.append([]) # each person belongs to which warehouse
  6. Totalperwarehouse.append(numpy.zeros(400))
  7.  
  8. for i in numpy.arange(len(C_coordinates)):
  9. personindexwarehouse[warehouseindex[i]].append(i)
  10.  
  11. # what each of 1250 people ordered 1250x400
  12. for i, val in enumerate(personindexwarehouse):
  13. for j in val:
  14. Totalperwarehouse[i]=numpy.array(Totalperwarehouse[i])+numpy.array(C_orders[j])
  15.  
  16. #Totalperwarehouse is the final list of what each warehouse has to deliver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement