bin-packing

How can I programmatically determine how to fit smaller boxes into a larger package? [closed]

痞子三分冷 提交于 2019-12-17 07:08:07
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 months ago . Does anyone know of existing software or algorithms to calculate a package size for shipping multiple items? I have a bunch of items in our inventory database with length, width and height dimesions defined. Given these dimensions I need to calculate how many of the purchased

Packing items into fixed number of bins

社会主义新天地 提交于 2019-12-12 11:05:01
问题 I am looking for an algorithm that will solve my problem in the most efficient way. Problem description: I have a list of items (only positive integers are allowed) and fixed number of bins of identical capacity. So far, I thought about branch-and-bound algorithm, but I am not quite sure if it is the best approach in this case. Example: Given a list of items: (3, 4, 4, 2, 3, 9, 2) and three bins of capacity 9 each I need to pack them this: (order of items is irrelevant) [3, 4, 2], [4, 3, 2],

2D bin packing with predefined gaps in container

房东的猫 提交于 2019-12-12 05:12:27
问题 I have a problem with optimal placing of rectangular objects with different size and amount in rectangular container. The problem can be perfectly solved with the one of 2D bin packing algorithms but only on empty container. For me it is almost always not a case. My containers can have a restricted places where no object can be placed. Packing example Surely I am not the first one who encountered this kind of problem and I hope someone already developed a good solution for it. Anything is

Bin Packing regarding Optimization and Decision Versions

和自甴很熟 提交于 2019-12-11 09:38:14
问题 I'm studying for an exam and we were given a set of practice problems. Here's one I'm struggling with and I hope somebody can help shed some light on the right approach to this problem: Here's my initial go at the problem: Decision Version: To find the optimal solution using the decision version, I would try using various K's until I got a yes answer. Let's say the optimized solution is 7, I would try : k=1, no k=2, no k=3, no k=4, no k=5, no k=6, no k=7, yes. So now that we know that the

Dynamic Programming Problem.. Array Partitioning..

微笑、不失礼 提交于 2019-12-11 03:15:51
问题 The question says, That given an array of size n, we have to output/partition the array into subsets which sum to N. For E,g, I/p arr{2,4,5,7}, n=4, N(sum) = 7(given) O/p = {2,5}, {7} I saw similar kind of problem/explanation in the url Dynamic Programming3 And I have the following queries in the pdf:- How could we find the subsets which sum to N, as the logic only tells whether the subset exist or not? Also, if we change the question a bit, can we find two subsets which has equal average

One-dimensional binpacking algorithm with relative costs

≯℡__Kan透↙ 提交于 2019-12-11 03:13:02
问题 I'm wondering how to solve "One-dimensional binpacking problem with relative costs". We pack N volumes (with given sizes) into M bins (with given capacities) and have the matrix (NxM) of costs of each volume per each bin. So, the total cost should be minimized. Can you advice any algorithm for solving this? Or, probably, any open-source lib for doing this? Thanks! 回答1: If the problem under consideration is the generalized assignment problem, it is NP -hard but admits an approximation

Detecting gaps in grid of divs

亡梦爱人 提交于 2019-12-10 09:42:27
问题 EDIT The solution has been found! Here's a blog post about it, and here is the Github repo! I am working on creating a grid of divs that is composed of multiple sized boxes, these sizes are set height's and widths - but are generated dynamically so each time the page is loaded there is a different grid. My problem - I tried using Masonry, but it winds up leaving gaps, also tried isotope. I am currently floating the elements left which is causing for the breaks in the layout. How it's built -

Detecting gaps in grid of divs

早过忘川 提交于 2019-12-05 14:30:33
EDIT The solution has been found! Here's a blog post about it, and here is the Github repo ! I am working on creating a grid of divs that is composed of multiple sized boxes, these sizes are set height's and widths - but are generated dynamically so each time the page is loaded there is a different grid. My problem - I tried using Masonry, but it winds up leaving gaps, also tried isotope. I am currently floating the elements left which is causing for the breaks in the layout. How it's built - I calculate the screen dimensions and determine the best column count for the page ranging from 1 to 6

Algorithm needed for distributing rectangles evenly within another rectangle

孤人 提交于 2019-12-05 02:21:47
问题 I am looking for an algorithm that can help distribute different sized rectangles within a larger rectangle while minimizing overlapping. I have looked at bin packing algorithms, but they seem to minimize the amount of space between rectangles (in my case the all of the items being packed will be squares). I guess I want to maximize the distance between all squares and the border of the outer rectangle. Here is an example of what I am trying to do: 回答1: What if you packed them as tightly as

Bin packing Python query with variable bin cost and sizes

久未见 提交于 2019-12-04 22:37:48
I'm currently working on a problem that requires a variation of the bin packing problem. My problem is different in that the number of bins is finite. I have three bins, the smallest one costs the least to put an object into, the medium bin is slightly more expensive than the small box, and the third box has theoretically unlimited capacity but is prohibitively more expensive to place an item into. I was able to find a Python script online that solves the bin problem in a similar manner. My question is how can I rewrite the script to get closer to my original problem? The script in question