This is a variation on the knapsack problem.
In this case you have a series of crates of varying sizes, weights, stacking and rotation capabilities.
The container is a trailer that may have multiple levels and/or decking.
There may also be loading requirements:
- clearance between items for climate control issues.
- sequence for deliveries
This app will produce a series of diagrams with the crates placed in the trailer.
It works but could be nicer.