Repository navigation
Simplify the assignment network by giving each case its supply - #24
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis 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.
Every case supplies exactly one unit of flow. The original model adds a source node supplying n units and n arcs of capacity one, one to each case. All n of those arcs must carry one unit in every feasible solution. Giving each case a supply of one removes n fixed variables and one equality row while preserving the assignment costs, capacities, queue budgets and the interpretation of queue prices.
Using the project's locked NumPy 2.5.2 / SciPy 1.18.0, both versions passed all 49 tests, including enumeration of every feasible assignment in small instances, priced budgets and the dual certificate. With four queues and 256 cases the median public solve fell from 2.503 to 2.068 ms without a flip constraint and 15.751 to 15.313 ms with it. On the two measured workloads at 32 and at 256 cases the chosen assignments and reported objective were identical. A tied optimum can admit several equally good assignments.
For transparency, the machine's older, unlocked SciPy 1.16.3 failed the same two small constrained-assignment tests on both versions. All timings above and both passing test runs used the project lock.