简体   繁体   English

最小成本存储分配优化问题的最优解是什么?

[英]What is the optimal solution for minimum cost storage assignment optimisation problem?

I have been trying to find a solution for the following assignment problem:我一直在尝试为以下分配问题找到解决方案:

  • There are "S" storage rooms.有“S”个储藏室。 Each storage room, "s", has a capacity "Cs".每个储藏室“s”都有一个容量“Cs”。
  • There are "P" packages.有“P”包。 Each package, "p", has a size "Zp"每个 package,“p”,大小为“Zp”
  • The cost to store a package "p" in a storage room "s" is "Tps"在储藏室“s”中存储 package“p”的成本是“Tps”
  • One storage room can take multiple packages,as long as their total size don't exceed the room's capacity "Cs".一个储藏室可以放多个包裹,只要它们的总大小不超过房间的容量“Cs”。
  • One package can't be split among multiple storage rooms.一个 package 不能在多个储藏室中拆分。

The problem is to assign the packages to the storage room so as to minimise the total cost.问题是将包裹分配到储藏室以最小化总成本。

My thoughts:我的想法:

  • I have made a cost matrix.我做了一个成本矩阵。
  • I have thought maybe it might be solved using the Hungarian algorithm.我想也许可以使用匈牙利算法来解决。 I think it is not applicable because there is an upper limit for the storage room capacity我认为它不适用,因为储藏室容量有上限
  • I thought maybe it can be treated as a transportation optimisation problem.我想也许可以将其视为运输优化问题。 I think it is not applicable because the package can't be split among several storage rooms.我认为它不适用,因为 package 不能在几个储藏室中拆分。

This problem is NP-hard by a reduction from the set partition problem.这个问题是 NP 难的,通过减少集合划分问题。 In that problem, you're given a set S of positive integers, and the goal is to split it into two sets that have the same sum.在那个问题中,给定一组正整数 S,目标是将它分成两个总和相同的集合。

You can reduce that problem to this one as follows.您可以按如下方式将该问题简化为这个问题。 Given a set S, sum up its elements to get their total 2n, which we assume is even.给定一个集合 S,将其元素相加得到它们的总数 2n,我们假设它是偶数。 Now create three storage rooms, two of size n and one of size 2n.现在创建三个储藏室,两个大小为 n,一个大小为 2n。 Call the two rooms of size n the “main rooms,” and the room of size 2n the “overflow room.”将大小为 n 的两个房间称为“主房间”,将大小为 2n 的房间称为“溢出房间”。 For each element of the set S, create an item to store whose size is equal to its value.对于集合 S 的每个元素,创建一个要存储的项目,其大小等于其值。 Finally, assign costs as follows: the cost of placing any item into one of the two main rooms is zero, and the cost of placing any item into the overflow room is 1.最后,分配成本如下:将任何物品放入两个主要房间之一的成本为零,将任何物品放入溢出房间的成本为 1。

Now, think about the cheapest way to place items.现在,想想最便宜的放置物品的方式。 If there is a partition of S into two equal sets, then you can place the items in the main rooms at cost 0 using that partition.如果将 S 分成两个相等的集合,那么您可以使用该分区以成本 0 将物品放置在主房间中。 Similarly, if you can place the items into the rooms at cost 0, then you must not have put any items into the overflow room, and so you have split the items in a way that perfectly fills the two main rooms - a partition.类似地,如果您可以以 0 的成本将物品放入房间,那么您一定没有将任何物品放入溢出房间,因此您以完美填充两个主要房间的方式拆分物品 - 一个分区。

A Mixed-Integer Programming model can look like:混合整数编程 model 可以如下所示:

 min sum((p,s),T[p,s]*x[p,s])
 sum(p, Z[p]*x[p,s]) <= C[s]    ∀s
 sum(s, x[p,s]) = 1             ∀p
 x[p,s] ∈ {0,1}

This can be solved with any MIP solver.这可以用任何 MIP 求解器来解决。 These assignment models tend to be fairly easy to solve.这些分配模型往往相当容易解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM