feat(rank): add TOPSIS-based node ranking for VNE - #44
Open
stark256-spec wants to merge 1 commit into
Open
Conversation
Adds TOPSISNodeRank to virne/solver/rank/node_rank.py and the corresponding TOPSISRankSolver to virne/solver/heuristic/node_rank.py. The ranker treats each substrate node as a TOPSIS alternative whose criteria are its available resource attributes (CPU, memory, etc.) concatenated with the aggregate available bandwidth of its incident links. The TOPSIS closeness coefficient — proximity to the ideal resource profile — becomes the node ranking score used by the two-stage mapping pipeline. Algorithm: 1. Build decision matrix: node resources || aggregate link resources 2. Euclidean-normalise each criterion column 3. Apply equal weights across all criteria (all benefit-type) 4. Compute positive and negative ideal solutions 5. Score each node by dist_neg / (dist_pos + dist_neg) Usage: python main.py solver.solver_name=topsis_rank Docs: adds topsis_rank row to docs/source/solver/overview.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) node ranking algorithm and its corresponding two-stage solver to Virne.
What changes
virne/solver/rank/node_rank.py— newTOPSISNodeRankclass registered as'topsis':dist_neg / (dist_pos + dist_neg). Nodes closest to the ideal resource profile receive the highest score and are placed first during VNE.virne/solver/heuristic/node_rank.py— newTOPSISRankSolverregistered as'topsis_rank':TOPSISNodeRankinside the existingBaseNodeRankSolvertwo-stage pipeline.python main.py solver.solver_name=topsis_rank.docs/source/solver/overview.md— addstopsis_rankrow to the heuristics solver table.Motivation
TOPSIS is a well-established MCDM method for multi-criteria node selection that provides a principled distance-to-ideal scoring without requiring iterative convergence (unlike GRC or RW). It naturally handles heterogeneous resource dimensions and produces scores in
[0, 1]that are directly interpretable as embedding priority.