The useful material is already on the rack

Try Trimwise · Watch the 1:44 demonstration · Source and setup

Trimwise helps a small workshop turn its measured offcuts and next cutting list into a complete, checkable stock plan. The tool counts the saw loss and keeps the person cutting in control. It does not buy material or operate equipment.

The original prototype handled twelve pieces. Repeat Batches now accepts up to 120 pieces and eight distinct lengths, with explicit search budgets. More capacity is useful only if the software can distinguish a complete answer from an unfinished search.

Eighty pieces, every one accounted for

Choose 80-piece repeat batch in the working application. The synthetic job needs forty 600 mm and forty 900 mm rails. Completed search purchases 58.2 metres of new stock, compared with 72 metres from best-fit decreasing using the same demand and inventory. The 13.8-metre difference is a calculated plan comparison, not a measured avoided purchase or an industry-wide benchmark.

A separate material ledger accounts for all 80 pieces, 240 mm of saw loss, 210 mm of trim, 243 mm of short tails and 4,907 mm of potentially reusable tails. Unused rack inventory is not counted as waste prevented. A tail passing a user-defined reuse threshold is not guaranteed to be reused later.

The earlier seven-piece example and remeasurement workflow remain. Changing a measured length invalidates the old cut-sheet export. Rechecking preserves the original allocation and reports its shortage instead of quietly rearranging it.

A stopped search is not an optimum

Set the batch budget to 1 (demonstrate early stop). A complete baseline still fits, so Trimwise returns feasible, not proven optimal. Its cut sheet remains usable, but the purchase lower bound and remaining gap are visible. A zero purchase gap would not prove the secondary scrap objective optimal.

Now choose When greedy fails. With that tiny budget, no complete allocation is known. The result is unknown, not infeasible, and no partial cut sheet can be exported. Restoring the normal budget finds a complete allocation using only the existing remnants.

Only completed exhaustive search may report optimal or infeasible. The default batch limit is 200,000 counted operations, selectable up to one million, with a separate elapsed-time guard. Not every allowed 120-piece input will finish at an optimum within those limits.

Python is the engine, not decoration

The original small-job subset solver and new count-vector dynamic program are Python. The browser runs those same modules in a self-hosted CPython/Pyodide worker; JavaScript handles the interface, not substitute optimization results. Native command-line use needs no third-party Python runtime packages.

Repeated equal lengths share optimization states. Physically distinct remnants are processed once; remaining purchases use repeatable stock lengths. The objective minimizes new length, modeled scrap and used bars, in that order. Expanded outputs retain each original part identity and ordinal. Auto mode preserves the original exact solver for jobs of up to twelve pieces.

The independent ledger does not trust saved totals or solver state. It recomputes complete demand, stock identity, per-bar fit and exact conservation. Saved workspaces contain inputs and cut assignments. Reopening revalidates the allocation but does not restore an optimality or savings claim. CSV exports include every requested piece.

Executed verification

The v1.1 release passed 79 Python unit tests, all 100 original reference cases, 150 new individual-piece reference comparisons, and four larger integer-programming comparisons. The original 22 browser workflows and 18 new batch workflows also passed, for 40 actual browser workflows.

All 40 workflows passed again on the anonymous public deployment with its security policy enforced. Python, JavaScript, runtime files, example inputs, source archive and video matched the verified release hashes. The public 103.725-second demonstration fully decoded with non-silent audio.

The small-job reference is a separately implemented individual-piece/bin-assignment search. The larger reference is an independent integer pattern-count formulation using SciPy/HiGHS, with its own pattern enumeration and three sequential optimization stages. It checks 20-, 60-, 80- and 120-piece cases. SciPy is test-only and is not needed by the app. These numerical cross-checks are not a formal verification certificate.

Browser tests exercise actual CPython, including 80- and 120-piece jobs, budget-limited feasible and unknown results, invalid measurements, complete CSV exports, saved-workspace revalidation, mobile layout, and computation after network disconnection once loaded. There are no mocked solver responses.

Release evidence · Large-job reference comparison · Public verification

Scope, environment and next steps

One material/profile per job; integer millimetres; six distinct remnants; three purchasable lengths. Every detached piece uses a full kerf, including the last, plus the supplied total trim per used bar. This conservative convention may reject a cut possible under another process. No defects, grain, tolerances, stock prices, carbon accounting or machine control are modeled.

The approximately 13.5 MB self-hosted browser runtime loads initially. Inputs stay in the browser and computation works after disconnection while the page remains open. Offline browser reload is not implemented. The native Python command is the small, fully offline alternative.

The environmental hypothesis is reduced unnecessary new-stock use and better use of existing offcuts. No physical cuts, customer revenue, workshop savings or emissions reductions have been measured. The next test is an authorized workshop pilot comparing plans with actual stock used, retained reusable tails and measured scrap.

Created for PyStorm on September 8, 2026 with substantial AI assistance. This is the same Trimwise entry, upgraded before its deadline. Cutting-stock optimization and grouped dynamic programming are established techniques; the contribution is this working offcut-first application, independent ledger and explicit search-state workflow. Original code is MIT licensed; unchanged runtime components retain their own licenses and source links. The demo records actual application actions with disclosed stock Kokoro synthetic narration, not a cloned person's voice. The unrelated production portfolio is unchanged.

Download the release source and tests · Native/browser setup and method · Earlier small-job demonstration

The release archive preserves the tested build. The current branch additionally includes the later anonymous-deployment verification helper and its results.

Built With

Share this project:

Updates

Submission history