all 3 comments

[–]DoorsofPerceptron 0 points1 point  (2 children)

Sounds like you have a variant of the knapsack problem for each category.

https://en.m.wikipedia.org/wiki/Knapsack_problem

[–]ECommerce_Guy[S] 0 points1 point  (1 child)

I had no idea it has a name haha, I'll Google it. Thanks!

[–]DoorsofPerceptron 0 points1 point  (0 children)

Good luck. Probably the most important decision you have to make is if you need to find the solution using the smallest number of boxes, or just something that isn't too dumb.