So I have been given the task to create a shipping module for a webshop system. It may be a bit overkill, but I would really like to create one that can figure out how to pa
This an old question, but just in case somebody stumbles upon this... there is python library called pyshipping that solves this problem:
https://pypi.python.org/pypi/pyShipping
The fact that you have height, length and width makes it harder than a simple knapsack problem. Here's an interesting discussion of a 3D knapsack problem.
Here's a paper on the topic by the same guys.
This seems a good problem to which to apply the simplex algorithm or some sort of genetic algorithm. If you never heard of the latter, I highly recommend you to read about them. As I can see from your question, you're doing this enhancement because you like to make things work optimally, and not because you were told to do so. Imagine when you tell them you applied an Artificial Intelligence technique for solving their problem!
There are many straight-forward algorithms that solve your problem, but this can be a great opportunity to learn some evolutionary computation. Some interesting links about genetic algorithms [everyone, feel free to edit and add]:
Luck with that!
Manuel
That’s your typical knapsack problem. Many solutions for different languages can be found at Rosetta Code.