2d Bin Packing Software S
I was hoping someone with an understanding of bin packing algorithms could explain how this can be achieved programmatically. 2D Bin Packing / Tile.
I've received a task to build a shipping estimative that suggests the best accomodation of goods on as few boxes as possible:. There is a finite set of known retangular box sizes. There are many arbitrary retangular item to be packed inside boxes. The fewer boxes should be used the best.
Because shipping two boxes 1x1x1 is way more expensive than one box 1x2x1. This should be the priority here. It should also be optimized to use the smaller boxes as possible, as a second level priority. (eg.: if presented with a choice between one bigger box and two small, it should choose the bigger box). Items can be rotated to fit the box, but the rotation have to be limited to increments of 45° at a minimum (in my researches it seems that some configurations allow for a 45 degrees rotation to better fit retangular boxes inside a bigger retangular box), being 90° rotations the standard to be taken. I think all @msw is saying is that this type of problem is unlikely a good fit for a 'perfect' solution, but rather a better fit for an acceptable solution found in a reasonable amount of time with heuristics based on the rules you've provided.
From a mathematical viewpoint, this often means you approach it with a different set of algorithms and tools, so I think he's just recommending that. For example, genetic algorithms, simulated annealing, and other methods of following a gradient descent curve approximating the solution space with respect to your heuristic might provide benefits here. – Oct 9 '14 at 3:50.
Bin packing is very computationally difficult. Think of half of the problem: you want to pack product in shipping boxes with no wastage in the box. An optimal solution for that would require going through all possible subsets and all possible 3d arrangements of the product that needs to ship in one truck. I'll give you the optimal solution for that because I have a friend who does six impossible things before breakfast. Now you just have to get all the boxes on the truck with no wastage. My friend does his second impossible thing and gives you the solution. Unfortunately, with the box sizes you selected above, there is empty space in the truck which could be reduced if you'd chosen different (either larger or smaller) boxes in the first task.
If you change the size of one box, at best you'll have to re-pack the truck; at worst, you may have to repack all of the boxes which is just as hard as the problem we started with. And, as with the first stage, you'd have to try all possible 3d arrangements.
I found Skiena's The to be helpful for thinking about what class of algorithms suit which sorts of problems, but I mostly learned that good solutions for even mundane problems blow up in you face with computational difficulty. Most of what you are needing fit into the class of and that article is a good jumping off point. It is worth noting that some of the best algorithms for this are commercial products because this task pops up everywhere in logistics (what's the smallest number of train cars can I get my goods into? There is considerable money to be made if the right heuristics can save a manufacturer 100 train cars a month. Unfortunately, the literature on optimizing heuristics isn't nearly as large as for algorithms. If you try to go it alone, I guarantee that you'll be dreaming about moving rectangular prisms around by your second month. I had a cutting-stock problem that if I had to do again I'd probably farm out to the experts (or their propriety software).
Thanks to @JTrana for the fine expansion of my comment. I think we have a miscomunication here. I may not have expressed me well (as you may have noticed, English isn't my home language).
I'm not asking for stealing the algorithms. I've came here for clarification on the subject. I've done some research and put it on the example above for analisys.
Maybe there is someone that came upon the same problems that can give me some better directions. If my solution isn't applicable, what I can do to get better results? This is my real question up there. I hope I've made me clearer now. – Oct 10 '14 at 19:28.
Your English is fine; I think the problem is that we are talking about different layers of the task. You are thinking implementation and I am thinking combinatorial explosion. I think solving your Edit 2 will help you better understand the problem from the way I'm looking at it. Can you solve that as stated? Without wastage, with a minimal number of boxes of the minimal size?
That's the multioptimization problem I mentioned before which I said is impossible to do: you will have to sacrifice at least one of those factors to optimize another. – Oct 10 '14 at 20:07. I think I got it now.
2d Bin Packing
I didn't tried to code it. I was thinking in not wasting time coding before a more concrete solution or at least a positive feedback over my proposal arise since this is, at first, for a quotation. I'm still researching but I'm afraid I'll have to get one of those APIs and see if the devices (data collectors running Win CE 6.0) can run connected to the internet.
3d Bin Packing
The first info I got from the client stated that they will not have internet access on the workplace. – Oct 10 '14 at 22:33.
We need a 2d bin packing program. There is.NET code available at url removed, login to view for bin packing.
I have several enhancements which need to be added to this software. Enhancements - 1) sizes need to go to 4 decimal places and outer rectangle needs to be configurable up to 60x100. 2) there should be a button which loops through all methods to find the best result. I need to be able to configure the procedure which calls those methods so that only certain methods are included so when I'm doing 20 rectangles I don't get stuck with the methods which will take forever.
3) there should be a loop which tries to get a better result by switching the height and width values (same as 90 degree rotation) of every rectangle. If there's 8 rectangles, that's only 64 combinations. 4) ability to log the results 5) ability to print layout ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment-Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. B) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered 'work made for hire' under U.S. Copyright law.
Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. Unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform vb.net Skills:, See more:,.