Code for solving bin packing problems