Repository navigation
Add LDG: Locality-Dominant Greedy heuristic for VNE under load - #58
Merged
Merged
Conversation
LDGSolver embeds each request by joint place-and-route: virtual nodes are ordered by total demand ((node + 2 x adjacent link demands) x (degree + 1), descending), and each node goes to the best-scoring feasible substrate candidate, scored by cpu_free^0.25 * adj_bw_free * (1 + 8 * prox), where proximity to already-placed neighbors is weighted by link demand over hop distance. The top five candidates are tried with available_shortest routing, and a request that dead-ends is rolled back and retried once in BFS order before rejection. Locality dominates the score by design: under heavy load link bandwidth is the binding resource, and scattering a request across the substrate costs more than picking a marginally richer node. Long-term average time revenue on held-out streams (arrival rate 0.12, seeds 42/137/2024): ldg 9299 / 9815 / 9701 (acceptance ~0.79) pl_rank 8233 / 8360 / 8294 nrm_rank 7025 / 7438 / 7424 At this load LDG exceeds pl_rank by +12.9/+17.4/+17.0% per stream and lands within 2.7% of a trained PPO policy on average, while remaining a purely classical, deterministic algorithm with no learned components. Co-Authored-By: Claude Code <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
What
Adds
ldg(Locality-Dominant Greedy), a new heuristic solver (LDGSolver,virne/solver/heuristic/ldg.py) for virtual network embedding under heavy load.How it works
(node resource demand + 2 x adjacent link bandwidth demand) x (degree + 1), descending — so the heavy, well-connected cores are placed first while contiguous capacity remains.score(p) = cpu_free(p)^0.25 * adj_bw_free(p) * (1 + 8 * prox(p)), whereprox(p)sums(1 + link demand / 25) / (1 + hops)over already-placed virtual neighbors (hop distances from an all-pairs BFS cache; the substrate topology is static).available_shortestrouting; a request that dead-ends is rolled back and retried once in BFS order from its heaviest node before rejection. Locality dominates the score by design: under heavy load link bandwidth is the binding resource, and scattering a request across the substrate costs more than picking a marginally richer node.Results
Long-term average time revenue on held-out simulation streams (arrival rate 0.12, 1000 v-nets each):
Why add it
pl_rank) by +12.9% / +17.4% / +17.0% per stream (mean +15.8%), and closes most of the gap to learned policies: within 2.7% of a trained PPO policy on average.ldgrun is the identical algorithm).Registered as
solver_name='ldg', exported fromvirne.solver.heuristicasLDGSolver.🤖 Generated with Claude Code
Co-Authored-By: Claude Code noreply@anthropic.com