Cutting use case #6
Replies: 1 comment
-
This is an NP hard / complete? problem, you won't be able to come up with an algo that always gives you the optimal solution. This packer uses the guillotine algo, and from the next version heuristics to give you possible solutions. Check out the PR about this, you will find pictures of the different heuristics. https://github.com/Padam87/bin-packer/pull/5/files I'm from a printing background, so I know this area well. You will need to run as many variations as your runtime allows to find the best solution. Ideally, you should cache results. So if you need a production run of 140, 10xA + 10xB might be the most efficient approach. (If sheet A costs less than B). It might end up being that 17xB and 1xA combo is the cheapest. In these cases you will also have to consider the cost of human intervention... changing the machine for a single sheet usually costs too much, so don't forget to add that to your material costs, and compare as a whole, get the cheapest. Also, people in the shop usually like to have options, so it is a good idea to list all possible solutions, and they will choose based on the sheets they have available ATM. So all in all: You don't try to calculate the whole 140 run at once. Just have to find the best organization for each sheet, and figure out how many sheets / combination of sheets you need. Calculate the max theoretical fit of the product by dividing the area of the sheet by the product's, and try to fit that. For example, if sheet B could fit 10 by area, you should try to pack 10, and it will give you back the result with 8 packed. (This is all assuming same sized items - which is usually the case, but not always. Gets pretty messy when you have to optimize for multiple sizes, and multiple quantities of each type, that would take far too long to write down :)) |
Beta Was this translation helpful? Give feedback.
-
Hello. I've a new project for a furniture industry customer that they need to know how many plywood sheet tables they need to produce a factory item.
I know how many blocks (parts) they need to cut to produce it. I know the size of one bin (plywood sheet table to cut).
How can I calculate all the necessary bins to produce the whole item? Ideally I need to represent (visualize as images) a collection of bins each ones well optimized.
I must implement and algorithm by myself to do it properly? Or can be a feature interesting to implement in this project? I can provide a PR..
Beta Was this translation helpful? Give feedback.
All reactions