Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getBestRoutes
- O = set of available routes
- remove routes from O where allocation is nos possible
- for route in O
- calculate capacity ( taken slices in route / all slices in route )
- remove routes from O where capacity is worse than best capacity for N
- return O
- Algorithm:
- A = queue of demands
- while A is not empty
- R = getBestRoutes
- if R is not empty
- choosenRoute = random from R
- allocate required slices on every link from R
- mark demand as served
- else
- mark demand as rejected
- pop demand
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement