kytos-ng / pathfinder

Kytos main path finder Network Application (NApp)
https://kytos-ng.github.io/api/pathfinder.html
MIT License
0 stars 7 forks source link

Add SPF Tie Breakers #59

Open Ktmi opened 11 months ago

Ktmi commented 11 months ago

Currently when pathfinder searches for a path it returns all paths that have the minimum total weight for the given spf attribute. It would be nice if we could further narrow down the selection of paths by including a tiebreaker, or list of tiebreakers, that will eliminate paths by applying additional metrics to them.

For example if I have 3 possible paths with the given total weights:

path_a = {'hop': 2, 'delay': 30, 'priority': 2}
path_b = {'hop': 2, 'delay': 20, 'priority': 1}
path_c = {'hop': 3 'delay': 20, 'priority': 2}

And we wanted the path with the lowest hop count, we would get back both path_a and path_b. If we add in a tiebreaker based on delay, we would then get only path_b.