Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. getBestRoutes
  2. O = set of available routes
  3.  
  4. remove routes from O where allocation is nos possible
  5.  
  6. for route in O
  7. calculate capacity ( taken slices in route / all slices in route )
  8.  
  9. remove routes from O where capacity is worse than best capacity for N
  10.  
  11. return O
  12.  
  13. Algorithm:
  14. A = queue of demands
  15. while A is not empty
  16. R = getBestRoutes
  17.  
  18. if R is not empty
  19. choosenRoute = random from R
  20. allocate required slices on every link from R
  21. mark demand as served
  22. else
  23. mark demand as rejected
  24.  
  25. pop demand
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement