寻找一种算法来展示如何将最多的盒子放入容器中
我一直有兴趣编写一个应用程序,该应用程序将展示如何将盒子(随机尺寸)放入容器中,以便留下尽可能小的空间。一个现实生活中的例子将告诉您如何充分利用 UPS 卡车的空间。有谁知道这样的事情有一个好的起点吗?是否有现有的算法可以完成与我所说的类似的事情?
I've been interested in writing an application that will show how to fit boxes (of random dimensions) in a container so there is as little space as possible left. A real life example would be something that would tell you how to use the most space in a UPS truck. Does anyone know of a good place to start for something like this? Is there an existing algorithm that does something similar to what I'm talking about?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您所指的是一个经典的计算机科学问题,称为装箱,它是一个 NP-Hard 定义的问题,具有众所周知的研究和启发式方法,但最终绝对计算它的唯一方法是通过计算每种可能的组合。
阅读 http://en.wikipedia.org/wiki/Bin_packing_problem
What you are referring to is a classic computer science problem known as bin packing, it is an NP-Hard defined problem with well known research and heuristics, but ultimately the only way of calculating it absolutely is via computation of every combination possible.
Read up on http://en.wikipedia.org/wiki/Bin_packing_problem