Commit 3f421d63 authored by cedgar's avatar cedgar
Browse files

small fix

parent 3e908bf3
......@@ -716,12 +716,12 @@ feel free to implement a different algorithm.
We propose the following algorithm:
1. if the reservation (addition or modification) fits in the current network we do the same than before.
1. if the reservation (addition or modification) fits in the current network we do the same as before.
2. if the reservation (addition or modification) does not fit in the current network:
1. remove (`virtually`) all the reservations with a lower priority than the requested one. Hint: you don't need to remove them from switches, you can just remove its capacities.
2. Check if now, (without the low priority reservations) the requested reservation fits the network.
3. if it fits, add or modify it. Now, take all the reservations with lower priority that you `virtually` removed, and allocate them starting with the ones with the highest priority. Some will remain in the same path, some will be moved to a new path, and some, if they don't fit anymore, will be deleted.
4. if it does not fit, if there is an existing entry for this reservation, delete it.
4. if it does not fit, and there is an existing entry for this reservation, delete it.
> Hint: make sure `self.links_capacity` is updated properly in each of your steps. Sometimes, when you virtually remove
reservations you will have to add the capacity to links.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment