# CutNesting 1D Benchmark Methodology v1.0.0 — Node/WASM reference

## Scope

This methodology measures the material accounting, feasibility, solver status,
and execution time of CutNesting's one-dimensional production solver on a
fixed synthetic corpus.

It does not compare other products and does not claim that every result is a
global optimum. An optimal claim is permitted only when the returned
`solverStatus` is `optimal`.

## Production engine boundary

The recorded reference run called `optimize_cut_plan` in a fixed production
WebAssembly binary. Results identify the execution target as `node-wasm` and
retain the engine's source commit and SHA-256 fingerprint as measurement
provenance. The public downloads contain inputs, methodology, complete plans
and results; the executable engine, JavaScript bindings and runner are not
distributed as benchmark downloads.

These timings describe Node/WASM execution on the reported machine. Browser
initialization, workers, messaging and rendering are outside the measurement.
The product's separate native Rust runner continues to use `native-rust`.

## Material definitions

- `stockInputLength`: full length of every used stock piece.
- `finishedPartLength`: total length of placed required parts.
- `kerfLossLength`: modeled material removed between cuts.
- `trimLossLength`: modeled start and end trim on used stock.
- `leftoverLength`: unused usable length after parts, kerf, and trim.
- `reusableRemnantLength`: leftover on plans meeting the declared threshold.
- `scrapLeftoverLength`: leftover below the declared threshold.
- `processLossLength`: kerf plus trim.
- `disposableMaterialLength`: process loss plus scrap leftover.
- `finishedPartYieldPercent`: finished parts divided by stock input.
- `recoveryAdjustedEfficiencyPercent`: finished parts plus reusable remnants,
  divided by stock input.
- `disposableMaterialPercent`: disposable material divided by stock input.

The validator enforces, within 0.001 base-unit tolerance:

```text
stockInputLength
= finishedPartLength
 + kerfLossLength
 + trimLossLength
 + reusableRemnantLength
 + scrapLeftoverLength
```

The production field `totalWaste` is interpreted as `leftoverLength`. The
production field `wastePercent` includes all stock not converted into finished
parts, including kerf and trim. Public benchmark output therefore uses the
unambiguous names above.

## Feasibility and validation

The validator independently checks that:

- Every required piece is placed exactly once or reported as unplaced.
- Used stock matches a declared stock definition and does not exceed inventory.
- Part IDs and lengths match the input.
- Kerf, trim, usable length, and leftover balance for every stock piece.
- Reusable/scrap classes match the declared threshold.
- Summary counts, lengths, and percentages equal recomputed values.
- The case's expected unplaced range and allowed solver statuses are met.

The validator uses its own serialized result types and accounting functions. It
does not call the production solver's summary-building functions.

## Timing

The default local run performs three warmups followed by 30 measured executions
per case. Timing surrounds the synchronous WASM call, including Rust JSON parsing and
result serialization. JavaScript result parsing and validation occur outside
the timed interval. The engine is initialized once before all warmups.

Reports include every raw duration plus p50 and p95. Short verification runs may
override the counts but must record the actual policy. Strict runtime ceilings
are not part of this suite because arbitrary CI hardware is not a stable public
reference machine.

## Provenance and independent review

The published reference report records:

- Suite and methodology versions.
- SHA-256 input and engine fingerprints and the engine source commit.
- Execution target, Node version, OS, CPU, core and memory details.
- Warmup and measured run counts.
- Raw timings and normalized metrics.
- Full production plans, warnings and validation outcomes.

The report retains its original measurement metadata. Historical executable
fingerprints identify the engine used for that run; they are not download links.
The current integrity manifest covers the public data and result files.

The public inputs and full plans support independent review of placement and
material accounting, and allow other implementations to use the same corpus.
Running CutNesting's recorded engine independently is not part of this public
distribution. Future reference measurements belong under a new versioned path;
local native reports from dirty source checkouts remain diagnostic.
