Puzzle: Warehouse Staffing

Puzzle: Warehouse Staffing

Rhine, the E-commerce giant of DS City, has a problem. While the warehouse incurs more costs than it should due to overstaffing, overtime is still a regular occurrence that happens about twice per week. You are to optimize the staffing decisions for a particular packaging line.

The line in question handles two types of orders, cosmetics and electronics. Packers fall into three groups. The first group are cosmetic experts and handle a cosmetics order, with typically several smaller items that need to be placed and protected well, in 2 minutes. But they are not efficient when it comes to packing larger, bulkier electronics, for which they need 5 minutes. The electronic experts manage these orders in a mere 3 minutes, but they require 4 minutes for cosmetics orders. Finally, there are all-rounders that can package cosmetics in 3 and electronics in 4 minutes.

Rhine employs ten packers in each of the three categories that can be assigned to the line. One packer costs $200 per 8-hour shift. All orders arrive in bulks of 10 (by pickers who collect the SKUs for each order and bring them to the packaging line). A bulk of 10 cosmetic orders arrives, on average, every 2.5 minutes (distributed as 1 + EXP(2/3) minutes, where EXP(lambda) is the exponential distribution with mean 1/lambda). A bulk of 10 electronic orders arrives every 5 minutes on average (2 + EXP(1/3) minutes). The last orders arrive at the latest ten minutes before the end of the shift. If there is a backlog of orders, these must be handled during overtime of maximally 1 hour of extra work for the entire line.

The workers have complained about overtime taking place too often, even though they get compensated with $40 extra should the line not finish all orders by the end of the shift. Rhine has agreed to reducing the probability of overtime to at most 20%.

Looking at this line in isolation, how many workers in each category of packers do we assign to the line, and how do they distribute their work as the different types of orders start to pile up?

Do you have a solution? Are you quite sure the probability of overtime is less than 20%?

Seeker provides this solution after 90 seconds (AMD EPYC 7763 64-Core Processor):

  • Cosmetic Experts: 9
  • Electronic Experts: 7
  • All-rounders: 0
  • Expected Costs: $3203.28
  • Overtime Probability: 8.2%

To distribute the work, we use a simple policy that looks at these features for a given package and type of expert:

  • Number of packages of the given type that the given types of experts can handle before the end of the shift.
  • Time the given employee type needs to package the given category divided by the product of the number of workers in this category and the fastest packaging time for this category over all employee types.
  • The slowest packaging time for the given package category over all employee types times the number of employees in the given category divided by the time the given employee type needs to package the given package category.
  • 0/1 features, 1 if and only if at least one employee of the given type is currently idle.

When using these features to select the employee type that the package will be assigned to as the one with maximum score, Seeker assigns these weights to them:

[0.00865, -0.46235, 0, 0.8173]

We let the employee in this category who is free first handle the package.

Seeker therefore favors the worker category that is currently partly idle and generally assigns work to the employees that can handle the given package the fastest, unless this category of workers already looks at a backlog that gets it very close to the end of the shift.

With this policy and staffing decisions, Seeker expects the cosmetics experts to finish the shift 5 minutes early and the electronics experts to finish 6 minutes early. The cosmetics experts are expected to handle, on average, 1867 cosmetics packages and 27 electronics packages (2070 and 66, maximally). The electronic experts are expected to handle, on average, 10 cosmetics packages and 909 electronics packages (39 and 1081, maximally).

A Colab with the Seeker model is here.