mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-01 02:01:34 -05:00
Add tested caller-stock StockLadder baseline with strict geometry validation
This commit is contained in:
1 parent
9b69c67572
commit
ea4bd836cd
11 files changed
+759
-11
No files matched your search
@@ -48,13 +48,13 @@ namespace OpenNest.Benchmark
|
||||
/// engine owns its own multi-plate/size strategy; this harness no
|
||||
/// longer picks plate sizes on the engine's behalf.
|
||||
/// </summary>
|
||||
public NestJob BuildNestJob(int maxPlates)
|
||||
public NestJob BuildNestJob(int maxPlates, double salvageRate = 0, double minimumSalvageDimension = 0)
|
||||
{
|
||||
var parts = Requests.Select(r =>
|
||||
DrawingJobMapper.FromDrawing(r.Drawing.Id.ToString(), r.Drawing, r.Quantity));
|
||||
var stock = CandidateSizes.Select(size =>
|
||||
new NestPlateStock(size.ToString(1), size, null, PartSpacing, EdgeSpacing, Quadrant));
|
||||
return new NestJob(parts, stock, new NestJobOptions("Default", maxPlates));
|
||||
return new NestJob(parts, stock, new NestJobOptions("Default", maxPlates, salvageRate, minimumSalvageDimension));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user