Cost optimization (multi-box)
Define up to three box options. We’ll find the least-cost mix meeting the required fasteners after overage.
| Label | Fasteners / box | Price / box | Currency | Remove |
|---|---|---|---|---|
Recommended mix
| Label | Boxes | Fasteners | Unit price | Subtotal |
|---|
Scenario table
Use Save scenario to append your current result. The first row below is an example.
| # | Scenario | Units | Areas (L×W) | Field spacing (X×Y) | Edge spacing (X×Y) | Rings | Corner extra | Overage % | Per box | Total after | Boxes |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Example A | Imperial | 20×10 | 8×8 | 6×6 | 1 | 0 | 5 | 250 | 1200 | 5 |
Formula used
Let each rectangular area have Length = L and Width = W. Choose base units to match spacing: inches (imperial) or centimeters (metric).
- Field grid (orthogonal):
rows = ⌊W / sy⌋ + 1,cols = ⌊L / sx⌋ + 1,grid = rows × cols. - Staggered rows: offset odd rows by
fx × sx; columns per row:⌊(L − δ)/sx⌋ + 1. - Staggered columns: offset odd columns by
fy × sy; rows per column:⌊(W − δ)/sy⌋ + 1. - 2D stagger (rows & columns): lattice points
(c·sx + δr, r·sy + δc)withδr = (r mod 2) ? fx·sx : 0andδc = (c mod 2) ? fy·sy : 0. Count points withx ≤ L,y ≤ W. - Diagonal grid (angle θ): project onto rotated axes
U,Vand count⌊U/sx⌋+1by⌊V/sy⌋+1. - Perimeter extras (orthogonal): additions beyond the field grid along edges using
ex,ey, and rings (excluding corners). - Diagonal perimeter bands: for band index
i, inset lengthsLi=max(L−2i·d,0),Wi=max(W−2i·d,0), wheredis ring inset; count2·max(⌊Li/ex⌋−1,0) + 2·max(⌊Wi/ey⌋−1,0)and sum over bands. - Corners:
cornerExtra = 4 × rings × cornerExtraPerCorner. - Totals: sum across areas; apply overage; box rounding as shown in the UI.
- Price optimization: choose non-negative integers of box options minimizing total cost while meeting required fasteners. We search combinations efficiently.
How to use
- Select units and enter box size and overage.
- Add one or more rectangular areas with length and width.
- Enter field spacing X (along length) and Y (along width).
- Optional: enable 2D stagger by checking both row and column staggering.
- Diagonal mode: set angle, enable perimeter bands, and set ring inset.
- Click Calculate to get fasteners, boxes, and leftovers.
- Use Optimize by price to find the cheapest box mix.
- Save the scenario, then export the table to CSV or PDF.