mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-29 06:51:06 -04:00
The benchmark built stock from spacing and quadrant only, so engines were scored on clamp-free sheets and baselines were never checked against the clamps they were made with. Stock now comes from NestStockBuilder.FromTemplate, as in desktop Auto Nest: the source plate's rail is resolved for every candidate size (explicit zones are offered unchanged), and baseline plates keep their rail and removed clamps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
1.8 KiB
Markdown
13 lines
1.8 KiB
Markdown
# Benchmarking whole-job engines
|
|
|
|
`OpenNest.Benchmark` runs each registered `INestingEngine` against `.nest` files or JSON manifests of DXFs and quantities. It ranks complete jobs first, then salvage-credited sheet cost with a penalty for each unplaced part. Invalid runs (bounds, spacing, quantity, rotation, or stock mismatch) place nothing and pay the penalty.
|
|
|
|
```bash
|
|
dotnet run --project OpenNest.Benchmark -- ./benchmark-jobs \
|
|
--sheet-sizes 48x96,60x120,72x120 --engines Irregular,Rectangles --csv results.csv
|
|
```
|
|
|
|
Supply `--sheet-sizes` for an independent candidate pool; otherwise a saved nest offers only its original sheet sizes, which can bias comparisons. A saved nest's first plate also supplies spacing, quadrant and clamps: its machine clamp rail is resolved for every candidate size, as desktop Auto Nest does, and its baseline layout is checked against the clamps it was made with. Manifests have no clamps. A saved nest records its salvage rate, but salvage credit applies only with a positive `--min-salvage-dimension`. Without it, every complete one-sheet layout costs the same, as in desktop Auto Nest on a single plate size. The default `--parallel 3` runs solves concurrently and confounds per-engine timing; use `--parallel 1` for timing comparisons. `--progress` logs each solve's start, engine progress, and finish. Retain input hashes, exact commands, validity, fulfillment, costs, and raw results outside source control when comparing revisions; see [fill performance verification](fill-verification.md).
|
|
|
|
Custom engines are DLLs implementing `INestingEngine` with a public parameterless constructor, loaded from `Engines/` beside the benchmark executable. See [nesting engines](../nesting-engines.md) for built-ins and engine-change rules. Run `dotnet run --project OpenNest.Benchmark -- --help` for all options.
|