1D Packing Problem of Different Lengths into Multiple Identical Larger Sections
I’m trying to build a Python script to return the optimal packing of different values into a set value sum. The end goal is to make a tool that can take the wholesale Length of a building material (e.g. Rebar (sold in 20′ sections) or Aluminum Extrusion (sold in 16′ sections)) and input specific pieces specified by a design (e.g. the design calls for 2 x 4-1/4″ sections, 5 x 48-1/2″, and 4 x 24-3/8″ pieces). The goal is to reduce wastage by varying the arrangement and how many plans are built (e.g., multiple houses, cabinets, or picture frames). I’m trying to find out what the optimal bulk quantity of the plan to offer to reduce material wastage.