Skip to content

Simplify the assignment network by giving each case its supply - #24

Merged
soodoku merged 1 commit into
mainfrom
perf/supply-at-cases
Nov 21, 2026
Merged

soodoku merged 1 commit into
mainfrom
perf/supply-at-cases

Conversation

@soodoku

@soodoku soodoku commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T22:00:20.301794Z 49618fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@soodoku
soodoku merged commit 975e005 into main Nov 21, 2026
11 checks passed
@soodoku
soodoku deleted the perf/supply-at-cases branch November 21, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant