Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. from copy import deepcopy
  2.  
  3. def dist():
  4.  
  5.  
  6. def sumilate(state, order_ind, ):
  7. state = deepcopy(state)
  8. log = list()
  9. order = state['orders'][order_ind]
  10. del state['orders']
  11.  
  12. best_drone, best_warehouse = (None, None)
  13.  
  14. for drone in state['drones']:
  15. for warehouse in state['warehouses']:
  16. if score(drone, warehouse) > score(best_drone, best_warehouse):
  17. best_drone, best_warehouse = drone, warehouse
  18.  
  19. log.extend(sumilate(order, drone, warehouse))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement