背包多重约束 [英] Knapsack multiple constraint

查看:67
本文介绍了背包多重约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们正在寻求按照以下描述在javascript或jquery中开发背包算法

•每个产品都有长度,宽度,高度。

•我们有多个盒子(多种尺寸)。每个盒子的内部大小可以变化

•每个盒子都有最大重量和最大体积(可变)

•当用户添加到购物车并在shopify中结账时,我们希望能够以最佳方式在各自的盒子中对购物车中的物品进行分类。这意味着每个盒子都装有购物车中的哪些物品。

•也在后端,对于我们的运费计算,我们需要知道每个盒子大小的盒子数量



我们欢迎所有有经验的背包联系我们:EMAIL REMOVED



我的尝试:



我们尝试背包0-1:意味着最大重量(1个约束)取最大值

解决方案

hi,
we are looking to developing a knapsack algorithm in javascript or jquery as per below description
• every product have length, width, height.
• we have multiple boxes (multiple sizes) . inner size of each box can be variable
• every box have a maximal weight and maximal volume (variable)
• when user add to cart and goes to checkout in shopify, we want to be able to sort the items in cart in respective boxes the most optimal way. meaning each box holds which items in the cart.
• also in the backend, for our shipping calculation we need the know the number of boxes per each box size

we welcome all knapsack experienced to contact us on: EMAIL REMOVED

What I have tried:

we tried knapsack 0-1 : meaning max weight (1 contraint) to take max $ value

解决方案

value


这篇关于背包多重约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆