Hi everybody,
I would like to code an algorithm to optimize truck loading (minimizing loading meter).
I read many articles about it, thesis, pseudo codes... It's about the well known bin packing problem :
Bin packing problem - Wikipedia
Since I don't want to reinvent the wheel, I searched for an existing code and found the one enclosed : "container.c" written 20 years ago.
Here is the link to its creator David Pisinger codes page :
Codes
(Many thanks to him for permitting me to discuss about it on forums)
I download and tested it, it works great. I used the enclosed file "loading.c" (I only added main function) to run on Online C Compiler - online editor
But I would like to implement 3 constraints :
- A box can not be placed over a smaller one
- Boxes can only be rotaded along a vertical axis, meaning I can only swap width and depth, not height
- Some boxes may not be stackable
I am convinced this is not a big deal, but I am a complete noob in C... So any help would be gratefully appreciated !
Hope somebody will have time to help me ; thanks for reading.