Mixed-Length Bar Nesting (Cutting Stock)

What barstock-cutlist says it does not do.

Run the calculator

Example

You enter

You get

No published worked example is on file for this calculation. It is checked against a hand-worked derivation of its method.

Details, formula, and sources

Scope"Mixed-length nesting, end trim, and clamping loss are not modeled." One piece length is division; several at once is packing, and the question becomes which pieces share a stick. Sorted longest-first and dropped into the first stick with room, a list of 4 at 62 in, 6 at 38, 9 at 27, and 12 at 14.5 nests into 4 sticks of 20 ft at 93.0% yield -- and the first stick comes out at ZERO drop, 62+62+62+38+14.5 plus four kerfs filling 239 in exactly. Longest-first is what makes it work: the big pieces have the least flexibility, so they get placed while every stick is empty and the short ones fill the gaps. Kerf is charged per CUT, so a stick cut clean to its end takes one fewer than a stick with drop left. Reports the pattern for every stick, the longest single drop worth saving, and a material lower bound -- with an honest note when the heuristic may not be optimal.

Formula or tableusable = stock - end trim; pieces sorted descending; first-fit-decreasing places each piece in the first stick where used + length + (kerf if the stick is not empty) <= usable, opening a new stick otherwise; total kerf = sum over sticks of (pieces on that stick - 1) x kerf; drop = total stock - part - kerf - trim; yield = part / total stock; lower bound = ceil((total part + (pieces - sticks) x kerf) / usable).

Source and editionOne-dimensional cutting-stock, packed by the first-fit-decreasing heuristic - a standard, near-optimal bin-packing method, not a proprietary nesting algorithm.

Free accessFirst-fit-decreasing is textbook combinatorial optimization; nothing here is licensed or tabulated.

What governsEstimate. AHJ and licensed professional govern.

API field namescut_list, stock_length_in, kerf_in, end_trim_in, sticks, total_pieces, usable_in, total_stock_in, total_piece_in, total_kerf_in, total_trim_in, total_drop_in, yield_pct, longest_drop_in, theoretical_min_sticks

Related tools