Repository navigation
chore: upgrade to pulp 4 - #171
Conversation
|
Hi, here are 2 issues I found with this branch:
|
The cbcbox wheel ships a CBC devel build that reports no version line, which failed the Dockerfile smoke check. Check that the binary runs instead. A solver error on the probe took the whole request down although the split still had the rest of the clock. The probe is a shortcut, so a failed one now falls through to the split, reported as 'split, probe failed'. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Thanks, both addressed in 3d81161. Version check: cbcbox 2.935 ships a CBC devel build ( Probe exception: I could not reproduce the non-zero exit, though. On the random MIP and on every captured test case with a 0.5 s time limit, cbcbox exits 0 on "Stopped on time limit", on both linux/amd64 and linux/arm64, with 1 and 4 threads. pulp raises exactly that error only when cbc's exit code is non-zero. If you can run the failing request with 🤖 Generated with Claude Code |
The strict compare pinned the slot of the partial charge, but the peak penalty only values the horizon maximum, so charging 50,50,50,50,20 and 50,20,50,50,50 are worth exactly the same. CBC 2.10 happened to pick the first, the devel build in cbcbox picks the second. A charging priority prefers the early fill and makes the expected schedule the only optimum on both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
CI on this branch was red since the first commit, unrelated to the two points above: strict case 027 pinned which slot gets the partial 20 Wh charge, but the peak penalty only values the horizon maximum, so both schedules are worth exactly the same (cost 149.4, preference -0.285 on either). CBC 2.10 picked the late remainder, the devel build in cbcbox picks the early one. Reproduced on linux/amd64 and fixed by giving the case a 🤖 Generated with Claude Code |
The cbcbox wheel of the pulp cbc extra ships a CBC devel build from the COIN-OR next branch. On the captured requests it solves 1.5 to 3 times slower than CBC 2.10.10: same iteration and node counts, but each LP iteration costs more. The image keeps installing the 2.10.10 release build on amd64, as before, and takes the Debian 2.10 package on arm64. pulp 4 resolves it from PATH. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
bc9200f drops the
pulp 4 itself is neutral. The cbcbox solver is what costs, and the cause is the build, not pulp:
So the extra is fine for a laptop, but production would pay 1.5 to 3× per solve for it. 🤖 Generated with Claude Code |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Correction on the cause split after looking at the instruction mix: 🤖 Generated with Claude Code |
Ports what main added since the branch forked to pulp 4: the LP floor of the tie break, the cost stage clock and gap log, the continuity stage and the stage timings. - the tie break pins integers by bounds only, a variable's category is fixed at creation - the cost bound carries its slack as a bounded variable, a row cannot change once added, so widening the slack is a bound change - the continuity candidate is a deep copy, its rows are written over the copy's variables by name and the schedule is carried back the same way - each stage keeps the stats of the schedule it leaves in the variables, so a split whose tie break was capped reports the cost stage's proven status when the tie break is not kept - the continuity tests seed the incumbent through bounds instead of rows they delete again
# Conflicts: # src/optimizer/optimizer.py # src/optimizer/settings.py
Upgrades to pulp 4.0.0, which moves the model into a Rust core, returns solve statistics instead of a status code and stops bundling CBC.
solve()returnsLpSolveStats:Optimalnow means proven, a run stopped by the clock reportsTimeLimitand carries what it found inhas_solution. CBC's "Optimal (within gap tolerance)" comes back asGapLimitand still counts as proven, the way pulp 3 read it. Each stage keeps the stats of the schedule it leaves in the variables, thesol_statusworkarounds are gone. The statuses the API reports are unchanged.pulp[cbc]extra, CBC 2.10.13 on every platform, which replaces the Dockerfile's CBC download and the symlink into pulp's solver directory.OPTIMIZER_CBC_PATHselects another binary: on this macOS 27 machine the kernel kills the cbcbox binary on larger models, a Homebrew cbc works.solve()rebuilds the model before it runs again. A variable no row uses comes back from the solver without a value and failsproblem.valid(), soz_s_max_reachedis only created for steps that have a demand.The continuity stage on the rollup branch shares variables between
problem.copy()and the original, which pulp 4 rejects; it needs the copy's ownvariablesDict()when it lands.🤖 Generated with Claude Code