Assume that we would want to develop a warehouse management system, which picks up plastic boxes and stacks them on a pallet. A pallet has a maximum of $5$ vertical box stacks and the maximum height of a box stack is $1400\,\textrm{mm}$.
There are three box sizes with varying heights (other dimensions are the same). The heights of the boxes are $170\,\textrm{mm}$, $200 \,\textrm{mm}$, and $270\,\textrm{mm}$. An item can be placed in only one type of box. All boxes are compatible to stack with each other.
There are only two objectives: the number of completed pallets should be minimal, and the height difference of towers of boxes can be at most $500\,\textrm{mm}$ between any of the five box stacks.
The goal is to design a warehouse management program which takes the order as an input, that is, the information of ordered items and how many boxes have been ordered. The program should determine how many boxes of each product should be stacked on a determined pallet and on a specific stack. A single product is always associated with only one box type.
How should one construct this kind of a program? I'm looking for general design guidelines and the methods to achieve the desired result. All tips and words of advice are welcome. I appreciate your effort.